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.

89 lines
3.0 KiB

  1. // =====================================================================================
  2. // MAPI IMessage to IMN message
  3. // =====================================================================================
  4. #ifndef __MAPICONV_H
  5. #define __MAPICONV_H
  6. // {0A522732-A626-11D0-8D60-00C04FD6202B}
  7. DEFINE_GUID(CLSID_CExchImport, 0x0A522732L, 0xA626, 0x11D0, 0x8D, 0x60, 0x00, 0xC0, 0x4F, 0xD6, 0x20, 0x2B);
  8. #include "MAPI.H"
  9. #include "MAPIX.H"
  10. typedef struct tagIMPFOLDERNODE IMPFOLDERNODE;
  11. typedef void (STDAPICALLTYPE FREEPROWS)(LPSRowSet lpRows);
  12. typedef FREEPROWS FAR *LPFREEPROWS;
  13. typedef HRESULT (STDAPICALLTYPE HRQUERYALLROWS)(LPMAPITABLE lpTable,
  14. LPSPropTagArray lpPropTags,
  15. LPSRestriction lpRestriction,
  16. LPSSortOrderSet lpSortOrderSet,
  17. LONG crowsMax,
  18. LPSRowSet FAR *lppRows);
  19. typedef HRQUERYALLROWS FAR *LPHRQUERYALLROWS;
  20. typedef HRESULT (STDAPICALLTYPE WRAPCOMPRESSEDRTFSTREAM)(LPSTREAM lpCompressedRTFStream,
  21. ULONG ulFlags,
  22. LPSTREAM FAR * lpUncompressedRTFStream);
  23. typedef WRAPCOMPRESSEDRTFSTREAM FAR *LPWRAPCOMPRESSEDRTFSTREAM;
  24. extern HMODULE g_hlibMAPI;
  25. extern LPMAPILOGONEX lpMAPILogonEx;
  26. extern LPMAPIINITIALIZE lpMAPIInitialize;
  27. extern LPMAPIUNINITIALIZE lpMAPIUninitialize;
  28. extern LPMAPIALLOCATEBUFFER lpMAPIAllocateBuffer;
  29. extern LPMAPIALLOCATEMORE lpMAPIAllocateMore;
  30. extern LPMAPIFREEBUFFER lpMAPIFreeBuffer;
  31. extern LPFREEPROWS lpFreeProws;
  32. extern LPHRQUERYALLROWS lpHrQueryAllRows;
  33. extern LPWRAPCOMPRESSEDRTFSTREAM lpWrapCompressedRTFStream;
  34. typedef struct IMSG IMSG, *LPIMSG;
  35. HRESULT HrMapiToImsg(LPMESSAGE lpMessage, LPIMSG lpImsg);
  36. HRESULT HrImsgToMapi(LPIMSG lpImsg, LPMESSAGE lpMessage);
  37. class CExchEnumFOLDERS : public IEnumFOLDERS
  38. {
  39. private:
  40. ULONG m_cRef;
  41. IMPFOLDERNODE *m_plist;
  42. IMPFOLDERNODE *m_pnext;
  43. public:
  44. CExchEnumFOLDERS(IMPFOLDERNODE *plist);
  45. ~CExchEnumFOLDERS(void);
  46. STDMETHODIMP QueryInterface(REFIID, LPVOID *);
  47. STDMETHODIMP_(ULONG) AddRef(void);
  48. STDMETHODIMP_(ULONG) Release(void);
  49. STDMETHODIMP Next(IMPORTFOLDER *pfldr);
  50. STDMETHODIMP Reset(void);
  51. };
  52. class CExchImport : public IMailImport
  53. {
  54. private:
  55. ULONG m_cRef;
  56. IMPFOLDERNODE *m_plist;
  57. IMAPISession *m_pmapi;
  58. public:
  59. CExchImport(void);
  60. ~CExchImport(void);
  61. STDMETHODIMP QueryInterface(REFIID, LPVOID *);
  62. STDMETHODIMP_(ULONG) AddRef(void);
  63. STDMETHODIMP_(ULONG) Release(void);
  64. STDMETHODIMP InitializeImport(HWND hwnd);
  65. STDMETHODIMP GetDirectory(char *szDir, UINT cch);
  66. STDMETHODIMP SetDirectory(char *szDir);
  67. STDMETHODIMP EnumerateFolders(DWORD_PTR dwCookie, IEnumFOLDERS **ppEnum);
  68. STDMETHODIMP ImportFolder(DWORD_PTR dwCookie, IFolderImport *pImport);
  69. };
  70. #endif // __MAPICONV_H