Tizen Native API
5.5
|
The Sync Adapter.
#include <sync_adapter.h>
Sync Adapter contains the callbacks required sync manager for triggering sync operations. Applications have to implement this sync adapter callback functions. The callback functions holds the logic of data sync operations. Each service application operates sync job respectively through the app control mechanism. The app control is operated by using appId. Also, it can distinguish start or cancel sync operation through app control operations which are written in Sync programming guide.
Functions | |
int | sync_adapter_set_callbacks (sync_adapter_start_sync_cb on_start_cb, sync_adapter_cancel_sync_cb on_cancel_cb) |
Sets client (Sync Adapter) callback functions. | |
int | sync_adapter_unset_callbacks (void) |
Unsets client (Sync Adapter) callback functions. | |
Typedefs | |
typedef bool(* | sync_adapter_start_sync_cb )(account_h account, const char *sync_job_name, const char *sync_capability, bundle *sync_job_user_data) |
Callback function for Sync Adapter's start sync request. | |
typedef void(* | sync_adapter_cancel_sync_cb )(account_h account, const char *sync_job_name, const char *sync_capability, bundle *sync_job_user_data) |
Callback function for Sync Adapter's cancel sync request. |
typedef void(* sync_adapter_cancel_sync_cb)(account_h account, const char *sync_job_name, const char *sync_capability, bundle *sync_job_user_data) |
Callback function for Sync Adapter's cancel sync request.
[in] | account | An account handle on which sync operation was requested or NULL in the case of accountless sync operation |
[in] | sync_job_name | A string representing a sync job which has been operated or NULL in the case of data change sync operation |
[in] | sync_capability | A string representing a sync job which has been operated because of data change or NULL in the case of on demand and periodic sync operation |
[in] | sync_job_user_data | User data which contains additional information related registered sync job |
typedef bool(* sync_adapter_start_sync_cb)(account_h account, const char *sync_job_name, const char *sync_capability, bundle *sync_job_user_data) |
Callback function for Sync Adapter's start sync request.
[in] | account | An account handle on which sync operation was requested or NULL in the case of accountless sync operation |
[in] | sync_job_name | A string representing a sync job which has been operated or NULL in the case of data change sync operation |
[in] | sync_capability | A string representing a sync job which has been operated because of data change or NULL in the case of on demand or periodic sync operation |
[in] | sync_job_user_data | User data which contains additional information related registered sync job |
true
if sync operation is success, false
otherwiseint sync_adapter_set_callbacks | ( | sync_adapter_start_sync_cb | on_start_cb, |
sync_adapter_cancel_sync_cb | on_cancel_cb | ||
) |
Sets client (Sync Adapter) callback functions.
[in] | on_start_cb | A callback function to be called by Sync Manager for performing sync operation |
[in] | on_cancel_cb | A callback function to be called by Sync Manager for cancelling sync operation |
0
on success, otherwise a negative error valueSYNC_ERROR_NONE | Successful |
SYNC_ERROR_NOT_SUPPORTED | Not supported |
SYNC_ERROR_OUT_OF_MEMORY | Out of memory |
SYNC_ERROR_IO_ERROR | I/O error |
SYNC_ERROR_INVALID_PARAMETER | Invalid parameter |
SYNC_ERROR_QUOTA_EXCEEDED | Quota exceeded |
SYNC_ERROR_SYSTEM | System error |
int sync_adapter_unset_callbacks | ( | void | ) |
Unsets client (Sync Adapter) callback functions.
0
on success, otherwise a negative error valueSYNC_ERROR_NONE | Successful |
SYNC_ERROR_NOT_SUPPORTED | Not supported |
SYNC_ERROR_SYSTEM | System error |