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.

109 lines
3.5 KiB

  1. // --------------------------------------------------------------------------------
  2. // Acctutil.h
  3. // Copyright (c)1993-1995 Microsoft Corporation, All Rights Reserved
  4. // Steven J. Bailey
  5. // --------------------------------------------------------------------------------
  6. #ifndef __ACCTUTIL_H
  7. #define __ACCTUTIL_H
  8. interface INotify;
  9. // --------------------------------------------------------------------------------
  10. // Depends On
  11. // --------------------------------------------------------------------------------
  12. #include "imnact.h"
  13. // --------------------------------------------------------------------------------
  14. // IImnAdviseAccount
  15. // --------------------------------------------------------------------------------
  16. class CImnAdviseAccount : public IImnAdviseAccount
  17. {
  18. private:
  19. ULONG m_cRef;
  20. ULONG m_cNNTP;
  21. INotify *m_pNotify;
  22. public:
  23. CImnAdviseAccount(void);
  24. ~CImnAdviseAccount(void);
  25. HRESULT Initialize(void);
  26. STDMETHODIMP QueryInterface(REFIID, LPVOID *);
  27. STDMETHODIMP_(ULONG) AddRef(void);
  28. STDMETHODIMP_(ULONG) Release(void);
  29. STDMETHODIMP AdviseAccount(DWORD dwAdviseType, ACTX *pactx);
  30. void HandleAccountChange(ACCTTYPE AcctType, DWORD dwAN, LPTSTR pszAccount, LPTSTR pszOldName, DWORD dwServerTypes);
  31. };
  32. // -----------------------------------------------------------------------------
  33. // Account Menu
  34. // -----------------------------------------------------------------------------
  35. typedef struct tagACCTMENU
  36. {
  37. BOOL fDefault,
  38. fThisAccount;
  39. UINT uidm;
  40. TCHAR szAccount[CCHMAX_ACCOUNT_NAME];
  41. } ACCTMENU, *LPACCTMENU;
  42. typedef enum tagACCOUNTMENUTYPE {
  43. ACCTMENU_SEND,
  44. ACCTMENU_SENDRECV,
  45. ACCTMENU_SENDLATER
  46. } ACCOUNTMENUTYPE;
  47. HRESULT AcctUtil_HrCreateAccountMenu(ACCOUNTMENUTYPE type, HMENU hPopup, UINT uidmPopup,
  48. HMENU *phAccounts, LPACCTMENU *pprgMenu, ULONG *pcMenu, LPSTR pszThisAccount, BOOL fMail);
  49. HRESULT HrConnectAccount(HWND hwnd, IImnAccount *pAccount);
  50. HRESULT HrDisconnectAccount(HWND hwnd, BOOL fShutdown);
  51. HRESULT AcctUtil_GetServerCount(DWORD dwSrvTypes, DWORD *pcSrv);
  52. typedef struct tagNEWACCTINFO
  53. {
  54. FOLDERTYPE type;
  55. LPSTR pszAcctId;
  56. } NEWACCTINFO;
  57. class CNewAcctMonitor
  58. {
  59. public:
  60. CNewAcctMonitor();
  61. ~CNewAcctMonitor();
  62. STDMETHOD_(ULONG, AddRef)(THIS);
  63. STDMETHOD_(ULONG, Release)(THIS);
  64. void OnAdvise(ACCTTYPE atType, DWORD dwNotify, LPCSTR pszAcctId);
  65. void StartMonitor(void);
  66. void StopMonitor(HWND hwndParent);
  67. private:
  68. ULONG m_cRef;
  69. BOOL m_fMonitor;
  70. NEWACCTINFO *m_rgAccounts;
  71. ULONG m_cAlloc;
  72. ULONG m_cAccounts;
  73. };
  74. extern CNewAcctMonitor *g_pNewAcctMonitor;
  75. void CheckIMAPDirty(LPSTR pszAccountID, HWND hwndParent, FOLDERID idServer, DWORD dwFlags);
  76. const DWORD CID_NOPROMPT = 0x00000001; // For CheckIMAPDirty dwFlags: do not prompt to reset list
  77. const DWORD CID_RESETLISTOK = 0x00000002; // For CheckIMAPDirty dwFlags: user gave permission to reset list
  78. void DoAccountListDialog(HWND hwnd, ACCTTYPE type);
  79. HRESULT AcctUtil_CreateSendReceieveMenu(HMENU hMenu, DWORD *pcItems);
  80. HRESULT AcctUtil_FreeSendReceieveMenu(HMENU hMenu, DWORD cItems);
  81. HRESULT AcctUtil_CreateAccountManagerForIdentity(GUID *puidIdentity, IImnAccountManager2 **ppAccountManager);
  82. void InitNewAcctMenu(HMENU hmenu);
  83. void FreeNewAcctMenu(HMENU hmenu);
  84. HRESULT HandleNewAcctMenu(HWND hwnd, HMENU hmenu, int id);
  85. #endif // __ACCTUTIL_H