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.

59 lines
2.3 KiB

  1. #ifndef _SYNCHNDL_H
  2. #define _SYNCHNDL_H
  3. /*
  4. File: Synchndl.h
  5. Private Header file for Synchronization HANDLER
  6. */
  7. #include <objbase.h>
  8. #include <syncmgr.h>
  9. #include "onestop.h"
  10. #include "imnact.h"
  11. class COneStopHandler : public ISyncMgrSynchronize
  12. {
  13. public:
  14. // === IUnknown
  15. STDMETHODIMP QueryInterface(REFIID, LPVOID FAR *);
  16. STDMETHODIMP_(ULONG) AddRef();
  17. STDMETHODIMP_(ULONG) Release();
  18. // === IOfflineSynchronize
  19. STDMETHODIMP Initialize (DWORD dwReserved, DWORD dwSyncFlags, DWORD cbCookie, const BYTE *lpCooke);
  20. STDMETHODIMP GetHandlerInfo (LPSYNCMGRHANDLERINFO *ppSyncMgrHandlerInfo);
  21. STDMETHODIMP EnumSyncMgrItems (ISyncMgrEnumItems **ppenumOffineItems);
  22. STDMETHODIMP GetItemObject (REFSYNCMGRITEMID ItemID, REFIID riid,void** ppv);
  23. STDMETHODIMP ShowProperties (HWND hwnd, REFSYNCMGRITEMID ItemID);
  24. STDMETHODIMP SetProgressCallback (ISyncMgrSynchronizeCallback *lpCallBack);
  25. STDMETHODIMP PrepareForSync (ULONG cbNumItems, SYNCMGRITEMID* pItemIDs, HWND hWndParent, DWORD dwReserved);
  26. STDMETHODIMP Synchronize (HWND hwnd);
  27. STDMETHODIMP SetItemStatus (REFSYNCMGRITEMID ItemID, DWORD dwSyncMgrStatus);
  28. STDMETHODIMP ShowError (HWND hWndParent, REFSYNCMGRERRORID ErrorID, ULONG *pcbNumItems, SYNCMGRITEMID **ppItemIDs);
  29. // === Constructor / Destructor
  30. COneStopHandler();
  31. virtual ~COneStopHandler();
  32. // === Get / Set
  33. inline LPSYNCMGRHANDLERITEMS GetOfflineItemsHolder() { return m_pOfflineHandlerItems; };
  34. inline void SetOfflineItemsHolder(LPSYNCMGRHANDLERITEMS pOfflineHandlerItems)
  35. { m_pOfflineHandlerItems = pOfflineHandlerItems; };
  36. inline LPSYNCMGRSYNCHRONIZECALLBACK GetOfflineSynchronizeCallback()
  37. { return m_pOfflineSynchronizeCallback; };
  38. private:
  39. LONG m_cRef;
  40. LPSYNCMGRHANDLERITEMS m_pOfflineHandlerItems;
  41. LPSYNCMGRSYNCHRONIZECALLBACK m_pOfflineSynchronizeCallback;
  42. DWORD m_dwSyncFlags;
  43. BOOL m_fInOE:1;
  44. BOOL m_fInit:1;
  45. DWORD m_dwUserID;
  46. };
  47. typedef COneStopHandler *LPCOneStopHandler;
  48. HRESULT SwitchContext(DWORD dwUserID);
  49. HRESULT InitUser(DWORD dwUserID);
  50. #endif // _SYNCHNDL_H