Tizen Native API  3.0
Data Control Provider

Service applications can provide their own data.

Required Header

#include <data_control.h>

Overview

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 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 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 Documentation

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.

Since :
3.0
Parameters:
[in]request_idThe request ID
[in]providerThe provider handle
[in]bulk_dataThe bulk data handle which contains data to be inserted or added
[in]user_dataThe user data passed from the register function
See also:
data_control_provider_sql_register_insert_bulk_data_request_cb()
data_control_provider_map_register_add_bulk_data_request_cb()
data_control_sql_insert_bulk_data()
data_control_map_add_bulk_data()
data_control_bulk_data_add()
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.

Since :
3.0
Parameters:
[in]providerThe provider handle. provider is valid only inside this function
provider should not be freed
[in]consumer_appidThe 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_dataThe user data
Returns:
true to continue with the next iteration of the loop, otherwise false to break out of the loop
Precondition:
data_control_provider_foreach_data_change_consumer() must be called to invoke this callback.
See also:
data_control_provider_foreach_data_change_consumer()
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.

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.

Since :
3.0
Parameters:
[in]providerThe provider handle. provider is valid only inside this function.
provider should not be freed
[in]consumer_appidThe 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_dataThe user data.
Returns:
A boolean value indicating whether the consumer application should be allowed to add data change callbacks. true let the application add a data change callback, otherwise false application not allowed to add data change callback
Precondition:
The callback must be registered using data_control_provider_add_data_change_consumer_filter_cb().
data_control_add_data_change_cb() must be called to invoke this callback.
See also:
data_control_provider_add_data_change_consumer_filter_cb()
data_control_provider_remove_data_change_consumer_filter_cb()
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.

Since :
2.3
Parameters:
[in]request_idThe request ID
[in]providerThe provider handle
[in]keyThe key of the value to add
[in]valueThe value to add
[in]user_dataThe 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.

Since :
2.3
Parameters:
[in]request_idThe request ID
[in]providerThe provider handle
[in]keyThe key of the value list to obtain
[in]user_dataThe 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.

Since :
2.3
Parameters:
[in]request_idThe request ID
[in]providerThe provider handle
[in]keyThe key of the value to remove
[in]valueThe value to remove
[in]user_dataThe 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.

Since :
2.3
Parameters:
[in]request_idThe request ID
[in]providerThe provider handle
[in]keyThe key of the value to replace
[in]old_valueThe value to replace
[in]new_valueThe new value that replaces the existing value
[in]user_dataThe 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.

Since :
2.3
Parameters:
[in]request_idThe request ID
[in]providerThe provider handle
[in]whereA 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_dataThe 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.

Since :
2.3
Parameters:
[in]request_idThe request ID
[in]providerThe provider handle
[in]insert_dataThe column-value pairs to insert
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
[in]user_dataThe 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.

Since :
2.3
Parameters:
[in]request_idThe request ID
[in]providerThe provider handle
[in]column_listThe column list to query
[in]column_countThe total number of columns to be queried
[in]whereA filter to select the desired rows
It is an SQL 'WHERE' clause excluding the 'WHERE' itself such as column1 = 'stringValue' and column2 = numericValue
[in]orderThe sorting order of the rows to query
It is an SQL 'ORDER BY' clause excluding the 'ORDER BY' itself
[in]user_dataThe 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.

Since :
2.3
Parameters:
[in]request_idThe request ID
[in]providerThe provider handle
[in]update_dataThe column-value pairs to update
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
[in]whereA 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_dataThe user data passed from the register function

Function Documentation

Adds a consumer filter for the data changed callback addition process.

Since :
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.
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.
Parameters:
[in]callbackConsumer filter callback, filtering consumers which try to add data changed callback
[in]user_dataThe user data to be passed to the list_cb function
[out]callback_idAdded callback ID
Returns:
0 on success, otherwise a negative error value
Return values:
DATA_CONTROL_ERROR_NONESuccessful
DATA_CONTROL_ERROR_IO_ERRORI/O error
DATA_CONTROL_ERROR_INVALID_PARAMETERInvalid parameter
See also:
data_control_provider_data_change_consumer_filter_cb()
char* data_control_provider_create_delete_statement ( data_control_h  provider,
const char *  where 
)

