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.

86 lines
3.0 KiB

  1. #ifndef _INC_ATHENAIMP_H
  2. #define _INC_ATHENAIMP_H
  3. // {B7AAC060-2638-11d1-83A9-00C04FBD7C09}
  4. DEFINE_GUID(CLSID_CAthena16Import, 0xb7aac060, 0x2638, 0x11d1, 0x83, 0xa9, 0x0, 0xc0, 0x4f, 0xbd, 0x7c, 0x9);
  5. #define ATH_HR_E(n) MAKE_SCODE(SEVERITY_ERROR, FACILITY_ITF, n)
  6. #define HR_FIRST 0x1000 // Put at the bottom
  7. #define hrNoMessages 780
  8. #define hrMemory E_OUTOFMEMORY
  9. #define hrCorruptMessage ATH_HR_E(HR_FIRST + 42)
  10. #define hrReadFile ATH_HR_E(HR_FIRST + 30)
  11. typedef struct tagzMsgHeader
  12. {
  13. char ver;
  14. ULONG TotalMessages;
  15. ULONG ulTotalUnread;
  16. }MsgHeader;
  17. class CAthena16FOLDERS : public IEnumFOLDERS
  18. {
  19. private:
  20. ULONG m_cRef;
  21. EUDORANODE* m_plist;
  22. EUDORANODE* m_pnext;
  23. public:
  24. CAthena16FOLDERS(EUDORANODE *plist);
  25. ~CAthena16FOLDERS(void);
  26. STDMETHODIMP QueryInterface(REFIID, LPVOID *);
  27. STDMETHODIMP_(ULONG) AddRef(void);
  28. STDMETHODIMP_(ULONG) Release(void);
  29. STDMETHODIMP Next(IMPORTFOLDER *pfldr);
  30. STDMETHODIMP Reset(void);
  31. };
  32. class CAthena16Import : public IMailImport
  33. {
  34. private:
  35. ULONG m_cRef;
  36. EUDORANODE *m_plist;
  37. BOOL m_bDraft;
  38. char m_szUser[MAX_PATH];
  39. char m_szIniFile[MAX_PATH];
  40. public:
  41. CAthena16Import(void);
  42. ~CAthena16Import(void);
  43. STDMETHODIMP QueryInterface(REFIID, LPVOID *);
  44. STDMETHODIMP_(ULONG) AddRef(void);
  45. STDMETHODIMP_(ULONG) Release(void);
  46. STDMETHODIMP InitializeImport(HWND hwnd);
  47. STDMETHODIMP GetDirectory(char *szDir, UINT cch);
  48. STDMETHODIMP SetDirectory(char *szDir);
  49. STDMETHODIMP EnumerateFolders(DWORD_PTR dwCookie, IEnumFOLDERS **ppEnum);
  50. STDMETHODIMP ImportFolder(DWORD_PTR dwCookie, IFolderImport *pImport);
  51. //class member functions
  52. HRESULT GetUserDir(char *szDir, UINT cch);
  53. };
  54. INT_PTR CALLBACK SelectAth16UserDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
  55. HRESULT GetAthSubFolderList(LPTSTR szInstallPath, EUDORANODE **ppList, EUDORANODE *);
  56. void GetNewRecurseFolder(LPTSTR szInstallPath, DWORD cchInstallPath, LPTSTR szDir, LPTSTR szInstallNewPath);
  57. HRESULT ProcessMessages(LPSTR szFileName, DWORD cchFileName, IFolderImport *pImport);
  58. long GetMessageCount(HANDLE hFile);
  59. HRESULT ProcessMsgList(HANDLE hFile,LPTSTR szPath, IFolderImport* pImport);
  60. HRESULT GetMsgFileName(LPCSTR szmsgbuffer, char *szfilename, DWORD cchFileName);
  61. HANDLE OpenMsgFile(LPTSTR szFileName,DWORD cchFileName);
  62. HRESULT GetFileinBuffer(HANDLE hnd,LPTSTR *szBuffer);
  63. HRESULT ProcessSingleMessage(LPTSTR szBuffer, DWORD dwFlags, IFolderImport* pImport);
  64. HRESULT ParseMsgBuffer(LPTSTR szmsgbuffer,LPTSTR szPath, IFolderImport* pImport);
  65. int GetNumUsers(char *szFile, char *szUser, DWORD cchUser);
  66. HRESULT GetMessageFlag(char *szmsgbuffer, LPDWORD pdwFlags);
  67. #endif // _INC_ATHENAIMP_H