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.

75 lines
3.3 KiB

  1. /*****************************************************************************\
  2. FILE: MailProtocol.h
  3. DESCRIPTION:
  4. This is the Autmation Object to AutoDiscover account information.
  5. BryanSt 2/15/2000
  6. Copyright (C) Microsoft Corp 1999-2000. All rights reserved.
  7. \*****************************************************************************/
  8. #ifndef _FILE_H_MAILPROTOCOL
  9. #define _FILE_H_MAILPROTOCOL
  10. #include <cowsite.h>
  11. #include <atlbase.h>
  12. HRESULT CMailProtocol_CreateInstance(IN IXMLDOMNode * pXMLNodeProtocol, IMailProtocolADEntry ** ppMailProtocol);
  13. class CMailProtocol : public CImpIDispatch
  14. , public IMailProtocolADEntry
  15. {
  16. public:
  17. //////////////////////////////////////////////////////
  18. // Public Interfaces
  19. //////////////////////////////////////////////////////
  20. // *** IUnknown ***
  21. virtual STDMETHODIMP QueryInterface(REFIID riid, LPVOID * ppvObj);
  22. virtual STDMETHODIMP_(ULONG) AddRef(void);
  23. virtual STDMETHODIMP_(ULONG) Release(void);
  24. // *** IMailProtocolADEntry ***
  25. virtual STDMETHODIMP get_Protocol(OUT BSTR * pbstr);
  26. virtual STDMETHODIMP get_ServerName(OUT BSTR * pbstr);
  27. virtual STDMETHODIMP get_ServerPort(OUT BSTR * pbstr);
  28. virtual STDMETHODIMP get_LoginName(OUT BSTR * pbstr);
  29. virtual STDMETHODIMP get_PostHTML(OUT BSTR * pbstr);
  30. virtual STDMETHODIMP get_UseSSL(OUT VARIANT_BOOL * pfUseSSL);
  31. virtual STDMETHODIMP get_IsAuthRequired(OUT VARIANT_BOOL * pfIsAuthRequired);
  32. virtual STDMETHODIMP get_UseSPA(OUT VARIANT_BOOL * pfUseSPA);
  33. virtual STDMETHODIMP get_SMTPUsesPOP3Auth(OUT VARIANT_BOOL * pfUsePOP3Auth);
  34. // *** IDispatch ***
  35. virtual STDMETHODIMP GetTypeInfoCount(UINT *pctinfo) { return CImpIDispatch::GetTypeInfoCount(pctinfo); }
  36. virtual STDMETHODIMP GetTypeInfo(UINT itinfo,LCID lcid,ITypeInfo **pptinfo) { return CImpIDispatch::GetTypeInfo(itinfo, lcid, pptinfo); }
  37. virtual STDMETHODIMP GetIDsOfNames(REFIID riid,OLECHAR **rgszNames,UINT cNames, LCID lcid, DISPID * rgdispid) { return CImpIDispatch::GetIDsOfNames(riid, rgszNames, cNames, lcid, rgdispid); }
  38. virtual STDMETHODIMP Invoke(DISPID dispidMember,REFIID riid,LCID lcid,WORD wFlags, DISPPARAMS * pdispparams, VARIANT * pvarResult, EXCEPINFO * pexcepinfo,UINT * puArgErr) { return CImpIDispatch::Invoke(dispidMember, riid, lcid, wFlags, pdispparams, pvarResult, pexcepinfo, puArgErr); }
  39. private:
  40. CMailProtocol();
  41. virtual ~CMailProtocol(void);
  42. HRESULT _Parse(IN IXMLDOMNode * pXMLNodeProtocol);
  43. // Private Member Variables
  44. int m_cRef;
  45. BSTR m_bstrProtocol;
  46. BSTR m_bstrServerName;
  47. BSTR m_bstrServerPort;
  48. BSTR m_bstrLoginName;
  49. BSTR m_bstrPostXML;
  50. BOOL m_fUseSSL;
  51. BOOL m_fRequiresAuth; // Mainly for SMTP. Is Authentication required to connect to the server?
  52. BOOL m_fUseSPA;
  53. BOOL m_fUsePOPAuth; // Get the auth settings from the POP protocol?
  54. // Friend Functions
  55. friend HRESULT CMailProtocol_CreateInstance(IN IXMLDOMNode * pXMLNodeProtocol, IMailProtocolADEntry ** ppMailProtocol);
  56. };
  57. #endif // _FILE_H_MAILPROTOCOL