예제 #1
0
        /// <summary>
        /// Requests the sync manager to perform periodic sync operations.
        /// </summary>
        /// <since_tizen> 4 </since_tizen>
        /// <param name="request"> The sync job information of the sync job request. </param>
        /// <param name="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. </param>
        /// <param name="syncOptions"> Sync options determine a way to operate the sync job and can be used as ORing. </param>
        /// <privilege>http://tizen.org/privilege/alarm.set</privilege>
        /// <exception cref="UnauthorizedAccessException"> In case of a privilege not defined. </exception>
        /// <exception cref="ArgumentNullException"> Thrown when any of the arguments are null. </exception>
        /// <exception cref="InvalidOperationException"> Thrown when the application calling this API doesn't have a sync adapter. </exception>
        /// <returns> A unique value which can manage sync jobs. The number of sync job IDs is limited as it is less than hundred. </returns>
        public static int AddPeriodicSyncJob(SyncJobData request, SyncPeriod period, SyncOption syncOptions)
        {
            if (request == null || request.SyncJobName == null)
            {
                throw new ArgumentNullException();
            }

            SafeAccountHandle accountHandle = (request.Account != null) ? request.Account.SafeAccountHandle : new SafeAccountHandle();
            SafeBundleHandle  bundleHandle  = (request.UserData != null) ? request.UserData.SafeBundleHandle : new SafeBundleHandle();

            int id  = 0;
            int ret = Interop.Manager.AddPeriodicSyncJob(accountHandle, request.SyncJobName, (int)period, (int)syncOptions, bundleHandle, out id);

            if (ret != (int)SyncManagerErrorCode.None)
            {
                Log.Error(ErrorFactory.LogTag, "Failed to add periodic sync job");
                throw ErrorFactory.GetException(ret);
            }
            return(id);
        }
예제 #2
0
 internal static extern int SetAccountDomainName(SafeAccountHandle handle, string domainName);
예제 #3
0
 internal static extern int GetAccountSercet(SafeAccountHandle handle, out int secretType);
예제 #4
0
 internal static extern int AddDataChangeSyncJob(SafeAccountHandle account, string syncCapability, int syncOption, SafeBundleHandle syncJobUserData, out int syncJobId);
예제 #5
0
 internal static extern int RequestOnDemandSyncJob(SafeAccountHandle account, string syncJobName, int syncOption, SafeBundleHandle syncJobUserData, out int syncJobId);
예제 #6
0
 internal static extern int QueryAccountById(int accountId, ref SafeAccountHandle handle);
예제 #7
0
 internal static extern int SetAccountUserInt(SafeAccountHandle handle, int index, int value);
예제 #8
0
 internal static extern int SetAccountAccessToken(SafeAccountHandle handle, string accessToken);
예제 #9
0
 internal static extern int Create(out SafeAccountHandle handle);
예제 #10
0
 internal static extern int GetAllAccountCustomValues(SafeAccountHandle handle, AccountCustomCallback callback, IntPtr userData);
예제 #11
0
 internal static extern int GetAllAccountCapabilities(SafeAccountHandle handle, AccountCapabilityCallback callback, IntPtr userData);
예제 #12
0
 internal static extern int SetAccountCustomValue(SafeAccountHandle handle, string key, string value);
예제 #13
0
 internal static extern int SetAccountSource(SafeAccountHandle handle, string source);
예제 #14
0
 internal static extern int SetAccountSyncSupport(SafeAccountHandle handle, int syncType);
예제 #15
0
 internal static extern int SetAccountSecret(SafeAccountHandle handle, int secretType);
예제 #16
0
 internal static extern int SetAccountEmail(SafeAccountHandle handle, string email);
예제 #17
0
 internal static extern int SetAccountPackageName(SafeAccountHandle handle, string name);
예제 #18
0
 internal static extern int GetAccountId(SafeAccountHandle data, out int accountId);
예제 #19
0
 internal static extern int SetAccountUserText(SafeAccountHandle handle, int index, string userText);
예제 #20
0
 internal static extern int GetAccountUserName(SafeAccountHandle data, out string userName);
예제 #21
0
 internal static extern int UpdateAccountToDBById(SafeAccountHandle handle, int id);
예제 #22
0
 internal static extern int SetAccountUserName(SafeAccountHandle handle, string userName);
예제 #23
0
 internal static extern int AddAccount(SafeAccountHandle handle, out int accountId);
예제 #24
0
 internal static extern int SetAccountDisplayName(SafeAccountHandle handle, string displayName);
예제 #25
0
 internal static extern int AddPeriodicSyncJob(SafeAccountHandle account, string syncJobName, int syncPeriod, int syncOption, SafeBundleHandle syncJobUserData, out int syncJobId);
예제 #26
0
 internal static extern int SetAccountCapability(SafeAccountHandle handle, string capabilityType, int capabilityValue);
예제 #27
0
 internal static extern int SetAccountIconPath(SafeAccountHandle handle, string iconPath);
예제 #28
0
 internal static extern int SetAccountAuthType(SafeAccountHandle handle, int authType);