/*
 * Copyright (c) 2018 Samsung Electronics Co., Ltd All Rights Reserved
 *
 * Licensed under the Apache License, Version 2.0 (the License);
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an AS IS BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef __TIZEN_APPFW_WATCHFACE_COMPLICATION_PROVIDER_H__
#define __TIZEN_APPFW_WATCHFACE_COMPLICATION_PROVIDER_H__

#include <tizen.h>
#include <app_control.h>

#include <watchface-complication.h>

#ifdef __cplusplus
extern "C" {
#endif

/**
 * @file watchface-complication-provider.h
 * @brief This file contains APIs for Complication provider.
 */

/**
 * @addtogroup WATCHFACE_COMPLICATION_PROVIDER_MODULE
 * @{
 */

/**
 * @brief Called when a watchface complication requests data update.
 * @details Watchface application which sends an update request will receive
 *          share_data through watchface_complication_updated_cb()'s data
 *          parameter after this callback is finished.
 * @since_tizen 5.0
 * @remarks The @a share_data should not be released.
 * @param[in] provider_id The id of the provider
 *            The @a provider_id can be used only in the callback. To use outside, make a copy.
 * @param[in] req_appid The name of the watchface that update request
 *            The @a req_appid can be used only in the callback. To use outside, make a copy.
 * @param[in] type Complication Type
 * @param[in] context The data set in the setting app for the provider
 *            The @a context can be used only in the callback. To use outside, make a copy.
 * @param[in] share_data The data to update. This data will be shared with
 *            watchface application.
 *            The @a share_data is managed by the platform and will be released after this callback is finished.
 * @param[in] user_data The user data passed from the callback function
 * @see watchface_complication_provider_add_update_requested_cb()
 * @see watchface_complication_updated_cb()
 *
 * @par Sample code:
 * @code
#include <watchface-complication-provider.h>
void _watchface_complication_provider_update_requested_cb(
	const char *provider_id, const char *req_appid,
	watchface_complication_type_e type, const bundle *context,
	bundle *shared_data, void *user_data)
{
	char num_str[128] = {0, };
	int num = rand();

	if (type == WATCHFACE_COMPLICATION_TYPE_SHORT_TEXT) {
		if (strcmp(provider_id, AIR_POLLUTION_PROVIDER_ID) == 0) {
			snprintf(num_str, sizeof(num_str), "air %d", num % 200);
			watchface_complication_provider_data_set_short_text(
				shared_data, num_str);
		} else if (strcmp(provider_id, BATTERY_PROVIDER_ID) == 0) {
			snprintf(num_str, sizeof(num_str),
					"battery %d", num % 100);
			watchface_complication_provider_data_set_short_text(
				shared_data, num_str);
		}
	}
}

bool app_create(void *data)
{
	watchface_complication_provider_add_update_requested_cb(
			BATTERY_PROVIDER_ID,
			_watchface_complication_provider_update_requested_cb,
			NULL);
	watchface_complication_provider_add_update_requested_cb(
			AIR_POLLUTION_PROVIDER_ID,
			_watchface_complication_provider_update_requested_cb,
			NULL);
	return true;
}

* @endcode
*/
typedef void (*watchface_complication_provider_update_requested_cb)(
			const char *provider_id, const char *req_appid,
			watchface_complication_type_e type, const bundle *context,
			bundle *share_data, void *user_data);

/**
 * @brief Adds the callback function to be executed when the update requested.
 * @since_tizen 5.0
 * @privlevel public
 * @privilege %http://tizen.org/privilege/datasharing
 * @remarks Since 5.5, %http://tizen.org/privilege/datasharing is required.
 * @param[in] provider_id The id of the provider
 * @param[in] callback The callback function
 * @param[in] user_data The user data passed from the callback function
 * @return #WATCHFACE_COMPLICATION_ERROR_NONE if success, other value if failure
 * @retval #WATCHFACE_COMPLICATION_ERROR_NONE Success
 * @retval #WATCHFACE_COMPLICATION_ERROR_NOT_SUPPORTED Not supported
 * @retval #WATCHFACE_COMPLICATION_ERROR_PERMISSION_DENIED Permission denied
 * @retval #WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER Invalid parameter
 * @retval #WATCHFACE_COMPLICATION_ERROR_OUT_OF_MEMORY Out of memory
 * @retval #WATCHFACE_COMPLICATION_ERROR_IO_ERROR I/O error
 * @retval #WATCHFACE_COMPLICATION_ERROR_DB Database error
 * @see watchface_complication_provider_remove_update_requested_cb()
 * @par Sample code:
 * @code
#include <watchface-complication-provider.h>
{
	watchface_complication_provider_add_update_requested_cb("PROVIDER_ID",
			_watchface_complication_provider_update_requested_cb, NULL);
}
 * @endcode
 */
int watchface_complication_provider_add_update_requested_cb(
			const char *provider_id,
			watchface_complication_provider_update_requested_cb callback,
			void *user_data);

/**
 * @brief Removes a callback function.
 * @since_tizen 5.0
 * @param[in] provider_id The id of the provider
 * @param[in] callback The callback function
 * @return #WATCHFACE_COMPLICATION_ERROR_NONE if success, other value if failure
 * @retval #WATCHFACE_COMPLICATION_ERROR_NONE Success
 * @retval #WATCHFACE_COMPLICATION_ERROR_NOT_SUPPORTED Not supported
 * @retval #WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER Invalid parameter
 * @see watchface_complication_provider_add_update_requested_cb()
 * @par Sample code:
 * @code
#include <watchface-complication-provider.h>
{
	watchface_complication_provider_remove_update_requested_cb("PROVIDER_ID",
			_watchface_complication_provider_update_requested_cb);
}
 * @endcode
 */
int watchface_complication_provider_remove_update_requested_cb(
			const char *provider_id,
			watchface_complication_provider_update_requested_cb callback);