Creates SQL DELETE statement.

Since :
2.3
Remarks:
The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
Parameters:
[in]providerThe provider handle
[in]whereA filter to select the desired rows to delete
Pass NULL if all rows need to be deleted
Returns:
The SQL DELETE statement on success, otherwise NULL
Exceptions:
DATA_CONTROL_ERROR_NONESuccess
DATA_CONTROL_ERROR_OUT_OF_MEMORYOut of memory
DATA_CONTROL_ERROR_INVALID_PARAMETERInvalid parameter

Creates SQL INSERT statement.

Since :
2.3
Remarks:
The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
Parameters:
[in]providerThe provider handle
[in]insert_mapThe column-value pairs to insert
Returns:
The SQL INSERT statement on success, otherwise NULL
Exceptions:
DATA_CONTROL_ERROR_NONESuccess
DATA_CONTROL_ERROR_OUT_OF_MEMORYOut of memory
DATA_CONTROL_ERROR_INVALID_PARAMETERInvalid 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.

Since :
2.3
Remarks:
The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
Parameters:
[in]providerThe provider handle
[in]column_listThe column names to query
Pass NULL if all columns need to be selected
[in]column_countThe total number of columns to be queried
[in]whereA filter to select the desired rows
[in]orderThe sorting order of rows to query
Returns:
The SQL SELECT statement on success, otherwise NULL
Exceptions:
DATA_CONTROL_ERROR_NONESuccess
DATA_CONTROL_ERROR_OUT_OF_MEMORYOut of memory
DATA_CONTROL_ERROR_INVALID_PARAMETERInvalid parameter
char* data_control_provider_create_update_statement ( data_control_h  provider,
bundle update_map,
const char *  where 
)

Creates SQL UPDATE statement.

Since :
2.3
Remarks:
The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
Parameters:
[in]providerThe provider handle
[in]update_mapThe column-value pairs to update
[in]whereA filter to select the desired rows to update
Returns:
The SQL UPDATE statement on success, otherwise NULL
Exceptions:
DATA_CONTROL_ERROR_NONESuccess
DATA_CONTROL_ERROR_OUT_OF_MEMORYOut of memory
DATA_CONTROL_ERROR_INVALID_PARAMETERInvalid parameter

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.

Since :
3.0
Parameters:
[in]providerTarget provider handle
[in]list_cbThe iteration callback function
[in]user_dataThe user data to be passed to the list_cb function
Returns:
0 on success, otherwise a negative error value
Return values:
DATA_CONTROL_ERROR_NONESuccessful
DATA_CONTROL_ERROR_IO_ERRORI/O error
DATA_CONTROL_ERROR_INVALID_PARAMETERInvalid parameter
Postcondition:
This function invokes data_control_provider_data_change_consumer_cb().
See also:
data_control_provider_data_change_consumer_cb()
int data_control_provider_get_client_appid ( int  request_id,
char **  appid 
)

Gets the application ID which sends the data control request.

Since :
2.3
Parameters:
[in]request_idThe request ID
[out]appidThe application ID
Returns:
0 on success, otherwise a negative error value
Return values:
DATA_CONTROL_ERROR_NONESuccessful
DATA_CONTROL_ERROR_INVALID_PARAMETERInvalid parameter

Registers a callback for the MAP bulk data request.

The provider is notified when a data control request is received from the client applications.

Since :
3.0
Privilege Level:
public
Privilege:
http://tizen.org/privilege/datasharing
Parameters:
[in]callbackThe callback function to be called when a data control request is received
[in]user_dataThe user data to be passed to the callback function
Returns:
0 on success, otherwise a negative error value
Return values:
DATA_CONTROL_ERROR_NONESuccessful
DATA_CONTROL_ERROR_INVALID_PARAMETERInvalid parameter
DATA_CONTROL_ERROR_PERMISSION_DENIEDPermission 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.

