Class SyncClient
Definition
- Namespace:
- Tizen.Account.SyncManager
- Assembly:
- Tizen.Account.SyncManager.dll
- API Level:
- 4
The SyncClient APIs for managing the sync operations. Applications will call these APIs to schedule their sync operations. The sync service maintains sync requests from all the applications and invokes their respective callback methods to perform account synchronization operations.
public static class SyncClient
- Inheritance
-
SyncClient
Methods
View SourceAddDataChangeSyncJob(SyncJobData, SyncOption)
Requests the sync manager to perform sync operations whenever the corresponding DB is changed.
Declaration
public static int AddDataChangeSyncJob(SyncJobData request, SyncOption syncOptions)
Parameters
Type | Name | Description |
---|---|---|
SyncJobData | request | The sync job information of the sync job request. |
SyncOption | syncOptions | Sync options determine a way to operate the sync job and can be used as ORing. |
Returns
Type | Description |
---|---|
Int32 | A unique value which can manage sync jobs. The number of sync job IDs is limited as it is less than hundred. |
Exceptions
Type | Condition |
---|---|
UnauthorizedAccessException | In case of a privilege is not defined. |
ArgumentNullException | Thrown when any of the arguments are null. |
InvalidOperationException | Thrown when the application calling this API doesn't have a sync adapter. |
API Level: 4
Privilege Level: public
Privilege: http://tizen.org/privilege/calendar.readhttp://tizen.org/privilege/contact.read
View SourceAddPeriodicSyncJob(SyncJobData, SyncPeriod, SyncOption)
Requests the sync manager to perform periodic sync operations.
Declaration
public static int AddPeriodicSyncJob(SyncJobData request, SyncPeriod period, SyncOption syncOptions)
Parameters
Type | Name | Description |
---|---|---|
SyncJobData | request | The sync job information of the sync job request. |
SyncPeriod | period | Determines the time interval of the periodic sync. The periodic sync operation can be triggered in that interval, but it does not guarantee the exact time. The minimum value is 30 minutes. |
SyncOption | syncOptions | Sync options determine a way to operate the sync job and can be used as ORing. |
Returns
Type | Description |
---|---|
Int32 | A unique value which can manage sync jobs. The number of sync job IDs is limited as it is less than hundred. |
Exceptions
Type | Condition |
---|---|
UnauthorizedAccessException | In case of a privilege not defined. |
ArgumentNullException | Thrown when any of the arguments are null. |
InvalidOperationException | Thrown when the application calling this API doesn't have a sync adapter. |
API Level: 4
Privilege Level: public
Privilege: http://tizen.org/privilege/alarm.set
View SourceGetAllSyncJobs()
Gets all the sync jobs registered with the sync manager.
Declaration
public static IEnumerable<KeyValuePair<int, SyncJobData>> GetAllSyncJobs()
Returns
Type | Description |
---|---|
IEnumerable<KeyValuePair<Int32, SyncJobData>> | Returns the list of SyncJobData corresponding to sync requests. |
API Level: 4
View SourceRemoveSyncJob(Int32)
Requests the sync manager to remove the corresponding sync job based on the ID.
Declaration
public static void RemoveSyncJob(int id)
Parameters
Type | Name | Description |
---|---|---|
Int32 | id | A unique value of each sync job, it can be used to search a specific sync job and remove it. |
Exceptions
Type | Condition |
---|---|
ArgumentException | Thrown if the input arugments is invalid. |
API Level: 4
View SourceRequestOnDemandSyncJob(SyncJobData, SyncOption)
Requests the sync manager to perform one time sync operation.
Declaration
public static int RequestOnDemandSyncJob(SyncJobData request, SyncOption syncOptions)
Parameters
Type | Name | Description |
---|---|---|
SyncJobData | request | The sync job information of the sync job request. |
SyncOption | syncOptions | Sync options determine a way to operate the sync job and can be used as ORing. |
Returns
Type | Description |
---|---|
Int32 | An unique value which can manage sync jobs. The number of sync job ID is limite as it is less than hundred. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | Thrown when any of the arugments are null. |
InvalidOperationException | Thrown when the application calling this API doesn't have a sync adapter. |