/**
 * @brief Notifies to the complication that there is an update.
 * @details Complication automatically requests data when notify is received.
 * @since_tizen 5.0
 * @privlevel public
 * @privilege http://tizen.org/privilege/datasharing
 * @param[in] updated_provider_id The id of the provider
 * @return #WATCHFACE_COMPLICATION_ERROR_NONE if success, other value if failure
 * @retval #WATCHFACE_COMPLICATION_ERROR_NONE Success
 * @retval #WATCHFACE_COMPLICATION_ERROR_NOT_SUPPORTED Not supported
 * @retval #WATCHFACE_COMPLICATION_ERROR_PERMISSION_DENIED Permission denied
 * @retval #WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER Invalid parameter
 * @retval #WATCHFACE_COMPLICATION_ERROR_IO_ERROR I/O error
 * @retval #WATCHFACE_COMPLICATION_ERROR_OUT_OF_MEMORY Out of memory
 * @par Sample code:
 * @code
#include <watchface-complication-provider.h>
{
	const char *provider_id = "org.tizen.comp_provider/battery";

	watchface_complication_provider_notify_update(provider_id);
}
 * @endcode
 */
int watchface_complication_provider_notify_update(
			const char *updated_provider_id);

/**
 * @brief Sends reply to the editor.
 * @details Using this function, setup app can sends new context data to the editor
 * @since_tizen 5.0
 * @privlevel public
 * @privilege http://tizen.org/privilege/datasharing
 * @remarks This function is for complication provider's setup application which
 *          specified in provider app's manifest file with setup-appid attribute.
 * @param[in] handle The editable handle
 * @param[in] context The new context data of complication provider.
 * @return #WATCHFACE_COMPLICATION_ERROR_NONE on success,
 *         otherwise an error code (see #watchface_complication_error_e) on failure
 * @retval #WATCHFACE_COMPLICATION_ERROR_NONE Successful
 * @retval #WATCHFACE_COMPLICATION_ERROR_NOT_SUPPORTED Not supported
 * @retval #WATCHFACE_COMPLICATION_ERROR_PERMISSION_DENIED Permission denied
 * @retval #WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER Invalid parameter
 * @retval #WATCHFACE_COMPLICATION_ERROR_OUT_OF_MEMORY Out of memory
 * @retval #WATCHFACE_COMPLICATION_ERROR_IO_ERROR I/O error
 * @see complication_provider_setup_get_context()
 * @par Sample code:
 * @code
#include <watchface-complication-provider.h>

{
	bundle *b = bundle_create();
	bundle_add_str(b, "REGION_DATA", "KR");
	watchface_complication_provider_setup_reply_to_editor(handle, b);
	bundle_free(b);
}
 * @endcode
 */
int watchface_complication_provider_setup_reply_to_editor(app_control_h handle,
			bundle *context);

/**
 * @brief Checks whether watch app request editing or not.
 * @details Using this function, setup app can tell what kind of UI should be displayed
 * @since_tizen 5.0
 * @remarks This function is for complication provider's setup application which
 *          specified in provider app's manifest file with setup-appid attribute.
 * @param[in] handle The editable handle
 * @param[out] is_editing The value that tell it's editing mode.
 * @return #WATCHFACE_COMPLICATION_ERROR_NONE on success,
 *         otherwise an error code (see #watchface_complication_error_e) on failure
 * @retval #WATCHFACE_COMPLICATION_ERROR_NONE Successful
 * @retval #WATCHFACE_COMPLICATION_ERROR_NOT_SUPPORTED Not supported
 * @retval #WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER Invalid parameter
 * @retval #WATCHFACE_COMPLICATION_ERROR_OUT_OF_MEMORY Out of memory
 * @see complication_provider_setup_reply_to_editor()
 * @par Sample code:
 * @code
#include <watchface-complication-provider.h>
void app_control(app_control_h app_control, void *data)
{
	bool is_editing;

	watchface_complication_provider_setup_is_editing(app_control, &is_editing);
	if (is_editing) {
		watchface_complication_provider_setup_get_context(handle, &b);
		// Draw complication provider app's current setting state.
	}
}
 * @endcode
 */
int watchface_complication_provider_setup_is_editing(app_control_h handle,
			bool *is_editing);

/**
 * @brief Gets provider app's setup context data.
 * @details Context data will be passed to the complication provider application
 *          through the app_control event callback's app_control_h handle parameter
 * @since_tizen 5.0
 * @remarks This function is for complication provider's setup application which
 *          specified in provider app's manifest file with setup-appid attribute.
 * @remarks The @a context should be released using bundle_free().
 * @param[in] handle The editable handle
 * @param[out] context app's setup context data
 * @return #WATCHFACE_COMPLICATION_ERROR_NONE on success,
 *         otherwise an error code (see #watchface_complication_error_e) on failure
 * @retval #WATCHFACE_COMPLICATION_ERROR_NONE Successful
 * @retval #WATCHFACE_COMPLICATION_ERROR_NOT_SUPPORTED Not supported
 * @retval #WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER Invalid parameter
 * @retval #WATCHFACE_COMPLICATION_ERROR_OUT_OF_MEMORY Out of memory
 * @see complication_provider_setup_reply_to_editor()
 * @par Sample code:
 * @code
#include <watchface-complication-provider.h>
void app_control(app_control_h app_control, void *data)
{
	bundle *b;

	watchface_complication_provider_setup_get_context(app_control, &b);
	// Draw complication provider app's current setting state.
}
 * @endcode
 */
int watchface_complication_provider_setup_get_context(app_control_h handle,
			bundle **context);

/**
 * @brief Sets short text data for shared data.
 * @since_tizen 5.0
 * @remarks @a short_text data can be added only for #WATCHFACE_COMPLICATION_TYPE_SHORT_TEXT,
 *          #WATCHFACE_COMPLICATION_TYPE_RANGED_VALUE, #WATCHFACE_COMPLICATION_TYPE_TIME type shared data.
 * @param[in] shared_data The data which will be shared with watch application
 * @param[in] short_text The short text data
 * @return #WATCHFACE_COMPLICATION_ERROR_NONE on success,
 *         otherwise an error code (see #watchface_complication_error_e) on failure
 * @retval #WATCHFACE_COMPLICATION_ERROR_NONE Successful
 * @retval #WATCHFACE_COMPLICATION_ERROR_NOT_SUPPORTED Not supported
 * @retval #WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER Invalid parameter
 * @retval #WATCHFACE_COMPLICATION_ERROR_OUT_OF_MEMORY Out of memory
 * @retval #WATCHFACE_COMPLICATION_ERROR_IO_ERROR I/O error
 * @see watchface_complication_type_e
 * @par Sample code:
 * @code
#include <watchface-complication-provider.h>
void _watchface_complication_provider_update_requested_cb(const char *provider_id,
		const char *req_appid, watchface_complication_type_e type,
		const bundle *context, bundle *shared_data, void *user_data)
{
	if (type == WATCHFACE_COMPLICATION_TYPE_SHORT_TEXT)
		watchface_complication_provider_data_set_short_text(shared_data, "text data");
}
 * @endcode
 */
