X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2FTizen.Account.SyncManager%2FTizen.Account.SyncManager%2FSyncAdapter.cs;h=01d45a696536062608a4c4ba762c922693b88f9f;hb=6bb51cb6b1cf4d7bd92a3d71fa74ac3b4c5d4da7;hp=8a59593dad12c043c283aa5a98b060a66bc7d692;hpb=f8d465b2c920fe8a812338f7aeef2c011ced42ee;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git
diff --git a/src/Tizen.Account.SyncManager/Tizen.Account.SyncManager/SyncAdapter.cs b/src/Tizen.Account.SyncManager/Tizen.Account.SyncManager/SyncAdapter.cs
index 8a59593..01d45a6 100755
--- a/src/Tizen.Account.SyncManager/Tizen.Account.SyncManager/SyncAdapter.cs
+++ b/src/Tizen.Account.SyncManager/Tizen.Account.SyncManager/SyncAdapter.cs
@@ -21,31 +21,35 @@ using Tizen.Account.AccountManager;
namespace Tizen.Account.SyncManager
{
///
- /// The class contains the delegates to be called upon scheduling a sync operation
+ /// This class contains the delegates to be called upon scheduling a sync operation.
///
+ /// 4
public class SyncAdapter
{
Interop.Adapter.SyncAdapterStartSyncCallback _startSyncCallback;
Interop.Adapter.SyncAdapterCancelSyncCallback _cancelSyncCallback;
///
- /// Callback function for Sync Adapter's start sync request
+ /// The callback function for the sync adapter's start sync request.
///
+ /// 4
/// The sync job parameters corresponding to the sync request.
- /// true if sync operation is success, @c false otherwise.
+ /// true if the sync operation is success, @c false otherwise.
public delegate bool StartSyncCallback(SyncJobData syncParameters);
///
- /// Callback function for Sync Adapter's cancel sync request.
+ /// The callback function for the sync adapter's cancel sync request.
///
+ /// 4
/// The sync job parameters corresponding to the sync request.
public delegate void CancelSyncCallback(SyncJobData syncParameters);
///
- /// Sets client (Sync Adapter) callback functions
+ /// Sets the client (sync adapter) callback functions.
///
- /// A callback function to be called by Sync Manager for performing sync operation.
- /// A callback function to be called by Sync Manager for cancelling sync operation.
+ /// 4
+ /// A callback function to be called by the sync manager for performing the sync operation.
+ /// A callback function to be called by the sync manager for cancelling the sync operation.
/// Thrown when any of the arguments are null.
/// Thrown when the application calling this API cannot be a sync adapter.
public void SetSyncEventCallbacks(StartSyncCallback startSyncCb, CancelSyncCallback cancelSyncCb)
@@ -62,12 +66,14 @@ namespace Tizen.Account.SyncManager
AccountManager.Account account = new AccountManager.Account(new SafeAccountHandle(accountHandle, true));
Bundle bundle = new Bundle(new SafeBundleHandle(syncJobUserData, true));
- SyncJobData syncJobData = new SyncJobData()
- {
- Account = account,
- SyncJobName = syncJobName,
- UserData = bundle
- };
+ SyncJobData syncJobData = new SyncJobData();
+ syncJobData.Account = account;
+ if (syncJobName == null)
+ syncJobData.SyncJobName = syncCapability;
+ else
+ syncJobData.SyncJobName = syncJobName;
+ syncJobData.UserData = bundle;
+
return startSyncCb(syncJobData);
};
@@ -79,12 +85,13 @@ namespace Tizen.Account.SyncManager
AccountManager.Account account = new AccountManager.Account(new SafeAccountHandle(accountHandle, true));
Bundle bundle = new Bundle(new SafeBundleHandle(syncJobUserData, true));
- SyncJobData syncJobData = new SyncJobData()
- {
- Account = account,
- SyncJobName = syncJobName,
- UserData = bundle
- };
+ SyncJobData syncJobData = new SyncJobData();
+ syncJobData.Account = account;
+ if (syncJobName == null)
+ syncJobData.SyncJobName = syncCapability;
+ else
+ syncJobData.SyncJobName = syncJobName;
+ syncJobData.UserData = bundle;
cancelSyncCb(syncJobData);
};
@@ -98,8 +105,9 @@ namespace Tizen.Account.SyncManager
}
///
- /// Unsets client (Sync Adapter) callback functions
+ /// Unsets the client (sync adapter) callback functions.
///
+ /// 4
/// Thrown when sync manager internal error occurs.
public void UnsetSyncEventCallbacks()
{