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.

168 lines
6.3 KiB

  1. /////////////////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright (c) 1997 Active Voice Corporation. All Rights Reserved.
  4. //
  5. // Active Agent(r) and Unified Communications(tm) are trademarks of Active Voice Corporation.
  6. //
  7. // Other brand and product names used herein are trademarks of their respective owners.
  8. //
  9. // The entire program and user interface including the structure, sequence, selection,
  10. // and arrangement of the dialog, the exclusively "yes" and "no" choices represented
  11. // by "1" and "2," and each dialog message are protected by copyrights registered in
  12. // the United States and by international treaties.
  13. //
  14. // Protected by one or more of the following United States patents: 5,070,526, 5,488,650,
  15. // 5,434,906, 5,581,604, 5,533,102, 5,568,540, 5,625,676, 5,651,054.
  16. //
  17. // Active Voice Corporation
  18. // Seattle, Washington
  19. // USA
  20. //
  21. /////////////////////////////////////////////////////////////////////////////////////////
  22. // ConfRoom.h : Declaration of the CConfRoom
  23. #ifndef __CONFROOM_H_
  24. #define __CONFROOM_H_
  25. #include "resource.h" // main symbols
  26. // FWD define
  27. class CConfRoom;
  28. #include "ConfRoomWnd.h"
  29. #include "ConfDetails.h"
  30. #define AV_CS_DIALING 1000
  31. #define AV_CS_ABORT 1001
  32. #define AV_CS_DISCONNECTING 1002
  33. /////////////////////////////////////////////////////////////////////////////
  34. // CConfRoom
  35. class ATL_NO_VTABLE CConfRoom :
  36. public CComObjectRootEx<CComMultiThreadModel>,
  37. public CComCoClass<CConfRoom, &CLSID_ConfRoom>,
  38. public IConfRoom
  39. {
  40. // Construction
  41. public:
  42. CConfRoom();
  43. void FinalRelease();
  44. void ReleaseAVCall( IAVTapiCall *pAVCall, bool bDisconnect );
  45. // Members
  46. public:
  47. CAVTapiCall *m_pAVCall; // Call in conference room
  48. IConfRoomTreeView *m_pTreeView; // Tree View
  49. IVideoWindow *m_pVideoPreview; // Video Preview Window
  50. CConfRoomWnd m_wndRoom; // Details View
  51. CConfDetails m_confDetails;
  52. SIZE m_szTalker; // Size of respective video windows
  53. SIZE m_szMembers;
  54. VARIANT_BOOL m_bPreviewStreaming;
  55. short m_nScale;
  56. protected:
  57. short m_nNumTerms; // Number of video terminals on call
  58. short m_nMaxTerms;
  59. long m_lNumParticipants;
  60. IVideoWindow *m_pITalkerVideo;
  61. ITParticipant *m_pITTalkerParticipant;
  62. CComAutoCriticalSection m_critCreateTerminals;
  63. CAtomicList m_atomTalkerVideo;
  64. CAtomicList m_atomTalkerParticipant;
  65. CComAutoCriticalSection m_critAVCall;
  66. VARIANT_BOOL m_bShowNames; // Show name under video feed window
  67. short m_nShowNamesNumLines;
  68. VARIANT_BOOL m_bConfirmDisconnect;
  69. bool m_bExiting;
  70. // Attributes
  71. public:
  72. void set_PreviewVideo( IVideoWindow *pVideo );
  73. bool IsPreviewVideo( IVideoWindow *pVideo );
  74. bool IsTalkerParticipant( ITParticipant *pParticipant );
  75. bool IsTalkerStreaming();
  76. bool IsExiting();
  77. HRESULT set_TalkerVideo( IVideoWindow *pVideo, bool bUpdate, bool bUpdateTree );
  78. HRESULT get_szMembers( SIZE *pSize );
  79. private:
  80. HRESULT get_ITTalkerParticipant( ITParticipant **ppVal );
  81. HRESULT set_ITTalkerParticipant( ITParticipant *pVal );
  82. // Operations
  83. public:
  84. void InternalDisconnect();
  85. bool MapStreamingParticipant( IParticipant *pIParticipant, IVideoFeed **ppFeed );
  86. protected:
  87. void UpdateNumParticipants( IAVTapiCall *pAVCall );
  88. void OnAbort();
  89. void OnConnected();
  90. void OnDisconnected();
  91. void UpdateData( bool bSaveAndValidate );
  92. // Implementation
  93. public:
  94. DECLARE_NOT_AGGREGATABLE(CConfRoom)
  95. BEGIN_COM_MAP(CConfRoom)
  96. COM_INTERFACE_ENTRY(IConfRoom)
  97. END_COM_MAP()
  98. // IConfRoom
  99. public:
  100. STDMETHOD(get_TalkerScale)(/*[out, retval]*/ short *pVal);
  101. STDMETHOD(put_TalkerScale)(/*[in]*/ short newVal);
  102. STDMETHOD(get_szTalker)(/*[out, retval]*/ SIZE *pVal);
  103. STDMETHOD(put_CallState)(/*[in]*/ CALL_STATE newVal);
  104. STDMETHOD(Cancel)();
  105. STDMETHOD(IsConfRoomConnected)();
  106. STDMETHOD(GetFirstVideoWindowThatsStreaming)(IDispatch **ppVideo);
  107. STDMETHOD(FindVideoFeedFromSubStream)(ITSubStream *pSubStream, IVideoFeed **ppFeed);
  108. STDMETHOD(SetQOSOnParticipants)();
  109. STDMETHOD(FindVideoFeedFromParticipant)(ITParticipant *pParticipant, IVideoFeed **ppFeed);
  110. STDMETHOD(get_bPreviewStreaming)(/*[out, retval]*/ VARIANT_BOOL *pVal);
  111. STDMETHOD(get_TalkerVideo)(/*[out, retval]*/ IDispatch * *pVal);
  112. STDMETHOD(get_hWndMembers)(/*[out, retval]*/ HWND *pVal);
  113. STDMETHOD(get_hWndTalker)(/*[out, retval]*/ HWND *pVal);
  114. STDMETHOD(SelectTalkerVideo)(IDispatch *pDisp, VARIANT_BOOL bUpdate);
  115. STDMETHOD(Layout)(VARIANT_BOOL bTalker, VARIANT_BOOL bMembers);
  116. STDMETHOD(get_bstrConfDetails)(/*[out, retval]*/ BSTR *pVal);
  117. STDMETHOD(get_ConfDetails)(/*[out, retval]*/ long * *pVal);
  118. STDMETHOD(put_ConfDetails)(/*[in]*/ long * newVal);
  119. STDMETHOD(get_lNumParticipants)(/*[out, retval]*/ long *pVal);
  120. STDMETHOD(get_nMaxTerms)(/*[out, retval]*/ short *pVal);
  121. STDMETHOD(put_nMaxTerms)(/*[in]*/ short newVal);
  122. STDMETHOD(get_TalkerParticipant)(/*[out, retval]*/ ITParticipant **ppVal);
  123. STDMETHOD(NotifyParticipantChange)(IAVTapiCall *pAVCall, ITParticipant *pParticipant, AV_PARTICIPANT_EVENT nEvent);
  124. STDMETHOD(get_bConfirmDisconnect)(/*[out, retval]*/ VARIANT_BOOL *pVal);
  125. STDMETHOD(put_bConfirmDisconnect)(/*[in]*/ VARIANT_BOOL newVal);
  126. STDMETHOD(get_IAVTapiCall)(/*[out, retval]*/ IAVTapiCall * *pVal);
  127. STDMETHOD(get_nShowNamesNumLines)(/*[out, retval]*/ short *pVal);
  128. STDMETHOD(put_nShowNamesNumLines)(/*[in]*/ short newVal);
  129. STDMETHOD(get_bShowNames)(/*[out, retval]*/ VARIANT_BOOL *pVal);
  130. STDMETHOD(put_bShowNames)(/*[in]*/ VARIANT_BOOL newVal);
  131. STDMETHOD(get_hWndConfRoom)(/*[out, retval]*/ HWND *pVal);
  132. STDMETHOD(get_bstrConfName)(/*[out, retval]*/ BSTR *pVal);
  133. STDMETHOD(SelectTalker)(ITParticipant *pParticipant, VARIANT_BOOL bUpdateTree);
  134. STDMETHOD(get_nNumTerms)(/*[out, retval]*/ short *pVal);
  135. STDMETHOD(get_MemberVideoSize)(/*[out, retval]*/ short *pVal);
  136. STDMETHOD(put_MemberVideoSize)(/*[in]*/ short newVal);
  137. STDMETHOD(NotifyStateChange)(IAVTapiCall *pAVCall);
  138. STDMETHOD(CanDisconnect)();
  139. STDMETHOD(Disconnect)();
  140. STDMETHOD(get_TreeView)(/*[out, retval]*/ IConfRoomTreeView * *pVal);
  141. STDMETHOD(Show)(HWND hWndTree, HWND hWndClient);
  142. STDMETHOD(UnShow)();
  143. STDMETHOD(IsConfRoomInUse)();
  144. STDMETHOD(EnterConfRoom)(IAVTapiCall *pAVCall);
  145. };
  146. #endif //__CONFROOM_H_