int watchface_complication_provider_data_set_short_text(bundle *shared_data,
			const char *short_text);

/**
 * @brief Sets long text data for shared data.
 * @since_tizen 5.0
 * @remarks @a long_text can be added only for #WATCHFACE_COMPLICATION_TYPE_LONG_TEXT type shared data.
 * @param[in] shared_data The data which will be shared with watch application
 * @param[in] long_text The long text data
 * @return #WATCHFACE_COMPLICATION_ERROR_NONE on success,
 *         otherwise an error code (see #watchface_complication_error_e) on failure
 * @retval #WATCHFACE_COMPLICATION_ERROR_NONE Successful
 * @retval #WATCHFACE_COMPLICATION_ERROR_NOT_SUPPORTED Not supported
 * @retval #WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER Invalid parameter
 * @retval #WATCHFACE_COMPLICATION_ERROR_OUT_OF_MEMORY Out of memory
 * @retval #WATCHFACE_COMPLICATION_ERROR_IO_ERROR I/O error
 * @see watchface_complication_type_e
 * @par Sample code:
 * @code
#include <watchface-complication-provider.h>
void _watchface_complication_provider_update_requested_cb(const char *provider_id,
		const char *req_appid, watchface_complication_type_e type,
		const bundle *context, bundle *shared_data, void *user_data)
{
	if (type == WATCHFACE_COMPLICATION_TYPE_LONG_TEXT)
		watchface_complication_provider_data_set_long_text(shared_data, "long text data");
}
 * @endcode
 */
int watchface_complication_provider_data_set_long_text(bundle *shared_data,
			const char *long_text);

/**
 * @brief Sets title data for shared data.
 * @since_tizen 5.0
 * @remarks @a title can be added only for #WATCHFACE_COMPLICATION_TYPE_SHORT_TEXT,
 *          #WATCHFACE_COMPLICATION_TYPE_LONG_TEXT, #WATCHFACE_COMPLICATION_TYPE_RANGED_VALUE type shared data.
 * @param[in] shared_data The data which will be shared with watch application
 * @param[in] title The title text data
 * @return #WATCHFACE_COMPLICATION_ERROR_NONE on success,
 *         otherwise an error code (see #watchface_complication_error_e) on failure
 * @retval #WATCHFACE_COMPLICATION_ERROR_NONE Successful
 * @retval #WATCHFACE_COMPLICATION_ERROR_NOT_SUPPORTED Not supported
 * @retval #WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER Invalid parameter
 * @retval #WATCHFACE_COMPLICATION_ERROR_OUT_OF_MEMORY Out of memory
 * @retval #WATCHFACE_COMPLICATION_ERROR_IO_ERROR I/O error
 * @see watchface_complication_type_e
 * @par Sample code:
 * @code
#include <watchface-complication-provider.h>
void _watchface_complication_provider_update_requested_cb(const char *provider_id,
		const char *req_appid, watchface_complication_type_e type,
		const bundle *context, bundle *shared_data, void *user_data)
{
	if (type == WATCHFACE_COMPLICATION_TYPE_SHORT_TEXT)
		watchface_complication_provider_data_set_title(shared_data, "title");
}
 * @endcode
 */
int watchface_complication_provider_data_set_title(bundle *shared_data,
			const char *title);

/**
 * @deprecated Deprecated since 5.5. Use watchface_complication_provider_data_set_timeinfo() instead.
 * @brief Sets timestamp data for shared data.
 * @since_tizen 5.0
 * @remarks @a timestamp can be added only for #WATCHFACE_COMPLICATION_TYPE_TIME type shared data.
 * @param[in] shared_data The data which will be shared with watch application
 * @param[in] timestamp The timestamp data
 * @return #WATCHFACE_COMPLICATION_ERROR_NONE on success,
 *         otherwise an error code (see #watchface_complication_error_e) on failure
 * @retval #WATCHFACE_COMPLICATION_ERROR_NONE Successful
 * @retval #WATCHFACE_COMPLICATION_ERROR_NOT_SUPPORTED Not supported
 * @retval #WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER Invalid parameter
 * @retval #WATCHFACE_COMPLICATION_ERROR_OUT_OF_MEMORY Out of memory
 * @retval #WATCHFACE_COMPLICATION_ERROR_IO_ERROR I/O error
 * @see watchface_complication_type_e
 * @par Sample code:
 * @code
#include <watchface-complication-provider.h>
void _watchface_complication_provider_update_requested_cb(const char *provider_id,
		const char *req_appid, watchface_complication_type_e type,
		const bundle *context, bundle *shared_data, void *user_data)
{
	time_t seconds;

	if (type == WATCHFACE_COMPLICATION_TYPE_TIME) {
		seconds = time(NULL);
		watchface_complication_provider_data_set_timestamp(shared_data, seconds);
	}
}
 * @endcode
 */
int watchface_complication_provider_data_set_timestamp(bundle *shared_data,
			long timestamp) TIZEN_DEPRECATED_API;

