Tizen Native API
5.0
|
Service applications can provide their own data.
#include <data_control.h>
The service application providing its own database file must register the provider callback using data_control_provider_sql_register_cb(). The service application providing its own registry file or key-value pairs data set must register the provider callback using the data_control_provider_map_register_cb(). The service application sends SQL-type or Map-type data control result to the other application, by using methods such as data_control_provider_send_select_result(),data_control_provider_send_insert_result(), data_control_provider_send_update_result(), or data_control_provider_send_delete_result(). Note: All callbacks are called in the main loop context, unless stated otherwise.
Functions | |
int | data_control_provider_sql_register_cb (data_control_provider_sql_cb *callback, void *user_data) |
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. | |
int | data_control_provider_sql_unregister_cb (void) |
Unregisters the SQL data control request callback functions. | |
int | data_control_provider_map_register_cb (data_control_provider_map_cb *callback, void *user_data) |
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. | |
int | data_control_provider_map_unregister_cb (void) |
Unregisters the map data control request callback functions. | |
int | data_control_provider_get_client_appid (int request_id, char **appid) |
Gets the application ID which sends the data control request. | |
int | data_control_provider_send_select_result (int request_id, void *db_handle) |
Sends the success result and the result set of the select request to the client application. | |
int | data_control_provider_send_insert_result (int request_id, long long row_id) |
Sends the success result of the insert request and the last inserted row ID to the client application. | |
int | data_control_provider_send_update_result (int request_id) |
Sends the success result of the update request to the client application. | |
int | data_control_provider_send_delete_result (int request_id) |
Sends the success result of the delete request to the client application. | |
int | data_control_provider_send_error (int request_id, const char *error) |
Sends the provider error message to the client application. | |
int | data_control_provider_send_map_result (int request_id) |
Sends the success result of the request for setting, adding, and removing the key-value structured data to the client application. | |
int | data_control_provider_send_map_get_value_result (int request_id, char **value_list, int value_count) |
Sends the success result of the request for getting the value list to the client application. | |
char * | data_control_provider_create_insert_statement (data_control_h provider, bundle *insert_map) |
Creates SQL INSERT statement. | |
char * | data_control_provider_create_delete_statement (data_control_h provider, const char *where) |
Creates SQL DELETE statement. | |
char * | data_control_provider_create_update_statement (data_control_h provider, bundle *update_map, const char *where) |
Creates SQL UPDATE statement. | |
char * | data_control_provider_create_select_statement (data_control_h provider, const char **column_list, int column_count, const char *where, const char *order) |
Creates SQL SELECT statement. | |
bool | data_control_provider_match_provider_id (data_control_h provider, const char *provider_id) |
Checks whether the given provider ID matches the provider handle's provider ID. | |
bool | data_control_provider_match_data_id (data_control_h provider, const char *data_id) |
Checks whether the given data ID matches the provider handle's data ID. | |
int | data_control_provider_send_data_change_noti (data_control_h provider, data_control_data_change_type_e type, bundle *data) |
Sends a data change notification to consumer applications which have successfully added a data change callback. | |
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) |
Adds a consumer filter for the data changed callback addition process. | |
int | data_control_provider_remove_data_change_consumer_filter_cb (int callback_id) |
Removes a consumer filter for the data changed callback addition process. | |
int | data_control_provider_foreach_data_change_consumer (data_control_h provider, data_control_provider_data_change_consumer_cb list_cb, void *user_data) |
Retrieves ids of all applications which receive data change notifications from a given provider. | |
int | data_control_provider_send_bulk_insert_result (int request_id, data_control_bulk_result_data_h bulk_results) |
Sends the result of the bulk insert request to the client application. | |
int | data_control_provider_send_map_bulk_add_result (int request_id, data_control_bulk_result_data_h bulk_results) |
Sends the result of the bulk add request to the client application. | |
int | data_control_provider_sql_register_insert_bulk_data_request_cb (data_control_provider_bulk_cb callback, void *user_data) |
Registers a callback for the SQL bulk data request. | |
int | data_control_provider_sql_unregister_insert_bulk_data_request_cb (void) |
Unregisters the callback for the SQL bulk data request. | |
int | data_control_provider_map_register_add_bulk_data_request_cb (data_control_provider_bulk_cb callback, void *user_data) |
Registers a callback for the MAP bulk data request. | |
int | data_control_provider_map_unregister_add_bulk_data_request_cb (void) |
Unregisters the callback for the MAP bulk data request. | |
Typedefs | |
typedef bool(* | data_control_provider_data_change_consumer_cb )(data_control_h provider, char *consumer_appid, void *user_data) |
Called for each application which successfully added a data change callback. | |
typedef bool(* | data_control_provider_data_change_consumer_filter_cb )(data_control_h provider, char *consumer_appid, void *user_data) |
Called when a consumer requests a data change callback addition. | |
typedef void(* | data_control_provider_bulk_cb )(int request_id, data_control_h provider, data_control_bulk_data_h bulk_data, void *user_data) |
Called when the bulk data request is received from an consumer application. | |
typedef void(* | data_control_provider_sql_insert_request_cb )(int request_id, data_control_h provider, bundle *insert_data, void *user_data) |
Called when the insert request is received from an application using SQL-friendly interface based data control. | |
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) |
Called when the update request is received from an application using SQL-friendly interface based data control. | |
typedef void(* | data_control_provider_sql_delete_request_cb )(int request_id, data_control_h provider, const char *where, void *user_data) |
Called when the delete request is received from an application using SQL-friendly interface based data control. | |
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) |
Called when the select request is received from an application using SQL-friendly interface based data control. | |
typedef void(* | data_control_provider_map_get_value_request_cb )(int request_id, data_control_h provider, const char *key, void *user_data) |
Called when the request for obtaining the value list is received from the key-value structured data control consumer. | |
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) |
Called when the request for replacing the value is received from the key-value structured data control consumer. | |
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) |
Called when the request for adding the value is received from the key-value structured data control consumer. | |
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) |
Called when the request for removing the value is received from the key-value structured data control consumer. |
typedef void(* data_control_provider_bulk_cb)(int request_id, data_control_h provider, data_control_bulk_data_h bulk_data, void *user_data) |
Called when the bulk data request is received from an consumer application.
[in] | request_id | The request ID |
[in] | provider | The provider handle. provider is valid only inside this function. provider should not be freed |
[in] | bulk_data | The bulk data handle which contains data to be inserted or added |
[in] | user_data | The user data passed from the register function |
typedef bool(* data_control_provider_data_change_consumer_cb)(data_control_h provider, char *consumer_appid, void *user_data) |
Called for each application which successfully added a data change callback.
[in] | provider | The provider handle. provider is valid only inside this function provider should not be freed |
[in] | consumer_appid | The id of the consumer application. consumer_appid is valid only inside this function To use outside the callback, make a copy. consumer_appid should not be freed |
[in] | user_data | The user data |
true
to continue with the next iteration of the loop, otherwise false
to break out of the looptypedef bool(* data_control_provider_data_change_consumer_filter_cb)(data_control_h provider, char *consumer_appid, void *user_data) |
Called when a consumer requests a data change callback addition.
The callback decides - through the return value - whether a consumer application should be allowed to add a data change callback.
If it returns true, it means the application should be allowed to do so, if it returns false, it means it should be denied.
[in] | provider | The provider handle. provider is valid only inside this function. provider should not be freed |
[in] | consumer_appid | The id of the consumer application which requested to add the callback. consumer_appid is valid only inside this function. To use outside the callback, make a copy. consumer_appid should not be freed |
[in] | user_data | The user data. |
true
let the application add a data change callback, otherwise false
application not allowed to add data change callbacktypedef 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) |
Called when the request for adding the value is received from the key-value structured data control consumer.
[in] | request_id | The request ID |
[in] | provider | The provider handle. provider is valid only inside this function. provider should not be freed |
[in] | key | The key of the value to add |
[in] | value | The value to add |
[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) |
Called when the request for obtaining the value list is received from the key-value structured data control consumer.
[in] | request_id | The request ID |
[in] | provider | The provider handle. provider is valid only inside this function. provider should not be freed |
[in] | key | The key of the value list to obtain |
[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) |
Called when the request for removing the value is received from the key-value structured data control consumer.
[in] | request_id | The request ID |
[in] | provider | The provider handle. provider is valid only inside this function. provider should not be freed |
[in] | key | The key of the value to remove |
[in] | value | The value to remove |
[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) |
Called when the request for replacing the value is received from the key-value structured data control consumer.
[in] | request_id | The request ID |
[in] | provider | The provider handle. provider is valid only inside this function. provider should not be freed |
[in] | key | The key of the value to replace |
[in] | old_value | The value to replace |
[in] | new_value | The new value that replaces the existing value |
[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) |
Called when the delete request is received from an application using SQL-friendly interface based data control.
[in] | request_id | The request ID |
[in] | provider | The provider handle. provider is valid only inside this function. provider should not be freed |
[in] | where | A filter to select the desired rows to delete It is an SQL 'WHERE' clause excluding the 'WHERE' itself such as column1 = 'stringValue' and column2 = numericValue |
[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) |
Called when the insert request is received from an application using SQL-friendly interface based data control.
[in] | request_id | The request ID |
[in] | provider | The provider handle. provider is valid only inside this function. provider should not be freed |
[in] | insert_data | The column-value pairs to insert If the value is a string, the value must be wrapped in single quotes, otherwise it does not need to be wrapped in single quotes. To use outside the callback, make a copy by using bundle_dup(). insert_data should not be freed. |
[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) |
Called when the select request is received from an application using SQL-friendly interface based data control.
[in] | request_id | The request ID |
[in] | provider | The provider handle. provider is valid only inside this function. provider should not be freed |
[in] | column_list | The column list to query |
[in] | column_count | The total number of columns to be queried |
[in] | where | A filter to select the desired rows It is an SQL 'WHERE' clause excluding the 'WHERE' itself such as column1 = 'stringValue' and column2 = numericValue |
[in] | order | The sorting order of the rows to query It is an SQL 'ORDER BY' clause excluding the 'ORDER BY' itself |
[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) |
Called when the update request is received from an application using SQL-friendly interface based data control.
[in] | request_id | The request ID |
[in] | provider | The provider handle. provider is valid only inside this function. provider should not be freed |
[in] | update_data | The column-value pairs to update If the value is a string, the value must be wrapped in single quotes, otherwise it does not need to be wrapped in single quotes. To use outside the callback, make a copy by using bundle_dup(). update_data should not be freed. |
[in] | where | A filter to select the desired rows to update It is an SQL 'WHERE' clause excluding the 'WHERE' itself such as column1 = 'stringValue' and column2 = numericValue |
[in] | user_data | The user data passed from the register function |
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 | ||
) |
Adds a consumer filter for the data changed callback addition process.
[in] | callback | Consumer filter callback, filtering consumers which try to add data changed callback |
[in] | user_data | The user data to be passed to the list_cb function |
[out] | callback_id | Added callback ID |
0
on success, otherwise a negative error valueDATA_CONTROL_ERROR_NONE | Successful |
DATA_CONTROL_ERROR_OUT_OF_MEMORY | Out of memory |
DATA_CONTROL_ERROR_INVALID_PARAMETER | Invalid parameter |
char* data_control_provider_create_delete_statement | ( | data_control_h | provider, |
const char * | where | ||
) |
Creates SQL DELETE statement.
[in] | provider | The provider handle |
[in] | where | A filter to select the desired rows to delete Pass NULL if all rows need to be deleted |
DATA_CONTROL_ERROR_NONE | Success |
DATA_CONTROL_ERROR_OUT_OF_MEMORY | Out of memory |
DATA_CONTROL_ERROR_INVALID_PARAMETER | Invalid parameter |
char* data_control_provider_create_insert_statement | ( | data_control_h | provider, |
bundle * | insert_map | ||
) |
Creates SQL INSERT statement.
[in] | provider | The provider handle |
[in] | insert_map | The column-value pairs to insert |
DATA_CONTROL_ERROR_NONE | Success |
DATA_CONTROL_ERROR_OUT_OF_MEMORY | Out of memory |
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 | ||
) |
Creates SQL SELECT statement.
[in] | provider | The provider handle |
[in] | column_list | The column names to query Pass NULL if all columns need to be selected |
[in] | column_count | The total number of columns to be queried |
[in] | where | A filter to select the desired rows |
[in] | order | The sorting order of rows to query |
DATA_CONTROL_ERROR_NONE | Success |
DATA_CONTROL_ERROR_OUT_OF_MEMORY | Out of memory |
DATA_CONTROL_ERROR_INVALID_PARAMETER | Invalid parameter |
char* data_control_provider_create_update_statement | ( | data_control_h | provider, |
bundle * | update_map, | ||
const char * | where | ||
) |
Creates SQL UPDATE statement.
[in] | provider | The provider handle |
[in] | update_map | The column-value pairs to update |
[in] | where | A filter to select the desired rows to update |
DATA_CONTROL_ERROR_NONE | Success |
DATA_CONTROL_ERROR_OUT_OF_MEMORY | Out of memory |
DATA_CONTROL_ERROR_INVALID_PARAMETER | Invalid parameter |
int data_control_provider_foreach_data_change_consumer | ( | data_control_h | provider, |
data_control_provider_data_change_consumer_cb | list_cb, | ||
void * | user_data | ||
) |
Retrieves ids of all applications which receive data change notifications from a given provider.
This function calls data_control_provider_data_change_consumer_cb() once for each provider's notification target consumer id.
If the data_control_provider_data_change_consumer_cb() callback function returns false
, then iteration will be finished.
[in] | provider | Target provider handle |
[in] | list_cb | The iteration callback function |
[in] | user_data | The user data to be passed to the list_cb function |
0
on success, otherwise a negative error valueDATA_CONTROL_ERROR_NONE | Successful |
DATA_CONTROL_ERROR_IO_ERROR | I/O error |
DATA_CONTROL_ERROR_INVALID_PARAMETER | Invalid parameter |
int data_control_provider_get_client_appid | ( | int | request_id, |
char ** | appid | ||
) |
Gets the application ID which sends the data control request.
[in] | request_id | The request ID |
[out] | appid | The application ID |
0
on success, otherwise a negative error valueDATA_CONTROL_ERROR_NONE | Successful |
DATA_CONTROL_ERROR_IO_ERROR | I/O error |
DATA_CONTROL_ERROR_OUT_OF_MEMORY | Out of memory |
DATA_CONTROL_ERROR_INVALID_PARAMETER | Invalid parameter |
int data_control_provider_map_register_add_bulk_data_request_cb | ( | data_control_provider_bulk_cb | callback, |
void * | user_data | ||
) |
Registers a callback for the MAP bulk data request.
The provider is notified when a data control request is received from the client applications.
[in] | callback | The callback function to be called when a data control request is received |
[in] | user_data | The user data to be passed to the callback function |
0
on success, otherwise a negative error valueDATA_CONTROL_ERROR_NONE | Successful |
DATA_CONTROL_ERROR_IO_ERROR | I/O error |
DATA_CONTROL_ERROR_INVALID_PARAMETER | Invalid parameter |
DATA_CONTROL_ERROR_PERMISSION_DENIED | Permission denied |
int data_control_provider_map_register_cb | ( | data_control_provider_map_cb * | callback, |
void * | user_data | ||
) |
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.
[in] | callback | The callback function to be called when a data control request is received |
[in] | user_data | The user data to be passed to the callback function |
0
on success, otherwise a negative error valueDATA_CONTROL_ERROR_NONE | Successful |
DATA_CONTROL_ERROR_INVALID_PARAMETER | Invalid parameter |
DATA_CONTROL_ERROR_IO_ERROR | I/O error |
DATA_CONTROL_ERROR_PERMISSION_DENIED | Permission denied |
Unregisters the callback for the MAP bulk data request.
0
on success, otherwise a negative error valueDATA_CONTROL_ERROR_NONE | Successful |
int data_control_provider_map_unregister_cb | ( | void | ) |
Unregisters the map data control request callback functions.
0
on success, otherwise a negative error valueDATA_CONTROL_ERROR_NONE | Successful |
bool data_control_provider_match_data_id | ( | data_control_h | provider, |
const char * | data_id | ||
) |
Checks whether the given data ID matches the provider handle's data ID.
[in] | provider | The provider handle |
[in] | data_id | The data ID to be compared with handle's data ID |
true
if the data_id matches, otherwise false
if it does not match DATA_CONTROL_ERROR_NONE | Success |
DATA_CONTROL_ERROR_OUT_OF_MEMORY | Out of memory |
DATA_CONTROL_ERROR_INVALID_PARAMETER | Invalid parameter |
bool data_control_provider_match_provider_id | ( | data_control_h | provider, |
const char * | provider_id | ||
) |
Checks whether the given provider ID matches the provider handle's provider ID.
[in] | provider | The provider handle |
[in] | provider_id | The provider ID to be compared with handle's provider ID |
true
if the provider_id matches, otherwise false
if it does not match DATA_CONTROL_ERROR_NONE | Success |
DATA_CONTROL_ERROR_OUT_OF_MEMORY | Out of memory |
DATA_CONTROL_ERROR_INVALID_PARAMETER | Invalid parameter |
int data_control_provider_remove_data_change_consumer_filter_cb | ( | int | callback_id | ) |
Removes a consumer filter for the data changed callback addition process.
[in] | callback_id | Target callback ID |
0
on success, otherwise a negative error valueDATA_CONTROL_ERROR_NONE | Successful |
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 | ||
) |
Sends the result of the bulk insert request to the client application.
[in] | request_id | The request ID |
[in] | bulk_results | The bulk add result for each data |
0
on success, otherwise a negative error valueDATA_CONTROL_ERROR_NONE | Successful |
DATA_CONTROL_ERROR_IO_ERROR | I/O error |
DATA_CONTROL_ERROR_OUT_OF_MEMORY | Out of memory |
DATA_CONTROL_ERROR_INVALID_PARAMETER | Invalid parameter |
int data_control_provider_send_data_change_noti | ( | data_control_h | provider, |
data_control_data_change_type_e | type, | ||
bundle * | data | ||
) |
Sends a data change notification to consumer applications which have successfully added a data change callback.
If the function is successful, data_control_data_change_cb() callback will be called under certain conditions.
[in] | provider | Target provider handle |
[in] | type | Changed data type |
[in] | data | Customized information about changed data |
0
on success, otherwise a negative error valueDATA_CONTROL_ERROR_NONE | Successful |
DATA_CONTROL_ERROR_IO_ERROR | I/O error |
DATA_CONTROL_ERROR_INVALID_PARAMETER | Invalid parameter |
DATA_CONTROL_ERROR_PERMISSION_DENIED | Permission denied |
int data_control_provider_send_delete_result | ( | int | request_id | ) |
Sends the success result of the delete request to the client application.
[in] | request_id | The request ID |
0
on success, otherwise a negative error valueDATA_CONTROL_ERROR_NONE | Successful |
DATA_CONTROL_ERROR_IO_ERROR | I/O error |
DATA_CONTROL_ERROR_OUT_OF_MEMORY | Out of memory |
DATA_CONTROL_ERROR_INVALID_PARAMETER | Invalid parameter |
int data_control_provider_send_error | ( | int | request_id, |
const char * | error | ||
) |
Sends the provider error message to the client application.
[in] | request_id | The request ID |
[in] | error | The provider-defined error message |
0
on success, otherwise a negative error valueDATA_CONTROL_ERROR_NONE | Successful |
DATA_CONTROL_ERROR_IO_ERROR | I/O error |
DATA_CONTROL_ERROR_OUT_OF_MEMORY | Out of memory |
DATA_CONTROL_ERROR_INVALID_PARAMETER | Invalid parameter |
int data_control_provider_send_insert_result | ( | int | request_id, |
long long | row_id | ||
) |
Sends the success result of the insert request and the last inserted row ID to the client application.
[in] | request_id | The request ID |
[in] | row_id | The row ID of the database changed by the insert request |
0
on success, otherwise a negative error valueDATA_CONTROL_ERROR_NONE | Successful |
DATA_CONTROL_ERROR_IO_ERROR | I/O error |
DATA_CONTROL_ERROR_OUT_OF_MEMORY | Out of memory |
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 | ||
) |
Sends the result of the bulk add request to the client application.
[in] | request_id | The request ID |
[in] | bulk_results | The bulk add result for each data |
0
on success, otherwise a negative error valueDATA_CONTROL_ERROR_NONE | Successful |
DATA_CONTROL_ERROR_IO_ERROR | I/O error |
DATA_CONTROL_ERROR_OUT_OF_MEMORY | Out of memory |
DATA_CONTROL_ERROR_INVALID_PARAMETER | Invalid parameter |
int data_control_provider_send_map_get_value_result | ( | int | request_id, |
char ** | value_list, | ||
int | value_count | ||
) |
Sends the success result of the request for getting the value list to the client application.
[in] | request_id | The request ID |
[in] | value_list | The result value list |
[in] | value_count | The number of the values |
0
on success, otherwise a negative error valueDATA_CONTROL_ERROR_NONE | Successful |
DATA_CONTROL_ERROR_IO_ERROR | I/O error |
DATA_CONTROL_ERROR_OUT_OF_MEMORY | Out of memory |
DATA_CONTROL_ERROR_INVALID_PARAMETER | Invalid parameter |
int data_control_provider_send_map_result | ( | int | request_id | ) |
Sends the success result of the request for setting, adding, and removing the key-value structured data to the client application.
[in] | request_id | The request ID |
0
on success, otherwise a negative error valueDATA_CONTROL_ERROR_NONE | Successful |
DATA_CONTROL_ERROR_IO_ERROR | I/O error |
DATA_CONTROL_ERROR_OUT_OF_MEMORY | Out of memory |
DATA_CONTROL_ERROR_INVALID_PARAMETER | Invalid parameter |
int data_control_provider_send_select_result | ( | int | request_id, |
void * | db_handle | ||
) |
Sends the success result and the result set of the select request to the client application.
[in] | request_id | The request ID |
[in] | db_handle | The result DB handle for the result set |
0
on success, otherwise a negative error valueDATA_CONTROL_ERROR_NONE | Successful |
DATA_CONTROL_ERROR_IO_ERROR | I/O error |
DATA_CONTROL_ERROR_OUT_OF_MEMORY | Out of memory |
DATA_CONTROL_ERROR_INVALID_PARAMETER | Invalid parameter |
int data_control_provider_send_update_result | ( | int | request_id | ) |
Sends the success result of the update request to the client application.
[in] | request_id | The request ID |
0
on success, otherwise a negative error valueDATA_CONTROL_ERROR_NONE | Successful |
DATA_CONTROL_ERROR_IO_ERROR | I/O error |
DATA_CONTROL_ERROR_OUT_OF_MEMORY | Out of memory |
DATA_CONTROL_ERROR_INVALID_PARAMETER | Invalid parameter |
int data_control_provider_sql_register_cb | ( | data_control_provider_sql_cb * | callback, |
void * | user_data | ||
) |
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.
[in] | callback | The callback function to be called when a data control request is received |
[in] | user_data | The user data to be passed to the callback function |
0
on success, otherwise a negative error valueDATA_CONTROL_ERROR_NONE | Successful |
DATA_CONTROL_ERROR_INVALID_PARAMETER | Invalid parameter |
DATA_CONTROL_ERROR_IO_ERROR | I/O error |
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 | ||
) |
Registers a callback for the SQL bulk data request.
The provider is notified when a data control request is received from the client applications.
[in] | callback | The callback function to be called when a data control request is received |
[in] | user_data | The user data to be passed to the callback function |
0
on success, otherwise a negative error valueDATA_CONTROL_ERROR_NONE | Successful |
DATA_CONTROL_ERROR_IO_ERROR | I/O error |
DATA_CONTROL_ERROR_INVALID_PARAMETER | Invalid parameter |
DATA_CONTROL_ERROR_PERMISSION_DENIED | Permission denied |
int data_control_provider_sql_unregister_cb | ( | void | ) |
Unregisters the SQL data control request callback functions.
0
on success, otherwise a negative error valueDATA_CONTROL_ERROR_NONE | Successful |
Unregisters the callback for the SQL bulk data request.
0
on success, otherwise a negative error valueDATA_CONTROL_ERROR_NONE | Successful |