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.

69 lines
2.1 KiB

  1. // header file for handler specific items
  2. #ifndef _HANDER_IMPL_
  3. #define _HANDER_IMPL_
  4. // DEFINE A NEW CLSID FOR EACH HANDLER
  5. // {97484BA1-26C7-11d1-9A39-0020AFDA97B0}
  6. DEFINE_GUID(CLSID_OneStopHandler,0x97484ba1, 0x26c7, 0x11d1, 0x9a, 0x39, 0x0, 0x20, 0xaf, 0xda, 0x97, 0xb0);
  7. #undef MDBX_VERSION
  8. #define MDBX_VERSION 0x0c
  9. DEFINE_GUID(IID_IMDBX,0x2F63F100+MDBX_VERSION,0x0A2E,0x11CF,0x9F,0xED,0x00,0xAA,0x00,0xB9,0x2B,0x87);
  10. //DEFINE_OLEGUID(IID_IMAPIProp, 0x00020303, 0, 0);
  11. //DEFINE_OLEGUID(IID_IMAPIStatus, 0x00020305 , 0, 0);
  12. // declarations specific to Mail handler
  13. #include "resource.h"
  14. VOID CALLBACK ProgressUpdate(STDPROG *stg, LPSTR lpcStatusText, INT iCurValue, INT iMaxValue);
  15. extern "C" HRESULT FormGetFormMessage(LPMAPIFORMINFO pinfo, ULONG FAR *pulReg,
  16. LPSTR lpcClass, LPMESSAGE FAR *ppmsg); // in IFRMREGU.CPP
  17. HRESULT HrGetOneProp(LPMAPIPROP lpIProp, ULONG ulTag, LPSPropValue* lppProp);
  18. // override the OneStopHandler Base class
  19. class CMailHandler : public COneStopHandler
  20. {
  21. private:
  22. BOOL m_fMapiInitialized;
  23. DWORD m_dwSyncFlags;
  24. public:
  25. CMailHandler();
  26. ~CMailHandler();
  27. STDMETHODIMP DestroyHandler();
  28. STDMETHODIMP Initialize(DWORD dwReserved,DWORD dwSyncFlags,
  29. DWORD cbCookie,const BYTE *lpCooke);
  30. STDMETHODIMP GetHandlerInfo(LPSYNCMGRHANDLERINFO *ppSyncMgrHandlerInfo);
  31. STDMETHODIMP PrepareForSync(ULONG cbNumItems,SYNCMGRITEMID *pItemIDs,
  32. HWND hwndParent,DWORD dwReserved);
  33. STDMETHODIMP Synchronize(HWND hwndParent);
  34. STDMETHODIMP SetItemStatus(REFSYNCMGRITEMID ItemID,DWORD dwSyncMgrStatus);
  35. STDMETHODIMP ShowError(HWND hWndParent,REFSYNCMGRERRORID ErrorID);
  36. // variables added for WorkerThread
  37. HWND m_hwnd;
  38. HWND m_hwndParent;
  39. CRITICAL_SECTION m_CriticalSection;
  40. BOOL m_fInPrepareForSync;
  41. BOOL m_fInSynchronize;
  42. LPHANDLERITEM m_pCurHandlerItem; // set for item that is currently being worked on.
  43. void PrepareForSyncCall();
  44. void SynchronizeCall();
  45. private:
  46. HRESULT GetProfileInformation();
  47. friend COneStopHandler* CreateHandlerObject();
  48. };
  49. COneStopHandler* CreateHandlerObject();
  50. #endif // #define _HANDER_IMPL_