/**
 * @brief Creates timeinfo data.
 * @since_tizen 5.5
 * @remarks @a info can be added only for #WATCHFACE_COMPLICATION_TYPE_TIME type shared data.
 * @remarks The @a info should be released using watchface_complication_provider_timeinfo_destroy().
 * @param[out] info The time information handle
 * @return #WATCHFACE_COMPLICATION_ERROR_NONE on success,
 *         otherwise an error code (see #watchface_complication_error_e) on failure
 * @retval #WATCHFACE_COMPLICATION_ERROR_NONE Successful
 * @retval #WATCHFACE_COMPLICATION_ERROR_NOT_SUPPORTED Not supported
 * @retval #WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER Invalid parameter
 * @retval #WATCHFACE_COMPLICATION_ERROR_OUT_OF_MEMORY Out of memory
 * @see watchface_complication_provider_timeinfo_set_timezone()
 * @see watchface_complication_provider_timeinfo_set_timezone_id()
 * @see watchface_complication_provider_timeinfo_set_timezone_country()
 * @see watchface_complication_provider_timeinfo_set_timezone_city()
 * @see watchface_complication_provider_timeinfo_destroy()
 * @see watchface_complication_provider_data_set_timeinfo()
 * @par Sample code:
 * @code
#include <watchface-complication-provider.h>
void _watchface_complication_provider_update_requested_cb(const char *provider_id,
		const char *req_appid, watchface_complication_type_e type,
		const bundle *context, bundle *shared_data, void *user_data)
{
	if (type == WATCHFACE_COMPLICATION_TYPE_TIME) {
		complication_time_info_h info;
		watchface_complication_provider_timeinfo_create(&info);
		watchface_complication_provider_timeinfo_destroy(info);
	}
}
 * @endcode
 */
int watchface_complication_provider_timeinfo_create(complication_time_info_h *info);

/**
 * @brief Sets timezone information.
 * @since_tizen 5.5
 * @remarks @a info can be added only for #WATCHFACE_COMPLICATION_TYPE_TIME type shared data.
 * @param[in] info The time information handle
 * @param[in] timezone The timezone string
 * @return #WATCHFACE_COMPLICATION_ERROR_NONE on success,
 *         otherwise an error code (see #watchface_complication_error_e) on failure
 * @retval #WATCHFACE_COMPLICATION_ERROR_NONE Successful
 * @retval #WATCHFACE_COMPLICATION_ERROR_NOT_SUPPORTED Not supported
 * @retval #WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER Invalid parameter
 * @retval #WATCHFACE_COMPLICATION_ERROR_OUT_OF_MEMORY Out of memory
 * @retval #WATCHFACE_COMPLICATION_ERROR_IO_ERROR I/O error
 * @see watchface_complication_provider_timeinfo_create()
 * @see watchface_complication_provider_timeinfo_set_timezone_id()
 * @see watchface_complication_provider_timeinfo_set_timezone_country()
 * @see watchface_complication_provider_timeinfo_set_timezone_city()
 * @see watchface_complication_provider_timeinfo_destroy()
 * @see watchface_complication_provider_data_set_timeinfo()
 * @par Sample code:
 * @code
#include <watchface-complication-provider.h>
void _watchface_complication_provider_update_requested_cb(const char *provider_id,
		const char *req_appid, watchface_complication_type_e type,
		const bundle *context, bundle *shared_data, void *user_data)
{
	if (type == WATCHFACE_COMPLICATION_TYPE_TIME) {
		complication_time_info_h info;
		watchface_complication_provider_timeinfo_create(&info);
		watchface_complication_provider_timeinfo_set_timezone(info, "UTC+9");
		watchface_complication_provider_timeinfo_destroy(info);
	}
}
 * @endcode
 */
int watchface_complication_provider_timeinfo_set_timezone(complication_time_info_h info,
            const char *timezone);

/**
 * @brief Sets timezone id.
 * @since_tizen 5.5
 * @remarks @a info can be added only for #WATCHFACE_COMPLICATION_TYPE_TIME type shared data.
 * @param[in] info The time information handle
 * @param[in] timezone_id The timezone id which is specified in TZ database
 * @return #WATCHFACE_COMPLICATION_ERROR_NONE on success,
 *         otherwise an error code (see #watchface_complication_error_e) on failure
 * @retval #WATCHFACE_COMPLICATION_ERROR_NONE Successful
 * @retval #WATCHFACE_COMPLICATION_ERROR_NOT_SUPPORTED Not supported
 * @retval #WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER Invalid parameter
 * @retval #WATCHFACE_COMPLICATION_ERROR_OUT_OF_MEMORY Out of memory
 * @retval #WATCHFACE_COMPLICATION_ERROR_IO_ERROR I/O error
 * @see watchface_complication_provider_timeinfo_set_timezone()
 * @see watchface_complication_provider_timeinfo_create()
 * @see watchface_complication_provider_timeinfo_set_timezone_country()
 * @see watchface_complication_provider_timeinfo_set_timezone_city()
 * @see watchface_complication_provider_timeinfo_destroy()
 * @see watchface_complication_provider_data_set_timeinfo()
 * @par Sample code:
 * @code
#include <watchface-complication-provider.h>
void _watchface_complication_provider_update_requested_cb(const char *provider_id,
		const char *req_appid, watchface_complication_type_e type,
		const bundle *context, bundle *shared_data, void *user_data)
{
	if (type == WATCHFACE_COMPLICATION_TYPE_TIME) {
		complication_time_info_h info;
		watchface_complication_provider_timeinfo_create(&info);
		watchface_complication_provider_timeinfo_set_timezone_id(info, "Asia/Seoul");
		watchface_complication_provider_timeinfo_destroy(info);
	}
}
 * @endcode
 */
int watchface_complication_provider_timeinfo_set_timezone_id(complication_time_info_h info,
            const char *timezone_id);

/**
 * @brief Sets timezone country information.
 * @since_tizen 5.5
 * @remarks @a info can be added only for #WATCHFACE_COMPLICATION_TYPE_TIME type shared data.
 * @param[in] info The time information handle
 * @param[in] country The timezone country information
 * @return #WATCHFACE_COMPLICATION_ERROR_NONE on success,
 *         otherwise an error code (see #watchface_complication_error_e) on failure
 * @retval #WATCHFACE_COMPLICATION_ERROR_NONE Successful
 * @retval #WATCHFACE_COMPLICATION_ERROR_NOT_SUPPORTED Not supported
 * @retval #WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER Invalid parameter
 * @retval #WATCHFACE_COMPLICATION_ERROR_OUT_OF_MEMORY Out of memory
 * @retval #WATCHFACE_COMPLICATION_ERROR_IO_ERROR I/O error
 * @see watchface_complication_provider_timeinfo_set_timezone()
 * @see watchface_complication_provider_timeinfo_set_timezone_id()
 * @see watchface_complication_provider_timeinfo_create()
 * @see watchface_complication_provider_timeinfo_set_timezone_city()
 * @see watchface_complication_provider_timeinfo_destroy()
 * @see watchface_complication_provider_data_set_timeinfo()
 * @par Sample code:
 * @code
#include <watchface-complication-provider.h>
void _watchface_complication_provider_update_requested_cb(const char *provider_id,
		const char *req_appid, watchface_complication_type_e type,
		const bundle *context, bundle *shared_data, void *user_data)
{
	if (type == WATCHFACE_COMPLICATION_TYPE_TIME) {
		complication_time_info_h info;
		watchface_complication_provider_timeinfo_create(&info);
		watchface_complication_provider_timeinfo_set_timezone_country(info, "Korea");
		watchface_complication_provider_timeinfo_destroy(info);
	}
}
 * @endcode
 */
