#ifndef __TIZEN_DATA_CONTROL_DOC_H__
#define __TIZEN_DATA_CONTROL_DOC_H__
+
/**
* @ingroup CAPI_APPLICATION_FRAMEWORK
* @defgroup CAPI_DATA_CONTROL_MODULE Data Control
* @brief Data control is a standard mechanism for exchanging specific data between applications.
- *
* @section CAPI_DATA_CONTROL_MODULE_HEADER Required Header
- * \#include <data_control.h>
+ * \#include <data_control.h>
*
* @section CAPI_DATA_CONTROL_MODULE_OVERVIEW Overview
* All applications can request data shared by other applications using data control. However, only service applications can provide their own data.
* This allows you to use a SQL-type data control to access the specific data exported by other service applications. You can also define a SQL-type data control provider to export specific data from your service application.
* - DATA_CONTROL_MAP
* This allows you to use a key value-type data control to access the data exported by other service applications. You can also define an key value-type data control provider to export the specific data from your service application.
- *
*/
+
/**
* @ingroup CAPI_DATA_CONTROL_MODULE
* @defgroup CAPI_DATA_CONTROL_CONSUMER_MODULE Data Control Consumer
* @brief All applications can request data shared by other applications using data control.
- *
* @section CAPI_DATA_CONTROL_CONSUMER_MODULE_HEADER Required Header
- * \#include <data_control.h>
+ * \#include <data_control.h>
*
* @section CAPI_DATA_CONTROL_CONSUMER_MODULE_OVERVIEW Overview
* You can get a datacontrol_h instance from data_control_map_create() or data_control_sql_create().
* Note: All callbacks are called in the main loop context, unless stated otherwise.
*/
+
/**
* @ingroup CAPI_DATA_CONTROL_MODULE
* @defgroup CAPI_DATA_CONTROL_PROVIDER_MODULE Data Control Provider
* @brief Service applications can provide their own data.
- *
* @section CAPI_DATA_CONTROL_PROVIDER_MODULE_HEADER Required Header
- * \#include <data_control.h>
+ * \#include <data_control.h>
*
* @section CAPI_DATA_CONTROL_PROVIDER_MODULE_OVERVIEW Overview
* The service application providing its own database file must register the provider callback using data_control_provider_sql_register_cb().
#endif
/**
- * @file data_control_bulk.h
- * @brief This is the header file for bulk data feature of the Data Control module. \n
- * All callbacks are called in the main loop context, unless stated otherwise.
+ * @file data_control_bulk.h
+ * @brief This is the header file for bulk data feature of the Data Control module. \n
+ * All callbacks are called in the main loop context, unless stated otherwise.
*/
+
/**
* @addtogroup CAPI_DATA_CONTROL_CONSUMER_MODULE
* @{
*/
+
/**
* @brief Called when a response is received for a bulk operation from a provider application.
* @since_tizen 3.0
- *
- * @param[in] request_id The request ID
- * @param[in] provider The provider handle. @a provider is valid only inside this function. \n
- * @a provider should not be freed.
- * @param[in] bulk_results The result data for each insert request. @a bulk_results is valid only inside this function. \n
- * @a bulk_results should not be freed.
- * @param[in] provider_result Set to @c true if the data control provider successfully processed, \n
- * otherwise set to @c false
- * @param[in] error The error message from the data control provider. @a error is valid only inside this function. \n
- * @a error should not be freed.
- * @param[in] user_data The user data passed from the register function
- *
- * @see data_control_sql_register_insert_bulk_data_response_cb()
- * @see data_control_map_register_add_bulk_data_response_cb()
+ * @param[in] request_id The request ID
+ * @param[in] provider The provider handle. @a provider is valid only inside this function. \n
+ * @a provider should not be freed.
+ * @param[in] bulk_results The result data for each insert request. @a bulk_results is valid only inside this function. \n
+ * @a bulk_results should not be freed.
+ * @param[in] provider_result Set to @c true if the data control provider successfully processed, \n
+ * otherwise set to @c false
+ * @param[in] error The error message from the data control provider. @a error is valid only inside this function. \n
+ * @a error should not be freed.
+ * @param[in] user_data The user data passed from the register function
+ * @see data_control_sql_register_insert_bulk_data_response_cb()
+ * @see data_control_map_register_add_bulk_data_response_cb()
*/
- typedef void (*data_control_bulk_cb)(
- int request_id,
- data_control_h provider,
- data_control_bulk_result_data_h bulk_results,
- bool provider_result,
- const char *error,
- void *user_data);
+ typedef void (*data_control_bulk_cb)(int request_id, data_control_h provider, data_control_bulk_result_data_h bulk_results, bool provider_result, const char *error, void *user_data);
+
/**
- * @brief Gets the n-th bundle from bulk data.
+ * @brief Gets the n-th bundle from bulk data.
* @since_tizen 3.0
- *
* @remarks The @a data should not be released. \n
- * It will be released when data_control_bulk_data_destroy() is called.
- *
- * @param [in] bulk_data The bulk data handle
- * @param [in] idx The bundle index. Index starts at 0
- * @param [out] data The n-th bundle.
- *
- * @return @c 0 on success,
- * otherwise a negative error value
- *
- * @retval #DATA_CONTROL_ERROR_NONE Successful
+ * It will be released when data_control_bulk_data_destroy() is called.
+ * @param [in] bulk_data The bulk data handle
+ * @param [in] idx The bundle index. Index starts at 0
+ * @param [out] data The n-th bundle.
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #DATA_CONTROL_ERROR_NONE Successful
* @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
- *
- * @see data_control_bulk_data_add()
- * @see data_control_bulk_data_destroy()
+ * @see data_control_bulk_data_add()
+ * @see data_control_bulk_data_destroy()
*/
int data_control_bulk_data_get_data(data_control_bulk_data_h bulk_data, int idx, bundle **data);
+
/**
- * @brief Gets the bulk data bundle count.
+ * @brief Gets the bulk data bundle count.
* @since_tizen 3.0
- *
- * @param [in] bulk_data The bulk data handle
- * @param [out] count The bundle count
- *
- * @return @c 0 on success,
- * otherwise a negative error value
- *
- * @retval #DATA_CONTROL_ERROR_NONE Successful
+ * @param [in] bulk_data The bulk data handle
+ * @param [out] count The bundle count
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #DATA_CONTROL_ERROR_NONE Successful
* @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
*/
int data_control_bulk_data_get_count(data_control_bulk_data_h bulk_data, int *count);
+
/**
- * @brief Adds a bundle to bulk data.
+ * @brief Adds a bundle to bulk data.
* @since_tizen 3.0
- *
* @remarks The order in which bundles are added is preserved. Bundle indexes start from 0.
- *
- * @param [in] bulk_data The bulk data handle
- * @param [in] data The bundle
- *
- * @return @c 0 on success,
- * otherwise a negative error value
- *
- * @retval #DATA_CONTROL_ERROR_NONE Successful
+ * @param [in] bulk_data The bulk data handle
+ * @param [in] data The bundle
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #DATA_CONTROL_ERROR_NONE Successful
* @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
*/
int data_control_bulk_data_add(data_control_bulk_data_h bulk_data, bundle *data);
+
/**
- * @brief Creates bulk data.
+ * @brief Creates bulk data.
* @since_tizen 3.0
- *
* @remarks The @a bulk_data should be released using data_control_bulk_data_destroy().
- * @param [out] bulk_data The bulk data handle
- *
+ * @param [out] bulk_data The bulk data handle
* @return @c 0 on success,
* otherwise a negative error value
- *
- * @retval #DATA_CONTROL_ERROR_NONE Successful
+ * @retval #DATA_CONTROL_ERROR_NONE Successful
* @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory
* @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
*/
int data_control_bulk_data_create(data_control_bulk_data_h *bulk_data);
+
/**
- * @brief Destroys bulk data.
+ * @brief Destroys bulk data.
* @since_tizen 3.0
- *
- * @param [in] bulk_data The bulk data handle
- *
- * @return @c 0 on success,
- * otherwise a negative error value
- *
- * @retval #DATA_CONTROL_ERROR_NONE Successful
+ * @param [in] bulk_data The bulk data handle
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #DATA_CONTROL_ERROR_NONE Successful
* @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
*/
int data_control_bulk_data_destroy(data_control_bulk_data_h bulk_data);
+
/**
- * @brief Gets the n-th bundle from bulk result data.
+ * @brief Gets the n-th bundle from bulk result data.
* @since_tizen 3.0
- *
* @remarks The @a data should not be released. \n
- * It will be released when data_control_bulk_result_data_destroy() is called.
- *
- * @param [in] result_data The bulk result data handle
- * @param [in] idx The bundle index. Index starts at 0
- * @param [out] data The n-th bundle
- * @param [out] result Bulk operation result. Possible values and their meaning are defined by the developer.
- *
- * @return @c 0 on success,
- * otherwise a negative error value
- *
- * @retval #DATA_CONTROL_ERROR_NONE Successful
+ * It will be released when data_control_bulk_result_data_destroy() is called.
+ * @param [in] result_data The bulk result data handle
+ * @param [in] idx The bundle index. Index starts at 0
+ * @param [out] data The n-th bundle
+ * @param [out] result Bulk operation result. Possible values and their meaning are defined by the developer.
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #DATA_CONTROL_ERROR_NONE Successful
* @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
- *
- * @see data_control_bulk_result_data_add()
- * @see data_control_bulk_result_data_destroy()
+ * @see data_control_bulk_result_data_add()
+ * @see data_control_bulk_result_data_destroy()
*/
int data_control_bulk_result_data_get_result_data(data_control_bulk_result_data_h result_data, int idx, bundle **data, int *result);
+
/**
- * @brief Gets the bulk result data bundle count.
+ * @brief Gets the bulk result data bundle count.
* @since_tizen 3.0
- *
- * @param [in] result_data The bulk result data handle
- * @param [out] count The bundle count
- *
+ * @param [in] result_data The bulk result data handle
+ * @param [out] count The bundle count
* @return @c 0 on success,
* otherwise a negative error value
- *
- * @retval #DATA_CONTROL_ERROR_NONE Successful
+ * @retval #DATA_CONTROL_ERROR_NONE Successful
* @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
*/
int data_control_bulk_result_data_get_count(data_control_bulk_result_data_h result_data, int *count);
+
/**
- * @brief Adds bulk data
+ * @brief Adds bulk data
* @since_tizen 3.0
- *
* @remarks The order in which bundles are added is preserved. Bundle indexes start from 0.
- *
- * @param [in] result_data The bulk result data handle
- * @param [in] data The bundle
- * @param [in] result Bulk operation result. Possible values and their meaning are defined by the developer.
- *
- * @return @c 0 on success,
- * otherwise a negative error value
- *
- * @retval #DATA_CONTROL_ERROR_NONE Successful
+ * @param [in] result_data The bulk result data handle
+ * @param [in] data The bundle
+ * @param [in] result Bulk operation result. Possible values and their meaning are defined by the developer.
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #DATA_CONTROL_ERROR_NONE Successful
* @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
- *
- * @see data_control_bulk_result_data_get_result_data()
+ * @see data_control_bulk_result_data_get_result_data()
*/
int data_control_bulk_result_data_add(data_control_bulk_result_data_h result_data, bundle *data, int result);
+
/**
- * @brief Creates bulk result data.
+ * @brief Creates bulk result data.
* @since_tizen 3.0
* @remarks The @a result_data should be released using data_control_bulk_result_data_destroy().
- *
- * @param [out] result_data The bulk result data handle
- *
- * @return @c 0 on success,
- * otherwise a negative error value
- *
- * @retval #DATA_CONTROL_ERROR_NONE Successful
+ * @param [out] result_data The bulk result data handle
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #DATA_CONTROL_ERROR_NONE Successful
* @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory
* @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
*/
int data_control_bulk_result_data_create(data_control_bulk_result_data_h *result_data);
+
/**
- * @brief Destroys bulk result data.
+ * @brief Destroys bulk result data.
* @since_tizen 3.0
- *
- * @param [in] result_data The bulk result data handle
- *
- * @return @c 0 on success,
- * otherwise a negative error value
- *
- * @retval #DATA_CONTROL_ERROR_NONE Successful
+ * @param [in] result_data The bulk result data handle
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #DATA_CONTROL_ERROR_NONE Successful
* @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
*/
int data_control_bulk_result_data_destroy(data_control_bulk_result_data_h result_data);
+
/**
* @}
*/
+
#ifdef __cplusplus
}
#endif
extern "C" {
#endif
+
/**
- * @file data_control_map.h
- * @brief This is the header file for the key-value structured data control.
+ * @file data_control_map.h
+ * @brief This is the header file for the key-value structured data control.
*/
/**
* @{
*/
+
/**
- * @brief Called when the result value list is received from the key-value structured data control provider.
+ * @brief Called when the result value list is received from the key-value structured data control provider.
* @since_tizen 2.3
- *
* @remarks You must release @a resule_value_list using free() after it is used. Note that @a result_value list is an array of char *. Its length is @a result_value_count. You should release all the elements in the @a result_value_list array and @a result_value_list itself like the following code.
*
* @code
*
* @endcode
- * @param[in] request_id The request ID
- * @param[in] provider The provider handle
- * @param[in] result_value_list The result value list of the data control request that gets the matching values
- * @param[in] result_value_count The number of the values
- * @param[in] provider_result Set to @c true if the data control provider is successfully processed, \n
- * otherwise set to @c false
- * @param[in] error The error message from the data control provider
- * @param[in] user_data The user data passed from the register function
+ * @param[in] request_id The request ID
+ * @param[in] provider The provider handle
+ * @param[in] result_value_list The result value list of the data control request that gets the matching values
+ * @param[in] result_value_count The number of the values
+ * @param[in] provider_result Set to @c true if the data control provider is successfully processed, \n
+ * otherwise set to @c false
+ * @param[in] error The error message from the data control provider
+ * @param[in] user_data The user data passed from the register function
*/
-typedef void (*data_control_map_get_response_cb)(int request_id,
- data_control_h provider, char **result_value_list,
- int result_value_count, bool provider_result,
- const char *error, void *user_data);
+typedef void (*data_control_map_get_response_cb)(int request_id, data_control_h provider, char **result_value_list, int result_value_count, bool provider_result, const char *error, void *user_data);
+
/**
- * @brief Called when the response is received from the key-value structured data control provider.
+ * @brief Called when the response is received from the key-value structured data control provider.
* @since_tizen 2.3
- *
- * @param[in] request_id The request ID that identifies the data control
- * @param[in] provider The provider handle
- * @param[in] provider_result Set to @c true if the data control provider successfully processed, \n
- * otherwise @c false
- * @param[in] error The error message from the data control provider
- * @param[in] user_data The user data passed from the register function
+ * @param[in] request_id The request ID that identifies the data control
+ * @param[in] provider The provider handle
+ * @param[in] provider_result Set to @c true if the data control provider successfully processed, \n
+ * otherwise @c false
+ * @param[in] error The error message from the data control provider
+ * @param[in] user_data The user data passed from the register function
*/
-typedef void (*data_control_map_set_response_cb)(int request_id,
- data_control_h provider, bool provider_result,
- const char *error, void *user_data);
+typedef void (*data_control_map_set_response_cb)(int request_id, data_control_h provider, bool provider_result, const char *error, void *user_data);
+
/**
- * @brief Called when the response is received from the key-value structured data control provider.
+ * @brief Called when the response is received from the key-value structured data control provider.
* @since_tizen 2.3
*
- * @param[in] request_id The request ID that identifies the data control
- * @param[in] provider The provider handle
- * @param[in] provider_result Set to @c true if the data control provider successfully processed, \n
- * otherwise set to @c false
- * @param[in] error The error message from the data control provider
- * @param[in] user_data The user data passed from the register function
+ * @param[in] request_id The request ID that identifies the data control
+ * @param[in] provider The provider handle
+ * @param[in] provider_result Set to @c true if the data control provider successfully processed, \n
+ * otherwise set to @c false
+ * @param[in] error The error message from the data control provider
+ * @param[in] user_data The user data passed from the register function
*/
-typedef void (*data_control_map_add_response_cb)(int request_id,
- data_control_h provider, bool provider_result,
- const char *error, void *user_data);
+typedef void (*data_control_map_add_response_cb)(int request_id, data_control_h provider, bool provider_result, const char *error, void *user_data);
+
/**
- * @brief Called when the response is received from the key-value structured data control provider.
+ * @brief Called when the response is received from the key-value structured data control provider.
* @since_tizen 2.3
- *
- * @param[in] request_id The request ID that identifies the data control
- * @param[in] provider The provider handle
- * @param[in] provider_result Set to @c true if the data control provider successfully processed, \n
- * otherwise set to @c false
- * @param[in] error The error message from the data control provider
- * @param[in] user_data The user data passed from the register function
+ * @param[in] request_id The request ID that identifies the data control
+ * @param[in] provider The provider handle
+ * @param[in] provider_result Set to @c true if the data control provider successfully processed, \n
+ * otherwise set to @c false
+ * @param[in] error The error message from the data control provider
+ * @param[in] user_data The user data passed from the register function
*/
-typedef void (*data_control_map_remove_response_cb)(int request_id,
- data_control_h provider, bool provider_result,
- const char *error, void *user_data);
+typedef void (*data_control_map_remove_response_cb)(int request_id, data_control_h provider, bool provider_result, const char *error, void *user_data);
+
/**
* @brief The structure type to contain the set of callback functions for handling the response events
* of the key-value structured data control.
* @since_tizen 2.3
- *
- * @see data_control_map_get_response_cb()
- * @see data_control_map_set_response_cb()
- * @see data_control_map_add_response_cb()
- * @see data_control_map_remove_response_cb()
+ * @see data_control_map_get_response_cb()
+ * @see data_control_map_set_response_cb()
+ * @see data_control_map_add_response_cb()
+ * @see data_control_map_remove_response_cb()
*/
typedef struct {
data_control_map_get_response_cb get_cb; /**< This callback function is called when the response is received for a getting value from the key-value structured data control provider. */
data_control_map_remove_response_cb remove_cb; /**< This callback function is called when the response is for a removing value received from the key-value structured data control provider. */
} data_control_map_response_cb;
+
/**
- * @brief Creates a provider handle.
+ * @brief Creates a provider handle.
* @since_tizen 2.3
- *
* @remarks The following example demonstrates how to use the %data_control_map_create() method.
*
* @code
* result = data_control_map_create(&provider);
* if (result != DATA_CONTROL_ERROR_NONE) {
* LOGE("Creating data control provider is failed with error: %d", result);
+ *
* return result;
* }
*
* result = data_control_map_set_provider_id(provider, provider_id);
* if (result != DATA_CONTROL_ERROR_NONE) {
* LOGE("Setting providerID is failed with error: %d", result);
+ *
* return result;
* }
*
* result = data_control_map_set_data_id(provider, data_id);
* if (result != DATA_CONTROL_ERROR_NONE) {
* LOGE("Setting dataID is failed with error: %d", result);
+ *
* return result;
* }
*
* // Executes some operations
*
* result = data_control_map_destroy(provider);
- * if (result != DATA_CONTROL_ERROR_NONE) {
- * LOGE("Destroying data control provider is failed with error: %d", result);
- * }
+ * if (result != DATA_CONTROL_ERROR_NONE)
+ * LOGE("Destorying data control provider is failed with error: %d", result);
*
* return result;
* }
*
* @endcode
-
- * @param[out] provider The provider handle
- *
- * @return @c 0 on success,
- * otherwise a negative error value
*
- * @retval #DATA_CONTROL_ERROR_NONE Successful
+ * @param[out] provider The provider handle
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #DATA_CONTROL_ERROR_NONE Successful
* @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory
- *
- * @see data_control_map_destroy()
-
+ * @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory
+ * @see data_control_map_destroy()
*/
int data_control_map_create(data_control_h *provider);
+
/**
- * @brief Destroys the provider handle and releases all its resources.
+ * @brief Destroys the provider handle and releases all its resources.
* @since_tizen 2.3
- *
- * @remarks When operations of data control are finished, this function must be called to prevent memory leak.
- *
- * @param[in] provider The provider handle
- *
- * @return @c 0 on success,
- * otherwise a negative error value
- *
+ * @remarks When operations of data control are finished, this function must be called to prevent memory leak.
+ * @param[in] provider The provider handle
+ * @return @c 0 on success,
+ * otherwise a negative error value
* @see data_control_map_create()
*/
int data_control_map_destroy(data_control_h provider);
+
/**
- * @brief Sets the Provider ID.
+ * @brief Sets the Provider ID.
* @since_tizen 2.3
- *
- * @param[in] provider The provider handle
- * @param[in] provider_id The data control provider ID
- *
- * @return @c 0 on success,
- * otherwise a negative error value
- *
- * @retval #DATA_CONTROL_ERROR_NONE Successful
- * @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory
- *
- * @see data_control_map_get_provider_id()
+ * @param[in] provider The provider handle
+ * @param[in] provider_id The data control provider ID
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #DATA_CONTROL_ERROR_NONE Successful
+ * @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory
+ * @see data_control_map_get_provider_id()
*/
int data_control_map_set_provider_id(data_control_h provider, const char *provider_id);
+
/**
- * @brief Gets the Provider ID.
+ * @brief Gets the Provider ID.
* @since_tizen 2.3
- *
- * @remarks You must release @a provider_id using free() after it is used.
- *
- * @param[in] provider The provider handle
- * @param[out] provider_id The data control provider ID
- *
- * @return @c 0 on success,
- * otherwise a negative error value
- *
- * @retval #DATA_CONTROL_ERROR_NONE Successful
+ * @remarks You must release @a provider_id using free() after it is used.
+ * @param[in] provider The provider handle
+ * @param[out] provider_id The data control provider ID
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #DATA_CONTROL_ERROR_NONE Successful
* @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory
- *
- * @see data_control_map_set_provider_id()
+ * @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory
+ * @see data_control_map_set_provider_id()
*/
int data_control_map_get_provider_id(data_control_h provider, char **provider_id);
+
/**
- * @brief Sets the Data ID.
+ * @brief Sets the Data ID.
* @since_tizen 2.3
- *
- * @param[in] provider The provider handle
- * @param[in] data_id A string for identifying a specific table to operate \n
- * The string consists of one or more components separated by a slash('/').
- * @return @c 0 on success,
- * otherwise a negative error value
- *
- * @retval #DATA_CONTROL_ERROR_NONE Successful
+ * @param[in] provider The provider handle
+ * @param[in] data_id A string for identifying a specific table to operate \n
+ * The string consists of one or more components separated by a slash('/').
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #DATA_CONTROL_ERROR_NONE Successful
* @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory
- *
- * @see data_control_map_get_data_id()
+ * @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory
+ * @see data_control_map_get_data_id()
*/
int data_control_map_set_data_id(data_control_h provider, const char *data_id);
+
/**
- * @brief Gets the data ID.
+ * @brief Gets the data ID.
* @since_tizen 2.3
- *
* @remarks You must release @a data_id using free() after it is used.
- *
- * @param[in] provider The provider handle
- * @param[out] data_id A string for identifying a specific table to operate \n
- * The string consists of one or more components separated by a slash('/').
- *
- * @return @c 0 on success,
- * otherwise a negative error value
- *
- * @retval #DATA_CONTROL_ERROR_NONE Successful
+ * @param[in] provider The provider handle
+ * @param[out] data_id A string for identifying a specific table to operate \n
+ * The string consists of one or more components separated by a slash('/').
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #DATA_CONTROL_ERROR_NONE Successful
* @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory
- *
- * @see data_control_map_set_data_id()
+ * @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory
+ * @see data_control_map_set_data_id()
*/
int data_control_map_get_data_id(data_control_h provider, char **data_id);
+
/**
- * @brief Registers a callback function for the key-value structured data control response.
- * The application is notified when a data control response is received from the @a provider.
+ * @brief Registers a callback function for the key-value structured data control response.
+ * The application is notified when a data control response is received from the @a provider.
* @since_tizen 2.3
- *
- * @param[in] provider The provider handle
- * @param[in] callback The callback function to be called when a response is received
- * @param[in] user_data The user data to be passed to the callback function
- *
- * @return @c 0 on success,
- * otherwise a negative error value
- *
- * @retval #DATA_CONTROL_ERROR_NONE Successful
- * @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error
+ * @param[in] provider The provider handle
+ * @param[in] callback The callback function to be called when a response is received
+ * @param[in] user_data The user data to be passed to the callback function
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #DATA_CONTROL_ERROR_NONE Successful
+ * @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error
* @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory
- *
- * @see data_control_map_unregister_response_cb()
+ * @see data_control_map_unregister_response_cb()
*/
int data_control_map_register_response_cb(data_control_h provider, data_control_map_response_cb *callback, void *user_data);
/**
- * @brief Unregisters the callback function in the @a provider.
+ * @brief Unregisters the callback function in the @a provider.
* @since_tizen 2.3
- *
- * @param[in] provider The provider handle
- *
+ * @param[in] provider The provider handle
* @return @c 0 on success,
* otherwise a negative error value
*/
int data_control_map_unregister_response_cb(data_control_h provider);
+
/**
- * @brief Gets the value list associated with the specified @a key from the key-values map owned by the key-value structured data control provider.
+ * @brief Gets the value list associated with the specified @a key from the key-values map owned by the key-value structured data control provider.
* @since_tizen 2.3
- * @privlevel public
- * @privilege %http://tizen.org/privilege/datasharing \n
- * %http://tizen.org/privilege/appmanager.launch
- *
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/datasharing \n
+ * %http://tizen.org/privilege/appmanager.launch
* @remarks If you want to use this api, you must add privileges.
* @remarks If the length of value list associated with the @a key is larger than 20, this API only returns the first 20 values.
* @remarks The following example demonstrates how to use the %data_control_map_get() method.
*
* @code
*
- * void map_get_response_cb(int request_id, data_control_h provider,
- * char **result_value_list, int ret_value_count, bool provider_result, const char *error, void *user_data)
+ * void
+ * map_get_response_cb(int request_id, data_control_h provider, char **result_value_list,
+ * int ret_value_count, bool provider_result, const char *error, void *user_data)
* {
- * if (provider_result) {
+ * if (provider_result)
* LOGI("The get operation is successful");
- * }
- * else {
+ * else
* LOGI("The get operation for the request %d is failed. error message: %s", request_id, error);
- * }
* }
*
* data_control_map_response_cb map_callback;
* result = data_control_map_register_response_cb(provider, &map_callback, NULL);
* if (result != DATA_CONTROL_ERROR_NONE) {
* LOGE("Registering the callback function is failed with error: %d", result);
+ *
* return result;
* }
*
* result = data_control_map_get(provider, key, &req_id);
- * if (result != DATA_CONTROL_ERROR_NONE) {
+ * if (result != DATA_CONTROL_ERROR_NONE)
* LOGE("Getting the value list of the key(%s) is failed with error: %d", key, result);
- * }
- * else {
+ * else
* LOGI("req_id is %d", req_id);
- * }
*
* return result;
* }
*
* @endcode
*
- * @param[in] provider The provider handle
- * @param[in] key The key of the value list to obtain
- * @param[out] request_id The request ID
- *
+ * @param[in] provider The provider handle
+ * @param[in] key The key of the value list to obtain
+ * @param[out] request_id The request ID
* @return @c 0 on success,
* otherwise a negative error value
- *
- * @retval #DATA_CONTROL_ERROR_NONE Successful
+ * @retval #DATA_CONTROL_ERROR_NONE Successful
* @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error
- * @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory
- * @retval #DATA_CONTROL_ERROR_MAX_EXCEEDED Too long argument
+ * @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error
+ * @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory
+ * @retval #DATA_CONTROL_ERROR_MAX_EXCEEDED Too long argument
* @retval #DATA_CONTROL_ERROR_PERMISSION_DENIED Permission denied
- *
* @see data_control_map_get_with_page()
*/
int data_control_map_get(data_control_h provider, const char *key, int *request_id);
+
/**
- * @brief Gets the value list associated with the specified @a key from the key-values map owned by the key-value structured data control provider.
+ * @brief Gets the value list associated with the specified @a key from the key-values map owned by the key-value structured data control provider.
* @since_tizen 2.3
- * @privlevel public
- * @privilege %http://tizen.org/privilege/datasharing \n
- * %http://tizen.org/privilege/appmanager.launch
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/datasharing \n
+ * %http://tizen.org/privilege/appmanager.launch
*
* @remarks If you want to use this api, you must add privileges.
- *
- * @param[in] provider The provider handle
- * @param[in] key The key of the value list to obtain
- * @param[out] request_id The request ID
- * @param[in] page_number The page number of the value set \n
- * It starts from @c 1.
- * @param [in] count_per_page The desired maximum count of the data items per page
- *
- * @return @c 0 on success,
- * otherwise a negative error value
- *
- * @retval #DATA_CONTROL_ERROR_NONE Successful
+ * @param[in] provider The provider handle
+ * @param[in] key The key of the value list to obtain
+ * @param[out] request_id The request ID
+ * @param[in] page_number The page number of the value set \n
+ * It starts from @c 1.
+ * @param [in] count_per_page The desired maximum count of the data items per page
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #DATA_CONTROL_ERROR_NONE Successful
* @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error
- * @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory
- * @retval #DATA_CONTROL_ERROR_MAX_EXCEEDED Too long argument
+ * @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error
+ * @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory
+ * @retval #DATA_CONTROL_ERROR_MAX_EXCEEDED Too long argument
* @retval #DATA_CONTROL_ERROR_PERMISSION_DENIED Permission denied
- *
* @see data_control_map_get()
*/
int data_control_map_get_with_page(data_control_h provider, const char *key, int *request_id, int page_number, int count_per_page);
+
/**
- * @brief Sets the value associated with the specified @a key to a new value.
+ * @brief Sets the value associated with the specified @a key to a new value.
* @since_tizen 2.3
- * @privlevel public
- * @privilege %http://tizen.org/privilege/datasharing \n
- * %http://tizen.org/privilege/appmanager.launch
- *
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/datasharing \n
+ * %http://tizen.org/privilege/appmanager.launch
* @remarks If you want to use this api, you must add privileges.
* @remarks The following example demonstrates how to use the %data_control_map_set() method.
*
* @code
*
- * void map_set_response_cb(int request_id, data_control_h provider, bool provider_result, const char *error, void *user_data)
+ * void
+ * map_set_response_cb(int request_id, data_control_h provider, bool provider_result, const char *error, void *user_data)
* {
- * if (provider_result) {
+ * if (provider_result)
* LOGI("The set operation is successful");
- * }
- * else {
+ * else
* LOGI("The set operation for the request %d is failed. error message: %s", request_id, error);
- * }
* }
*
* data_control_map_response_cb map_callback;
* result = data_control_map_register_response_cb(provider, &map_callback, NULL);
* if (result != DATA_CONTROL_ERROR_NONE) {
* LOGE("Registering the callback function is failed with error: %d", result);
+ *
* return result;
* }
*
* result = data_control_map_set(provider, key, old_value, new_value, &req_id);
- * if (result != DATA_CONTROL_ERROR_NONE) {
+ * if (result != DATA_CONTROL_ERROR_NONE)
* LOGE("Replacing old_value(%s) with new_value(%s) is failed with error: %d", old_value, new_value, result);
- * }
- * else {
+ * else
* LOGI("req_id is %d", req_id);
- * }
*
* return result;
* }
*
* @endcode
-
- * @param[in] provider The provider handle
- * @param[in] key The key of the value to replace
- * @param[in] old_value The value to replace
- * @param[in] new_value The new value that replaces the existing value
- * @param[out] request_id The request ID
- *
- * @return @c 0 on success,
- * otherwise a negative error value
*
- * @retval #DATA_CONTROL_ERROR_NONE Successful
+ * @param[in] provider The provider handle
+ * @param[in] key The key of the value to replace
+ * @param[in] old_value The value to replace
+ * @param[in] new_value The new value that replaces the existing value
+ * @param[out] request_id The request ID
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #DATA_CONTROL_ERROR_NONE Successful
* @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error
- * @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory
- * @retval #DATA_CONTROL_ERROR_MAX_EXCEEDED Too long argument
+ * @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error
+ * @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory
+ * @retval #DATA_CONTROL_ERROR_MAX_EXCEEDED Too long argument
* @retval #DATA_CONTROL_ERROR_PERMISSION_DENIED Permission denied
*/
int data_control_map_set(data_control_h provider, const char *key, const char *old_value, const char *new_value, int *request_id);
+
/**
- * @brief Adds the @a value associated with the specified @a key to the key-values map owned by the key-value structured data control provider.
+ * @brief Adds the @a value associated with the specified @a key to the key-values map owned by the key-value structured data control provider.
* @since_tizen 2.3
- * @privlevel public
- * @privilege %http://tizen.org/privilege/datasharing \n
- * %http://tizen.org/privilege/appmanager.launch
- *
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/datasharing \n
+ * %http://tizen.org/privilege/appmanager.launch
* @remarks If you want to use this api, you must add privileges.
* @remarks The following example demonstrates how to use the %data_control_map_add() method.
*
* @code
*
- * void map_add_response_cb(int request_id, data_control_h provider, bool provider_result, const char *error, void *user_data) {
- * if (provider_result) {
+ * void
+ * map_add_response_cb(int request_id, data_control_h provider, bool provider_result, const char *error, void *user_data)
+ * {
+ * if (provider_result)
* LOGI("The add operation is successful");
- * }
- * else {
+ * else
* LOGI("The add operation for the request %d is failed. error message: %s", request_id, error);
- * }
* }
*
* data_control_map_response_cb map_callback;
* result = data_control_map_register_response_cb(provider, &map_callback, NULL);
* if (result != DATA_CONTROL_ERROR_NONE) {
* LOGE("Registering the callback function is failed with error: %d", result);
+ *
* return result;
* }
*
* result = data_control_map_add(provider, key, value, &req_id);
- * if (result != DATA_CONTROL_ERROR_NONE) {
+ * if (result != DATA_CONTROL_ERROR_NONE)
* LOGE("Adding %s-%s pair is failed with error: %d", key, value, result);
- * }
- * else {
+ * else
* LOGI("req_id is %d", req_id);
- * }
*
* return result;
* }
*
* @endcode
-
- * @param[in] provider The provider handle
- * @param[in] key The key of the value to add
- * @param[in] value The value to add
- * @param[out] request_id The request ID
- *
- * @return @c 0 on success,
- * otherwise a negative error value
*
- * @retval #DATA_CONTROL_ERROR_NONE Successful
+ * @param[in] provider The provider handle
+ * @param[in] key The key of the value to add
+ * @param[in] value The value to add
+ * @param[out] request_id The request ID
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #DATA_CONTROL_ERROR_NONE Successful
* @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error
- * @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory
- * @retval #DATA_CONTROL_ERROR_MAX_EXCEEDED Too long argument
+ * @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error
+ * @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory
+ * @retval #DATA_CONTROL_ERROR_MAX_EXCEEDED Too long argument
* @retval #DATA_CONTROL_ERROR_PERMISSION_DENIED Permission denied
*/
int data_control_map_add(data_control_h provider, const char *key, const char *value, int *request_id);
+
/**
- * @brief Removes the @a value associated with the specified @a key from the key-values map owned by the key-value structured data control provider.
+ * @brief Removes the @a value associated with the specified @a key from the key-values map owned by the key-value structured data control provider.
* @since_tizen 2.3
- * @privlevel public
- * @privilege %http://tizen.org/privilege/datasharing \n
- * %http://tizen.org/privilege/appmanager.launch
- *
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/datasharing \n
+ * %http://tizen.org/privilege/appmanager.launch
* @remarks If you want to use this api, you must add privileges.
* @remarks The following example demonstrates how to use the %data_control_map_remove() method.
*
* @code
*
- * void map_remove_response_cb(int request_id, data_control_h provider, bool provider_result, const char *error, void *user_data) {
- * if (provider_result) {
+ * void
+ * map_remove_response_cb(int request_id, data_control_h provider, bool provider_result, const char *error, void *user_data)
+ * {
+ * if (provider_result)
* LOGI("The remove operation is successful");
- * }
- * else {
+ * else
* LOGI("The remove operation for the request %d is failed. error message: %s", request_id, error);
- * }
* }
*
* data_control_map_response_cb map_callback;
* result = data_control_map_register_response_cb(provider, &map_callback, NULL);
* if (result != DATA_CONTROL_ERROR_NONE) {
* LOGE("Registering the callback function is failed with error: %d", result);
+ *
* return result;
* }
*
* result = data_control_map_remove(provider, key, value, &req_id);
- * if (result != DATA_CONTROL_ERROR_NONE) {
+ * if (result != DATA_CONTROL_ERROR_NONE)
* LOGE("Removing %s-%s pair is failed with error: %d", key, value, result);
- * }
- * else {
+ * else
* LOGI("req_id is %d", req_id);
- * }
*
* return result;
* }
*
* @endcode
*
- * @param[in] provider The provider handle
- * @param[in] key The key of the value to remove
- * @param[in] value The value to remove
- * @param[out] request_id The request ID
- *
- * @return @c 0 on success,
- * otherwise a negative error value
- *
- * @retval #DATA_CONTROL_ERROR_NONE Successful
+ * @param[in] provider The provider handle
+ * @param[in] key The key of the value to remove
+ * @param[in] value The value to remove
+ * @param[out] request_id The request ID
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #DATA_CONTROL_ERROR_NONE Successful
* @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error
- * @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory
- * @retval #DATA_CONTROL_ERROR_MAX_EXCEEDED Too long argument
+ * @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error
+ * @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory
+ * @retval #DATA_CONTROL_ERROR_MAX_EXCEEDED Too long argument
* @retval #DATA_CONTROL_ERROR_PERMISSION_DENIED Permission denied
*/
int data_control_map_remove(data_control_h provider, const char *key, const char *value, int *request_id);
+
/**
- * @brief Adds multiple key-value pairs in one request.
+ * @brief Adds multiple key-value pairs in one request.
* @since_tizen 3.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/datasharing \n
- * %http://tizen.org/privilege/appmanager.launch
- *
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/datasharing \n
+ * %http://tizen.org/privilege/appmanager.launch
* @remarks If you want to use this function, you must add privileges.
* @remarks The following example demonstrates how to use the %data_control_map_add_bulk_data() method.
*
* @code
*
- * void map_bulk_add_response_cb(int request_id, data_control_h provider, data_control_bulk_result_data_h bulk_results,
- * bool provider_result, const char *error, void *user_data) {
- * if (provider_result) {
- * LOGI("The add operation is successful");
- * }
- * else {
- * LOGI("The add operation for the request %d is failed. error message: %s", request_id, error);
- * }
- * }
+ * void
+ * map_bulk_add_response_cb(int request_id, data_control_h provider, data_control_bulk_result_data_h bulk_results,
+ * bool provider_result, const char *error, void *user_data)
+ * {
+ * if (provider_result)
+ * LOGI("The add operation is successful");
+ * else
+ * LOGI("The add operation for the request %d is failed. error message: %s", request_id, error);
+ * }
*
* data_control_map_response_cb map_callback;
*
- * {
+ * {
*
* data_control_bulk_data_h bulk_data;
* int req_id;
- * bundle *b1;
- * bundle *b2;
+ * bundle *b1;
+ * bundle *b2;
* int result = 0;
* int req_id = 0;
* int count;
*
* b1 = bundle_create();
* bundle_add_str(b1, "key", "test key");
- * bundle_add_str(b1, "value", "test value");
- * b2 = bundle_create();
- * bundle_add_str(b2, "key", "test key2");
- * bundle_add_str(b2, "value", "test value2");
+ * bundle_add_str(b1, "value", "test value");
+ * b2 = bundle_create();
+ * bundle_add_str(b2, "key", "test key2");
+ * bundle_add_str(b2, "value", "test value2");
*
* data_control_bulk_data_create(&bulk_data);
* data_control_bulk_data_add(bulk_data, b1);
- * data_control_bulk_data_add(bulk_data, b2);
+ * data_control_bulk_data_add(bulk_data, b2);
*
* data_control_bulk_data_get_count(bulk_data, &count);
* dlog_print(DLOG_INFO, LOG_TAG, "bulk add count %d ", count);
*
- * data_control_map_add_bulk_data(provider, bulk_data, &req_id);
+ * data_control_map_add_bulk_data(provider, bulk_data, &req_id);
* data_control_bulk_data_destroy(bulk_data);
*
- * bundle_free(b1);
- * bundle_free(b2);
- * return result;
- * }
+ * bundle_free(b1);
+ * bundle_free(b2);
+ * return result;
+ * }
*
* @endcode
-
- * @param[in] provider The provider handle
- * @param[in] bulk_data The bulk data handle
- * @param[out] request_id The request ID
*
+ * @param[in] provider The provider handle
+ * @param[in] bulk_data The bulk data handle
+ * @param[out] request_id The request ID
* @return @c 0 on success,
* otherwise a negative error value
- *
- * @retval #DATA_CONTROL_ERROR_NONE Successful
+ * @retval #DATA_CONTROL_ERROR_NONE Successful
* @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error
- * @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory
- * @retval #DATA_CONTROL_ERROR_MAX_EXCEEDED Too long argument. Bulk data total length cannot exceed 1MB
+ * @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error
+ * @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory
+ * @retval #DATA_CONTROL_ERROR_MAX_EXCEEDED Too long argument. Bulk data total length cannot exceed 1MB
* @retval #DATA_CONTROL_ERROR_PERMISSION_DENIED Permission denied
*/
int data_control_map_add_bulk_data(data_control_h provider, data_control_bulk_data_h bulk_data, int *request_id);
+
/**
- * @brief Registers an add bulk data callback for the MAP data control response.
+ * @brief Registers an add bulk data callback for the MAP data control response.
* @since_tizen 3.0
- *
- * remarks The application is notified when a data control response is received from the @a provider.
- *
- * @param[in] provider The provider handle
- * @param[in] callback The callback function to be called when a response is received
- * @param[in] user_data The user data to be passed to the callback function
- *
- * @return @c 0 on success,
+ * @remarks The application is notified when a data control response is received from the @a provider.
+ * @param[in] provider The provider handle
+ * @param[in] callback The callback function to be called when a response is received
+ * @param[in] user_data The user data to be passed to the callback function
+ * @return @c 0 on success,
* otherwise a negative error value
- *
- * @retval #DATA_CONTROL_ERROR_NONE Successful
- * @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error
+ * @retval #DATA_CONTROL_ERROR_NONE Successful
+ * @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error
* @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory
- * @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
- *
- * @see data_control_map_unregister_add_bulk_data_response_cb()
+ * @retval #DATA_CONTROL_ERROR_INVALID_PARAMETE Invalid parameter
+ * @see data_control_map_unregister_add_bulk_data_response_cb()
*/
-int data_control_map_register_add_bulk_data_response_cb(data_control_h provider,
- data_control_bulk_cb callback, void *user_data);
+int data_control_map_register_add_bulk_data_response_cb(data_control_h provider, data_control_bulk_cb callback, void *user_data);
+
/**
- * @brief Unregisters the add bulk data callback.
+ * @brief Unregisters the add bulk data callback.
* @since_tizen 3.0
- *
- * @param[in] provider The provider handle
- *
+ * @param[in] provider The provider handle
* @return @c 0 on success,
* otherwise a negative error value
- * @retval #DATA_CONTROL_ERROR_NONE Successful
+ * @retval #DATA_CONTROL_ERROR_NONE Successful
* @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory
- * @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
- * @see data_control_map_register_add_bulk_data_response_cb()
+ * @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
+ * @see data_control_map_register_add_bulk_data_response_cb()
*/
int data_control_map_unregister_add_bulk_data_response_cb(data_control_h provider);
+
/**
* @}
*/
extern "C" {
#endif
+
/**
- * @file data_control_noti.h
- * @brief This is the header file for data change notifications of the Data Control module. \n
- * All callbacks are called in the main loop context, unless stated otherwise.
+ * @file data_control_noti.h
+ * @brief This is the header file for data change notifications of the Data Control module. \n
+ * All callbacks are called in the main loop context, unless stated otherwise.
*/
/**
/**
- * @brief Called when received data changed notification from provider application.
+ * @brief Called when received data changed notification from provider application.
* @since_tizen 3.0
- *
- * @param[in] provider The provider handle. @a provider is valid only inside this function. \n
- * @a provider should not be freed.
- * @param[in] type Changed data type.
- * @param[in] data Data from provider, intended to contain information about changed data \n
- * @a data is valid only inside this function. \n
- * To use outside the callback, make a copy. @a data should not be freed.
- * @param[in] user_data The user data passed from the add function.
- *
+ * @param[in] provider The provider handle. @a provider is valid only inside this function \n
+ * @a provider should not be freed
+ * @param[in] type Changed data type
+ * @param[in] data Data from provider, intended to contain information about changed data \n
+ * @a data is valid only inside this function \n
+ * To use outside the callback, make a copy. @a data should not be freed
+ * @param[in] user_data The user data passed from the add function
* @pre The callback must be registered using data_control_add_data_change_cb(). \n
- * data_control_provider_send_data_change_noti() must be called to invoke this callback.
- *
- * @see data_control_add_data_change_cb()
- * @see data_control_provider_send_data_change_noti()
+ * data_control_provider_send_data_change_noti() must be called to invoke this callback.
+ * @see data_control_add_data_change_cb()
+ * @see data_control_provider_send_data_change_noti()
*/
-typedef void (*data_control_data_change_cb) (
- data_control_h provider,
- data_control_data_change_type_e type,
- bundle *data,
- void *user_data);
+typedef void (*data_control_data_change_cb) (data_control_h provider, data_control_data_change_type_e type, bundle *data, void *user_data);
+
/**
- * @brief Called when the consumer receives the result of the data change callback adding operation.
- * @details The following error codes can be delivered. \n
- * #DATA_CONTROL_ERROR_NONE, \n
- * #DATA_CONTROL_ERROR_OUT_OF_MEMORY, \n
- * #DATA_CONTROL_ERROR_IO_ERROR, \n
- * #DATA_CONTROL_ERROR_PERMISSION_DENIED, \n
- * #DATA_CONTROL_ERROR_MAX_EXCEEDED
- *
+ * @brief Called when the consumer receives the result of the data change callback adding operation.
+ * @details The following error codes can be delivered: \n
+ * #DATA_CONTROL_ERROR_NONE, \n
+ * #DATA_CONTROL_ERROR_OUT_OF_MEMORY, \n
+ * #DATA_CONTROL_ERROR_IO_ERROR, \n
+ * #DATA_CONTROL_ERROR_PERMISSION_DENIED, \n
+ * #DATA_CONTROL_ERROR_MAX_EXCEEDED
* @since_tizen 3.0
- *
* @remarks DATA_CONTROL_ERROR_PERMISSION_DENIED will be returned when the provider denies to add the callback.
- *
- * @param[in] provider The provider handle. @a provider is valid only inside this function. \n
- * @a provider should not be freed.
- * @param[in] result Add data changed callback result.
- * @param[in] callback_id Added callback ID.
- * @param[in] user_data The user data passed from the add function.
- *
- * @pre The callback must be registered using data_control_add_data_change_cb().
- *
- * @see data_control_add_data_change_cb()
+ * @param[in] provider The provider handle. @a provider is valid only inside this function \n
+ * @a provider should not be freed
+ * @param[in] result Add data change callback result
+ * @param[in] callback_id Added callback ID
+ * @param[in] user_data The user data passed from the add function
+ * @pre The callback must be registered using data_control_add_data_change_cb().
+ * @see data_control_add_data_change_cb()
*/
-typedef void (*data_control_add_callback_result_cb) (
- data_control_h provider,
- data_control_error_e result,
- int callback_id,
- void *user_data);
+typedef void (*data_control_add_callback_result_cb) (data_control_h provider, data_control_error_e result, int callback_id, void *user_data);
+
/**
- * @brief Asynchronously adds a data changed callback which is called whenever the provider's data is changed.
- * @details The function attempts to add the callback asynchronously and calls result_callback to inform about the result of the attempt. \n
- * If the function is successful, result_callback will be called. \n
- * The provider will call any filters which were added for the callback addition process.
+ * @brief Asynchronously adds a data changed callback, which is called whenever the provider's data is changed.
+ * @details The function attempts to add the callback asynchronously and calls result_callback to inform about the result of the attempt. \n
+ * If the function is successful, result_callback will be called. \n
+ * The provider will call any filters which were added for the callback addition process.
* @since_tizen 3.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/datasharing \n
- * %http://tizen.org/privilege/appmanager.launch
- *
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/datasharing \n
+ * %http://tizen.org/privilege/appmanager.launch
* @remarks If you want to use this function, you must add privileges.
- *
- * @param [in] provider Target provider handle
- * @param [in] callback The callback function to be called when consumer receive data changed notification
- * @param [in] user_data The user data to be passed to the callback function
- * @param [in] result_callback The callback function to be called when consumer receive add data changed callback process result
- * @param [in] result_cb_user_data The user data to be passed to the result_callback function
- * @param [out] callback_id Added callback ID, it can be used to remove the callback
- *
+ * @param [in] provider Target provider handle
+ * @param [in] callback The callback function to be called when consumer receives data change notification
+ * @param [in] user_data The user data to be passed to the callback function
+ * @param [in] result_callback The callback function to be called when consumer receives add data change callback process result
+ * @param [in] result_cb_user_data The user data to be passed to the result_callback function
+ * @param [out] callback_id Added callback ID, it can be used to remove the callback
* @return @c 0 on success,
* otherwise a negative error value
- *
- * @retval #DATA_CONTROL_ERROR_NONE Successful
- * @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error
+ * @retval #DATA_CONTROL_ERROR_NONE Successful
+ * @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error
* @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory
* @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #DATA_CONTROL_ERROR_PERMISSION_DENIED Permission denied
- *
- * @see data_control_data_change_cb()
- * @see data_control_add_callback_result_cb()
+ * @see data_control_data_change_cb()
+ * @see data_control_add_callback_result_cb()
* @see data_control_provider_add_data_change_consumer_filter_cb()
- *
*/
-int data_control_add_data_change_cb(
- data_control_h provider,
- data_control_data_change_cb callback,
- void *user_data,
- data_control_add_callback_result_cb result_callback,
- void *result_cb_user_data,
- int *callback_id);
+int data_control_add_data_change_cb(data_control_h provider, data_control_data_change_cb callback, void *user_data, data_control_add_callback_result_cb result_callback, void *result_cb_user_data, int *callback_id);
+
/**
- * @brief Removes data changed callback function.
+ * @brief Removes data change callback function.
* @since_tizen 3.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/datasharing \n
- * %http://tizen.org/privilege/appmanager.launch
- *
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/datasharing \n
+ * %http://tizen.org/privilege/appmanager.launch
* @remarks If you want to use this function, you must add privileges.
- *
- * @param [in] provider Target provider handle
- * @param [in] callback_id Target callback ID
- *
+ * @param [in] provider Target provider handle
+ * @param [in] callback_id Target callback ID
* @return @c 0 on success,
* otherwise a negative error value
- *
- * @retval #DATA_CONTROL_ERROR_NONE Successful
- * @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error
+ * @retval #DATA_CONTROL_ERROR_NONE Successful
+ * @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error
* @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory
* @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #DATA_CONTROL_ERROR_PERMISSION_DENIED Permission denied
* @}
*/
+
#ifdef __cplusplus
}
#endif
#endif
/**
- * @file data_control_provider.h
- * @brief This is the header file for the data control provider.\n
- * All callbacks are called in the main loop context, unless stated otherwise.
+ * @file data_control_provider.h
+ * @brief This is the header file for the data control provider.\n
+ * All callbacks are called in the main loop context, unless stated otherwise.
*/
/**
* @{
*/
+
/**
- * @brief Called for each application which successfully added a data change callback.
+ * @brief Called for each application which successfully added a data change callback.
* @since_tizen 3.0
*
- * @param[in] provider The provider handle. @a provider is valid only inside this function. \n
- * @a provider should not be freed.
- * @param[in] consumer_appid The id of the consumer application. @a consumer_appid is valid only inside this function. \n
- * To use outside the callback, make a copy. @a consumer_appid should not be freed.
- * @param[in] user_data The user data.
+ * @param[in] provider The provider handle. @a provider is valid only inside this function \n
+ * @a provider should not be freed
+ * @param[in] consumer_appid The id of the consumer application. @a consumer_appid is valid only inside this function \n
+ * To use outside the callback, make a copy. @a consumer_appid should not be freed
+ * @param[in] user_data The user data
* @return @c true to continue with the next iteration of the loop,
* otherwise @c false to break out of the loop
*
- * @pre data_control_provider_foreach_data_change_consumer() must be called to invoke this callback.
- * @see data_control_provider_foreach_data_change_consumer()
+ * @pre data_control_provider_foreach_data_change_consumer() must be called to invoke this callback.
+ * @see data_control_provider_foreach_data_change_consumer()
*/
-typedef bool (*data_control_provider_data_change_consumer_cb)(
- data_control_h provider,
- char *consumer_appid,
- void *user_data);
+typedef bool (*data_control_provider_data_change_consumer_cb)(data_control_h provider, char *consumer_appid, void *user_data);
+
/**
- * @brief Called when a consumer requests a data change callback addition.
- * @since_tizen 3.0
- * @details The callback decides - through the return value - whether a consumer application should be allowed to add a data change callback. \n
- * If it returns true, it means the application should be allowed to do so, if it returns false, it means it should be denied.
+ * @brief Called when a consumer requests a data change callback addition.
+ * @details The callback decides - through the return value - whether a consumer application should be allowed to add a data change callback. \n
+ * If it returns true, it means the application should be allowed to do so, if it returns false, it means it should be denied.
*
- * @param[in] provider The provider handle. @a provider is valid only inside this function. \n
- * @a provider should not be freed.
- * @param[in] consumer_appid The id of the consumer application which requested to add the callback. @a consumer_appid is valid only inside this function. \n
- * To use outside the callback, make a copy. @a consumer_appid should not be freed.
- * @param[in] user_data The user data.
- * @return @c A boolean value indicating whether the consumer application should be allowed to add data change callbacks.
+ * @since_tizen 3.0
+ * @param[in] provider The provider handle. @a provider is valid only inside this function. \n
+ * @a provider should not be freed
+ * @param[in] consumer_appid The id of the consumer application which requested to add the callback. @a consumer_appid is valid only inside this function. \n
+ * To use outside the callback, make a copy. @a consumer_appid should not be freed
+ * @param[in] user_data The user data.
+ * @return A boolean value indicating whether the consumer application should be allowed to add data change callbacks.
+ * @c true let the application add a data change callback,
+ * otherwise @c false application not allowed to add data change callback
*
* @pre The callback must be registered using data_control_provider_add_data_change_consumer_filter_cb(). \n
- * data_control_add_data_change_cb() must be called to invoke this callback.
+ * data_control_add_data_change_cb() must be called to invoke this callback.
*
- * @see data_control_provider_add_data_change_consumer_filter_cb()
- * @see data_control_provider_remove_data_change_consumer_filter_cb()
+ * @see data_control_provider_add_data_change_consumer_filter_cb()
+ * @see data_control_provider_remove_data_change_consumer_filter_cb()
*/
-typedef bool (*data_control_provider_data_change_consumer_filter_cb)(
- data_control_h provider,
- char *consumer_appid,
- void *user_data);
+typedef bool (*data_control_provider_data_change_consumer_filter_cb)(data_control_h provider, char *consumer_appid, void *user_data);
+
/**
- * @brief Called when the bulk data request is received from an consumer application.
+ * @brief Called when the bulk data request is received from an consumer application.
* @since_tizen 3.0
*
- * @param[in] request_id The request ID
- * @param[in] provider The provider handle
- * @param[in] bulk_data The bulk data handle which contains data to be inserted or added
- * @param[in] user_data The user data passed from the register function
+ * @param[in] request_id The request ID
+ * @param[in] provider The provider handle
+ * @param[in] bulk_data The bulk data handle which contains data to be inserted or added
+ * @param[in] user_data The user data passed from the register function
*
- * @see data_control_provider_sql_register_insert_bulk_data_request_cb()
- * @see data_control_provider_map_register_add_bulk_data_request_cb()
- * @see data_control_sql_insert_bulk_data()
- * @see data_control_map_add_bulk_data()
- * @see data_control_bulk_data_add()
+ * @see data_control_provider_sql_register_insert_bulk_data_request_cb()
+ * @see data_control_provider_map_register_add_bulk_data_request_cb()
+ * @see data_control_sql_insert_bulk_data()
+ * @see data_control_map_add_bulk_data()
+ * @see data_control_bulk_data_add()
*/
-typedef void (*data_control_provider_bulk_cb)(
- int request_id,
- data_control_h provider,
- data_control_bulk_data_h bulk_data,
- void *user_data);
+typedef void (*data_control_provider_bulk_cb)(int request_id, data_control_h provider, data_control_bulk_data_h bulk_data, void *user_data);
+
/**
- * @brief Called when the insert request is received from an application using SQL-friendly interface based data control.
+ * @brief Called when the insert request is received from an application using SQL-friendly interface based data control.
* @since_tizen 2.3
*
- * @param[in] request_id The request ID
- * @param[in] provider The provider handle
- * @param[in] insert_data The column-value pairs to insert \n
- * If the value is a string, it must be wrapped in single quotes, else it does not need to be wrapped in single quotes.
- * @param[in] user_data The user data passed from the register function
+ * @param[in] request_id The request ID
+ * @param[in] provider The provider handle
+ * @param[in] insert_data The column-value pairs to insert \n
+ * If the value is a string, the value must be wrapped in single quotes,
+ * else it does not need to be wrapped in single quotes
+ * @param[in] user_data The user data passed from the register function
*/
-typedef void (*data_control_provider_sql_insert_request_cb)(int request_id,
- data_control_h provider, bundle *insert_data, void *user_data);
+typedef void (*data_control_provider_sql_insert_request_cb)(int request_id, data_control_h provider, bundle *insert_data, void *user_data);
+
/**
- * @brief Called when the update request is received from an application using SQL-friendly interface based data control.
+ * @brief Called when the update request is received from an application using SQL-friendly interface based data control.
* @since_tizen 2.3
*
- * @param[in] request_id The request ID
- * @param[in] provider The provider handle
- * @param[in] update_data The column-value pairs to update \n
- * If the value is a string, the value must be wrapped in single quotes, else it does not need to be wrapped in single quotes.
- * @param[in] where A filter to select the desired rows to update \n
- * It is an SQL 'WHERE' clause excluding the 'WHERE' itself such as column1 = 'stringValue' and column2 = numericValue.
- * @param[in] user_data The user data passed from the register function
+ * @param[in] request_id The request ID
+ * @param[in] provider The provider handle
+ * @param[in] update_data The column-value pairs to update \n
+ * If the value is a string, the value must be wrapped in single quotes,
+ * else it does not need to be wrapped in single quotes
+ * @param[in] where A filter to select the desired rows to update \n
+ * It is an SQL 'WHERE' clause excluding the 'WHERE' itself such as column1 = 'stringValue' and column2 = numericValue
+ * @param[in] user_data The user data passed from the register function
*/
-typedef void (*data_control_provider_sql_update_request_cb)(int request_id,
- data_control_h provider, bundle *update_data,
- const char *where, void *user_data);
+typedef void (*data_control_provider_sql_update_request_cb)(int request_id, data_control_h provider, bundle *update_data, const char *where, void *user_data);
+
/**
- * @brief Called when the delete request is received from an application using SQL-friendly interface based data control.
+ * @brief Called when the delete request is received from an application using SQL-friendly interface based data control.
* @since_tizen 2.3
*
- * @param[in] request_id The request ID
- * @param[in] provider The provider handle
- * @param[in] where A filter to select the desired rows to delete \n
- * It is an SQL 'WHERE' clause excluding the 'WHERE' itself such as column1 = 'stringValue' and column2 = numericValue.
- * @param[in] user_data The user data passed from the register function
+ * @param[in] request_id The request ID
+ * @param[in] provider The provider handle
+ * @param[in] where A filter to select the desired rows to delete \n
+ * It is an SQL 'WHERE' clause excluding the 'WHERE' itself such as column1 = 'stringValue' and column2 = numericValue
+ * @param[in] user_data The user data passed from the register function
*/
-typedef void (*data_control_provider_sql_delete_request_cb)(int request_id,
- data_control_h provider, const char *where, void *user_data);
+typedef void (*data_control_provider_sql_delete_request_cb)(int request_id, data_control_h provider, const char *where, void *user_data);
+
/**
- * @brief Called when the select request is received from an application using SQL-friendly interface based data control.
+ * @brief Called when the select request is received from an application using SQL-friendly interface based data control.
* @since_tizen 2.3
*
- * @param[in] request_id The request ID
- * @param[in] provider The provider handle
- * @param[in] column_list The column list to query
- * @param[in] column_count The total number of columns to be queried
- * @param[in] where A filter to select the desired rows \n
- * It is an SQL 'WHERE' clause excluding the 'WHERE' itself such as column1 = 'stringValue' and column2 = numericValue.
- * @param[in] order The sorting order of the rows to query \n
- * It is an SQL 'ORDER BY' clause excluding the 'ORDER BY' itself.
- * @param[in] user_data The user data passed from the register function
+ * @param[in] request_id The request ID
+ * @param[in] provider The provider handle
+ * @param[in] column_list The column list to query
+ * @param[in] column_count The total number of columns to be queried
+ * @param[in] where A filter to select the desired rows \n
+ * It is an SQL 'WHERE' clause excluding the 'WHERE' itself such as column1 = 'stringValue' and column2 = numericValue
+ * @param[in] order The sorting order of the rows to query \n
+ * It is an SQL 'ORDER BY' clause excluding the 'ORDER BY' itself
+ * @param[in] user_data The user data passed from the register function
*/
-typedef void (*data_control_provider_sql_select_request_cb)(int request_id,
- data_control_h provider, const char **column_list,
- int column_count, const char *where, const char *order,
- void *user_data);
+typedef void (*data_control_provider_sql_select_request_cb)(int request_id, data_control_h provider, const char **column_list, int column_count, const char *where, const char *order, void *user_data);
+
/**
- * @brief Called when the request for obtaining the value list is received from the key-value structured data control consumer.
+ * @brief Called when the request for obtaining the value list is received from the key-value structured data control consumer.
* @since_tizen 2.3
*
- * @param[in] request_id The request ID
- * @param[in] provider The provider handle
- * @param[in] key The key of the value list to obtain
- * @param[in] user_data The user data passed from the register function
+ * @param[in] request_id The request ID
+ * @param[in] provider The provider handle
+ * @param[in] key The key of the value list to obtain
+ * @param[in] user_data The user data passed from the register function
*/
-typedef void (*data_control_provider_map_get_value_request_cb)(int request_id,
- data_control_h provider, const char *key, void *user_data);
+typedef void (*data_control_provider_map_get_value_request_cb)(int request_id, data_control_h provider, const char *key, void *user_data);
+
/**
- * @brief Called when the request for replacing the value is received from the key-value structured data control consumer.
+ * @brief Called when the request for replacing the value is received from the key-value structured data control consumer.
* @since_tizen 2.3
*
- * @param[in] request_id The request ID
- * @param[in] provider The provider handle
- * @param[in] key The key of the value to replace
- * @param[in] old_value The value to replace
- * @param[in] new_value The new value that replaces the existing value
- * @param[in] user_data The user data passed from the register function
+ * @param[in] request_id The request ID
+ * @param[in] provider The provider handle
+ * @param[in] key The key of the value to replace
+ * @param[in] old_value The value to replace
+ * @param[in] new_value The new value that replaces the existing value
+ * @param[in] user_data The user data passed from the register function
*/
-typedef void (*data_control_provider_map_set_value_request_cb)(int request_id,
- data_control_h provider, const char *key,
- const char *old_value, const char *new_value, void *user_data);
+typedef void (*data_control_provider_map_set_value_request_cb)(int request_id, data_control_h provider, const char *key, const char *old_value, const char *new_value, void *user_data);
+
/**
- * @brief Called when the request for adding the value is received from the key-value structured data control consumer.
+ * @brief Called when the request for adding the value is received from the key-value structured data control consumer.
* @since_tizen 2.3
*
- * @param[in] request_id The request ID
- * @param[in] provider The provider handle
- * @param[in] key The key of the value to add
- * @param[in] value The value to add
- * @param[in] user_data The user data passed from the register function
+ * @param[in] request_id The request ID
+ * @param[in] provider The provider handle
+ * @param[in] key The key of the value to add
+ * @param[in] value The value to add
+ * @param[in] user_data The user data passed from the register function
*/
-typedef void (*data_control_provider_map_add_value_request_cb)(int request_id,
- data_control_h provider, const char *key,
- const char *value, void *user_data);
+typedef void (*data_control_provider_map_add_value_request_cb)(int request_id, data_control_h provider, const char *key, const char *value, void *user_data);
+
/**
- * @brief Called when the request for removing the value is received from the key-value structured data control consumer.
+ * @brief Called when the request for removing the value is received from the key-value structured data control consumer.
* @since_tizen 2.3
*
- * @param[in] request_id The request ID
- * @param[in] provider The provider handle
- * @param[in] key The key of the value to remove
- * @param[in] value The value to remove
- * @param[in] user_data The user data passed from the register function
+ * @param[in] request_id The request ID
+ * @param[in] provider The provider handle
+ * @param[in] key The key of the value to remove
+ * @param[in] value The value to remove
+ * @param[in] user_data The user data passed from the register function
*/
-typedef void (*data_control_provider_map_remove_value_request_cb)(
- int request_id, data_control_h provider, const char *key,
- const char *value, void *user_data);
+typedef void (*data_control_provider_map_remove_value_request_cb)(int request_id, data_control_h provider, const char *key, const char *value, void *user_data);
+
/**
* @brief The structure type to contain the set of callback functions for handling the request events
* of SQL-friendly interface based data control.
* @since_tizen 2.3
*
- * @see data_control_provider_sql_select_request_cb()
- * @see data_control_provider_sql_insert_request_cb()
- * @see data_control_provider_sql_update_request_cb()
- * @see data_control_provider_sql_delete_request_cb()
+ * @see data_control_provider_sql_select_request_cb()
+ * @see data_control_provider_sql_insert_request_cb()
+ * @see data_control_provider_sql_update_request_cb()
+ * @see data_control_provider_sql_delete_request_cb()
*/
typedef struct {
data_control_provider_sql_insert_request_cb insert_cb; /**< This callback function is called when a request for insert operation is received from other application. */
data_control_provider_sql_delete_request_cb delete_cb; /**< This callback function is called when a request for delete operation is received from other application. */
} data_control_provider_sql_cb;
+
/**
* @brief The structure type to contain the set of callback functions for handling the request events
* from the key-value structured data control consumer.
* @since_tizen 2.3
*
- * @see data_control_provider_map_get_value_request_cb()
- * @see data_control_provider_map_set_value_request_cb()
- * @see data_control_provider_map_add_value_request_cb()
- * @see data_control_provider_map_remove_value_request_cb()
+ * @see data_control_provider_map_get_value_request_cb()
+ * @see data_control_provider_map_set_value_request_cb()
+ * @see data_control_provider_map_add_value_request_cb()
+ * @see data_control_provider_map_remove_value_request_cb()
*/
typedef struct {
data_control_provider_map_get_value_request_cb get_cb; /**< This callback function is called when a request for getting value is received from other application. */
data_control_provider_map_remove_value_request_cb remove_cb; /**< This callback function is called when a request for removing value is received from other application. */
} data_control_provider_map_cb;
+
/**
- * @brief Registers a callback function for the SQL data control request.
- * The provider is notified when a data control request is received from the client applications.
+ * @brief Registers a callback function for the SQL data control request.
+ * The provider is notified when a data control request is received from the client applications.
* @since_tizen 2.3
- * @privlevel public
- * @privilege %http://tizen.org/privilege/datasharing
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/datasharing
*
- * @param[in] callback The callback function to be called when a data control request is received
- * @param[in] user_data The user data to be passed to the callback function
+ * @param[in] callback The callback function to be called when a data control request is received
+ * @param[in] user_data The user data to be passed to the callback function
*
- * @return @c 0 on success,
- * otherwise a negative error value
+ * @return @c 0 on success,
+ * otherwise a negative error value
*
- * @retval #DATA_CONTROL_ERROR_NONE Successful
+ * @retval #DATA_CONTROL_ERROR_NONE Successful
* @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #DATA_CONTROL_ERROR_PERMISSION_DENIED Permission denied
*/
int data_control_provider_sql_register_cb(data_control_provider_sql_cb *callback, void *user_data);
+
/**
- * @brief Unregisters the callback functions.
+ * @brief Unregisters the callback functions.
* @since_tizen 2.3
*
- * @return @c 0 on success,
- * otherwise a negative error value
+ * @return @c 0 on success,
+ * otherwise a negative error value
*/
int data_control_provider_sql_unregister_cb(void);
+
/**
- * @brief Registers a callback function for the map data control request.
- * The provider is notified when a data control request is received from the client applications.
+ * @brief Registers a callback function for the map data control request.
+ * The provider is notified when a data control request is received from the client applications.
* @since_tizen 2.3
- * @privlevel public
- * @privilege %http://tizen.org/privilege/datasharing
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/datasharing
*
- * @param[in] callback The callback function to be called when a data control request is received
- * @param[in] user_data The user data to be passed to the callback function
+ * @param[in] callback The callback function to be called when a data control request is received
+ * @param[in] user_data The user data to be passed to the callback function
*
- * @return @c 0 on success,
- * otherwise a negative error value
+ * @return @c 0 on success,
+ * otherwise a negative error value
*
- * @retval #DATA_CONTROL_ERROR_NONE Successful
+ * @retval #DATA_CONTROL_ERROR_NONE Successful
* @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #DATA_CONTROL_ERROR_PERMISSION_DENIED Permission denied
*/
int data_control_provider_map_register_cb(data_control_provider_map_cb *callback, void *user_data);
+
/**
- * @brief Unregisters the callback functions.
+ * @brief Unregisters the callback functions.
* @since_tizen 2.3
*
- * @return @c 0 on success,
- * otherwise a negative error value
+ * @return @c 0 on success,
+ * otherwise a negative error value
*/
int data_control_provider_map_unregister_cb(void);
+
/**
- * @brief Gets the application ID which sends the data control request.
+ * @brief Gets the application ID which sends the data control request.
* @since_tizen 2.3
*
- * @param[in] request_id The request ID
- * @param[out] appid The application ID
+ * @param[in] request_id The request ID
+ * @param[out] appid The application ID
*
- * @return @c 0 on success,
- * otherwise a negative error value
+ * @return @c 0 on success,
+ * otherwise a negative error value
*
- * @retval #DATA_CONTROL_ERROR_NONE Successful
+ * @retval #DATA_CONTROL_ERROR_NONE Successful
* @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
*/
int data_control_provider_get_client_appid(int request_id, char **appid);
+
/**
- * @brief Sends the success result and the result set of the select request to the client application.
+ * @brief Sends the success result and the result set of the select request to the client application.
* @since_tizen 2.3
*
- * @param[in] request_id The request ID
- * @param[in] db_handle The result DB handle for the result set
+ * @param[in] request_id The request ID
+ * @param[in] db_handle The result DB handle for the result set
*
- * @return @c 0 on success,
- * otherwise a negative error value
+ * @return @c 0 on success,
+ * otherwise a negative error value
*
- * @retval #DATA_CONTROL_ERROR_NONE Successful
- * @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error
+ * @retval #DATA_CONTROL_ERROR_NONE Successful
+ * @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error
* @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #DATA_CONTROL_ERROR_PERMISSION_DENIED Permission denied
*/
int data_control_provider_send_select_result(int request_id, void *db_handle);
+
/**
- * @brief Sends the success result of the insert request and the last inserted row ID to the client application.
+ * @brief Sends the success result of the insert request and the last inserted row ID to the client application.
* @since_tizen 2.3
*
- * @param[in] request_id The request ID
- * @param[in] row_id The row ID of the database changed by the insert request
+ * @param[in] request_id The request ID
+ * @param[in] row_id The row ID of the database changed by the insert request
*
- * @return @c 0 on success,
- * otherwise a negative error value
+ * @return @c 0 on success,
+ * otherwise a negative error value
*
- * @retval #DATA_CONTROL_ERROR_NONE Successful
- * @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error
+ * @retval #DATA_CONTROL_ERROR_NONE Successful
+ * @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error
* @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
*/
int data_control_provider_send_insert_result(int request_id, long long row_id);
+
/**
- * @brief Sends the success result of the update request to the client application.
+ * @brief Sends the success result of the update request to the client application.
* @since_tizen 2.3
*
- * @param[in] request_id The request ID
+ * @param[in] request_id The request ID
*
- * @return @c 0 on success,
- * otherwise a negative error value
+ * @return @c 0 on success,
+ * otherwise a negative error value
*
- * @retval #DATA_CONTROL_ERROR_NONE Successful
- * @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error
+ * @retval #DATA_CONTROL_ERROR_NONE Successful
+ * @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error
* @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
*/
int data_control_provider_send_update_result(int request_id);
+
/**
- * @brief Sends the success result of the delete request to the client application.
+ * @brief Sends the success result of the delete request to the client application.
* @since_tizen 2.3
*
- * @param[in] request_id The request ID
+ * @param[in] request_id The request ID
*
- * @return @c 0 on success,
- * otherwise a negative error value
+ * @return @c 0 on success,
+ * otherwise a negative error value
*
- * @retval #DATA_CONTROL_ERROR_NONE Successful
- * @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error
+ * @retval #DATA_CONTROL_ERROR_NONE Successful
+ * @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error
* @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
*/
int data_control_provider_send_delete_result(int request_id);
+
/**
- * @brief Sends the provider error message to the client application.
+ * @brief Sends the provider error message to the client application.
* @since_tizen 2.3
*
- * @param[in] request_id The request ID
- * @param[in] error The provider-defined error message
+ * @param[in] request_id The request ID
+ * @param[in] error The provider-defined error message
*
- * @return @c 0 on success,
- * otherwise a negative error value
+ * @return @c 0 on success,
+ * otherwise a negative error value
*
- * @retval #DATA_CONTROL_ERROR_NONE Successful
- * @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error
+ * @retval #DATA_CONTROL_ERROR_NONE Successful
+ * @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error
* @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
*/
int data_control_provider_send_error(int request_id, const char *error);
+
/**
- * @brief Sends the success result of the request for setting, adding and removing the key-value structured data the client application.
+ * @brief Sends the success result of the request for setting, adding, and removing the key-value structured data to the client application.
* @since_tizen 2.3
*
- * @param[in] request_id The request ID
+ * @param[in] request_id The request ID
*
- * @return @c 0 on success,
- * otherwise a negative error value
+ * @return @c 0 on success,
+ * otherwise a negative error value
*
- * @retval #DATA_CONTROL_ERROR_NONE Successful
- * @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error
+ * @retval #DATA_CONTROL_ERROR_NONE Successful
+ * @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error
* @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
*/
int data_control_provider_send_map_result(int request_id);
+
/**
- * @brief Sends the success result of the request for getting the value list to the client application.
+ * @brief Sends the success result of the request for getting the value list to the client application.
* @since_tizen 2.3
*
- * @param[in] request_id The request ID
- * @param[in] value_list The result value list
- * @param[in] value_count The number of the values
+ * @param[in] request_id The request ID
+ * @param[in] value_list The result value list
+ * @param[in] value_count The number of the values
*
- * @return @c 0 on success,
- * otherwise a negative error value
+ * @return @c 0 on success,
+ * otherwise a negative error value
*
- * @retval #DATA_CONTROL_ERROR_NONE Successful
- * @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error
+ * @retval #DATA_CONTROL_ERROR_NONE Successful
+ * @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error
* @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #DATA_CONTROL_ERROR_PERMISSION_DENIED Permission denied
*/
int data_control_provider_send_map_get_value_result(int request_id, char **value_list, int value_count);
+
/**
- * @brief Creates SQL INSERT statement.
- * @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
+ * @brief Creates SQL INSERT statement.
+ *
* @since_tizen 2.3
*
- * @param[in] provider The provider handle
- * @param[in] insert_map The column-value pairs to insert
+ * @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
+ * @param[in] provider The provider handle
+ * @param[in] insert_map The column-value pairs to insert
*
- * @return The SQL INSERT statement on success, otherwise NULL
- * @exception DATA_CONTROL_ERROR_NONE Success
- * @exception DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory
- * @exception DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
+ * @return The SQL INSERT statement on success,
+ * otherwise NULL
+ * @exception DATA_CONTROL_ERROR_NONE Success
+ * @exception DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory
+ * @exception DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
*/
char *data_control_provider_create_insert_statement(data_control_h provider, bundle *insert_map);
+
/**
- * @brief Creates SQL DELETE statement.
- * @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
+ * @brief Creates SQL DELETE statement.
+ *
* @since_tizen 2.3
*
- * @param[in] provider The provider handle
- * @param[in] where A filter to select the desired rows to delete \n
- * Pass @c NULL if all rows need to be deleted.
+ * @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
+ * @param[in] provider The provider handle
+ * @param[in] where A filter to select the desired rows to delete \n
+ * Pass @c NULL if all rows need to be deleted
*
- * @return The SQL DELETE statement on success, otherwise NULL
- * @exception DATA_CONTROL_ERROR_NONE Success
- * @exception DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory
- * @exception DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
+ * @return The SQL DELETE statement on success,
+ * otherwise NULL
+ * @exception DATA_CONTROL_ERROR_NONE Success
+ * @exception DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory
+ * @exception DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
*/
char *data_control_provider_create_delete_statement(data_control_h provider, const char *where);
+
/**
- * @brief Creates SQL UPDATE statement.
- * @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
+ * @brief Creates SQL UPDATE statement.
+ *
* @since_tizen 2.3
*
- * @param[in] provider The provider handle
- * @param[in] update_map The column-value pairs to update
- * @param[in] where A filter to select the desired rows to update
+ * @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
+ * @param[in] provider The provider handle
+ * @param[in] update_map The column-value pairs to update
+ * @param[in] where A filter to select the desired rows to update
*
- * @return The SQL UPDATE statement on success, otherwise NULL
- * @exception DATA_CONTROL_ERROR_NONE Success
- * @exception DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory
- * @exception DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
+ * @return The SQL UPDATE statement on success,
+ * otherwise NULL
+ * @exception DATA_CONTROL_ERROR_NONE Success
+ * @exception DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory
+ * @exception DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
*/
char *data_control_provider_create_update_statement(data_control_h provider, bundle *update_map, const char *where);
+
/**
- * @brief Creates SQL SELECT statement.
- * @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
- * @since_tizen 2.3
+ * @brief Creates SQL SELECT statement.
*
- * @param[in] provider The provider handle
- * @param[in] column_list The column names to query \n
- * Pass @c NULL if all columns need to be selected.
- * @param[in] column_count The total number of columns to be queried
- * @param[in] where A filter to select the desired rows
- * @param[in] order The sorting order of rows to query
+ * @since_tizen 2.3
*
- * @return The SQL SELECT statement on success, otherwise NULL
- * @exception DATA_CONTROL_ERROR_NONE Success
- * @exception DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory
- * @exception DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
+ * @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
+ * @param[in] provider The provider handle
+ * @param[in] column_list The column names to query \n
+ * Pass @c NULL if all columns need to be selected
+ * @param[in] column_count The total number of columns to be queried
+ * @param[in] where A filter to select the desired rows
+ * @param[in] order The sorting order of rows to query
+ *
+ * @return The SQL SELECT statement on success,
+ * otherwise NULL
+ * @exception DATA_CONTROL_ERROR_NONE Success
+ * @exception DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory
+ * @exception DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
*/
char *data_control_provider_create_select_statement(data_control_h provider, const char **column_list, int column_count, const char *where, const char *order);
+
/**
- * @brief Checks whether the given provider ID matches the provider handle's provider ID.
- * @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
+ * @brief Checks whether the given provider ID matches the provider handle's provider ID.
+ *
* @since_tizen 2.3
*
- * @param[in] provider The provider handle
- * @param[in] provider_id The provider ID to be compared with handle's provider ID
+ * @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
+ * @param[in] provider The provider handle
+ * @param[in] provider_id The provider ID to be compared with handle's provider ID
*
- * @return @c true if the provider_id matches,
- * otherwise @c false if it does not match
- * @exception DATA_CONTROL_ERROR_NONE Success
- * @exception DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
+ * @return @c true if the provider_id matches,
+ * otherwise @c false if it does not match
+ * @exception DATA_CONTROL_ERROR_NONE Success
+ * @exception DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
*/
bool data_control_provider_match_provider_id(data_control_h provider, const char *provider_id);
+
/**
- * @brief Checks whether the given data ID matches the provider handle's data ID.
- * @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
+ * @brief Checks whether the given data ID matches the provider handle's data ID.
+ *
* @since_tizen 2.3
*
- * @param[in] provider The provider handle
- * @param[in] data_id The data ID to be compared with handle's data ID
+ * @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
+ * @param[in] provider The provider handle
+ * @param[in] data_id The data ID to be compared with handle's data ID
*
- * @return @c true if the @a data_id matches,
- * otherwise @c false if it does not match
- * @exception DATA_CONTROL_ERROR_NONE Success
- * @exception DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
+ * @return @c true if the @a data_id matches,
+ * otherwise @c false if it does not match
+ * @exception DATA_CONTROL_ERROR_NONE Success
+ * @exception DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
*/
bool data_control_provider_match_data_id(data_control_h provider, const char *data_id);
+
/**
- * @brief Sends a data change notification to consumer applications which have successfully added a data change callback.
+ * @brief Sends a data change notification to consumer applications which have successfully added a data change callback.
* @details If the function is successful, data_control_data_change_cb() callback will be called under certain conditions.
* @since_tizen 3.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/datasharing
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/datasharing
*
- * @param[in] provider Target provider handle
- * @param[in] type Changed data type
- * @param[in] data Customized information about changed data
+ * @param[in] provider Target provider handle
+ * @param[in] type Changed data type
+ * @param[in] data Customized information about changed data
*
- * @return @c 0 on success,
- * otherwise a negative error value
+ * @return @c 0 on success,
+ * otherwise a negative error value
*
- * @retval #DATA_CONTROL_ERROR_NONE Successful
- * @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error
+ * @retval #DATA_CONTROL_ERROR_NONE Successful
+ * @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error
* @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #DATA_CONTROL_ERROR_PERMISSION_DENIED Permission denied
*
- * @pre The consumer should call data_control_add_data_change_cb() to receive data change notifications,
- * @see data_control_data_change_cb()
- * @see data_control_add_data_change_cb()
+ * @pre The consumer should call data_control_add_data_change_cb() to receive data change notifications
+ * @see data_control_data_change_cb()
+ * @see data_control_add_data_change_cb()
*/
-int data_control_provider_send_data_change_noti(
- data_control_h provider,
- data_control_data_change_type_e type,
- bundle *data);
+int data_control_provider_send_data_change_noti(data_control_h provider, data_control_data_change_type_e type, bundle *data);
+
/**
- * @brief Adds a consumer filter for the data changed callback addition process.
+ * @brief Adds a consumer filter for the data changed callback addition process.
* @since_tizen 3.0
- * @remarks If the provider does not add any filters by calling this function, all requests to add a data change callback will be granted. \n
- * If filters are added, and at least one filter returns false for a consumer application, the application will not be able to add data change callbacks.
+ * @remarks If the provider does not add any filters by calling this function, all requests to add a data change callback will be granted. \n
+ * If filters are added, and at least one filter returns false for a consumer application, the application will not be able to add data change callbacks.
*
- * @param[in] callback Consumer filter callback, filtering consumers which try to add data changed callback
- * @param[in] user_data The user data to be passed to the list_cb function
- * @param[out] callback_id Added callback ID
+ * @param[in] callback Consumer filter callback, filtering consumers which try to add data changed callback
+ * @param[in] user_data The user data to be passed to the list_cb function
+ * @param[out] callback_id Added callback ID
*
- * @return @c 0 on success,
- * otherwise a negative error value
+ * @return @c 0 on success,
+ * otherwise a negative error value
*
- * @retval #DATA_CONTROL_ERROR_NONE Successful
- * @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error
+ * @retval #DATA_CONTROL_ERROR_NONE Successful
+ * @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error
* @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
- * @see data_control_provider_data_change_consumer_filter_cb()
+ * @see data_control_provider_data_change_consumer_filter_cb()
*/
-int data_control_provider_add_data_change_consumer_filter_cb(
- data_control_provider_data_change_consumer_filter_cb callback,
- void *user_data,
- int *callback_id);
+int data_control_provider_add_data_change_consumer_filter_cb(data_control_provider_data_change_consumer_filter_cb callback, void *user_data, int *callback_id);
+
/**
- * @brief Removes a consumer filter for the data changed callback addition process.
+ * @brief Removes a consumer filter for the data changed callback addition process.
* @since_tizen 3.0
*
- * @param[in] callback_id Target callback ID
+ * @param[in] callback_id Target callback ID
*
- * @return @c 0 on success,
- * otherwise a negative error value
+ * @return @c 0 on success,
+ * otherwise a negative error value
*
- * @retval #DATA_CONTROL_ERROR_NONE Successful
- * @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error
+ * @retval #DATA_CONTROL_ERROR_NONE Successful
+ * @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error
* @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
*/
int data_control_provider_remove_data_change_consumer_filter_cb(int callback_id);
+
/**
- * @brief Retrieves ids of all applications which receive data change notifications from a given provider.
+ * @brief Retrieves ids of all applications which receive data change notifications from a given provider.
+ * @details This function calls data_control_provider_data_change_consumer_cb() once for each provider's notification target consumer id. \n
+ * If the data_control_provider_data_change_consumer_cb() callback function returns @c false, then iteration will be finished.
* @since_tizen 3.0
- * @details This function calls data_control_provider_data_change_consumer_cb() once for each provider's notification target consumer id. \n
- * If the data_control_provider_data_change_consumer_cb() callback function returns @c false, then iteration will be finished.
*
- * @param[in] provider Target provider handle
- * @param[in] list_cb The iteration callback function
- * @param[in] user_data The user data to be passed to the list_cb function
+ * @param[in] provider Target provider handle
+ * @param[in] list_cb The iteration callback function
+ * @param[in] user_data The user data to be passed to the list_cb function
*
- * @return @c 0 on success,
- * otherwise a negative error value
+ * @return @c 0 on success,
+ * otherwise a negative error value
*
- * @retval #DATA_CONTROL_ERROR_NONE Successful
- * @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error
+ * @retval #DATA_CONTROL_ERROR_NONE Successful
+ * @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error
* @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
* @post This function invokes data_control_provider_data_change_consumer_cb().
- * @see data_control_provider_data_change_consumer_cb()
+ * @see data_control_provider_data_change_consumer_cb()
*/
-int data_control_provider_foreach_data_change_consumer(
- data_control_h provider,
- data_control_provider_data_change_consumer_cb list_cb,
- void *user_data);
+int data_control_provider_foreach_data_change_consumer(data_control_h provider, data_control_provider_data_change_consumer_cb list_cb, void *user_data);
+
/**
- * @brief Sends the result of the bulk insert request to the client application.
+ * @brief Sends the result of the bulk insert request to the client application.
* @since_tizen 3.0
*
- * @param[in] request_id The request ID
- * @param[in] bulk_results The bulk add result for each data
+ * @param[in] request_id The request ID
+ * @param[in] bulk_results The bulk add result for each data
*
- * @return @c 0 on success,
- * otherwise a negative error value
+ * @return @c 0 on success,
+ * otherwise a negative error value
*
- * @retval #DATA_CONTROL_ERROR_NONE Successful
- * @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error
+ * @retval #DATA_CONTROL_ERROR_NONE Successful
+ * @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error
* @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
*/
int data_control_provider_send_bulk_insert_result(int request_id, data_control_bulk_result_data_h bulk_results);
+
/**
- * @brief Sends the result of the bulk add request to the client application.
+ * @brief Sends the result of the bulk add request to the client application.
* @since_tizen 3.0
*
- * @param[in] request_id The request ID
- * @param[in] bulk_results The bulk add result for each data
+ * @param[in] request_id The request ID
+ * @param[in] bulk_results The bulk add result for each data
*
- * @return @c 0 on success,
- * otherwise a negative error value
+ * @return @c 0 on success,
+ * otherwise a negative error value
*
- * @retval #DATA_CONTROL_ERROR_NONE Successful
- * @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error
+ * @retval #DATA_CONTROL_ERROR_NONE Successful
+ * @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error
* @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
*/
int data_control_provider_send_map_bulk_add_result(int request_id, data_control_bulk_result_data_h bulk_results);
+
/**
- * @brief Registers a callback for the SQL bulk data request.
- * @details The provider is notified when a data control request is received from the client applications.
+ * @brief Registers a callback for the SQL bulk data request.
+ * @details The provider is notified when a data control request is received from the client applications.
* @since_tizen 3.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/datasharing
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/datasharing
*
- * @param[in] callback The callback function to be called when a data control request is received
- * @param[in] user_data The user data to be passed to the callback function
+ * @param[in] callback The callback function to be called when a data control request is received
+ * @param[in] user_data The user data to be passed to the callback function
*
- * @return @c 0 on success,
- * otherwise a negative error value
+ * @return @c 0 on success,
+ * otherwise a negative error value
*
- * @retval #DATA_CONTROL_ERROR_NONE Successful
+ * @retval #DATA_CONTROL_ERROR_NONE Successful
* @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #DATA_CONTROL_ERROR_PERMISSION_DENIED Permission denied
*/
int data_control_provider_sql_register_insert_bulk_data_request_cb(data_control_provider_bulk_cb callback, void *user_data);
+
/**
* @brief Unregisters the callback for the SQL bulk data request.
* @since_tizen 3.0
*/
int data_control_provider_sql_unregister_insert_bulk_data_request_cb(void);
+
/**
* @brief Registers a callback for the MAP bulk data request.
* @details The provider is notified when a data control request is received from the client applications.
*/
int data_control_provider_map_register_add_bulk_data_request_cb(data_control_provider_bulk_cb callback, void *user_data);
+
/**
* @brief Unregisters the callback for the MAP bulk data request.
* @since_tizen 3.0
*/
int data_control_provider_map_unregister_add_bulk_data_request_cb(void);
+
/**
* @}
*/
*/
/**
- * @brief Called when a response is received for an insert operation from an application using the SQL-friendly interface based data control.
+ * @brief Called when a response is received for an insert operation from an application using the SQL-friendly interface based data control.
* @since_tizen 2.3
*
- * @param[in] request_id The request ID
- * @param[in] provider The provider handle
- * @param[in] inserted_row_id The inserted row ID set by the data control
- * @param[in] provider_result Set to @c true if the data control provider successfully processed, \n
- * otherwise set to @c false
- * @param[in] error The error message from the data control provider
- * @param[in] user_data The user data passed from the register function
+ * @param[in] request_id The request ID
+ * @param[in] provider The provider handle
+ * @param[in] inserted_row_id The inserted row ID set by the data control
+ * @param[in] provider_result Set to @c true if the data control provider successfully processed, \n
+ * otherwise set to @c false
+ * @param[in] error The error message from the data control provider
+ * @param[in] user_data The user data passed from the register function
*/
-typedef void (*data_control_sql_insert_response_cb)(int request_id,
- data_control_h provider, long long inserted_row_id,
- bool provider_result, const char *error, void *user_data);
+typedef void (*data_control_sql_insert_response_cb)(int request_id, data_control_h provider, long long inserted_row_id, bool provider_result, const char *error, void *user_data);
+
/**
- * @brief Called when a response is received for a delete operation from an application using the SQL-friendly interface based data control.
+ * @brief Called when a response is received for a delete operation from an application using the SQL-friendly interface based data control.
* @since_tizen 2.3
*
- * @param[in] request_id The request ID that identifies the data control
- * @param[in] provider_result Set to @c true if the data control provider successfully processed, \n
- * otherwise set to @c false
- * @param[in] error The error message from the data control provider
- * @param[in] user_data The user data passed from the register function
+ * @param[in] request_id The request ID that identifies the data control
+ * @param[in] provider_result Set to @c true if the data control provider successfully processed, \n
+ * otherwise set to @c false
+ * @param[in] error The error message from the data control provider
+ * @param[in] user_data The user data passed from the register function
*/
-typedef void (*data_control_sql_delete_response_cb)(int request_id,
- data_control_h provider, bool provider_result,
- const char *error, void *user_data);
+typedef void (*data_control_sql_delete_response_cb)(int request_id, data_control_h provider, bool provider_result, const char *error, void *user_data);
+
/**
- * @brief Called when a response is received for a select operation from an application using the SQL-friendly interface based data control.
+ * @brief Called when a response is received for a select operation from an application using the SQL-friendly interface based data control.
* @since_tizen 2.3
*
- * @remarks @a enumerator will be removed after this callback is called.
+ * @remarks @a enumerator will be removed after this callback is called.
*
- * @param[in] request_id The request ID
- * @param[in] provider The provider handle
- * @param[in] enumerator The enumerator for navigating the result of data control select request
- * @param[in] provider_result Set to @c true if the data control provider successfully processed, \n
- * otherwise set to @c false
- * @param[in] error The error message from the data control provider
- * @param[in] user_data The user data passed from the register function
+ * @param[in] request_id The request ID
+ * @param[in] provider The provider handle
+ * @param[in] enumerator The enumerator for navigating the result of data control select request
+ * @param[in] provider_result Set to @c true if the data control provider successfully processed, \n
+ * otherwise set to @c false
+ * @param[in] error The error message from the data control provider
+ * @param[in] user_data The user data passed from the register function
*/
-typedef void (*data_control_sql_select_response_cb)(int request_id,
- data_control_h provider, result_set_cursor enumerator,
- bool provider_result, const char *error, void *user_data);
+typedef void (*data_control_sql_select_response_cb)(int request_id, data_control_h provider, result_set_cursor enumerator, bool provider_result, const char *error, void *user_data);
+
/**
- * @brief Called when a response is received for an update operation from an application using the SQL-friendly interface based data control.
+ * @brief Called when a response is received for an update operation from an application using the SQL-friendly interface based data control.
* @since_tizen 2.3
*
- * @param[in] request_id The request ID
- * @param[in] provider The provider handle
- * @param[in] provider_result Set to @c true if the data control provider successfully processed, \n
- * otherwise set to @c false
- * @param[in] error The error message from the data control provider
- * @param[in] user_data The user data passed from the register function
+ * @param[in] request_id The request ID
+ * @param[in] provider The provider handle
+ * @param[in] provider_result Set to @c true if the data control provider successfully processed, \n
+ * otherwise set to @c false
+ * @param[in] error The error message from the data control provider
+ * @param[in] user_data The user data passed from the register function
*/
-typedef void (*data_control_sql_update_response_cb)(int request_id,
- data_control_h provider, bool provider_result,
- const char *error, void *user_data);
+typedef void (*data_control_sql_update_response_cb)(int request_id, data_control_h provider, bool provider_result, const char *error, void *user_data);
+
/**
- * @brief The structure type to contain the set of callback functions for handling the response events
- * of the SQL-friendly interface based data control.
+ * @brief The structure type to contain the set of callback functions for handling the response events of the SQL-friendly interface based data control.
* @since_tizen 2.3
*
- * @see data_control_sql_select_response_cb()
- * @see data_control_sql_insert_response_cb()
- * @see data_control_sql_update_response_cb()
- * @see data_control_sql_delete_response_cb()
+ * @see data_control_sql_select_response_cb()
+ * @see data_control_sql_insert_response_cb()
+ * @see data_control_sql_update_response_cb()
+ * @see data_control_sql_delete_response_cb()
*/
typedef struct {
data_control_sql_select_response_cb select_cb; /**< This callback function is called when a response is received for an select operation from an application using the SQL-friendly interface based data control. */
data_control_sql_delete_response_cb delete_cb; /**< This callback function is called when a response is received for a delete operation from an application using the SQL-friendly interface based data control. */
} data_control_sql_response_cb;
+
/**
- * @brief Creates a provider handle.
+ * @brief Creates a provider handle.
* @since_tizen 2.3
*
* @remarks The following example demonstrates how to use the %data_control_sql_create() method:
* result = data_control_sql_create(&provider);
* if (result != DATA_CONTROL_ERROR_NONE) {
* LOGE("Creating data control provider is failed with error: %d", result);
+ *
* return result;
* }
*
* result = data_control_sql_set_provider_id(provider, provider_id);
* if (result != DATA_CONTROL_ERROR_NONE) {
* LOGE("Setting providerID is failed with error: %d", result);
+ *
* return result;
* }
*
* result = data_control_sql_set_data_id(provider, data_id);
* if (result != DATA_CONTROL_ERROR_NONE) {
* LOGE("Setting dataID is failed with error: %d", result);
+ *
* return result;
* }
*
* // Executes some operations
*
* result = data_control_sql_destroy(provider);
- * if (result != DATA_CONTROL_ERROR_NONE) {
+ * if (result != DATA_CONTROL_ERROR_NONE)
* LOGE("Destroying data control provider is failed with error: %d", result);
- * }
*
* return result;
* }
*
* @endcode
- * @param[out] provider The provider handle
+ * @param[out] provider The provider handle
*
- * @return @c 0 on success,
- * otherwise a negative error value
+ * @return @c 0 on success,
+ * otherwise a negative error value
*
- * @retval #DATA_CONTROL_ERROR_NONE Successful
+ * @retval #DATA_CONTROL_ERROR_NONE Successful
* @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory
+ * @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory
*
- * @see data_control_sql_destroy()
+ * @see data_control_sql_destroy()
*/
int data_control_sql_create(data_control_h *provider);
+
/**
- * @brief Destroys the provider handle and releases all its resources.
+ * @brief Destroys the provider handle and releases all its resources.
* @since_tizen 2.3
*
- * @remarks When operations of data control are finished, this function must be called to prevent the memory leak.
+ * @remarks When operations of data control are finished, this function must be called to prevent the memory leak.
*
- * @param[in] provider The provider handle
+ * @param[in] provider The provider handle
*
- * @return @c 0 on success,
- * otherwise a negative error value
+ * @return @c 0 on success,
+ * otherwise a negative error value
*
* @see data_control_sql_create()
*/
int data_control_sql_destroy(data_control_h provider);
+
/**
- * @brief Sets the Provider ID.
+ * @brief Sets the Provider ID.
* @since_tizen 2.3
*
- * @param[in] provider The provider handle
- * @param[in] provider_id The data control provider ID
+ * @param[in] provider The provider handle
+ * @param[in] provider_id The data control provider ID
*
- * @return @c 0 on success,
- * otherwise a negative error value
+ * @return @c 0 on success,
+ * otherwise a negative error value
*
- * @retval #DATA_CONTROL_ERROR_NONE Successful
+ * @retval #DATA_CONTROL_ERROR_NONE Successful
* @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory
+ * @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory
*
- * @see data_control_sql_get_provider_id()
+ * @see data_control_sql_get_provider_id()
*/
int data_control_sql_set_provider_id(data_control_h provider, const char *provider_id);
+
/**
- * @brief Gets the Provider ID.
+ * @brief Gets the Provider ID.
* @since_tizen 2.3
*
- * @remarks You must release @a provider_id using free() after it is used.
+ * @remarks You must release @a provider_id using free() after it is used.
*
- * @param[in] provider The provider handle
- * @param[out] provider_id The data control provider ID
+ * @param[in] provider The provider handle
+ * @param[out] provider_id The data control provider ID
*
- * @return @c 0 on success,
- * otherwise a negative error value
+ * @return @c 0 on success,
+ * otherwise a negative error value
*
- * @retval #DATA_CONTROL_ERROR_NONE Successful
+ * @retval #DATA_CONTROL_ERROR_NONE Successful
* @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory
+ * @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory
*
- * @see data_control_sql_set_provider_id()
+ * @see data_control_sql_set_provider_id()
*/
int data_control_sql_get_provider_id(data_control_h provider, char **provider_id);
+
/**
- * @brief Sets the data ID.
+ * @brief Sets the data ID.
* @since_tizen 2.3
*
+ * @param[in] provider The provider handle
+ * @param[in] data_id A string for identifying a specific table to operate \n
+ * The string consists of one or more components separated by a slash('/')
+ *
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ *
+ * @retval #DATA_CONTROL_ERROR_NONE Successful
+ * @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory
+ *
+ * @see data_control_sql_get_data_id()
+ *
* @code
*
* {
* }
*
* @endcode
- *
- * @param[in] provider The provider handle
- * @param[in] data_id A string for identifying a specific table to operate \n
- * The string consists of one or more components separated by a slash('/').
- *
- * @return @c 0 on success,
- * otherwise a negative error value
- *
- * @retval #DATA_CONTROL_ERROR_NONE Successful
- * @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory
- *
- * @see data_control_sql_get_data_id()
*/
int data_control_sql_set_data_id(data_control_h provider, const char *data_id);
+
/**
- * @brief Gets the data ID.
+ * @brief Gets the data ID.
* @since_tizen 2.3
*
* @remarks You must release @a data_id using free() after it is used.
*
- * @param[in] provider The provider handle
- * @param[out] data_id A string for identifying a specific table to operate \n
- * The string consists of one or more components separated by a slash('/').
+ * @param[in] provider The provider handle
+ * @param[out] data_id A string for identifying a specific table to operate \n
+ * The string consists of one or more components separated by a slash('/')
*
- * @return @c 0 on success,
- * otherwise a negative error value
+ * @return @c 0 on success,
+ * otherwise a negative error value
*
- * @retval #DATA_CONTROL_ERROR_NONE Successful
- * @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory
+ * @retval #DATA_CONTROL_ERROR_NONE Successful
+ * @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory
*
- * @see data_control_sql_set_data_id()
+ * @see data_control_sql_set_data_id()
*/
int data_control_sql_get_data_id(data_control_h provider, char **data_id);
+
/**
- * @brief Registers a callback function for the SQL data control response.
+ * @brief Registers a callback function for the SQL data control response.
* @since_tizen 2.3
*
* remarks The application is notified when a data control response is received from the @a provider.
*
- * @param[in] provider The provider handle
- * @param[in] callback The callback function to be called when a response is received
- * @param[in] user_data The user data to be passed to the callback function
+ * @param[in] provider The provider handle
+ * @param[in] callback The callback function to be called when a response is received
+ * @param[in] user_data The user data to be passed to the callback function
*
- * @return @c 0 on success,
- * otherwise a negative error value
+ * @return @c 0 on success,
+ * otherwise a negative error value
*
- * @retval #DATA_CONTROL_ERROR_NONE Successful
- * @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error
+ * @retval #DATA_CONTROL_ERROR_NONE Successful
+ * @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error
* @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory
*
- * @see data_control_sql_unregister_response_cb()
+ * @see data_control_sql_unregister_response_cb()
*/
int data_control_sql_register_response_cb(data_control_h provider, data_control_sql_response_cb *callback, void *user_data);
+
/**
- * @brief Unregisters the callback function in the @a provider.
+ * @brief Unregisters the callback function in the @a provider.
* @since_tizen 2.3
*
- * @param[in] provider The provider handle
+ * @param[in] provider The provider handle
*
- * @return @c 0 on success,
- * otherwise a negative error value
+ * @return @c 0 on success,
+ * otherwise a negative error value
*/
int data_control_sql_unregister_response_cb(data_control_h provider);
+
/**
- * @brief Deletes rows of a table owned by the SQL-type data control provider.
+ * @brief Deletes rows of a table owned by the SQL-type data control provider.
* @since_tizen 2.3
- * @privlevel public
- * @privilege %http://tizen.org/privilege/datasharing \n
- * %http://tizen.org/privilege/appmanager.launch
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/datasharing \n
+ * %http://tizen.org/privilege/appmanager.launch
*
* @remarks If you want to use this api, you must add privileges.
* @remarks If the value is a string, then the value must be wrapped in single quotes, else it does not need to be wrapped in single quotes.
*
* @code
*
- * void sql_delete_response_cb(int request_id, data_control_h provider, bool provider_result, const char *error, void *user_data) {
- * if (provider_result) {
+ * void
+ * sql_delete_response_cb(int request_id, data_control_h provider, bool provider_result, const char *error, void *user_data)
+ * {
+ * if (provider_result)
* LOGI(The delete operation is successful");
- * }
- * else {
+ * else
* LOGI("The delete operation for the request %d is failed. error message: %s", request_id, error);
- * }
* }
*
* data_control_sql_response_cb sql_callback;
* result = data_control_sql_register_response_cb(provider, &sql_callback, void *user_data);
* if (result != DATA_CONTROL_ERROR_NONE) {
* LOGE("Registering the callback function is failed with error: %d", result);
+ *
* return result;
* }
*
* result = data_control_sql_delete(provider, where, &req_id);
- * if (result != DATA_CONTROL_ERROR_NONE) {
+ * if (result != DATA_CONTROL_ERROR_NONE)
* LOGE("Deleting is failed with error: %d", result);
- * }
- * else {
+ * else
* LOGI("req_id is %d", req_id);
- * }
*
* return result;
* }
*
* @endcode
*
- * @param[in] provider The provider handle
- * @param[in] where A filter to select the desired rows to delete \n
- * It is an SQL 'WHERE' clause excluding the 'WHERE' itself such as column1 = 'stringValue' and column2 = numericValue.
- * @param[out] request_id The request ID
+ * @param[in] provider The provider handle
+ * @param[in] where A filter to select the desired rows to delete \n
+ * It is an SQL 'WHERE' clause excluding the 'WHERE' itself such as column1 = 'stringValue' and column2 = numericValue
+ * @param[out] request_id The request ID
*
- * @return @c 0 on success,
- * otherwise a negative error value
+ * @return @c 0 on success,
+ * otherwise a negative error value
*
- * @retval #DATA_CONTROL_ERROR_NONE Successful
+ * @retval #DATA_CONTROL_ERROR_NONE Successful
* @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error
- * @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory
+ * @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error
+ * @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory
* @retval #DATA_CONTROL_ERROR_PERMISSION_DENIED Permission denied
*/
int data_control_sql_delete(data_control_h provider, const char *where, int *request_id);
+
/**
- * @brief Inserts new rows in a table owned by the SQL-type data control provider.
+ * @brief Inserts new rows in a table owned by the SQL-type data control provider.
* @since_tizen 2.3
- * @privlevel public
- * @privilege %http://tizen.org/privilege/datasharing \n
- * %http://tizen.org/privilege/appmanager.launch
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/datasharing \n
+ * %http://tizen.org/privilege/appmanager.launch
*
* @remarks If you want to use this api, you must add privileges.
* @remarks The following example demonstrates how to use the %data_control_sql_insert() method:
*
* @code
*
- * void sql_insert_response_cb(int request_id, data_control_h provider, long long inserted_row_id, bool provider_result, const char *error, void *user_data) {
- * if (provider_result) {
+ * void
+ * sql_insert_response_cb(int request_id, data_control_h provider, long long inserted_row_id,
+ * bool provider_result, const char *error, void *user_data)
+ * {
+ * if (provider_result)
* LOGI("The insert operation is successful");
- * }
- * else {
+ * else
* LOGI("The insert operation for the request %d is failed. error message: %s", request_id, error);
- * }
* }
*
* data_control_sql_response_cb sql_callback;
* result = data_control_sql_register_response_cb(provider, &sql_callback, void *user_data);
* if (result != DATA_CONTROL_ERROR_NONE) {
* LOGE("Registering the callback function is failed with error: %d", result);
+ *
* return result;
* }
*
* bundle_add(b, "WORD_DESC", "test description");
*
* result = data_control_sql_insert(provider, b, &req_id);
- * if (result != DATA_CONTROL_ERROR_NONE) {
+ * if (result != DATA_CONTROL_ERROR_NONE)
* LOGE("Inserting is failed with error: %d", result);
- * }
- * else {
+ * else
* LOGI("req_id is %d", req_id);
- * }
*
* bundle_free(b);
+ *
* return result;
* }
*
* @endcode
- * @param[in] provider The provider handle
- * @param[in] insert_data The column-value pairs to insert\ n
- * If the value is a string, then the value must be wrapped in single quotes,
- * else it does not need to be wrapped in single quotes.
- * @param[out] request_id The request ID
+ * @param[in] provider The provider handle
+ * @param[in] insert_data The column-value pairs to insert \n
+ * If the value is a string, then the value must be wrapped in single quotes,
+ * else it does not need to be wrapped in single quotes
+ * @param[out] request_id The request ID
*
- * @return @c 0 on success,
- * otherwise a negative error value
+ * @return @c 0 on success,
+ * otherwise a negative error value
*
- * @retval #DATA_CONTROL_ERROR_NONE Successful
+ * @retval #DATA_CONTROL_ERROR_NONE Successful
* @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error
- * @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory
+ * @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error
+ * @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory
* @retval #DATA_CONTROL_ERROR_PERMISSION_DENIED Permission denied
*/
int data_control_sql_insert(data_control_h provider, const bundle *insert_data, int *request_id);
+
/**
- * @brief Selects the specified columns to be queried.
+ * @brief Selects the specified columns to be queried.
* @since_tizen 2.3
- * @privlevel public
- * @privilege %http://tizen.org/privilege/datasharing \n
- * %http://tizen.org/privilege/appmanager.launch
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/datasharing \n
+ * %http://tizen.org/privilege/appmanager.launch
*
* @remarks If you want to use this api, you must add privileges.
* @remarks The following example demonstrates how to use the %data_control_sql_select() method:
*
* @code
*
- * void sql_select_response_cb(int request_id, data_control_h provider, result_set_cursor *enumerator, bool provider_result, const char *error, void *user_data) {
- * if (provider_result) {
+ * void
+ * sql_select_response_cb(int request_id, data_control_h provider, result_set_cursor *enumerator,
+ * bool provider_result, const char *error, void *user_data)
+ * {
+ * if (provider_result)
* LOGI("The select operation is successful");
- * }
- * else {
+ * else
* LOGI("The select operation for the request %d is failed. error message: %s", request_id, error);
- * }
* }
*
* data_control_sql_response_cb sql_callback;
* result = data_control_sql_register_response_cb(provider, &sql_callback, void *user_data);
* if (result != DATA_CONTROL_ERROR_NONE) {
* LOGE("Registering the callback function is failed with error: %d", result);
+ *
* return result;
* }
*
* result = data_control_sql_select(provider, column_list, 2, where, order, &req_id);
- * if (result != DATA_CONTROL_ERROR_NONE) {
+ * if (result != DATA_CONTROL_ERROR_NONE)
* LOGE("Selecting is failed with error: %d", result);
- * }
- * else {
+ * else
* LOGI("req_id is %d", req_id);
- * }
*
* return result;
* }
* @endcode
- * @param[in] provider The provider handle
- * @param[in] column_list The column list to query
- * @param[in] column_count The total number of columns to be queried
- * @param[in] where A filter to select the desired rows \n
- * It is an SQL 'WHERE' clause excluding the 'WHERE' itself such as column1 = 'stringValue' and column2 = numericValue.
- * @param[in] order The sorting order of the rows to query \n
- * It is an SQL 'ORDER BY' clause excluding the 'ORDER BY' itself.
- * @param[out] request_id The request ID
+ * @param[in] provider The provider handle
+ * @param[in] column_list The column list to query
+ * @param[in] column_count The total number of columns to be queried
+ * @param[in] where A filter to select the desired rows \n
+ * It is an SQL 'WHERE' clause excluding the 'WHERE' itself such as column1 = 'stringValue' and column2 = numericValue
+ * @param[in] order The sorting order of the rows to query \n
+ * It is an SQL 'ORDER BY' clause excluding the 'ORDER BY' itself.
+ * @param[out] request_id The request ID
*
- * @return @c 0 on success,
- * otherwise a negative error value
+ * @return @c 0 on success,
+ * otherwise a negative error value
*
- * @retval #DATA_CONTROL_ERROR_NONE Successful
+ * @retval #DATA_CONTROL_ERROR_NONE Successful
* @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error
- * @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory
+ * @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error
+ * @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory
* @retval #DATA_CONTROL_ERROR_PERMISSION_DENIED Permission denied
*/
int data_control_sql_select(data_control_h provider, char **column_list, int column_count, const char *where, const char *order, int *request_id);
+
/**
- * @brief Selects the specified columns to be queried.
+ * @brief Selects the specified columns to be queried.
* @since_tizen 2.3
- * @privlevel public
- * @privilege %http://tizen.org/privilege/datasharing \n
- * %http://tizen.org/privilege/appmanager.launch
- *
- * @remarks If you want to use this api, you must add privileges.
- *
- * @param[in] provider The provider handle
- * @param[in] column_list The column list to query
- * @param[in] column_count The total number of columns to be queried
- * @param[in] where A filter to select the desired rows \n
- * It is an SQL 'WHERE' clause excluding the 'WHERE' itself such as column1 = 'stringValue' and column2 = numericValue.
- * @param[in] order The sorting order of the rows to query \n
- * It is an SQL 'ORDER BY' clause excluding the 'ORDER BY' itself.
- * @param[in] page_number The page number of the result set \n
- * It starts from @c 1.
- * @param[in] count_per_page The desired maximum count of rows on a page
- * @param[out] request_id The request ID
- *
- * @return @c 0 on success,
- * otherwise a negative error value
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/datasharing \n
+ * %http://tizen.org/privilege/appmanager.launch
*
- * @retval #DATA_CONTROL_ERROR_NONE Successful
+ * @remarks If you want to use this api, you must add privileges.
+ *
+ * @param[in] provider The provider handle
+ * @param[in] column_list The column list to query
+ * @param[in] column_count The total number of columns to be queried
+ * @param[in] where A filter to select the desired rows \n
+ * It is an SQL 'WHERE' clause excluding the 'WHERE' itself such as column1 = 'stringValue' and column2 = numericValue
+ * @param[in] order The sorting order of the rows to query \n
+ * It is an SQL 'ORDER BY' clause excluding the 'ORDER BY' itself
+ * @param[in] page_number The page number of the result set \n
+ * It starts from @c 1
+ * @param[in] count_per_page The desired maximum count of rows on a page
+ * @param[out] request_id The request ID
+ *
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ *
+ * @retval #DATA_CONTROL_ERROR_NONE Successful
* @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error
- * @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory
+ * @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error
+ * @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory
* @retval #DATA_CONTROL_ERROR_PERMISSION_DENIED Permission denied
- * @see data_control_sql_select()
+ * @see data_control_sql_select()
*/
int data_control_sql_select_with_page(data_control_h provider, char **column_list, int column_count, const char *where, const char *order, int page_number, int count_per_page, int *request_id);
+
/**
- * @brief Updates values of a table owned by the SQL-type data control provider.
+ * @brief Updates values of a table owned by the SQL-type data control provider.
* @since_tizen 2.3
- * @privlevel public
- * @privilege %http://tizen.org/privilege/datasharing \n
- * %http://tizen.org/privilege/appmanager.launch
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/datasharing \n
+ * %http://tizen.org/privilege/appmanager.launch
*
* @remarks If you want to use this api, you must add privileges.
* @remarks The following example demonstrates how to use the %data_control_sql_update() method:
*
* @code
*
- * void sql_update_response_cb(int request_id, data_control_h provider, bool provider_result, const char *error, void *user_data) {
- * if (provider_result) {
+ * void
+ * sql_update_response_cb(int request_id, data_control_h provider, bool provider_result, const char *error, void *user_data)
+ * {
+ * if (provider_result)
* LOGI("The update operation is successful");
- * }
- * else {
+ * else
* LOGI("The update operation for the request %d is failed. error message: %s", request_id, error);
- * }
* }
*
* data_control_sql_response_cb sql_callback;
* result = data_control_sql_register_response_cb(provider, &sql_callback, void *user_data);
* if (result != DATA_CONTROL_ERROR_NONE) {
* LOGE("Registering the callback function is failed with error: %d", result);
+ *
* return result;
* }
*
* bundle_add(b, "WORD", "test_new");
*
* result = data_control_sql_update(provider, b, where, &req_id);
- * if (result != DATA_CONTROL_ERROR_NONE) {
+ * if (result != DATA_CONTROL_ERROR_NONE)
* LOGE("Updating is failed with error: %d", result);
- * }
- * else {
+ * else
* LOGI("req_id is %d", req_id);
- * }
*
* bundle_free(b);
+ *
* return result;
* }
*
* @endcode
*
*
- * @param[in] provider The provider handle
- * @param[in] update_data The column-value pairs to update \n
- * If the value is a string, the value must be wrapped in single quotes,
- * else it does not need to be wrapped in single quotes.
- * @param[in] where A filter to select the desired rows to update \n
- * It is an SQL 'WHERE' clause excluding the 'WHERE' itself such as column1 = 'stringValue' and column2 = numericValue.
- * @param[out] request_id The request ID
+ * @param[in] provider The provider handle
+ * @param[in] update_data The column-value pairs to update \n
+ * If the value is a string, the value must be wrapped in single quotes,
+ * else it does not need to be wrapped in single quotes
+ * @param[in] where A filter to select the desired rows to update \n
+ * It is an SQL 'WHERE' clause excluding the 'WHERE' itself such as column1 = 'stringValue' and column2 = numericValue
+ * @param[out] request_id The request ID
*
- * @return @c 0 on success,
- * otherwise a negative error value
+ * @return @c 0 on success,
+ * otherwise a negative error value
*
- * @retval #DATA_CONTROL_ERROR_NONE Successful
+ * @retval #DATA_CONTROL_ERROR_NONE Successful
* @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error
- * @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory
+ * @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error
+ * @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory
* @retval #DATA_CONTROL_ERROR_PERMISSION_DENIED Permission denied
*/
int data_control_sql_update(data_control_h provider, const bundle *update_data, const char *where, int *request_id);
+
/**
- * @brief Inserts multiple rows in one request.
+ * @brief Inserts multiple rows in one request.
* @since_tizen 3.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/datasharing \n
- * %http://tizen.org/privilege/appmanager.launch
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/datasharing \n
+ * %http://tizen.org/privilege/appmanager.launch
*
* @remarks If you want to use this function, you must add privileges.
* @remarks The following example demonstrates how to use the %data_control_sql_insert_bulk_data() method:
*
* @code
*
- * void sql_bulk_insert_response_cb(int request_id, data_control_h provider, data_control_bulk_result_data_h bulk_results,
- * bool provider_result, const char *error, void *user_data) {
- * if (provider_result) {
+ * void
+ * sql_bulk_insert_response_cb(int request_id, data_control_h provider, data_control_bulk_result_data_h bulk_results,
+ * bool provider_result, const char *error, void *user_data)
+ * {
+ * if (provider_result)
* LOGI("The bulk insert operation is successful");
- * }
- * else {
+ * else
* LOGI("The bulk insert operation for the request %d is failed. error message: %s", request_id, error);
- * }
* }
*
* data_control_sql_response_cb sql_callback;
*
* {
- *
* data_control_bulk_data_h bulk_data;
* int req_id;
* bundle *b1;
* result = data_control_sql_register_insert_bulk_data_response_cb(provider, sql_bulk_insert_response_cb, user_data);
* if (result != DATA_CONTROL_ERROR_NONE) {
* LOGE("Registering the callback function is failed with error: %d", result);
+ *
* return result;
* }
*
*
* bundle_free(b1);
* bundle_free(b2);
- * return result;
- * }
+ *
+ * return result;
+ * }
*
* @endcode
- * @param[in] provider The provider handle
- * @param[in] bulk_data The bulk data handle
- * @param[out] request_id The request ID
+ * @param[in] provider The provider handle
+ * @param[in] bulk_data The bulk data handle
+ * @param[out] request_id The request ID
*
- * @return @c 0 on success,
- * otherwise a negative error value
+ * @return @c 0 on success,
+ * otherwise a negative error value
*
- * @retval #DATA_CONTROL_ERROR_NONE Successful
+ * @retval #DATA_CONTROL_ERROR_NONE Successful
* @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error
- * @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory
+ * @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error
+ * @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory
* @retval #DATA_CONTROL_ERROR_PERMISSION_DENIED Permission denied
*/
int data_control_sql_insert_bulk_data(data_control_h provider, data_control_bulk_data_h bulk_data, int *request_id);
+
/**
- * @brief Registers an insert bulk data callback for the SQL data control response.
+ * @brief Registers an insert bulk data callback for the SQL data control response.
* @since_tizen 3.0
*
* remarks The application is notified when a data control response is received from the @a provider.
*
- * @param[in] provider The provider handle
- * @param[in] callback The callback function to be called when a response is received
- * @param[in] user_data The user data to be passed to the callback function
+ * @param[in] provider The provider handle
+ * @param[in] callback The callback function to be called when a response is received
+ * @param[in] user_data The user data to be passed to the callback function
*
- * @return @c 0 on success,
- * otherwise a negative error value
+ * @return @c 0 on success,
+ * otherwise a negative error value
*
- * @retval #DATA_CONTROL_ERROR_NONE Successful
- * @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error
+ * @retval #DATA_CONTROL_ERROR_NONE Successful
+ * @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error
* @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory
- * @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
*
* @see data_control_sql_unregister_insert_bulk_data_response_cb()
*/
-int data_control_sql_register_insert_bulk_data_response_cb(data_control_h provider,
- data_control_bulk_cb callback, void *user_data);
+int data_control_sql_register_insert_bulk_data_response_cb(data_control_h provider, data_control_bulk_cb callback, void *user_data);
+
/**
- * @brief Unregisters the insert bulk data callback.
+ * @brief Unregisters the insert bulk data callback.
* @since_tizen 3.0
*
- * @param[in] provider The provider handle
+ * @param[in] provider The provider handle
*
- * @return @c 0 on success,
+ * @return @c 0 on success,
* otherwise a negative error value
- * @retval #DATA_CONTROL_ERROR_NONE Successful
+ * @retval #DATA_CONTROL_ERROR_NONE Successful
* @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory
- * @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
* @see data_control_sql_register_insert_bulk_data_response_cb()
*/
int data_control_sql_unregister_insert_bulk_data_response_cb(data_control_h provider);
+
/**
* @}
*/
extern "C" {
#endif
+
/**
- * @file data_control_sql_cursor.h
- * @brief This is the header file for the cursor of the SQL-friendly interface based data control.
+ * @file data_control_sql_cursor.h
+ * @brief This is the header file for the cursor of the SQL-friendly interface based data control.
*/
/**
* @{
*/
+
/**
- * @brief The structure type to represent a SQL result set.
+ * @brief The structure type to represent a SQL result set.
* @details This type can be used to enumerate through the result set of an SQL query.
* @since_tizen 2.3
*/
typedef struct result_set_s *result_set_cursor;
+
/**
- * @brief Moves the cursor to the first position.
+ * @brief Moves the cursor to the first position.
* @since_tizen 2.3
- *
* @remarks The following example demonstrates how to use the %data_control_sql_step_first() method:
*
* @code
*
- * void sql_select_response_cb(int request_id, data_control_h provider, result_set_cursor cursor, bool provider_result, const char *error)
+ * void
+ * sql_select_response_cb(int request_id, data_control_h provider, result_set_cursor cursor,
+ * bool provider_result, const char *error)
* {
* char person_name[32] = {0,};
* long long person_number = -1;
* }
*
* @endcode
-
- * @param[in] cursor The cursor that navigates the result of the request for the select operation
- *
- * @return @c 0 on success,
- * otherwise a negative error value
*
- * @retval #DATA_CONTROL_ERROR_NONE Successful
- * @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error
+ * @param[in] cursor The cursor that navigates the result of the request for the select operation
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #DATA_CONTROL_ERROR_NONE Successful
+ * @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error
* @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory
* @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
*/
int data_control_sql_step_first(result_set_cursor cursor);
+
/**
- * @brief Moves the cursor to the last position.
+ * @brief Moves the cursor to the last position.
* @since_tizen 2.3
- *
* @remarks The following example demonstrates how to use the %data_control_sql_step_last() method:
*
* @code
*
- * void sql_select_response_cb(int request_id, data_control_h provider, result_set_cursor cursor, bool provider_result, const char *error)
+ * void
+ * sql_select_response_cb(int request_id, data_control_h provider, result_set_cursor cursor,
+ * bool provider_result, const char *error)
* {
* char person_name[32] = {0,};
* long long person_number = -1;
* }
*
* @endcode
-
- * @param[in] cursor The cursor that navigates the result of data control select request
*
- * @return @c 0 on success,
- * otherwise a negative error value
- *
- * @retval #DATA_CONTROL_ERROR_NONE Successful
- * @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error
+ * @param[in] cursor The cursor that navigates the result of data control select request
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #DATA_CONTROL_ERROR_NONE Successful
+ * @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error
* @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory
* @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
*/
int data_control_sql_step_last(result_set_cursor cursor);
+
/**
- * @brief Moves the cursor to the next position.
+ * @brief Moves the cursor to the next position.
* @since_tizen 2.3
- *
* @remarks The following example demonstrates how to use the %data_control_sql_step_next() method:
*
* @code
*
- * void sql_select_response_cb(int request_id, data_control_h provider, result_set_cursor cursor, bool provider_result, const char *error)
+ * void
+ * sql_select_response_cb(int request_id, data_control_h provider, result_set_cursor cursor,
+ * bool provider_result, const char *error)
* {
* char person_name[32] = {0,};
* long long person_number = -1;
*
* @endcode
*
- * @param[in] cursor The cursor that navigates the result of the request for the select operation
- *
- * @return @c 0 on success,
- * otherwise a negative error value
- *
- * @retval #DATA_CONTROL_ERROR_NONE Successful
- * @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error
+ * @param[in] cursor The cursor that navigates the result of the request for the select operation
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #DATA_CONTROL_ERROR_NONE Successful
+ * @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error
* @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory
* @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
*/
int data_control_sql_step_next(result_set_cursor cursor);
+
/**
- * @brief Moves the cursor to the previous position.
+ * @brief Moves the cursor to the previous position.
* @since_tizen 2.3
- *
- * @param[in] cursor The cursor that navigates the result of the request for the select operation
- *
- * @return @c 0 on success,
- * otherwise a negative error value
- *
- * @retval #DATA_CONTROL_ERROR_NONE Successful
+ * @param[in] cursor The cursor that navigates the result of the request for the select operation
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #DATA_CONTROL_ERROR_NONE Successful
* @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
*/
int data_control_sql_step_previous(result_set_cursor cursor);
+
/**
- * @brief Gets the number of columns for this cursor.
+ * @brief Gets the number of columns for this cursor.
* @since_tizen 2.3
- *
- * @param[in] cursor The cursor that navigates the result of the request for the select operation
- *
- * @return The number of columns in the calling cursor
+ * @param[in] cursor The cursor that navigates the result of the request for the select operation
+ * @return The number of columns in the calling cursor
*/
int data_control_sql_get_column_count(result_set_cursor cursor);
+
/**
- * @brief Gets the name of the column indicated by the specified index.
+ * @brief Gets the name of the column indicated by the specified index.
* @since_tizen 2.3
- *
- * @param[in] cursor The cursor that navigates the result of the request for the select operation
- * @param[in] column_index The index of the destination column
- * @param[out] name The name of the destination column. You should provide a buffer for the column name. The limit of column name length is 4096 bytes.
- *
- * @return @c 0 on success,
- * otherwise a negative error value
- *
- * @retval #DATA_CONTROL_ERROR_NONE Successful
+ * @param[in] cursor The cursor that navigates the result of the request for the select operation
+ * @param[in] column_index The index of the destination column
+ * @param[out] name The name of the destination column. You should provide a buffer for the column name. The limit of column name length is 4096 bytes
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #DATA_CONTROL_ERROR_NONE Successful
* @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error
* @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
*/
int data_control_sql_get_column_name(result_set_cursor cursor, int column_index, char *name);
+
/**
- * @brief Gets the size of the data in the column indicated by the specified index.
+ * @brief Gets the size of the data in the column indicated by the specified index.
* @since_tizen 2.3
- *
- * @param[in] cursor The cursor that navigates the result of the request for the select operation
- * @param[in] column_index The index of the destination column
- *
- * @return The size of data in the column indicated by the specified index \n
- * If an error is occurred, then a negative value is returned.
- *
+ * @param[in] cursor The cursor that navigates the result of the request for the select operation
+ * @param[in] column_index The index of the destination column
+ * @return The size of data in the column indicated by the specified index \n
+ * If an error is occurred, then a negative value is returned
* @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error
* @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
*/
int data_control_sql_get_column_item_size(result_set_cursor cursor, int column_index);
+
/**
- * @brief Gets the type of the column indicated by the specified index.
+ * @brief Gets the type of the column indicated by the specified index.
* @since_tizen 2.3
- *
- * @param[in] cursor The cursor that navigates the result of the request for the select operation
- * @param[in] column_index The index of the destination column
- * @param[out] type The type of the destination column
- *
- * @return @c 0 on success,
- * otherwise a negative error value
- *
- * @retval #DATA_CONTROL_ERROR_NONE Successful
+ * @param[in] cursor The cursor that navigates the result of the request for the select operation
+ * @param[in] column_index The index of the destination column
+ * @param[out] type The type of the destination column
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #DATA_CONTROL_ERROR_NONE Successful
* @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error
* @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
*/
int data_control_sql_get_column_item_type(result_set_cursor cursor, int column_index, data_control_sql_column_type_e *type);
+
/**
- * @brief Gets a blob data from the column indicated by the specified index.
+ * @brief Gets a blob data from the column indicated by the specified index.
* @since_tizen 2.3
- *
- * @param[in] cursor The cursor that navigates the result of the request for the select operation
- * @param[in] column_index The index of the destination column
- * @param[out] data The blob value obtained from the column
- * @param[out] size The size of the data
- *
- * @return @c 0 on success,
- * otherwise a negative error value
- *
- * @retval #DATA_CONTROL_ERROR_NONE Successful
- * @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error
- * @retval #DATA_CONTROL_ERROR_MAX_EXCEEDED Too long argument
+ * @param[in] cursor The cursor that navigates the result of the request for the select operation
+ * @param[in] column_index The index of the destination column
+ * @param[out] data The blob value obtained from the column
+ * @param[out] size The size of the data
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #DATA_CONTROL_ERROR_NONE Successful
+ * @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error
+ * @retval #DATA_CONTROL_ERROR_MAX_EXCEEDED Too long argument
* @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
*/
int data_control_sql_get_blob_data(result_set_cursor cursor, int column_index, void *data, int size);
+
/**
- * @brief Gets an int value from the column indicated by the specified index.
+ * @brief Gets an int value from the column indicated by the specified index.
* @since_tizen 2.3
- *
- * @param[in] cursor The cursor that navigates the result of the request for the select operation
- * @param[in] column_index The index of the destination column
- * @param[out] data The integer value obtained from the column
- *
- * @return @c 0 on success,
- * otherwise a negative error value
- *
- * @retval #DATA_CONTROL_ERROR_NONE Successful
- * @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error
+ * @param[in] cursor The cursor that navigates the result of the request for the select operation
+ * @param[in] column_index The index of the destination column
+ * @param[out] data The integer value obtained from the column
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #DATA_CONTROL_ERROR_NONE Successful
+ * @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error
* @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
*/
int data_control_sql_get_int_data(result_set_cursor cursor, int column_index, int *data);
+
/**
- * @brief Gets a long long value from the column indicated by the specified index.
+ * @brief Gets a long long value from the column indicated by the specified index.
* @since_tizen 2.3
- *
- * @param[in] cursor The cursor that navigates the result of the request for the select operation
- * @param[in] column_index The index of the destination column
- * @param[out] data The 64-bit integer value obtained from the column
- *
- * @return @c 0 on success,
- * otherwise a negative error value
- *
- * @retval #DATA_CONTROL_ERROR_NONE Successful
- * @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error
+ * @param[in] cursor The cursor that navigates the result of the request for the select operation
+ * @param[in] column_index The index of the destination column
+ * @param[out] data The 64-bit integer value obtained from the column
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #DATA_CONTROL_ERROR_NONE Successful
+ * @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error
* @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
*/
int data_control_sql_get_int64_data(result_set_cursor cursor, int column_index, long long *data);
+
/**
- * @brief Gets a double value from the column indicated by the specified index.
+ * @brief Gets a double value from the column indicated by the specified index.
* @since_tizen 2.3
- *
- * @param[in] cursor The cursor that navigates the result of the request for the select operation
- * @param[in] column_index The index of the destination column
- * @param[out] data The value obtained from the column as double
- *
- * @return @c 0 on success,
- * otherwise a negative error value
- *
- * @retval #DATA_CONTROL_ERROR_NONE Successful
- * @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error
+ * @param[in] cursor The cursor that navigates the result of the request for the select operation
+ * @param[in] column_index The index of the destination column
+ * @param[out] data The value obtained from the column as double
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #DATA_CONTROL_ERROR_NONE Successful
+ * @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error
* @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
*/
int data_control_sql_get_double_data(result_set_cursor cursor, int column_index, double *data);
+
/**
- * @brief Gets a text value from the column indicated by the specified index.
+ * @brief Gets a text value from the column indicated by the specified index.
* @since_tizen 2.3
- *
- * @param[in] cursor The cursor that navigates the result of the request for the select operation
- * @param[in] column_index The index of the destination column
- * @param[out] data The value obtained from the column as text. You should provide a buffer for the data. You can get the size of data via data_control_sql_get_column_item_size().
- *
- * @return @c 0 on success,
- * otherwise a negative error value
- *
- * @retval #DATA_CONTROL_ERROR_NONE Successful
- * @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error
+ * @param[in] cursor The cursor that navigates the result of the request for the select operation
+ * @param[in] column_index The index of the destination column
+ * @param[out] data The value obtained from the column as text. You should provide a buffer for the data. You can get the size of data via data_control_sql_get_column_item_size()
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #DATA_CONTROL_ERROR_NONE Successful
+ * @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error
* @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory
+ * @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory
*/
int data_control_sql_get_text_data(result_set_cursor cursor, int column_index, char *data);
+
/**
* @}
*/
* limitations under the License.
*/
+
#ifndef __TIZEN_APPFW__DATA_CONTROL_TYPES_H__
#define __TIZEN_APPFW__DATA_CONTROL_TYPES_H__
#include <tizen.h>
+
/**
- * @file data_control_types.h
- * @brief This is the header file for data types of the data-control.
+ * @file data_control_types.h
+ * @brief This is the header file for data types of the data-control.
*/
/**
*/
typedef struct data_control_bulk_data_s *data_control_bulk_data_h;
+
/**
* @brief The bulk result data handle.
* @since_tizen 3.0
*/
typedef struct data_control_bulk_result_data_s *data_control_bulk_result_data_h;
+
/**
* @brief The structure type for the provider handle.
* @since_tizen 2.3
*/
typedef struct data_control_s *data_control_h;
+
/**
* @brief Enumeration for different types of columns in a SQL table.
* @since_tizen 2.3
DATA_CONTROL_SQL_COLUMN_TYPE_NULL /**< null value */
} data_control_sql_column_type_e;
+
/**
- * @brief Enumeration for the various error-codes an API can return.
+ * @brief Enumeration for the various error codes an API can return.
* @since_tizen 2.3
*/
typedef enum {
DATA_CONTROL_ERROR_MAX_EXCEEDED = TIZEN_ERROR_DATA_CONTROL | 0x01 /**< Too long argument */
} data_control_error_e;
+
/**
* @brief Enumeration for the various data changed notification types.
* @since_tizen 3.0
DATA_CONTROL_DATA_CHANGE_MAP_REMOVE /**< Remove notification */
} data_control_data_change_type_e;
+
/**
* @}
*/