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.

69 lines
2.3 KiB

  1. #ifndef _INC_EXCHACCT
  2. #define _INC_EXCHACCT
  3. class CAccountManager;
  4. typedef struct tagMAPIACCTINFO
  5. {
  6. DWORD_PTR dwCookie;
  7. HKEY hkey;
  8. IImnAccount *pAccount;
  9. char szDisplay[CCHMAX_ACCOUNT_NAME];
  10. } MAPIACCTINFO;
  11. // {39981128-C287-11D0-8D8C-00C04FD6202B}
  12. DEFINE_GUID(CLSID_CEnumMAPIACCTS, 0x39981128L, 0xC287, 0x11D0, 0x8D, 0x8C, 0x00, 0xC0, 0x4F, 0xD6, 0x20, 0x2B);
  13. class CEnumMAPIACCTS : public IEnumIMPACCOUNTS
  14. {
  15. private:
  16. ULONG m_cRef;
  17. int m_iInfo;
  18. UINT m_cInfo;
  19. MAPIACCTINFO *m_rgInfo;
  20. public:
  21. CEnumMAPIACCTS(void);
  22. ~CEnumMAPIACCTS(void);
  23. STDMETHODIMP QueryInterface(REFIID, LPVOID *);
  24. STDMETHODIMP_(ULONG) AddRef(void);
  25. STDMETHODIMP_(ULONG) Release(void);
  26. HRESULT STDMETHODCALLTYPE Next(IMPACCOUNTINFO *pinfo);
  27. HRESULT STDMETHODCALLTYPE Reset(void);
  28. HRESULT Init(MAPIACCTINFO *pinfo, int cinfo);
  29. };
  30. // {39981129-C287-11D0-8D8C-00C04FD6202B}
  31. DEFINE_GUID(CLSID_CMAPIAcctImport, 0x39981129L, 0xC287, 0x11D0, 0x8D, 0x8C, 0x00, 0xC0, 0x4F, 0xD6, 0x20, 0x2B);
  32. class CMAPIAcctImport : public IAccountImport, public IAccountImport2
  33. {
  34. private:
  35. ULONG m_cRef;
  36. UINT m_cInfo;
  37. MAPIACCTINFO *m_rgInfo;
  38. CAccountManager *m_pAcctMan;
  39. HRESULT STDMETHODCALLTYPE IGetSettings(DWORD_PTR dwCookie, IImnAccount *pAcct, IMPCONNINFO *pInfo);
  40. public:
  41. CMAPIAcctImport(void);
  42. ~CMAPIAcctImport(void);
  43. STDMETHODIMP QueryInterface(REFIID, LPVOID *);
  44. STDMETHODIMP_(ULONG) AddRef(void);
  45. STDMETHODIMP_(ULONG) Release(void);
  46. HRESULT STDMETHODCALLTYPE AutoDetect(DWORD *pcAcct, DWORD dwReserved);
  47. HRESULT STDMETHODCALLTYPE EnumerateAccounts(IEnumIMPACCOUNTS **ppEnum);
  48. HRESULT STDMETHODCALLTYPE GetSettings(DWORD_PTR dwCookie, IImnAccount *pAcct);
  49. HRESULT STDMETHODCALLTYPE InitializeImport(HWND hwnd, DWORD_PTR dwCookie);
  50. HRESULT STDMETHODCALLTYPE GetNewsGroup(INewsGroupImport *pImp, DWORD dwReserved);
  51. HRESULT STDMETHODCALLTYPE GetSettings2(DWORD_PTR dwCookie, IImnAccount *pAcct, IMPCONNINFO *pInfo);
  52. };
  53. #endif // _INC_EXCHACCT