int watchface_complication_provider_timeinfo_set_timezone_country(complication_time_info_h info,
            const char *country);

/**
 * @brief Sets timezone city information.
 * @since_tizen 5.5
 * @remarks @a info can be added only for #WATCHFACE_COMPLICATION_TYPE_TIME type shared data.
 * @param[in] info The time information handle
 * @param[in] city The timezone city information
 * @return #WATCHFACE_COMPLICATION_ERROR_NONE on success,
 *         otherwise an error code (see #watchface_complication_error_e) on failure
 * @retval #WATCHFACE_COMPLICATION_ERROR_NONE Successful
 * @retval #WATCHFACE_COMPLICATION_ERROR_NOT_SUPPORTED Not supported
 * @retval #WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER Invalid parameter
 * @retval #WATCHFACE_COMPLICATION_ERROR_OUT_OF_MEMORY Out of memory
 * @retval #WATCHFACE_COMPLICATION_ERROR_IO_ERROR I/O error
 * @see watchface_complication_provider_timeinfo_set_timezone()
 * @see watchface_complication_provider_timeinfo_set_timezone_id()
 * @see watchface_complication_provider_timeinfo_set_timezone_country()
 * @see watchface_complication_provider_timeinfo_create()
 * @see watchface_complication_provider_timeinfo_destroy()
 * @see watchface_complication_provider_data_set_timeinfo()
 * @par Sample code:
 * @code
#include <watchface-complication-provider.h>
void _watchface_complication_provider_update_requested_cb(const char *provider_id,
		const char *req_appid, watchface_complication_type_e type,
		const bundle *context, bundle *shared_data, void *user_data)
{
	if (type == WATCHFACE_COMPLICATION_TYPE_TIME) {
		complication_time_info_h info;
		watchface_complication_provider_timeinfo_create(&info);
		watchface_complication_provider_timeinfo_set_timezone_city(info, "Seoul");
		watchface_complication_provider_timeinfo_destroy(info);
	}
}
 * @endcode
 */
int watchface_complication_provider_timeinfo_set_timezone_city(complication_time_info_h info,
            const char *city);

/**
 * @brief Destroys timezone handle.
 * @since_tizen 5.5
 * @param[in] info The time information handle
 * @return #WATCHFACE_COMPLICATION_ERROR_NONE on success,
 *         otherwise an error code (see #watchface_complication_error_e) on failure
 * @retval #WATCHFACE_COMPLICATION_ERROR_NONE Successful
 * @retval #WATCHFACE_COMPLICATION_ERROR_NOT_SUPPORTED Not supported
 * @retval #WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER Invalid parameter
 * @see watchface_complication_provider_timeinfo_set_timezone()
 * @see watchface_complication_provider_timeinfo_set_timezone_id()
 * @see watchface_complication_provider_timeinfo_set_timezone_country()
 * @see watchface_complication_provider_timeinfo_set_timezone_city()
 * @see watchface_complication_provider_timeinfo_create()
 * @see watchface_complication_provider_data_set_timeinfo()
 * @par Sample code:
 * @code
#include <watchface-complication-provider.h>
void _watchface_complication_provider_update_requested_cb(const char *provider_id,
		const char *req_appid, watchface_complication_type_e type,
		const bundle *context, bundle *shared_data, void *user_data)
{
	if (type == WATCHFACE_COMPLICATION_TYPE_TIME) {
		complication_time_info_h info;
		watchface_complication_provider_timeinfo_create(&info);
		watchface_complication_provider_timeinfo_destroy(info);
	}
}
 * @endcode
 */
int watchface_complication_provider_timeinfo_destroy(complication_time_info_h info);


/**
 * @brief Sets time information data to shared data.
 * @since_tizen 5.5
 * @remarks @a info can be added only for #WATCHFACE_COMPLICATION_TYPE_TIME type shared data.
 * @param[in] shared_data The data which will be shared with watch application
 * @param[in] info The time information handle
 * @return #WATCHFACE_COMPLICATION_ERROR_NONE on success,
 *         otherwise an error code (see #watchface_complication_error_e) on failure
 * @retval #WATCHFACE_COMPLICATION_ERROR_NONE Successful
 * @retval #WATCHFACE_COMPLICATION_ERROR_NOT_SUPPORTED Not supported
 * @retval #WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER Invalid parameter
 * @retval #WATCHFACE_COMPLICATION_ERROR_OUT_OF_MEMORY Out of memory
 * @retval #WATCHFACE_COMPLICATION_ERROR_IO_ERROR I/O error
 * @see watchface_complication_provider_timeinfo_create()
 * @see watchface_complication_provider_timeinfo_set_timezone()
 * @see watchface_complication_provider_timeinfo_set_timezone_id()
 * @see watchface_complication_provider_timeinfo_set_timezone_country()
 * @see watchface_complication_provider_timeinfo_set_timezone_city()
 * @see watchface_complication_provider_timeinfo_destroy()
 * @par Sample code:
 * @code
#include <watchface-complication-provider.h>
void _watchface_complication_provider_update_requested_cb(const char *provider_id,
		const char *req_appid, watchface_complication_type_e type,
		const bundle *context, bundle *shared_data, void *user_data)
{
	if (type == WATCHFACE_COMPLICATION_TYPE_TIME) {
		complication_time_info_h info;
		watchface_complication_provider_timeinfo_create(&info);
		watchface_complication_provider_timeinfo_set_timezone(info, "UTC+9");
		watchface_complication_provider_data_set_timeinfo(shared_data, info);
		watchface_complication_provider_timeinfo_destroy(info);
	}
}
 * @endcode
 */
