/**
* @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.
+ * @a provider should not be destroyed.
* @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
* @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.
+ * @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
/**
* @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
+ * @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
* @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
+ * @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
* @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
/**
* @brief Destroys bulk data.
* @since_tizen 3.0
- * @param [in] bulk_data The bulk data handle
+ * @param[in] bulk_data The bulk data handle
* @return @c 0 on success,
* otherwise a negative error value
* @retval #DATA_CONTROL_ERROR_NONE Successful
* @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.
+ * @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
/**
* @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
* @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.
+ * @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
* @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
+ * @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
/**
* @brief Destroys bulk result data.
* @since_tizen 3.0
- * @param [in] result_data The bulk result data handle
+ * @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
/**
* @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.
+ * @remarks You must release @a result_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] provider The provider handle. @a provider is valid only inside this function \n
+ * @a provider should not be destroyed.
* @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
/**
- * @brief Called when the response is received from the key-value structured data control provider.
+ * @brief Called when the response is received for a set operation 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 The provider handle. @a provider is valid only inside this function \n
+ * @a provider should not be destroyed.
* @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
/**
- * @brief Called when the response is received from the key-value structured data control provider.
+ * @brief Called when the response is received for an add operation 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 The provider handle. @a provider is valid only inside this function \n
+ * @a provider should not be destroyed.
* @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
/**
- * @brief Called when the response is received from the key-value structured data control provider.
+ * @brief Called when the response is received for a remove operation 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 The provider handle. @a provider is valid only inside this function \n
+ * @a provider should not be destroyed.
* @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
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_set_response_cb set_cb; /**< This callback function is called when the response is received for a setting value from the key-value structured data control provider. */
- data_control_map_add_response_cb add_cb; /**< This callback function is called when the response is received for a adding value from the key-value structured data control provider. */
+ data_control_map_add_response_cb add_cb; /**< This callback function is called when the response is received for an adding 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.
* @since_tizen 2.3
- * @remarks The following example demonstrates how to use the %data_control_map_create() method.
+ * @remarks @a provider should be destroyed with data_control_map_destroy().
+ * The following example demonstrates how to use the %data_control_map_create() method.
*
* @code
*
/**
- * @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, with partition into pages.
* @since_tizen 2.3
* @privlevel public
* @privilege %http://tizen.org/privilege/datasharing \n
* @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
+ * @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
*
* @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;
+ * int result = 0;
+ * int req_id = 0;
+ * int count;
+ *
+ * result = data_control_map_register_add_bulk_data_response_cb(provider, map_bulk_add_response_cb, user_data);
+ * if (result != DATA_CONTROL_ERROR_NONE) {
+ * LOGE("Registering the callback function is failed with error: %d", result);
+ * return result;
+ * }
+ *
+ * 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");
+ *
+ * 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_get_count(bulk_data, &count);
+ * dlog_print(DLOG_INFO, LOG_TAG, "bulk add count %d ", count);
*
- * {
- *
- * data_control_bulk_data_h bulk_data;
- * int req_id;
- * bundle *b1;
- * bundle *b2;
- * int result = 0;
- * int req_id = 0;
- * int count;
- *
- * result = data_control_map_register_add_bulk_data_response_cb(provider, map_bulk_add_response_cb, user_data);
- * if (result != DATA_CONTROL_ERROR_NONE) {
- * LOGE("Registering the callback function is failed with error: %d", result);
- * return result;
- * }
- *
- * 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");
- *
- * 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_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_bulk_data_destroy(bulk_data);
- *
- * bundle_free(b1);
- * bundle_free(b2);
- * return result;
- * }
+ * 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;
+ * }
*
* @endcode
*
* @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
+ * @a provider should not be destroyed.
* @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
* @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
+ * @a provider should not be destroyed.
* @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
* @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 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
+ * @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
* @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
* @since_tizen 3.0
*
* @param[in] request_id The request ID
- * @param[in] provider The provider handle
+ * @param[in] provider The provider handle. @a provider is valid only inside this function. \n
+ * @a provider should not be freed
* @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
*
* @since_tizen 2.3
*
* @param[in] request_id The request ID
- * @param[in] provider The provider handle
+ * @param[in] provider The provider handle. @a provider is valid only inside this function. \n
+ * @a provider should not be freed
* @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
+ * otherwise it does not need to be wrapped in single quotes. \n
+ * To use outside the callback, make a copy by using bundle_dup().
+ * @a insert_data should not be freed.
* @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);
* @since_tizen 2.3
*
* @param[in] request_id The request ID
- * @param[in] provider The provider handle
+ * @param[in] provider The provider handle. @a provider is valid only inside this function. \n
+ * @a provider should not be freed
* @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
+ * otherwise it does not need to be wrapped in single quotes. \n
+ * To use outside the callback, make a copy by using bundle_dup().
+ * @a update_data should not be freed.
* @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
* @since_tizen 2.3
*
* @param[in] request_id The request ID
- * @param[in] provider The provider handle
+ * @param[in] provider The provider handle. @a provider is valid only inside this function. \n
+ * @a provider should not be freed
* @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
* @since_tizen 2.3
*
* @param[in] request_id The request ID
- * @param[in] provider The provider handle
+ * @param[in] provider The provider handle. @a provider is valid only inside this function. \n
+ * @a provider should not be freed
* @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
* @since_tizen 2.3
*
* @param[in] request_id The request ID
- * @param[in] provider The provider handle
+ * @param[in] provider The provider handle. @a provider is valid only inside this function. \n
+ * @a provider should not be freed
* @param[in] key The key of the value list to obtain
* @param[in] user_data The user data passed from the register function
*/
* @since_tizen 2.3
*
* @param[in] request_id The request ID
- * @param[in] provider The provider handle
+ * @param[in] provider The provider handle. @a provider is valid only inside this function. \n
+ * @a provider should not be freed
* @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
* @since_tizen 2.3
*
* @param[in] request_id The request ID
- * @param[in] provider The provider handle
+ * @param[in] provider The provider handle. @a provider is valid only inside this function. \n
+ * @a provider should not be freed
* @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
* @since_tizen 2.3
*
* @param[in] request_id The request ID
- * @param[in] provider The provider handle
+ * @param[in] provider The provider handle. @a provider is valid only inside this function. \n
+ * @a provider should not be freed
* @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
/**
- * @brief Unregisters the callback functions.
+ * @brief Unregisters the SQL data control request callback functions.
* @since_tizen 2.3
*
* @return @c 0 on success,
/**
- * @brief Unregisters the callback functions.
+ * @brief Unregisters the map data control request callback functions.
* @since_tizen 2.3
*
* @return @c 0 on success,
* @brief Gets the application ID which sends the data control request.
* @since_tizen 2.3
*
+ * @remarks You must release @a appid using free() after it is used.
+ *
* @param[in] request_id The request ID
* @param[out] appid The application ID
*
* @since_tizen 2.3
*
* @param[in] request_id The request ID
- * @param[in] provider The provider handle
+ * @param[in] provider The provider handle. @a provider is valid only inside this function \n
+ * @a provider should not be destroyed
* @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] 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);
* @since_tizen 2.3
*
* @param[in] request_id The request ID that identifies the data control
+ * @param[in] provider The provider handle. @a provider is valid only inside this function \n
+ * @a provider should not be destroyed
* @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
* @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 the execution of this callback.
*
* @param[in] request_id The request ID
- * @param[in] provider The provider handle
+ * @param[in] provider The provider handle. @a provider is valid only inside this function \n
+ * @a provider should not be destroyed
* @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
* @since_tizen 2.3
*
* @param[in] request_id The request ID
- * @param[in] provider The provider handle
+ * @param[in] provider The provider handle. @a provider is valid only inside this function \n
+ * @a provider should not be destroyed
* @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
* @brief Creates a provider handle.
* @since_tizen 2.3
*
- * @remarks The following example demonstrates how to use the %data_control_sql_create() method:
+ * @remarks @a provider should be destroyed with data_control_sql_destroy().
+ * The following example demonstrates how to use the %data_control_sql_create() method:
*
* @code
*
*
* @remarks You must release @a provider_id using free() after it is used.
*
- * @param[in] provider The provider handle
+ * @param[in] provider The provider handle
* @param[out] provider_id The data control provider ID
*
* @return @c 0 on success,
*
* @code
*
- * {
- * bundle *b;
- * int ret;
- *
- * // Insert data to Note table
- * ret = data_control_sql_set_data_id(ad->provider_h, "Note");
- * if (ret != DATA_CONTROL_ERROR_NONE)
- * dlog_print(DLOG_ERROR, LOG_TAG, "setting data id failed with error: %d", ret);
- *
- * b = bundle_create();
- * bundle_add_str(b, ""TITLE"", "test");
- * bundle_add_str(b, "CONTENTS", "test contents");
- * data_control_sql_insert(ad->provider_h, b, &req_id);
- * bundle_free(b);
- *
- * // Insert data to Dictionary table
- * ret = data_control_sql_set_data_id(ad->provider_h, "Dictionary");
- * if (ret != DATA_CONTROL_ERROR_NONE)
- * dlog_print(DLOG_ERROR, LOG_TAG, "setting data id failed with error: %d", ret);
- *
- * b = bundle_create();
- * bundle_add_str(b, "WORD", "test");
- * bundle_add_str(b, "WORD_DESC", "test desc");
- * data_control_sql_insert(ad->provider_h, b, &req_id);
- * bundle_free(b);
- * }
+ * {
+ * bundle *b;
+ * int ret;
+ *
+ * // Insert data to Note table
+ * ret = data_control_sql_set_data_id(ad->provider_h, "Note");
+ * if (ret != DATA_CONTROL_ERROR_NONE)
+ * dlog_print(DLOG_ERROR, LOG_TAG, "setting data id failed with error: %d", ret);
+ *
+ * b = bundle_create();
+ * bundle_add_str(b, ""TITLE"", "test");
+ * bundle_add_str(b, "CONTENTS", "test contents");
+ * data_control_sql_insert(ad->provider_h, b, &req_id);
+ * bundle_free(b);
+ *
+ * // Insert data to Dictionary table
+ * ret = data_control_sql_set_data_id(ad->provider_h, "Dictionary");
+ * if (ret != DATA_CONTROL_ERROR_NONE)
+ * dlog_print(DLOG_ERROR, LOG_TAG, "setting data id failed with error: %d", ret);
+ *
+ * b = bundle_create();
+ * bundle_add_str(b, "WORD", "test");
+ * bundle_add_str(b, "WORD_DESC", "test desc");
+ * data_control_sql_insert(ad->provider_h, b, &req_id);
+ * bundle_free(b);
+ * }
*
* @endcode
*/
/**
- * @brief Selects the specified columns to be queried.
+ * @brief Selects the specified columns to be queried, with partition into pages.
* @since_tizen 2.3
* @privlevel public
* @privilege %http://tizen.org/privilege/datasharing \n
*
* @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)
- * LOGI("The bulk insert operation is successful");
- * 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;
- * bundle *b2;
- * int result = 0;
- * int req_id = 0;
- * int bulk_count = 0;
- *
- * 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;
- * }
- *
- * b1 = bundle_create();
- * bundle_add_str(b1, "WORD", "'test'");
- * bundle_add_str(b1, "WORD_DESC", "'test description'");
- * b2 = bundle_create();
- * bundle_add_str(b2, "WORD", "'test2'");
- * bundle_add_str(b2, "WORD_DESC", "'test2 description'");
- *
- * 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_get_count(bulk_data, &bulk_count);
- *
- * dlog_print(DLOG_INFO, LOG_TAG, "bulk insert count %d ", bulk_count);
- *
- * data_control_sql_insert_bulk_data(provider, bulk_data, &req_id);
- * data_control_bulk_data_destroy(bulk_data);
- *
- * bundle_free(b1);
- * bundle_free(b2);
- *
- * return 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
+ * 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;
+ * bundle *b2;
+ * int result = 0;
+ * int req_id = 0;
+ * int bulk_count = 0;
+ *
+ * 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;
+ * }
+ *
+ * b1 = bundle_create();
+ * bundle_add_str(b1, "WORD", "'test'");
+ * bundle_add_str(b1, "WORD_DESC", "'test description'");
+ * b2 = bundle_create();
+ * bundle_add_str(b2, "WORD", "'test2'");
+ * bundle_add_str(b2, "WORD_DESC", "'test2 description'");
+ *
+ * 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_get_count(bulk_data, &bulk_count);
+ *
+ * dlog_print(DLOG_INFO, LOG_TAG, "bulk insert count %d ", bulk_count);
+ *
+ * data_control_sql_insert_bulk_data(provider, bulk_data, &req_id);
+ * data_control_bulk_data_destroy(bulk_data);
+ *
+ * bundle_free(b1);
+ * bundle_free(b2);
+ *
+ * return result;
+ * }
*
* @endcode