Source code of Windows XP (NT5)
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.

62 lines
1.8 KiB

  1. #ifndef _ASYNC_SMTPMX_HXX_
  2. #define _ASYNC_SMTPMX_HXX_
  3. class SMTP_SERVER_INSTANCE;
  4. #define SMTP_ASYNCMX_SIGNATURE 'uDNS'
  5. #define SMTP_ASYNCMX_SIGNATURE_FREE 'fDNS'
  6. class CAsyncSmtpDns : public CAsyncDns
  7. {
  8. private:
  9. DWORD m_Signature;
  10. DWORD m_DomainOptions;
  11. BOOL m_fConnectToSmartHost;
  12. CTcpRegIpList *m_pIpEntry;
  13. SMTP_SERVER_INSTANCE *m_pServiceInstance;
  14. ISMTPConnection *m_pISMTPConnection;
  15. // used to get an alternate destination host if needed.
  16. DNS_RESOLVER_RECORD *m_pDNS_RESOLVER_RECORD;
  17. LPSTR m_pszSSLVerificationName;
  18. BOOL m_fInitCalled;
  19. public:
  20. //use CPool for better memory management
  21. static CPool Pool;
  22. // override the mem functions to use CPool functions
  23. void *operator new (size_t cSize)
  24. { return Pool.Alloc(); }
  25. void operator delete (void *pInstance)
  26. { Pool.Free(pInstance); }
  27. LIST_ENTRY m_ListEntry;
  28. LIST_ENTRY & QueryListEntry(void) {return m_ListEntry;}
  29. CAsyncSmtpDns (SMTP_SERVER_INSTANCE * pServiceInstance,
  30. ISMTPConnection *pSmtpConnection);
  31. ~CAsyncSmtpDns();
  32. BOOL Init (LPSTR pszSSLVerificationName);
  33. void SetDomainOptions(DWORD Options) {m_DomainOptions = Options;}
  34. void SetSmartHostOption(BOOL fConnectToSmartHost) {m_fConnectToSmartHost = fConnectToSmartHost;}
  35. BOOL GetMissingIpAddresses(PSMTPDNS_RECS pDnsList);
  36. BOOL GetIpFromDns(PSMTPDNS_RECS pDnsRec, DWORD Count);
  37. void HandleCompletedData(DNS_STATUS);
  38. BOOL RetryAsyncDnsQuery(BOOL fUdp);
  39. BOOL NDRAllMessages();
  40. void SetDnsResolverRecord(DNS_RESOLVER_RECORD *pDnsResolverRecord)
  41. { m_pDNS_RESOLVER_RECORD = pDnsResolverRecord; }
  42. };
  43. #endif