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.

144 lines
3.0 KiB

  1. /*++
  2. Copyright (c) 1997-1999 Microsoft Corporation
  3. Module Name:
  4. ACDGroup.h
  5. Abstract:
  6. Declaration of the CACDGroup
  7. Author:
  8. Noela - 11/04/97
  9. Notes:
  10. Revision History:
  11. --*/
  12. #ifndef __ACDGROUP_H_
  13. #define __ACDGROUP_H_
  14. #include "resource.h" // main symbols
  15. #include "ObjectSafeImpl.h"
  16. class CQueue;
  17. class CAgentHandler;
  18. /////////////////////////////////////////////////////////////////////////////
  19. // CACDGroup
  20. class ATL_NO_VTABLE CACDGroup :
  21. public CTAPIComObjectRoot<CACDGroup>,
  22. public IDispatchImpl<ITACDGroup, &IID_ITACDGroup, &LIBID_TAPI3Lib>,
  23. public CObjectSafeImpl
  24. {
  25. private:
  26. PWSTR m_szName;
  27. GUID m_GroupHandle;
  28. BOOL m_bGroupHasBeenEnumerated;
  29. QueueArray m_QueueArray;
  30. CAgentHandler * m_pHandler;
  31. BOOL m_bActive;
  32. public:
  33. CACDGroup()
  34. {
  35. }
  36. HRESULT UpdateQueueArray();
  37. GUID getID() {return m_GroupHandle;}
  38. void SetInactive();
  39. void SetActive();
  40. inline BOOL inactive() {return !m_bActive;}
  41. inline BOOL active() {return m_bActive;}
  42. BOOL active(HRESULT * hr);
  43. CAgentHandler * GetAgentHandler() { return m_pHandler; }
  44. void FinalRelease();
  45. DECLARE_DEBUG_ADDREF_RELEASE(CACDGroup)
  46. DECLARE_QI()
  47. DECLARE_MARSHALQI(CACDGroup)
  48. DECLARE_TRACELOG_CLASS(CACDGroup)
  49. BEGIN_COM_MAP(CACDGroup)
  50. COM_INTERFACE_ENTRY(ITACDGroup)
  51. COM_INTERFACE_ENTRY(IDispatch)
  52. COM_INTERFACE_ENTRY(IObjectSafety)
  53. COM_INTERFACE_ENTRY_FUNC(IID_IMarshal, 0, IMarshalQI)
  54. COM_INTERFACE_ENTRY_AGGREGATE(IID_IMarshal, m_pFTM)
  55. END_COM_MAP()
  56. // ITACDGroup
  57. public:
  58. STDMETHOD(EnumerateQueues)(IEnumQueue ** ppEnumQueue);
  59. STDMETHOD(get_Queues)(VARIANT * pVariant);
  60. STDMETHOD(get_Name)(BSTR * ppName);
  61. STDMETHOD(Initialize)
  62. (
  63. PWSTR pszGroupName,
  64. GUID GroupHandle,
  65. CAgentHandler * pHandler
  66. );
  67. };
  68. /////////////////////////////////////////////////////////////////////////////
  69. // CACDGroupEvent
  70. class ATL_NO_VTABLE CACDGroupEvent :
  71. public CTAPIComObjectRoot<CACDGroupEvent>,
  72. public IDispatchImpl<ITACDGroupEvent, &IID_ITACDGroupEvent, &LIBID_TAPI3Lib>,
  73. public CObjectSafeImpl
  74. {
  75. protected:
  76. ACDGROUP_EVENT m_GroupEvent;
  77. ITACDGroup * m_pGroup;
  78. public:
  79. CACDGroupEvent()
  80. {
  81. }
  82. static HRESULT FireEvent(
  83. CACDGroup* pGroup,
  84. ACDGROUP_EVENT Event
  85. );
  86. void FinalRelease();
  87. DECLARE_MARSHALQI(CACDGroupEvent)
  88. DECLARE_TRACELOG_CLASS(CACDGroupEvent)
  89. BEGIN_COM_MAP(CACDGroupEvent)
  90. COM_INTERFACE_ENTRY(ITACDGroupEvent)
  91. COM_INTERFACE_ENTRY(IDispatch)
  92. COM_INTERFACE_ENTRY(IObjectSafety)
  93. COM_INTERFACE_ENTRY_FUNC(IID_IMarshal, 0, IMarshalQI)
  94. COM_INTERFACE_ENTRY_AGGREGATE(IID_IMarshal, m_pFTM)
  95. END_COM_MAP()
  96. // ITACDGroupEvent
  97. public:
  98. STDMETHOD(get_Event)(ACDGROUP_EVENT * pEvent);
  99. STDMETHOD(get_Group)(ITACDGroup ** ppGroup);
  100. };
  101. #endif //__ACDGROUP_H_