Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

503 lines
14 KiB

  1. //****************************************************************************
  2. //
  3. // Copyright (c) Microsoft Corporation. All rights reserved.
  4. //
  5. // File: syncmgrp.idl
  6. //
  7. // Contents: Private Interfaces for SyncMgr Manager
  8. //
  9. //****************************************************************************
  10. #ifndef DO_NO_IMPORTS
  11. import "objidl.idl";
  12. import "oleidl.idl";
  13. import "mstask.idl";
  14. import "mobsync.idl";
  15. #endif
  16. interface IPrivSyncMgrSynchronizeInvoke;
  17. interface ISyncScheduleMgr;
  18. interface IEnumSyncSchedules;
  19. interface ISyncSchedule;
  20. interface IEnumSyncItems;
  21. typedef GUID SYNCSCHEDULECOOKIE;
  22. // declare proxy value so can define when building proxy/stub so don't have
  23. // to worry about midl picking the wrong value. This value is same as
  24. // IPrivSyncMgrSynchronizeInvoke since this was the only
  25. // interface originally not local
  26. // {6295DF2E-35EE-11d1-8707-00C04FD93327}
  27. cpp_quote("DEFINE_GUID(CLSID_SyncMgrProxy,0x6295df2e, 0x35ee, 0x11d1, 0x87, 0x7, 0x0, 0xc0, 0x4f, 0xd9, 0x33, 0x27);")
  28. // {6295DF2D-35EE-11d1-8707-00C04FD93327}
  29. cpp_quote("DEFINE_GUID(CLSID_SyncMgrp,0x6295df2d, 0x35ee, 0x11d1, 0x87, 0x7, 0x0, 0xc0, 0x4f, 0xd9, 0x33, 0x27);")
  30. // {6295DF2E-35EE-11d1-8707-00C04FD93327}
  31. cpp_quote("DEFINE_GUID(IID_IPrivSyncMgrSynchronizeInvoke,0x6295df2e, 0x35ee, 0x11d1, 0x87, 0x7, 0x0, 0xc0, 0x4f, 0xd9, 0x33, 0x27);")
  32. // {F0E15897-A700-11d1-9831-00C04FD910DD}
  33. cpp_quote("DEFINE_GUID(IID_ISyncScheduleMgr,0xf0e15897, 0xa700, 0x11d1, 0x98, 0x31, 0x0, 0xc0, 0x4f, 0xd9, 0x10, 0xdd);")
  34. // {F0E15898-A700-11d1-9831-00C04FD910DD}
  35. cpp_quote("DEFINE_GUID(IID_IEnumSyncSchedules,0xf0e15898, 0xa700, 0x11d1, 0x98, 0x31, 0x0, 0xc0, 0x4f, 0xd9, 0x10, 0xdd);")
  36. // {F0E15899-A700-11d1-9831-00C04FD910DD}
  37. cpp_quote("DEFINE_GUID(IID_ISyncSchedule,0xf0e15899, 0xa700, 0x11d1, 0x98, 0x31, 0x0, 0xc0, 0x4f, 0xd9, 0x10, 0xdd);")
  38. // {F0E1589A-A700-11d1-9831-00C04FD910DD}
  39. cpp_quote("DEFINE_GUID(IID_IEnumSyncItems,0xf0e1589a, 0xa700, 0x11d1, 0x98, 0x31, 0x0, 0xc0, 0x4f, 0xd9, 0x10, 0xdd);")
  40. // {F0E1589B-A700-11d1-9831-00C04FD910DD}
  41. cpp_quote("DEFINE_GUID(IID_ISyncSchedulep,0xf0e1589b, 0xa700, 0x11d1, 0x98, 0x31, 0x0, 0xc0, 0x4f, 0xd9, 0x10, 0xdd);")
  42. // {6295DF2F-35EE-11d1-8707-00C04FD93327}
  43. cpp_quote("DEFINE_GUID(GUID_SENSSUBSCRIBER_SYNCMGRP,0x6295df2f, 0x35ee, 0x11d1, 0x87, 0x7, 0x0, 0xc0, 0x4f, 0xd9, 0x33, 0x27);")
  44. // {6295DF30-35EE-11d1-8707-00C04FD93327}
  45. cpp_quote("DEFINE_GUID(GUID_SENSLOGONSUBSCRIPTION_SYNCMGRP,0x6295df30, 0x35ee, 0x11d1, 0x87, 0x7, 0x0, 0xc0, 0x4f, 0xd9, 0x33, 0x27);")
  46. // {6295DF31-35EE-11d1-8707-00C04FD93327}
  47. cpp_quote("DEFINE_GUID(GUID_SENSLOGOFFSUBSCRIPTION_SYNCMGRP,0x6295df31, 0x35ee, 0x11d1, 0x87, 0x7, 0x0, 0xc0, 0x4f, 0xd9, 0x33, 0x27);")
  48. cpp_quote("")
  49. // Internal SyncMgr guids
  50. // define guids we use internally
  51. // Progress Idle dialog ID
  52. // {F897AA23-BDC3-11d1-B85B-00C04FB93981}
  53. cpp_quote("DEFINE_GUID(GUID_PROGRESSDLGIDLE,0xf897aa23, 0xbdc3, 0x11d1, 0xb8, 0x5b, 0x0, 0xc0, 0x4f, 0xb9, 0x39, 0x81);")
  54. cpp_quote("")
  55. // guid for creating an Idle schedule.
  56. // {F897AA24-BDC3-11d1-B85B-00C04FB93981}
  57. cpp_quote("#define SZGUID_IDLESCHEDULE TEXT(\"{F897AA24-BDC3-11d1-B85B-00C04FB93981}\")")
  58. cpp_quote("#define WSZGUID_IDLESCHEDULE L\"{F897AA24-BDC3-11d1-B85B-00C04FB93981}\"")
  59. cpp_quote("DEFINE_GUID(GUID_IDLESCHEDULE,0xf897aa24, 0xbdc3, 0x11d1, 0xb8, 0x5b, 0x0, 0xc0, 0x4f, 0xb9, 0x39, 0x81);")
  60. cpp_quote("")
  61. // Error codes specific to SyncMgr interfaces
  62. cpp_quote("#define SYNCMGR_E_NAME_IN_USE MAKE_SCODE(SEVERITY_ERROR,FACILITY_ITF,0x0201)")
  63. cpp_quote("#define SYNCMGR_E_ITEM_UNREGISTERED MAKE_SCODE(SEVERITY_ERROR,FACILITY_ITF,0x0202)")
  64. cpp_quote("#define SYNCMGR_E_HANDLER_NOT_LOADED MAKE_SCODE(SEVERITY_ERROR,FACILITY_ITF,0x0203)")
  65. cpp_quote("//Autosync reg entry values")
  66. cpp_quote("#define AUTOSYNC_WAN_LOGON 0x0001")
  67. cpp_quote("#define AUTOSYNC_WAN_LOGOFF 0x0002")
  68. cpp_quote("#define AUTOSYNC_LAN_LOGON 0x0004")
  69. cpp_quote("#define AUTOSYNC_LAN_LOGOFF 0x0008")
  70. cpp_quote("#define AUTOSYNC_SCHEDULED 0x0010")
  71. cpp_quote("#define AUTOSYNC_IDLE 0x0020")
  72. cpp_quote("#define AUTOSYNC_LOGONWITHRUNKEY 0x0040")
  73. cpp_quote("#define AUTOSYNC_LOGON (AUTOSYNC_WAN_LOGON | AUTOSYNC_LAN_LOGON) ")
  74. cpp_quote("#define AUTOSYNC_LOGOFF (AUTOSYNC_WAN_LOGOFF | AUTOSYNC_LAN_LOGOFF) ")
  75. cpp_quote("")
  76. [
  77. object,
  78. uuid(6295DF2E-35EE-11d1-8707-00C04FD93327), // IID_IPrivSyncMgrSynchronizeInvoke
  79. pointer_default(unique)
  80. ]
  81. interface IPrivSyncMgrSynchronizeInvoke : IUnknown
  82. {
  83. typedef [unique] IPrivSyncMgrSynchronizeInvoke *LPPRIVSYNCMGRSYNCHRONIZEINVOKE;
  84. HRESULT UpdateItems(
  85. [in] DWORD dwInvokeFlags,
  86. [in] REFCLSID rclsid,
  87. [in] DWORD cbCookie,
  88. [in, unique, size_is(cbCookie)] const BYTE *lpCookie);
  89. HRESULT UpdateAll(); // same al calling update all with 0 set for the invoke flags.
  90. HRESULT Logon();
  91. HRESULT Logoff();
  92. HRESULT Schedule([in,unique,string] WCHAR *pszTaskName);
  93. HRESULT RasPendingDisconnect(
  94. [in] DWORD cbConnectionName,
  95. [in, unique, size_is(cbConnectionName)] const BYTE *lpConnectionName
  96. );
  97. HRESULT Idle();
  98. }
  99. // Scheduling interfaces
  100. cpp_quote("#define SYNCSCHEDINFO_FLAGS_MASK 0x0FFF")
  101. cpp_quote("#define SYNCSCHEDINFO_FLAGS_READONLY 0x0001")
  102. cpp_quote("#define SYNCSCHEDINFO_FLAGS_AUTOCONNECT 0x0002")
  103. cpp_quote("#define SYNCSCHEDINFO_FLAGS_HIDDEN 0x0004")
  104. cpp_quote("#define SYNCSCHEDWIZARD_SHOWALLHANDLERITEMS 0x1000")
  105. cpp_quote("")
  106. [
  107. local,
  108. object,
  109. uuid(F0E15897-A700-11d1-9831-00C04FD910DD), // IID_ISyncScheduleMgr
  110. pointer_default(unique)
  111. ]
  112. interface ISyncScheduleMgr : IUnknown
  113. {
  114. typedef [unique] ISyncScheduleMgr *LPSYNCSCHEDULEMGR;
  115. HRESULT CreateSchedule(
  116. [in] LPCWSTR pwszScheduleName,
  117. [in] DWORD dwFlags,
  118. [in,out] SYNCSCHEDULECOOKIE *pSyncSchedCookie,
  119. [out] ISyncSchedule **ppSyncSchedule);
  120. HRESULT LaunchScheduleWizard(
  121. [in] HWND hParent,
  122. [in] DWORD dwFlags,
  123. [in, out] SYNCSCHEDULECOOKIE *pSyncSchedCookie,
  124. [out] ISyncSchedule ** ppSyncSchedule);
  125. HRESULT OpenSchedule(
  126. [in] SYNCSCHEDULECOOKIE *pSyncSchedCookie,
  127. [in] DWORD dwFlags,
  128. [out] ISyncSchedule **ppSyncSchedule);
  129. HRESULT RemoveSchedule(
  130. [in] SYNCSCHEDULECOOKIE *pSyncSchedCookie);
  131. HRESULT EnumSyncSchedules(
  132. [out] IEnumSyncSchedules **ppEnumSyncSchedules);
  133. }
  134. cpp_quote("#define SYNCSCHEDINFO_FLAGS_CONNECTION_LAN 0x0000")
  135. cpp_quote("#define SYNCSCHEDINFO_FLAGS_CONNECTION_WAN 0x0001")
  136. [
  137. local,
  138. object,
  139. uuid(F0E15898-A700-11d1-9831-00C04FD910DD), // IID_IEnumSyncSchedules
  140. pointer_default(unique)
  141. ]
  142. interface IEnumSyncSchedules : IUnknown
  143. {
  144. HRESULT Next(
  145. [in] ULONG celt,
  146. [out, size_is(celt), length_is(*pceltFetched)]
  147. SYNCSCHEDULECOOKIE *pSyncSchedCookie,
  148. [out] ULONG *pceltFetched);
  149. HRESULT Skip(
  150. [in] ULONG celt);
  151. HRESULT Reset(void);
  152. HRESULT Clone(
  153. [out] IEnumSyncSchedules **ppEnumSyncSchedules);
  154. }
  155. typedef struct _tagSYNC_HANDLER_ITEM_INFO
  156. {
  157. GUID handlerID;
  158. SYNCMGRITEMID itemID;
  159. HICON hIcon;
  160. WCHAR wszItemName[MAX_SYNCMGRITEMNAME];
  161. DWORD dwCheckState;
  162. } SYNC_HANDLER_ITEM_INFO, *LPSYNC_HANDLER_ITEM_INFO;
  163. [
  164. local,
  165. object,
  166. uuid(F0E15899-A700-11d1-9831-00C04FD910DD), // IID_ISyncSchedule
  167. pointer_default(unique)
  168. ]
  169. interface ISyncSchedule : IUnknown
  170. {
  171. HRESULT GetFlags(
  172. [out] DWORD *pdwFlags);
  173. HRESULT SetFlags(
  174. [in] DWORD dwFlags);
  175. HRESULT GetConnection(
  176. [in, out] DWORD *pcbSize,
  177. [out] LPWSTR pwszConnectionName,
  178. [out] DWORD *pdwConnType);
  179. HRESULT SetConnection(
  180. [in] LPCWSTR pwszConnectionName,
  181. [in] DWORD dwConnType);
  182. HRESULT GetScheduleName(
  183. [in, out] DWORD *pcbSize,
  184. [out] LPWSTR pwszScheduleName);
  185. HRESULT SetScheduleName(
  186. [in] LPCWSTR pwszScheduleName);
  187. HRESULT GetScheduleCookie(
  188. [out] SYNCSCHEDULECOOKIE *pSyncSchedCookie);
  189. HRESULT SetAccountInformation(
  190. [in] LPCWSTR pwszAccountName,
  191. [in] LPCWSTR pwszPassword);
  192. HRESULT GetAccountInformation(
  193. [in, out] DWORD *pcbSize,
  194. [out] LPWSTR pwszAccountName);
  195. HRESULT GetTrigger(
  196. [out] ITaskTrigger ** ppTrigger);
  197. HRESULT GetNextRunTime(
  198. [out] SYSTEMTIME * pstNextRun);
  199. HRESULT GetMostRecentRunTime(
  200. [out] SYSTEMTIME * pstRecentRun);
  201. HRESULT EditSyncSchedule(
  202. [in] HWND hParent,
  203. [in] DWORD dwReserved);
  204. HRESULT AddItem(
  205. [in] LPSYNC_HANDLER_ITEM_INFO pHandlerItemInfo);
  206. HRESULT RegisterItems(
  207. [in] REFCLSID pHandlerID,
  208. [in] SYNCMGRITEMID *pItemID);
  209. HRESULT UnregisterItems(
  210. [in] REFCLSID pHandlerID,
  211. [in] SYNCMGRITEMID *pItemID);
  212. HRESULT SetItemCheck(
  213. [in] REFCLSID pHandlerID,
  214. [in] SYNCMGRITEMID *pItemID,
  215. [in] DWORD dwCheckState);
  216. HRESULT GetItemCheck(
  217. [in] REFCLSID pHandlerID,
  218. [in] SYNCMGRITEMID *pItemID,
  219. [out] DWORD *pdwCheckState);
  220. HRESULT EnumItems(
  221. [in] REFCLSID pHandlerID,
  222. [in] IEnumSyncItems **ppEnumItems);
  223. HRESULT Save();
  224. HRESULT GetITask(
  225. [out] ITask ** ppITask);
  226. }
  227. [
  228. local,
  229. object,
  230. uuid(F0E1589B-A700-11d1-9831-00C04FD910DD), // IID_ISyncSchedulep
  231. pointer_default(unique)
  232. ]
  233. interface ISyncSchedulep : ISyncSchedule
  234. {
  235. typedef [unique] ISyncSchedulep *LPSYNCSCHEDULEP;
  236. HRESULT GetHandlerInfo([in] REFCLSID pHandlerID,
  237. [out] LPSYNCMGRHANDLERINFO *ppSyncMgrHandlerInfo);
  238. }
  239. [
  240. local,
  241. object,
  242. uuid(F0E1589A-A700-11d1-9831-00C04FD910DD), // IID_IEnumSyncItems
  243. pointer_default(unique)
  244. ]
  245. interface IEnumSyncItems : IUnknown
  246. {
  247. HRESULT Next(
  248. [in] ULONG celt,
  249. [out, size_is(celt), length_is(*pceltFetched)]
  250. LPSYNC_HANDLER_ITEM_INFO rgelt,
  251. [out] ULONG * pceltFetched);
  252. HRESULT Skip(
  253. [in] ULONG celt);
  254. HRESULT Reset(void);
  255. HRESULT Clone(
  256. [out] IEnumSyncItems ** ppEnumSyncItems);
  257. }
  258. // temporary definitions of interfaces before changed (6/10/98) so existing clients don't break.
  259. // should be able to remove before IE 5 beta2.
  260. cpp_quote("#define SYNCMGRITEM_ITEMFLAGMASKNT5B2 0x07")
  261. const USHORT MAX_SYNCMGRITEMSTATUS = 128;
  262. typedef struct _tagSYNCMGRITEMNT5B2 {
  263. DWORD cbSize;
  264. DWORD dwFlags;
  265. SYNCMGRITEMID ItemID;
  266. DWORD dwItemState;
  267. HICON hIcon;
  268. WCHAR wszItemName[MAX_SYNCMGRITEMNAME];
  269. WCHAR wszStatus[MAX_SYNCMGRITEMSTATUS];
  270. } SYNCMGRITEMNT5B2, *LPSYNCMGRITEMNT5B2;
  271. interface IOldSyncMgrSynchronize;
  272. interface IOldSyncMgrSynchronizeCallback;
  273. interface IOldSyncMgrRegister;
  274. // {6295DF29-35EE-11d1-8707-00C04FD93327}
  275. cpp_quote("DEFINE_GUID(IID_IOldSyncMgrSynchronize,0x6295df28, 0x35ee, 0x11d1, 0x87, 0x7, 0x0, 0xc0, 0x4f, 0xd9, 0x33, 0x27);")
  276. // {6295DF28-35EE-11d1-8707-00C04FD93327}
  277. cpp_quote("DEFINE_GUID(IID_IOldSyncMgrSynchronizeCallback,0x6295df29, 0x35ee, 0x11d1, 0x87, 0x7, 0x0, 0xc0, 0x4f, 0xd9, 0x33, 0x27);")
  278. // {894D8C55-BDDF-11d1-B85D-00C04FB93981}
  279. cpp_quote("DEFINE_GUID(IID_IOldSyncMgrRegister,0x894d8c55, 0xbddf, 0x11d1, 0xb8, 0x5d, 0x0, 0xc0, 0x4f, 0xb9, 0x39, 0x81);")
  280. [
  281. local,
  282. object,
  283. uuid(6295DF28-35EE-11d1-8707-00C04FD93327) // IID_IOldSyncMgrSynchronize
  284. ]
  285. interface IOldSyncMgrSynchronize: IUnknown
  286. {
  287. typedef [unique] IOldSyncMgrSynchronize *LPOLDSYNCMGRSYNCHRONIZE;
  288. HRESULT Initialize(
  289. [in] DWORD dwReserved,
  290. [in] DWORD dwSyncMgrFlags,
  291. [in] DWORD cbCookie,
  292. [in] BYTE const*lpCookie);
  293. HRESULT GetHandlerInfo(
  294. [out] LPSYNCMGRHANDLERINFO *ppSyncMgrHandlerInfo);
  295. HRESULT EnumSyncMgrItems(
  296. [out] ISyncMgrEnumItems **ppSyncMgrEnumItems);
  297. HRESULT GetItemObject(
  298. [in] REFSYNCMGRITEMID ItemID,
  299. [in] REFIID riid,
  300. [out] void** ppv);
  301. HRESULT ShowProperties(
  302. [in] HWND hWndParent,
  303. [in] REFSYNCMGRITEMID ItemID);
  304. HRESULT SetProgressCallback(
  305. [in] IOldSyncMgrSynchronizeCallback *lpCallBack);
  306. HRESULT PrepareForSync(
  307. [in] ULONG cbNumItems,
  308. [in] SYNCMGRITEMID* pItemIDs,
  309. [in] HWND hWndParent,
  310. [in] DWORD dwReserved);
  311. HRESULT Synchronize(
  312. [in] HWND hWndParent);
  313. HRESULT SetItemStatus(
  314. [in] REFSYNCMGRITEMID pItemID,
  315. [in] DWORD dwSyncMgrStatus);
  316. HRESULT ShowError(
  317. [in] HWND hWndParent,
  318. [in] REFSYNCMGRERRORID ErrorID,
  319. [out] ULONG *pcbNumItems,
  320. [out] SYNCMGRITEMID **ppItemIDs);
  321. }
  322. [
  323. local,
  324. object,
  325. uuid(6295DF29-35EE-11d1-8707-00C04FD93327) // IID_IOldSyncMgrSynchronizeCallback
  326. ]
  327. interface IOldSyncMgrSynchronizeCallback: IUnknown
  328. {
  329. typedef [unique] IOldSyncMgrSynchronizeCallback *LPOLDSYNCMGRSYNCHRONIZECALLBACK;
  330. HRESULT Progress(
  331. [in] REFSYNCMGRITEMID pItemID,
  332. [in] LPSYNCMGRPROGRESSITEM lpSyncProgressItem);
  333. HRESULT PrepareForSyncCompleted(HRESULT hr);
  334. HRESULT SynchronizeCompleted(HRESULT hr);
  335. HRESULT EnableModeless(
  336. [in] BOOL fEnable);
  337. HRESULT LogError(
  338. [in] DWORD dwErrorLevel,
  339. [in] const WCHAR *lpcErrorText,
  340. [in] LPSYNCMGRLOGERRORINFO lpSyncLogError);
  341. HRESULT DeleteLogError(
  342. [in] REFSYNCMGRERRORID ErrorID,
  343. [in] DWORD dwReserved);
  344. }
  345. [
  346. local,
  347. object,
  348. uuid(894D8C55-BDDF-11d1-B85D-00C04FB93981), // IID_IOldSyncMgrSynchronizeRegister
  349. pointer_default(unique)
  350. ]
  351. interface IOldSyncMgrRegister : IUnknown
  352. {
  353. typedef [unique] IOldSyncMgrRegister *LPOLDSYNCMGRREGISTER;
  354. HRESULT RegisterSyncMgrHandler(
  355. [in] REFCLSID rclsidHandler,
  356. [in] DWORD dwReserved);
  357. HRESULT UnregisterSyncMgrHandler(
  358. [in] REFCLSID rclsidHandler,
  359. [in] DWORD dwReserved);
  360. }
  361. interface ISyncMgrRegisterCSC;
  362. // {47681A61-BC74-11d2-B5C5-00C04FB93981}
  363. cpp_quote("DEFINE_GUID(IID_ISyncMgrRegisterCSC,0x47681a61, 0xbc74, 0x11d2, 0xb5, 0xc5, 0x0, 0xc0, 0x4f, 0xb9, 0x39, 0x81);")
  364. [
  365. local,
  366. object,
  367. uuid(47681A61-BC74-11d2-B5C5-00C04FB93981), // IID_ISyncMgrRegisterCSC
  368. pointer_default(unique)
  369. ]
  370. interface ISyncMgrRegisterCSC : ISyncMgrRegister
  371. {
  372. typedef [unique] ISyncMgrRegisterCSC *LPSYNCMGRREGISTERCSC;
  373. HRESULT GetUserRegisterFlags(
  374. [out] LPDWORD pdwSyncMgrRegisterFlags);
  375. HRESULT SetUserRegisterFlags(
  376. [in] DWORD dwSyncMgrRegisterMask,
  377. [in] DWORD dwSyncMgrRegisterFlags);
  378. }