int watchface_complication_provider_data_set_timeinfo(bundle *shared_data,
            complication_time_info_h info);

/**
 * @brief Sets image path data for shared data.
 * @since_tizen 5.0
 * @remarks @a image_path can be added only for #WATCHFACE_COMPLICATION_TYPE_IMAGE type shared data.
 * @remarks @a image_path should be relative path like shared/res/image.png.
 * @param[in] shared_data The data which will be shared with watch application
 * @param[in] image_path The image path data
 * @return #WATCHFACE_COMPLICATION_ERROR_NONE on success,
 *         otherwise an error code (see #watchface_complication_error_e) on failure
 * @retval #WATCHFACE_COMPLICATION_ERROR_NONE Successful
 * @retval #WATCHFACE_COMPLICATION_ERROR_NOT_SUPPORTED Not supported
 * @retval #WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER Invalid parameter
 * @retval #WATCHFACE_COMPLICATION_ERROR_OUT_OF_MEMORY Out of memory
 * @retval #WATCHFACE_COMPLICATION_ERROR_IO_ERROR I/O error
 * @see watchface_complication_type_e
 * @par Sample code:
 * @code
#include <watchface-complication-provider.h>
void _watchface_complication_provider_update_requested_cb(const char *provider_id,
		const char *req_appid, watchface_complication_type_e type,
		const bundle *context, bundle *shared_data, void *user_data)
{
	if (type == WATCHFACE_COMPLICATION_TYPE_IMAGE)
		watchface_complication_provider_data_set_image_path(shared_data, "path");
}
 * @endcode
 */
int watchface_complication_provider_data_set_image_path(bundle *shared_data,
			const char *image_path);

/**
 * @brief Sets ranged value data for shared data.
 * @since_tizen 5.0
 * @remarks @a min_value, @a max_value, @a current_value can be added only for #WATCHFACE_COMPLICATION_TYPE_RANGED_VALUE type shared data.
 * @param[in] shared_data The data which will be shared with watch application
 * @param[in] current_value The current value
 * @param[in] min_value The minimum value
 * @param[in] max_value The max value
 * @return #WATCHFACE_COMPLICATION_ERROR_NONE on success,
 *         otherwise an error code (see #watchface_complication_error_e) on failure
 * @retval #WATCHFACE_COMPLICATION_ERROR_NONE Successful
 * @retval #WATCHFACE_COMPLICATION_ERROR_NOT_SUPPORTED Not supported
 * @retval #WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER Invalid parameter
 * @retval #WATCHFACE_COMPLICATION_ERROR_OUT_OF_MEMORY Out of memory
 * @retval #WATCHFACE_COMPLICATION_ERROR_IO_ERROR I/O error
 * @see watchface_complication_type_e
 * @par Sample code:
 * @code
#include <watchface-complication-provider.h>
void _watchface_complication_provider_update_requested_cb(const char *provider_id,
		const char *req_appid, watchface_complication_type_e type,
		const bundle *context, bundle *shared_data, void *user_data)
{
	if (type == WATCHFACE_COMPLICATION_TYPE_RANGED_VALUE)
		watchface_complication_provider_data_set_ranged_value(shared_data, 50.0, 0.0, 100.0);
}
 * @endcode
 */
int watchface_complication_provider_data_set_ranged_value(bundle *shared_data,
		double current_value, double min_value, double max_value);

/**
 * @brief Sets icon path data for shared data.
 * @since_tizen 5.0
 * @remarks @a icon_path can be added only for #WATCHFACE_COMPLICATION_TYPE_SHORT_TEXT,
 *          #WATCHFACE_COMPLICATION_TYPE_LONG_TEXT, #WATCHFACE_COMPLICATION_TYPE_TIME, #WATCHFACE_COMPLICATION_TYPE_ICON type shared data.
 * @remarks @a icon_path should be relative path like shared/res/icon.png.
 * @param[in] shared_data The data which will be shared with watch application
 * @param[in] icon_path The icon path data
 * @return #WATCHFACE_COMPLICATION_ERROR_NONE on success,
 *         otherwise an error code (see #watchface_complication_error_e) on failure
 * @retval #WATCHFACE_COMPLICATION_ERROR_NONE Successful
 * @retval #WATCHFACE_COMPLICATION_ERROR_NOT_SUPPORTED Not supported
 * @retval #WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER Invalid parameter
 * @retval #WATCHFACE_COMPLICATION_ERROR_OUT_OF_MEMORY Out of memory
 * @retval #WATCHFACE_COMPLICATION_ERROR_IO_ERROR I/O error
 * @see watchface_complication_type_e
 * @par Sample code:
 * @code
#include <watchface-complication-provider.h>
void _watchface_complication_provider_update_requested_cb(const char *provider_id,
		const char *req_appid, watchface_complication_type_e type,
		const bundle *context, bundle *shared_data, void *user_data)
{
	if (type == WATCHFACE_COMPLICATION_TYPE_ICON)
		watchface_complication_provider_data_set_icon_path(shared_data, "path");
}
 * @endcode
 */
int watchface_complication_provider_data_set_icon_path(bundle *shared_data,
			const char *icon_path);

/**
 * @brief Sets extra data for shared data.
 * @since_tizen 5.0
 * @remarks @a extra_data can be added to every type of shared data.
 * @param[in] shared_data The data which will be shared with watch application
 * @param[in] extra_data The extra data
 * @return #WATCHFACE_COMPLICATION_ERROR_NONE on success,
 *         otherwise an error code (see #watchface_complication_error_e) on failure
 * @retval #WATCHFACE_COMPLICATION_ERROR_NONE Successful
 * @retval #WATCHFACE_COMPLICATION_ERROR_NOT_SUPPORTED Not supported
 * @retval #WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER Invalid parameter
 * @retval #WATCHFACE_COMPLICATION_ERROR_OUT_OF_MEMORY Out of memory
 * @retval #WATCHFACE_COMPLICATION_ERROR_IO_ERROR I/O error
 * @see watchface_complication_type_e
 * @par Sample code:
 * @code
#include <watchface-complication-provider.h>
void _watchface_complication_provider_update_requested_cb(const char *provider_id,
		const char *req_appid, watchface_complication_type_e type,
		const bundle *context, bundle *shared_data, void *user_data)
{
	watchface_complication_provider_data_set_extra_data(shared_data, "extra");
}
 * @endcode
 */