Since :
2.3
Privilege Level:
public
Privilege:
http://tizen.org/privilege/datasharing
Parameters:
[in]callbackThe callback function to be called when a data control request is received
[in]user_dataThe user data to be passed to the callback function
Returns:
0 on success, otherwise a negative error value
Return values:
DATA_CONTROL_ERROR_NONESuccessful
DATA_CONTROL_ERROR_INVALID_PARAMETERInvalid parameter
DATA_CONTROL_ERROR_PERMISSION_DENIEDPermission denied

Unregisters the callback for the MAP bulk data request.

Since :
3.0
Returns:
0 on success, otherwise a negative error value
See also:
data_control_provider_map_register_add_bulk_data_request_cb()

Unregisters the callback functions.

Since :
2.3
Returns:
0 on success, otherwise a negative error value
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.

Since :
2.3
Remarks:
The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
Parameters:
[in]providerThe provider handle
[in]data_idThe data ID to be compared with handle's data ID
Returns:
true if the data_id matches, otherwise false if it does not match
Exceptions:
DATA_CONTROL_ERROR_NONESuccess
DATA_CONTROL_ERROR_INVALID_PARAMETERInvalid 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.

Since :
2.3
Remarks:
The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
Parameters:
[in]providerThe provider handle
[in]provider_idThe provider ID to be compared with handle's provider ID
Returns:
true if the provider_id matches, otherwise false if it does not match
Exceptions:
DATA_CONTROL_ERROR_NONESuccess
DATA_CONTROL_ERROR_INVALID_PARAMETERInvalid parameter

Removes a consumer filter for the data changed callback addition process.

Since :
3.0
Parameters:
[in]callback_idTarget callback ID
Returns:
0 on success, otherwise a negative error value
Return values:
DATA_CONTROL_ERROR_NONESuccessful
DATA_CONTROL_ERROR_IO_ERRORI/O error
DATA_CONTROL_ERROR_INVALID_PARAMETERInvalid parameter

Sends the result of the bulk insert request to the client application.

Since :
3.0
Parameters:
[in]request_idThe request ID
[in]bulk_resultsThe bulk add result for each data
Returns:
0 on success, otherwise a negative error value
Return values:
DATA_CONTROL_ERROR_NONESuccessful
DATA_CONTROL_ERROR_IO_ERRORI/O error
DATA_CONTROL_ERROR_INVALID_PARAMETERInvalid parameter

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.

Since :
3.0
Privilege Level:
public
Privilege:
http://tizen.org/privilege/datasharing
Parameters:
[in]providerTarget provider handle
[in]typeChanged data type
[in]dataCustomized information about changed data
Returns:
0 on success, otherwise a negative error value
Return values:
DATA_CONTROL_ERROR_NONESuccessful
DATA_CONTROL_ERROR_IO_ERRORI/O error
DATA_CONTROL_ERROR_INVALID_PARAMETERInvalid parameter
DATA_CONTROL_ERROR_PERMISSION_DENIEDPermission denied
Precondition:
The consumer should call data_control_add_data_change_cb() to receive data change notifications
See also:
data_control_data_change_cb()
data_control_add_data_change_cb()

Sends the success result of the delete request to the client application.

Since :
2.3
Parameters:
[in]request_idThe request ID
Returns:
0 on success, otherwise a negative error value
Return values:
DATA_CONTROL_ERROR_NONESuccessful
DATA_CONTROL_ERROR_IO_ERRORI/O error
DATA_CONTROL_ERROR_INVALID_PARAMETERInvalid parameter
int data_control_provider_send_error ( int  request_id,
const char *  error 
)

Sends the provider error message to the client application.

Since :
2.3
Parameters:
[in]request_idThe request ID
[in]errorThe provider-defined error message
Returns:
0 on success, otherwise a negative error value
Return values:
DATA_CONTROL_ERROR_NONESuccessful
DATA_CONTROL_ERROR_IO_ERRORI/O error
DATA_CONTROL_ERROR_INVALID_PARAMETERInvalid 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.

