Release 4.0.0-preview1-00138
[platform/core/csapi/tizenfx.git] / src / Tizen.Account.SyncManager / Interop / Interop.Manager.cs
1 // Copyright 2016 by Samsung Electronics, Inc.,
2 //
3 // This software is the confidential and proprietary information
4 // of Samsung Electronics, Inc. ("Confidential Information"). You
5 // shall not disclose such Confidential Information and shall use
6 // it only in accordance with the terms of the license agreement
7 // you entered into with Samsung.
8
9 using System;
10 using System.Runtime.InteropServices;
11 using Tizen.Applications;
12 using Tizen.Account.AccountManager;
13
14 internal static partial class Interop
15 {
16     internal static partial class Manager
17     {
18         [DllImport(Libraries.SyncManager, EntryPoint = "sync_manager_on_demand_sync_job")]
19         internal static extern int RequestOnDemandSyncJob(SafeAccountHandle account, string syncJobName, int syncOption, SafeBundleHandle syncJobUserData, out int syncJobId);
20
21         [DllImport(Libraries.SyncManager, EntryPoint = "sync_manager_add_periodic_sync_job")]
22         internal static extern int AddPeriodicSyncJob(SafeAccountHandle account, string syncJobName, int syncPeriod, int syncOption, SafeBundleHandle syncJobUserData, out int syncJobId);
23
24         [DllImport(Libraries.SyncManager, EntryPoint = "sync_manager_add_data_change_sync_job")]
25         internal static extern int AddDataChangeSyncJob(SafeAccountHandle account, string syncCapability, int syncOption, SafeBundleHandle syncJobUserData, out int syncJobId);
26
27         [DllImport(Libraries.SyncManager, EntryPoint = "sync_manager_remove_sync_job")]
28         internal static extern int RemoveSyncJob(int syncJobId);
29
30         [DllImport(Libraries.SyncManager, EntryPoint = "sync_manager_foreach_sync_job")]
31         internal static extern int ForeachSyncJob(SyncManagerSyncJobCallback syncJobCb, IntPtr userData);
32
33         [UnmanagedFunctionPointerAttribute(CallingConvention.Cdecl)]
34         internal delegate bool SyncManagerSyncJobCallback(IntPtr account, string syncJobName, string syncCapability, int syncJobId, IntPtr syncJobUserData, IntPtr userData);
35     }
36 }