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.

153 lines
4.2 KiB

  1. #ifndef _INC_IMPORT_H
  2. #define _INC_IMPORT_H
  3. interface IMAPISession;
  4. #include "resource.h"
  5. #include "impdlg.h"
  6. extern HINSTANCE g_hInstImp;
  7. HRESULT ExchInit(void);
  8. void ExchDeinit(void);
  9. HRESULT MapiLogon(HWND hwnd, IMAPISession **ppmapi);
  10. LPMAPICONTAINER OpenDefaultStoreContainer(HWND hwnd, IMAPISession *pmapi);
  11. LPSPropValue PvalFind(LPSRow prw, ULONG ulPropTag);
  12. void FreeSRowSet(LPSRowSet prws);
  13. void ImpErrorMessage(HWND hwnd, LPTSTR szTitle, LPTSTR szError, HRESULT hrDetail);
  14. int ImpMessageBox(HWND hwndOwner, LPTSTR szTitle, LPTSTR sz1, LPTSTR sz2, UINT fuStyle);
  15. void InitListViewImages(HWND hwnd);
  16. void FillFolderListview(HWND hwnd, IMPFOLDERNODE *plist, DWORD_PTR dwReserved);
  17. class CImpProgress
  18. {
  19. private:
  20. ULONG m_cRef;
  21. ULONG m_cMax;
  22. ULONG m_cCur;
  23. ULONG m_cPerCur;
  24. HWND m_hwndProgress;
  25. HWND m_hwndDlg;
  26. HWND m_hwndOwner;
  27. BOOL m_fCanCancel;
  28. BOOL m_fHasCancel;
  29. public:
  30. CImpProgress ();
  31. ~CImpProgress ();
  32. ULONG AddRef ();
  33. ULONG Release ();
  34. VOID SetMsg(LPTSTR lpszMsg, int id);
  35. VOID SetTitle(LPTSTR lpszTitle);
  36. VOID Show (DWORD dwDelaySeconds=0);
  37. VOID Hide (VOID);
  38. VOID Close (VOID);
  39. VOID AdjustMax(ULONG cNewMax);
  40. VOID Reset(VOID);
  41. HRESULT HrUpdate (ULONG cInc);
  42. static INT_PTR CALLBACK ProgressDlgProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
  43. VOID Init (HWND hwndParent, BOOL fCanCancel);
  44. };
  45. #define WM_POSTSETFOCUS (WM_USER + 1)
  46. #define WM_ENABLENEXT (WM_USER + 2)
  47. typedef struct tagIMPWIZINFO IMPWIZINFO;
  48. INT_PTR CALLBACK GenDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
  49. BOOL CALLBACK MigrateInitProc(IMPWIZINFO *,HWND,BOOL);
  50. BOOL CALLBACK MigrateOKProc(IMPWIZINFO *,HWND,BOOL,UINT *,BOOL *);
  51. BOOL CALLBACK MigModeInitProc(IMPWIZINFO *,HWND,BOOL);
  52. BOOL CALLBACK MigModeOKProc(IMPWIZINFO *,HWND,BOOL,UINT *,BOOL *);
  53. BOOL CALLBACK MigIncInitProc(IMPWIZINFO *,HWND,BOOL);
  54. BOOL CALLBACK MigIncOKProc(IMPWIZINFO *,HWND,BOOL,UINT *,BOOL *);
  55. BOOL CALLBACK ClientInitProc(IMPWIZINFO *,HWND,BOOL);
  56. BOOL CALLBACK ClientOKProc(IMPWIZINFO *,HWND,BOOL,UINT *,BOOL *);
  57. BOOL CALLBACK LocationInitProc(IMPWIZINFO *,HWND,BOOL);
  58. BOOL CALLBACK LocationOKProc(IMPWIZINFO *,HWND,BOOL,UINT *,BOOL *);
  59. BOOL CALLBACK LocationCmdProc(IMPWIZINFO *,HWND,WPARAM,LPARAM);
  60. BOOL CALLBACK FolderInitProc(IMPWIZINFO *,HWND,BOOL);
  61. BOOL CALLBACK FolderOKProc(IMPWIZINFO *,HWND,BOOL,UINT *,BOOL *);
  62. BOOL CALLBACK AddressOKProc(IMPWIZINFO *,HWND,BOOL,UINT *,BOOL *);
  63. BOOL CALLBACK CongratInitProc(IMPWIZINFO *,HWND,BOOL);
  64. BOOL CALLBACK CongratOKProc(IMPWIZINFO *,HWND,BOOL,UINT *,BOOL *);
  65. typedef BOOL (CALLBACK* INITPROC)(IMPWIZINFO *,HWND,BOOL);
  66. typedef BOOL (CALLBACK* OKPROC)(IMPWIZINFO *,HWND,BOOL,UINT *,BOOL *);
  67. typedef BOOL (CALLBACK* CMDPROC)(IMPWIZINFO *,HWND,WPARAM,LPARAM);
  68. typedef struct tagPAGEINFO
  69. {
  70. UINT uDlgID;
  71. UINT uHdrID;
  72. // handler procedures for each page-- any of these can be
  73. // NULL in which case the default behavior is used
  74. INITPROC InitProc;
  75. OKPROC OKProc;
  76. CMDPROC CmdProc;
  77. } PAGEINFO;
  78. #define NUM_WIZARD_PAGES 8
  79. typedef struct tagMIGRATEINFO
  80. {
  81. CLSID clsid;
  82. UINT idDisplay;
  83. char *szfnImport;
  84. } MIGRATEINFO;
  85. #define PAGE_LOCATION 0x0001
  86. #define PAGE_FOLDERS 0x0002
  87. #define PAGE_MODE 0x0004
  88. #define PAGE_ALL 0x0007
  89. typedef struct tagIMPWIZINFO
  90. {
  91. IMailImporter *pImporter;
  92. BOOL dwReload;
  93. BOOL fMigrate;
  94. BOOL fMessages;
  95. BOOL fAddresses;
  96. MIGRATEINFO *pMigrate;
  97. UINT cMigrate;
  98. UINT iMigrate;
  99. CLSID *pClsid;
  100. UINT cClsid;
  101. UINT iClsid;
  102. BOOL fLocation;
  103. char szDir[MAX_PATH];
  104. IMPFOLDERNODE *pList;
  105. char szClient[CCHMAX_STRINGRES];
  106. UINT cPagesCompleted;
  107. UINT idCurrentPage;
  108. UINT rgHistory[NUM_WIZARD_PAGES];
  109. IMailImport *pImport;
  110. } IMPWIZINFO;
  111. typedef struct tagINITWIZINFO
  112. {
  113. const PAGEINFO *pPageInfo;
  114. IMPWIZINFO *pWizInfo;
  115. } INITWIZINFO;
  116. #endif // _INC_IMPORT_H