Leaked source code of windows server 2003
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.

103 lines
3.3 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1998.
  5. //
  6. // File: Invoke.h
  7. //
  8. // Contents: IOfflineSynchronizeInvoke interface
  9. //
  10. // Classes: CSyncMgrSynchronize
  11. //
  12. // Notes:
  13. //
  14. // History: 05-Nov-97 rogerg Created.
  15. //
  16. //--------------------------------------------------------------------------
  17. #ifndef _SYNCMGRINVOKE_
  18. #define _SYNCMGRINVOKE_
  19. #define NUM_TASK_WIZARD_PAGES 5
  20. class CSyncMgrSynchronize : public ISyncMgrSynchronizeInvoke,
  21. public ISyncScheduleMgr,
  22. // public ISyncMgrRegister, // base class of ISyncMgrRegisterCSC
  23. public IOldSyncMgrRegister, // can remove next ship since never went out except in beta
  24. public ISyncMgrRegisterCSC
  25. {
  26. public:
  27. CSyncMgrSynchronize();
  28. ~CSyncMgrSynchronize();
  29. //IUnknown members
  30. STDMETHODIMP QueryInterface(REFIID, LPVOID FAR *);
  31. STDMETHODIMP_(ULONG) AddRef();
  32. STDMETHODIMP_(ULONG) Release();
  33. // IOfflineSynchronizeInvoke methods
  34. STDMETHODIMP UpdateItems(DWORD dwInvokeFlags,REFCLSID rclsid,DWORD cbCookie,const BYTE *lpCookie);
  35. STDMETHODIMP UpdateAll();
  36. // ISyncMgrRegister methods
  37. STDMETHODIMP RegisterSyncMgrHandler(REFCLSID rclsidHandler,
  38. WCHAR const *pwszDescription,
  39. DWORD dwSyncMgrRegisterFlags);
  40. STDMETHODIMP UnregisterSyncMgrHandler(REFCLSID rclsidHandler,DWORD dwReserved);
  41. STDMETHODIMP GetHandlerRegistrationInfo(REFCLSID rclsidHandler,LPDWORD pdwSyncMgrRegisterFlags);
  42. // ISyncMgrRegisterCSC private methods
  43. STDMETHODIMP GetUserRegisterFlags(LPDWORD pdwSyncMgrRegisterFlags);
  44. STDMETHODIMP SetUserRegisterFlags(DWORD dwSyncMgrRegisterMask,DWORD dwSyncMgrRegisterFlags);
  45. // old idl, remove when get a chance.
  46. // IOldSyncMgrRegister method
  47. STDMETHODIMP RegisterSyncMgrHandler(REFCLSID rclsidHandler,
  48. DWORD dwReserved);
  49. // ISyncScheduleMgr methods
  50. STDMETHODIMP CreateSchedule(
  51. LPCWSTR pwszScheduleName,
  52. DWORD dwFlags,
  53. SYNCSCHEDULECOOKIE *pSyncSchedCookie,
  54. ISyncSchedule **ppSyncSchedule);
  55. STDMETHODIMP LaunchScheduleWizard(
  56. HWND hParent,
  57. DWORD dwFlags,
  58. SYNCSCHEDULECOOKIE *pSyncSchedCookie,
  59. ISyncSchedule ** ppSyncSchedule);
  60. STDMETHODIMP OpenSchedule(
  61. SYNCSCHEDULECOOKIE *pSyncSchedCookie,
  62. DWORD dwFlags,
  63. ISyncSchedule **ppSyncSchedule);
  64. STDMETHODIMP RemoveSchedule(
  65. SYNCSCHEDULECOOKIE *pSyncSchedCookie);
  66. STDMETHODIMP EnumSyncSchedules(
  67. IEnumSyncSchedules **ppEnumSyncSchedules);
  68. private:
  69. SCODE InitializeScheduler();
  70. SCODE MakeScheduleName(LPTSTR ptstrName, UINT cchName, GUID *pCookie);
  71. BOOL GetFriendlyName(LPCTSTR ptszScheduleGUIDName,
  72. LPTSTR ptstrFriendlyName);
  73. BOOL GenerateUniqueName(LPTSTR ptszScheduleGUIDName,
  74. LPTSTR ptszFriendlyName,
  75. UINT cchFriendlyName);
  76. ULONG m_cRef;
  77. ITaskScheduler *m_pITaskScheduler;
  78. CWizPage *m_apWizPages[NUM_TASK_WIZARD_PAGES];
  79. };
  80. typedef CSyncMgrSynchronize *LPCSyncMgrSynchronize;
  81. #endif // _SYNCMGRINVOKE_