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.

106 lines
3.0 KiB

  1. #ifndef __NmCall_h__
  2. #define __NmCall_h__
  3. #include "NetMeeting.h"
  4. #include "SDKInternal.h"
  5. class CCall;
  6. class CNmManagerObj;
  7. /////////////////////////////////////////////////////////////////////////////
  8. // CNmCallObj
  9. class ATL_NO_VTABLE CNmCallObj :
  10. public CComObjectRootEx<CComSingleThreadModel>,
  11. public IConnectionPointContainerImpl<CNmCallObj>,
  12. public IConnectionPointImpl<CNmCallObj, &IID_INmCallNotify, CComDynamicUnkArray>,
  13. public INmCall,
  14. public INmCallNotify2,
  15. public IInternalCallObj
  16. {
  17. friend HRESULT CreateEnumNmCall(IEnumNmCall** ppEnum);
  18. protected:
  19. // data
  20. static CSimpleArray<CNmCallObj*>* ms_pCallObjList;
  21. NM_CALL_STATE m_State;
  22. CComPtr<INmConference> m_spConference;
  23. CComPtr<INmCall> m_spInternalINmCall;
  24. DWORD m_dwInteralINmCallAdvise;
  25. CNmManagerObj* m_pNmManagerObj;
  26. public:
  27. static HRESULT InitSDK();
  28. static void CleanupSDK();
  29. DECLARE_NO_REGISTRY()
  30. DECLARE_NOT_AGGREGATABLE(CNmCallObj)
  31. BEGIN_COM_MAP(CNmCallObj)
  32. COM_INTERFACE_ENTRY(INmCall)
  33. COM_INTERFACE_ENTRY(IInternalCallObj)
  34. COM_INTERFACE_ENTRY(IConnectionPointContainer)
  35. COM_INTERFACE_ENTRY(INmCallNotify)
  36. COM_INTERFACE_ENTRY(INmCallNotify2)
  37. END_COM_MAP()
  38. BEGIN_CONNECTION_POINT_MAP(CNmCallObj)
  39. CONNECTION_POINT_ENTRY(IID_INmCallNotify)
  40. END_CONNECTION_POINT_MAP()
  41. // Construction and destruction
  42. CNmCallObj();
  43. ~CNmCallObj();
  44. HRESULT FinalConstruct();
  45. ULONG InternalRelease();
  46. //static HRESULT CreateInstance(INmCall* pInternalINmCall, INmCall** ppCall);
  47. static HRESULT CreateInstance(CNmManagerObj* pNmManagerObj, INmCall* pInternalINmCall, INmCall** ppCall);
  48. // INmCall methods
  49. STDMETHOD(IsIncoming)(void);
  50. STDMETHOD(GetState)(NM_CALL_STATE *pState);
  51. STDMETHOD(GetName)(BSTR *pbstrName);
  52. STDMETHOD(GetAddr)(BSTR *pbstrAddr, NM_ADDR_TYPE * puType);
  53. STDMETHOD(GetUserData)(REFGUID rguid, BYTE **ppb, ULONG *pcb);
  54. STDMETHOD(GetConference)(INmConference **ppConference);
  55. STDMETHOD(Accept)(void);
  56. STDMETHOD(Reject)(void);
  57. STDMETHOD(Cancel)(void);
  58. // INmCallNotify2 methods
  59. STDMETHOD(NmUI)(CONFN uNotify);
  60. STDMETHOD(StateChanged)(NM_CALL_STATE uState);
  61. STDMETHOD(Failed)(ULONG uError);
  62. STDMETHOD(Accepted)(INmConference *pInternalConference);
  63. // We don't care about these...
  64. STDMETHOD(CallError)(UINT cns) { return S_OK; }
  65. STDMETHOD(RemoteConference)(BOOL fMCU, BSTR *pwszConfNames, BSTR *pbstrConfToJoin) { return S_OK; }
  66. STDMETHOD(RemotePassword)(BSTR bstrConference, BSTR *pbstrPassword, BYTE *pb, DWORD cb, BOOL fIsService) { return S_OK; }
  67. // IInternalCallObj methods
  68. STDMETHOD(GetInternalINmCall)(INmCall** ppCall);
  69. static HRESULT StateChanged(INmCall* pInternalNmCall, NM_CALL_STATE uState);
  70. // INmCallNotify Notification Firing Fns
  71. HRESULT Fire_NmUI(CONFN uNotify);
  72. HRESULT Fire_StateChanged(NM_CALL_STATE uState);
  73. HRESULT Fire_Failed(ULONG uError);
  74. HRESULT Fire_Accepted(INmConference* pConference);
  75. private:
  76. // Helper Fns
  77. HRESULT _ReleaseResources();
  78. static HRESULT _CreateInstanceGuts(CComObject<CNmCallObj> *p, INmCall** ppCall);
  79. };
  80. //HRESULT CreateEnumNmCall(IEnumNmCall** ppEnum);
  81. #endif // __NmCall_h__