Since :
2.3
Parameters:
[in]request_idThe request ID
[in]row_idThe row ID of the database changed by the insert request
Returns:
0 on success, otherwise a negative error value
Return values:
DATA_CONTROL_ERROR_NONESuccessful
DATA_CONTROL_ERROR_IO_ERRORI/O error
DATA_CONTROL_ERROR_INVALID_PARAMETERInvalid parameter

Sends the result of the bulk add request to the client application.

Since :
3.0
Parameters:
[in]request_idThe request ID
[in]bulk_resultsThe bulk add result for each data
Returns:
0 on success, otherwise a negative error value
Return values:
DATA_CONTROL_ERROR_NONESuccessful
DATA_CONTROL_ERROR_IO_ERRORI/O error
DATA_CONTROL_ERROR_INVALID_PARAMETERInvalid 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.

Since :
2.3
Parameters:
[in]request_idThe request ID
[in]value_listThe result value list
[in]value_countThe number of the values
Returns:
0 on success, otherwise a negative error value
Return values:
DATA_CONTROL_ERROR_NONESuccessful
DATA_CONTROL_ERROR_IO_ERRORI/O error
DATA_CONTROL_ERROR_INVALID_PARAMETERInvalid parameter
DATA_CONTROL_ERROR_PERMISSION_DENIEDPermission denied
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.

Since :
2.3
Parameters:
[in]request_idThe request ID
Returns:
0 on success, otherwise a negative error value
Return values:
DATA_CONTROL_ERROR_NONESuccessful
DATA_CONTROL_ERROR_IO_ERRORI/O error
DATA_CONTROL_ERROR_INVALID_PARAMETERInvalid 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.

Since :
2.3
Parameters:
[in]request_idThe request ID
[in]db_handleThe result DB handle for the result set
Returns:
0 on success, otherwise a negative error value
Return values:
DATA_CONTROL_ERROR_NONESuccessful
DATA_CONTROL_ERROR_IO_ERRORI/O error
DATA_CONTROL_ERROR_INVALID_PARAMETERInvalid parameter
DATA_CONTROL_ERROR_PERMISSION_DENIEDPermission denied

Sends the success result of the update request to the client application.

Since :
2.3
Parameters:
[in]request_idThe request ID
Returns:
0 on success, otherwise a negative error value
Return values:
DATA_CONTROL_ERROR_NONESuccessful
DATA_CONTROL_ERROR_IO_ERRORI/O error
DATA_CONTROL_ERROR_INVALID_PARAMETERInvalid 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.

Since :
2.3
Privilege Level:
public
Privilege:
http://tizen.org/privilege/datasharing
Parameters:
[in]callbackThe callback function to be called when a data control request is received
[in]user_dataThe user data to be passed to the callback function
Returns:
0 on success, otherwise a negative error value
Return values:
DATA_CONTROL_ERROR_NONESuccessful
DATA_CONTROL_ERROR_INVALID_PARAMETERInvalid parameter
DATA_CONTROL_ERROR_PERMISSION_DENIEDPermission denied

Registers a callback for the SQL bulk data request.

The provider is notified when a data control request is received from the client applications.

Since :
3.0
Privilege Level:
public
Privilege:
http://tizen.org/privilege/datasharing
Parameters:
[in]callbackThe callback function to be called when a data control request is received
[in]user_dataThe user data to be passed to the callback function
Returns:
0 on success, otherwise a negative error value
Return values:
DATA_CONTROL_ERROR_NONESuccessful
DATA_CONTROL_ERROR_INVALID_PARAMETERInvalid parameter
DATA_CONTROL_ERROR_PERMISSION_DENIEDPermission denied

Unregisters the callback functions.

Since :
2.3
Returns:
0 on success, otherwise a negative error value

Unregisters the callback for the SQL bulk data request.

Since :
3.0
Returns:
0 on success, otherwise a negative error value
See also:
data_control_provider_sql_register_insert_bulk_data_request_cb()