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.

86 lines
2.6 KiB

  1. //-----------------------------------------------------------------------------
  2. //
  3. //
  4. // File: smproute.h
  5. //
  6. // Description:
  7. // Simple routing header file. Defines a simple/default IMessageRouter
  8. // as well as constants that are defined in rei.h (which currently
  9. // uses the old IMsg).
  10. //
  11. // Author: Mike Swafford - mikeswa
  12. //
  13. // History:
  14. // 5/19/98 - mikeswa Created
  15. // 1/23/99 - MikeSwa Moved important constants to smtpevent.idl
  16. //
  17. // Copyright (C) 1998 Microsoft Corporation
  18. //
  19. //-----------------------------------------------------------------------------
  20. #ifndef __SMPROUTE_H__
  21. #define __SMPROUTE_H__
  22. #include <aqincs.h>
  23. #include <smtpevent.h>
  24. class CAQSvrInst;
  25. #define AQ_DEFAULT_ROUTER_SIG 'RDQA'
  26. #define NUM_MESSAGE_TYPES 4
  27. class CAQDefaultMessageRouter :
  28. public IMessageRouter,
  29. public CBaseObject
  30. {
  31. public:
  32. CAQDefaultMessageRouter(GUID *pguid, CAQSvrInst *paqinst);
  33. ~CAQDefaultMessageRouter();
  34. public: //IUnknown
  35. STDMETHOD(QueryInterface)(REFIID riid, LPVOID * ppvObj) {return E_NOTIMPL;};
  36. STDMETHOD_(ULONG, AddRef)(void) {InterlockedIncrement((PLONG) &m_cPeakReferences);return CBaseObject::AddRef();};
  37. STDMETHOD_(ULONG, Release)(void) {return CBaseObject::Release();};
  38. public: //IMessageRouter
  39. STDMETHOD_(GUID,GetTransportSinkID) ();
  40. STDMETHOD (GetMessageType) (
  41. IN IMailMsgProperties *pIMailMsg,
  42. OUT DWORD *pdwMessageType);
  43. STDMETHOD (ReleaseMessageType) (
  44. IN DWORD dwMessageType,
  45. IN DWORD dwReleaseCount);
  46. STDMETHOD (GetNextHop) (
  47. IN LPSTR szDestinationAddressType,
  48. IN LPSTR szDestinationAddress,
  49. IN DWORD dwMessageType,
  50. OUT LPSTR *pszRouteAddressType,
  51. OUT LPSTR *pszRouteAddress,
  52. OUT LPDWORD pdwScheduleID,
  53. OUT LPSTR *pszRouteAddressClass,
  54. OUT LPSTR *pszConnectorName,
  55. OUT LPDWORD pdwNextHopType);
  56. STDMETHOD (GetNextHopFree) (
  57. IN LPSTR szDestinationAddressType,
  58. IN LPSTR szDestinationAddress,
  59. IN LPSTR szConnectorName,
  60. IN LPSTR szRouteAddressType,
  61. IN LPSTR szRouteAddress,
  62. IN LPSTR szRouteAddressClass);
  63. STDMETHOD (ConnectionFailed) (
  64. IN LPSTR pszConnectorName)
  65. {
  66. return S_OK;
  67. }
  68. protected:
  69. DWORD m_dwSignature;
  70. DWORD m_rgcMsgTypeReferences[NUM_MESSAGE_TYPES];
  71. DWORD m_dwCurrentReference;
  72. GUID m_guid; //My TransportSinkID
  73. DWORD m_cPeakReferences;
  74. CAQSvrInst *m_paqinst;
  75. };
  76. #endif //__SMPROUTE_H__