int watchface_complication_provider_data_set_extra_data(bundle *shared_data,
		const char *extra_data);

/**
 * @brief Sets screen reader text for shared data.
 * @since_tizen 5.0
 * @remarks @a screen_reader_text can be added to every type of shared data.
 * @param[in] shared_data The data which will be shared with watch application
 * @param[in] screen_reader_text The screen reader text
 * @return #WATCHFACE_COMPLICATION_ERROR_NONE on success,
 *         otherwise an error code (see #watchface_complication_error_e) on failure
 * @retval #WATCHFACE_COMPLICATION_ERROR_NONE Successful
 * @retval #WATCHFACE_COMPLICATION_ERROR_NOT_SUPPORTED Not supported
 * @retval #WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER Invalid parameter
 * @retval #WATCHFACE_COMPLICATION_ERROR_OUT_OF_MEMORY Out of memory
 * @retval #WATCHFACE_COMPLICATION_ERROR_IO_ERROR I/O error
 * @par Sample code:
 * @code
#include <watchface-complication-provider.h>
void _watchface_complication_provider_update_requested_cb(const char *provider_id,
		const char *req_appid, watchface_complication_type_e type,
		const bundle *context, bundle *shared_data, void *user_data)
{
	watchface_complication_provider_data_set_screen_reader_text(shared_data, "screen reader text");
}
 * @endcode
 */
int watchface_complication_provider_data_set_screen_reader_text(
			bundle *shared_data, const char *screen_reader_text);

/**
 * @brief Checks whether shared_data is valid or not.
 * @details Developer can check the shared data is valid. If the following mandatory data
 *          is not set in shared_data, it's not valid.\n
 *          #WATCHFACE_COMPLICATION_TYPE_SHORT_TEXT : short text\n
 *          #WATCHFACE_COMPLICATION_TYPE_LONG_TEXT : long text\n
 *          #WATCHFACE_COMPLICATION_TYPE_RANGED_VALUE : current, min, max\n
 *          #WATCHFACE_COMPLICATION_TYPE_TIME : timestamp or timezone_id\n
 *          #WATCHFACE_COMPLICATION_TYPE_ICON : icon path\n
 *          #WATCHFACE_COMPLICATION_TYPE_IMAGE : image path\n
 * @since_tizen 5.0
 * @param[in] shared_data The data which will be shared with watch application
 * @param[out] is_valid The value that tell the shared_data is valid or not.
 * @return #WATCHFACE_COMPLICATION_ERROR_NONE on success,
 *         otherwise an error code (see #watchface_complication_error_e) on failure
 * @retval #WATCHFACE_COMPLICATION_ERROR_NONE Successful
 * @retval #WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER Invalid parameter
 * @see watchface_complication_type_e
 * @see watchface_complication_provider_data_set_short_text()
 * @see watchface_complication_provider_data_set_long_text()
 * @see watchface_complication_provider_data_set_ranged_value()
 * @see watchface_complication_provider_data_set_icon_path()
 * @see watchface_complication_provider_data_set_image_path()
 * @see watchface_complication_provider_timeinfo_create()
 * @see watchface_complication_provider_timeinfo_set_timezone_id()
 * @par Sample code:
 * @code
#include <watchface-complication-provider.h>
void _watchface_complication_provider_update_requested_cb(const char *provider_id,
		const char *req_appid, watchface_complication_type_e type,
		const bundle *context, bundle *shared_data, void *user_data)
{
	char num_str[128] = {0, };
	int num = rand();
	bool is_valid;

	if (type == WATCHFACE_COMPLICATION_TYPE_SHORT_TEXT) {
		snprintf(num_str, sizeof(num_str), "air %d", num % 200);
		watchface_complication_provider_data_set_short_text(
			shared_data, num_str);

		watchface_complication_provider_data_is_valid(shared_data, &is_valid);
	}
}
 * @endcode
 */
int watchface_complication_provider_data_is_valid(bundle *shared_data,
			bool *is_valid);

/**
 * @brief Gets touch event type that is transferred from watchface.
 * @since_tizen 5.0
 * @remarks @a event_type is the type of touch event transftered from the watchface
 *             by watchface_complication_transfer_event().
 * @param[in] handle The app control handle
 * @param[out] event_type The value that tells touch event type that is transferred.
 * @return #WATCHFACE_COMPLICATION_ERROR_NONE on success,
 *         otherwise an error code (see #watchface_complication_error_e) on failure
 * @retval #WATCHFACE_COMPLICATION_ERROR_NONE Successful
 * @retval #WATCHFACE_COMPLICATION_ERROR_NOT_SUPPORTED Not supported
 * @retval #WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER Invalid parameter
 * @retval #WATCHFACE_COMPLICATION_ERROR_OUT_OF_MEMORY Out of memory
 * @retval #WATCHFACE_COMPLICATION_ERROR_IO_ERROR I/O error
 * @see watchface_complication_event_type_e
 * @see watchface_complication_transfer_event()
 * @see watchface_complication_provider_event_get_provider_id()
 * @see watchface_complication_provider_event_get_complication_type()
 * @see watchface_complication_provider_event_get_context()
 * @par Sample code:
 * @code
#include <watchface-complication-provider.h>
void app_control(app_control_h app_control, void *data)
{
	watchface_complication_event_type_e event_type;
	char *provider_id;
	watchface_complication_type_e type;
	bundle *context

	watchface_complication_provider_event_get_type(app_control, &event_type);
	if (event_type == WATCHFACE_COMPLICATION_EVENT_TAP) {
		watchface_complication_provider_event_get_provider_id(app_control,
			&provider_id);
		watchface_complication_provider_event_get_complication_type(
			app_control, &type);
		watchface_complication_provider_event_get_context(app_control,
			&context);
		// Do something
	}
}
 * @endcode
 */
