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.

73 lines
2.2 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1997.
  5. //
  6. // File: Callback.h
  7. //
  8. // Contents: Callback implementation
  9. //
  10. // Classes: COfflineSychronizeCallback
  11. //
  12. // Notes:
  13. //
  14. // History: 05-Nov-97 rogerg Created.
  15. //
  16. //--------------------------------------------------------------------------
  17. #ifndef _SYNCCALLBACK_
  18. #define _SYNCCALLBACK_
  19. class CHndlrMsg;
  20. class CThreadMsgProxy;
  21. class COfflineSynchronizeCallback: public ISyncMgrSynchronizeCallback ,
  22. public IOldSyncMgrSynchronizeCallback, // OLD IDL
  23. CLockHandler
  24. {
  25. public:
  26. COfflineSynchronizeCallback(CHndlrMsg *pHndlrMsg,
  27. CLSID CLSIDServer,DWORD dwSyncFlags,BOOL fAllowModeless);
  28. ~COfflineSynchronizeCallback();
  29. //IUnknown methods
  30. STDMETHODIMP QueryInterface(REFIID, LPVOID FAR *);
  31. STDMETHODIMP_(ULONG) AddRef();
  32. STDMETHODIMP_(ULONG) Release();
  33. // Callback methods.
  34. STDMETHODIMP Progress(REFSYNCMGRITEMID ItemID,LPSYNCMGRPROGRESSITEM lpSyncProgressItem);
  35. STDMETHODIMP PrepareForSyncCompleted(HRESULT hr);
  36. STDMETHODIMP SynchronizeCompleted(HRESULT hr);
  37. STDMETHODIMP EnableModeless(BOOL fEnable);
  38. STDMETHODIMP LogError(DWORD dwErrorLevel,const WCHAR *lpcErrorText,LPSYNCMGRLOGERRORINFO lpSyncLogError);
  39. STDMETHODIMP DeleteLogError(REFSYNCMGRERRORID ErrorID,DWORD dwReserved);
  40. STDMETHODIMP EstablishConnection( WCHAR const * lpwszConnection, DWORD dwReserved);
  41. // new callback methods
  42. STDMETHODIMP ShowPropertiesCompleted(HRESULT hr);
  43. STDMETHODIMP ShowErrorCompleted(HRESULT hr,ULONG cbNumItems,SYNCMGRITEMID *pItemIDs);
  44. // called by hndlrMsg
  45. void SetHndlrMsg(CHndlrMsg *pHndlrMsg,BOOL fForceKilled);
  46. void SetEnableModeless(BOOL fAllowModeless);
  47. private:
  48. void CallCompletionRoutine(DWORD dwThreadMsg,HRESULT hCallResult,ULONG cbNumItems,SYNCMGRITEMID *pItemIDs);
  49. CHndlrMsg *m_pHndlrMsg;
  50. ULONG m_cRef;
  51. BOOL m_fSynchronizeCompleted;
  52. DWORD m_dwSyncFlags;
  53. BOOL m_fAllowModeless;
  54. BOOL m_fForceKilled;
  55. CLSID m_CLSIDServer;
  56. };
  57. #endif // _SYNCCALLBACK_