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.

135 lines
3.1 KiB

  1. /*++
  2. Copyright (c) 1998-1999 Microsoft Corporation
  3. Module Name:
  4. request.h
  5. Abstract:
  6. Declaration of the CRequest class
  7. Author:
  8. mquinton 06-03-98
  9. Notes:
  10. Revision History:
  11. --*/
  12. #ifndef __REQUEST_H__
  13. #define __REQUEST_H__
  14. #include "resource.h"
  15. //#include "objsafe.h"
  16. #include "atlctl.h"
  17. #include "TAPIObjectSafety.h"
  18. /////////////////////////////////////////////////////////////////////////////
  19. // CDispatchMapper
  20. class CRequest :
  21. public CTAPIComObjectRoot<CRequest>,
  22. public CComCoClass<CRequest, &CLSID_RequestMakeCall>,
  23. public CComDualImpl<ITRequest, &IID_ITRequest, &LIBID_TAPI3Lib>,
  24. public CTAPIObjectSafety
  25. {
  26. public:
  27. CRequest()
  28. {
  29. }
  30. DECLARE_REGISTRY_RESOURCEID(IDR_REQUESTMAKECALL)
  31. DECLARE_QI()
  32. DECLARE_MARSHALQI(CRequest)
  33. DECLARE_TRACELOG_CLASS(CRequest)
  34. BEGIN_COM_MAP(CRequest)
  35. COM_INTERFACE_ENTRY2(IDispatch, ITRequest)
  36. COM_INTERFACE_ENTRY(ITRequest)
  37. COM_INTERFACE_ENTRY(IObjectSafety)
  38. COM_INTERFACE_ENTRY(IObjectWithSite)
  39. COM_INTERFACE_ENTRY_FUNC(IID_IMarshal, 0, IMarshalQI)
  40. COM_INTERFACE_ENTRY_AGGREGATE(IID_IMarshal, m_pFTM)
  41. END_COM_MAP()
  42. STDMETHOD(MakeCall)(
  43. BSTR pDestAddress,
  44. #ifdef NEWREQUEST
  45. long lAddressType,
  46. #endif
  47. BSTR pAppName,
  48. BSTR pCalledParty,
  49. BSTR pComment
  50. );
  51. };
  52. class CRequestEvent :
  53. public CTAPIComObjectRoot<CRequestEvent>,
  54. public CComDualImpl<ITRequestEvent, &IID_ITRequestEvent, &LIBID_TAPI3Lib>,
  55. public CObjectSafeImpl
  56. {
  57. public:
  58. CRequestEvent(){}
  59. void
  60. FinalRelease();
  61. static
  62. HRESULT
  63. FireEvent(
  64. CTAPI * pTapi,
  65. DWORD dwReg,
  66. LPLINEREQMAKECALLW pReqMakeCall
  67. );
  68. DECLARE_MARSHALQI(CRequestEvent)
  69. DECLARE_TRACELOG_CLASS(CRequestEvent)
  70. BEGIN_COM_MAP(CRequestEvent)
  71. COM_INTERFACE_ENTRY(IDispatch)
  72. COM_INTERFACE_ENTRY(ITRequestEvent)
  73. COM_INTERFACE_ENTRY(IObjectSafety)
  74. COM_INTERFACE_ENTRY_FUNC(IID_IMarshal, 0, IMarshalQI)
  75. COM_INTERFACE_ENTRY_AGGREGATE(IID_IMarshal, m_pFTM)
  76. END_COM_MAP()
  77. virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID iid, void **ppvObject) = 0;
  78. virtual ULONG STDMETHODCALLTYPE AddRef() = 0;
  79. virtual ULONG STDMETHODCALLTYPE Release() = 0;
  80. protected:
  81. long m_lRegistrationInstance;
  82. long m_lRequestMode;
  83. #ifdef NEWREQUEST
  84. long m_lAddressType;
  85. #endif
  86. LINEREQMAKECALLW * m_pReqMakeCall;
  87. #if DBG
  88. PWSTR m_pDebug;
  89. #endif
  90. public:
  91. STDMETHOD(get_RegistrationInstance)( long * plRegistrationInstance );
  92. STDMETHOD(get_RequestMode)(long * plRequestMode );
  93. STDMETHOD(get_DestAddress)(BSTR * ppDestAddress );
  94. #ifdef NEWREQUEST
  95. STDMETHOD(get_AddressType)(long * plAddressType );
  96. #endif
  97. STDMETHOD(get_AppName)(BSTR * ppAppName );
  98. STDMETHOD(get_CalledParty)(BSTR * ppCalledParty );
  99. STDMETHOD(get_Comment)(BSTR * ppComment );
  100. };
  101. #endif