int watchface_complication_provider_event_get_type(app_control_h handle,
		watchface_complication_event_type_e *event_type);

/**
 * @brief Gets provider id of touched complication.
 * @since_tizen 5.0
 * @remarks The @a provider_id should be freed using free().
 * @param[in] handle The app control handle
 * @param[out] provider_id The provider id of touched complication
 * @return #WATCHFACE_COMPLICATION_ERROR_NONE on success,
 *         otherwise an error code (see #watchface_complication_error_e) on failure
 * @retval #WATCHFACE_COMPLICATION_ERROR_NONE Successful
 * @retval #WATCHFACE_COMPLICATION_ERROR_NOT_SUPPORTED Not supported
 * @retval #WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER Invalid parameter
 * @retval #WATCHFACE_COMPLICATION_ERROR_OUT_OF_MEMORY Out of memory
 * @retval #WATCHFACE_COMPLICATION_ERROR_IO_ERROR I/O error
 * @retval #WATCHFACE_COMPLICATION_ERROR_NO_DATA No data
 * @see watchface_complication_transfer_event()
 * @see watchface_complication_provider_event_get_complication_type()
 * @see watchface_complication_provider_event_get_context()
 * @par Sample code:
 * @code
#include <watchface-complication-provider.h>
void app_control(app_control_h app_control, void *data)
{
	watchface_complication_event_type_e event_type;
	char *provider_id;
	watchface_complication_type_e type;
	bundle *context

	watchface_complication_provider_event_get_type(app_control, &event_type);
	if (event_type == WATCHFACE_COMPLICATION_EVENT_TAP) {
		watchface_complication_provider_event_get_provider_id(app_control,
			&provider_id);
		watchface_complication_provider_event_get_complication_type(
			app_control, &type);
		watchface_complication_provider_event_get_context(app_control,
			&context);
		// Do something
	}
}
 * @endcode
 */
int watchface_complication_provider_event_get_provider_id(
		app_control_h handle, char **provider_id);

/**
 * @brief Gets complication type of touched complication.
 * @since_tizen 5.0
 * @param[in] handle The app control handle
 * @param[out] type The complication type of touched complication
 * @return #WATCHFACE_COMPLICATION_ERROR_NONE on success,
 *         otherwise an error code (see #watchface_complication_error_e) on failure
 * @retval #WATCHFACE_COMPLICATION_ERROR_NONE Successful
 * @retval #WATCHFACE_COMPLICATION_ERROR_NOT_SUPPORTED Not supported
 * @retval #WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER Invalid parameter
 * @retval #WATCHFACE_COMPLICATION_ERROR_OUT_OF_MEMORY Out of memory
 * @retval #WATCHFACE_COMPLICATION_ERROR_IO_ERROR I/O error
 * @retval #WATCHFACE_COMPLICATION_ERROR_NO_DATA No data
 * @see watchface_complication_transfer_event()
 * @see watchface_complication_provider_event_get_provider_id()
 * @see watchface_complication_provider_event_get_context()
 * @par Sample code:
 * @code
#include <watchface-complication-provider.h>
void app_control(app_control_h app_control, void *data)
{
	watchface_complication_event_type_e event_type;
	char *provider_id;
	watchface_complication_type_e type;
	bundle *context

	watchface_complication_provider_event_get_type(app_control, &event_type);
	if (event_type == WATCHFACE_COMPLICATION_EVENT_TAP) {
		watchface_complication_provider_event_get_provider_id(app_control,
			&provider_id);
		watchface_complication_provider_event_get_complication_type(
			app_control, &type);
		watchface_complication_provider_event_get_context(app_control,
			&context);
		// Do something
	}
}
 * @endcode
 */
int watchface_complication_provider_event_get_complication_type(
		app_control_h handle, watchface_complication_type_e *type);

/**
 * @brief Gets complication context of touched complication.
 * @since_tizen 5.0
 * @remarks @a context is customized information about complication setup.
 *          complication setup can be generated by complication setup app and
 *          complication setup app can be specified with complication provider
 *          app's manifest xml file.
 * @remarks The @a context should be released using bundle_free().
 * @param[in] handle The app control handle
 * @param[out] context The complication context of touched complication
 * @return #WATCHFACE_COMPLICATION_ERROR_NONE on success,
 *         otherwise an error code (see #watchface_complication_error_e) on failure
 * @retval #WATCHFACE_COMPLICATION_ERROR_NONE Successful
 * @retval #WATCHFACE_COMPLICATION_ERROR_NOT_SUPPORTED Not supported
 * @retval #WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER Invalid parameter
 * @retval #WATCHFACE_COMPLICATION_ERROR_OUT_OF_MEMORY Out of memory
 * @retval #WATCHFACE_COMPLICATION_ERROR_IO_ERROR I/O error
 * @retval #WATCHFACE_COMPLICATION_ERROR_NO_DATA No data
 * @see watchface_complication_transfer_event()
 * @see watchface_complication_provider_event_get_provider_id()
 * @see watchface_complication_provider_event_get_complication_type()
 * @see watchface_complication_provider_setup_reply_to_editor()
 * @see watchface_complication_provider_setup_is_editing()
 * @see watchface_complication_provider_setup_get_context()
 * @par Sample code:
 * @code
#include <watchface-complication-provider.h>
void app_control(app_control_h app_control, void *data)
{
	watchface_complication_event_type_e event_type;
	char *provider_id;
	watchface_complication_type_e type;
	bundle *context

	watchface_complication_provider_event_get_type(app_control, &event_type);
	if (event_type == WATCHFACE_COMPLICATION_EVENT_TAP) {
		watchface_complication_provider_event_get_provider_id(app_control,
			&provider_id);
		watchface_complication_provider_event_get_complication_type(
			app_control, &type);
		watchface_complication_provider_event_get_context(app_control,
			&context);
		// Do something
	}
}
 * @endcode
 */
int watchface_complication_provider_event_get_context(
		app_control_h handle, bundle **context);

/**
 * @}
 */

#ifdef __cplusplus
}

#endif

#endif  /* __TIZEN_APPFW_WATCHFACE_COMPLICATION_PROVIDER_H__ */
