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.

80 lines
1.9 KiB

  1. #ifndef __WBEM_SMTP_CONSUMER__H_
  2. #define __WBEM_SMTP_CONSUMER__H_
  3. #include <unk.h>
  4. #include <wbemidl.h>
  5. #include <errorObj.h>
  6. #include "txttempl.h"
  7. class CSMTPConsumer : public CUnk
  8. {
  9. protected:
  10. class XProvider : public CImpl<IWbemEventConsumerProvider, CSMTPConsumer>
  11. {
  12. public:
  13. XProvider(CSMTPConsumer* pObj)
  14. : CImpl<IWbemEventConsumerProvider, CSMTPConsumer>(pObj){}
  15. HRESULT STDMETHODCALLTYPE FindConsumer(
  16. IWbemClassObject* pLogicalConsumer,
  17. IWbemUnboundObjectSink** ppConsumer);
  18. } m_XProvider;
  19. friend XProvider;
  20. public:
  21. CSMTPConsumer(CLifeControl* pControl = NULL, IUnknown* pOuter = NULL);
  22. ~CSMTPConsumer();
  23. void* GetInterface(REFIID riid);
  24. };
  25. class CSMTPSink : public CUnk
  26. {
  27. protected:
  28. class XSink : public CImpl<IWbemUnboundObjectSink, CSMTPSink>
  29. {
  30. public:
  31. XSink(CSMTPSink* pObj) :
  32. CImpl<IWbemUnboundObjectSink, CSMTPSink>(pObj){}
  33. HRESULT STDMETHODCALLTYPE IndicateToConsumer(
  34. IWbemClassObject* pLogicalConsumer, long lNumObjects,
  35. IWbemClassObject** apObjects);
  36. } m_XSink;
  37. friend XSink;
  38. char* PreProcessLine(WCHAR* line, bool bStripWhitespace, bool bHammerSemiColons);
  39. protected:
  40. CTextTemplate m_SubjectTemplate;
  41. CTextTemplate m_MessageTemplate;
  42. CTextTemplate m_To;
  43. CTextTemplate m_Cc;
  44. CTextTemplate m_Bcc;
  45. CTextTemplate m_From;
  46. WString m_wsFakeFromLine;
  47. CTextTemplate m_ReplyTo;
  48. WString m_wsServer;
  49. WString m_wsHeaders;
  50. ErrorObj* m_pErrorObj;
  51. bool m_bSMTPInitialized;
  52. bool m_bFakeFromLine; // true if the from line was generated from the computer name.
  53. public:
  54. CSMTPSink(CLifeControl* pControl = NULL);
  55. ~CSMTPSink();
  56. HRESULT Initialize(IWbemClassObject* pLogicalConsumer);
  57. void* GetInterface(REFIID riid);
  58. };
  59. #endif