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.

67 lines
2.1 KiB

  1. //-----------------------------------------------------------------------------
  2. //
  3. //
  4. // File: dcontext.h
  5. //
  6. // Description: Defines stucture referenced by delilvery context HANDLE
  7. // (as returned by HrGetNextMessage). This should only be used inside
  8. // the CMT.
  9. //
  10. // Author: mikeswa
  11. //
  12. // Copyright (C) 1997 Microsoft Corporation
  13. //
  14. //-----------------------------------------------------------------------------
  15. #ifndef _DCONTEXT_H_
  16. #define _DCONTEXT_H_
  17. #include "bitmap.h"
  18. #include "aqueue.h"
  19. class CMsgRef;
  20. class CDestMsgRetryQueue;
  21. #define DELIVERY_CONTEXT_SIG 'txtC'
  22. #define DELIVERY_CONTEXT_FREE 'txt!'
  23. //---[ CDeliveryContext ]------------------------------------------------------
  24. //
  25. //
  26. // Description:
  27. // Context that is used to Ack message after local/remote delivery. The
  28. // memory for this class is either allocated with the connection object
  29. // or on the stack for local delivery.
  30. // Hungarian:
  31. //
  32. //
  33. //-----------------------------------------------------------------------------
  34. class CDeliveryContext
  35. {
  36. public:
  37. CDeliveryContext();
  38. CDeliveryContext(CMsgRef *pmsgref, CMsgBitMap *pmbmap, DWORD cRecips,
  39. DWORD *rgdwRecips, DWORD dwStartDomain, CDestMsgRetryQueue *pdmrq);
  40. ~CDeliveryContext();
  41. HRESULT HrAckMessage(IN MessageAck *pMsgAck);
  42. void Init(CMsgRef *pmsgref, CMsgBitMap *pmbmap, DWORD cRecips,
  43. DWORD *rgdwRecips, DWORD dwStartDomain, CDestMsgRetryQueue *pdmrq);
  44. void Recycle();
  45. BOOL FVerifyHandle(IMailMsgProperties *pIMailMsgPropeties);
  46. CDestMsgRetryQueue *pdmrqGetDMRQ() {return m_pdmrq;};
  47. private:
  48. friend class CMsgRef;
  49. DWORD m_dwSignature;
  50. CMsgRef *m_pmsgref; //MsgRef for this context
  51. CMsgBitMap *m_pmbmap; //Bitmap of domains that delivery was attempted for
  52. DWORD m_cRecips; //Number of recips to deliver to
  53. DWORD *m_rgdwRecips; //Array of recip indexes
  54. DWORD m_dwStartDomain; //First domain delivered to
  55. //Retry interface for this delivey attempt
  56. CDestMsgRetryQueue *m_pdmrq;
  57. };
  58. #endif //_DCONTEXT_H_