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.

78 lines
2.4 KiB

  1. #ifndef __NmChannelAppShare_h__
  2. #define __NmChannelAppShare_h__
  3. /////////////////////////////////////////////////////////////////////////////
  4. // CNmChannelAppShareObj
  5. class ATL_NO_VTABLE CNmChannelAppShareObj :
  6. public CComObjectRootEx<CComSingleThreadModel>,
  7. public IConnectionPointContainerImpl<CNmChannelAppShareObj>,
  8. public IConnectionPointImpl<CNmChannelAppShareObj, &IID_INmChannelNotify, CComDynamicUnkArray>,
  9. public IConnectionPointImpl<CNmChannelAppShareObj, &IID_INmChannelAppShareNotify, CComDynamicUnkArray>,
  10. public INmChannelAppShare,
  11. public INmChannelAppShareNotify,
  12. public IInternalChannelObj
  13. {
  14. protected:
  15. CSimpleArray<INmSharableApp*> m_ArySharableApps;
  16. public:
  17. DECLARE_NO_REGISTRY()
  18. DECLARE_NOT_AGGREGATABLE(CNmChannelAppShareObj)
  19. BEGIN_COM_MAP(CNmChannelAppShareObj)
  20. COM_INTERFACE_ENTRY(INmChannel)
  21. COM_INTERFACE_ENTRY(INmChannelAppShare)
  22. COM_INTERFACE_ENTRY(IInternalChannelObj)
  23. COM_INTERFACE_ENTRY(IConnectionPointContainer)
  24. COM_INTERFACE_ENTRY(INmChannelNotify)
  25. COM_INTERFACE_ENTRY(INmChannelAppShareNotify)
  26. END_COM_MAP()
  27. BEGIN_CONNECTION_POINT_MAP(CNmChannelAppShareObj)
  28. CONNECTION_POINT_ENTRY(IID_INmChannelNotify)
  29. CONNECTION_POINT_ENTRY(IID_INmChannelAppShareNotify)
  30. END_CONNECTION_POINT_MAP()
  31. // Construction and destruection
  32. CNmChannelAppShareObj();
  33. ~CNmChannelAppShareObj();
  34. static HRESULT CreateInstance(CNmConferenceObj* pConfObj, INmChannel** ppChannel);
  35. // INmChannelAppShare methods
  36. STDMETHOD(GetState)(NM_SHARE_STATE *puState);
  37. STDMETHOD(SetState)(NM_SHARE_STATE uState);
  38. STDMETHOD(EnumSharableApp)(IEnumNmSharableApp **ppEnum);
  39. // IInternalChannelObj methods
  40. STDMETHOD(GetInternalINmChannel)(INmChannel** ppChannel);
  41. STDMETHOD(ChannelRemoved)();
  42. // interface INmChannelAppShareNotify methods
  43. STDMETHOD(StateChanged)(NM_SHAPP_STATE uState,INmSharableApp *pApp);
  44. // Helpers
  45. HRESULT Fire_MemberChanged(NM_MEMBER_NOTIFY uNotify, INmMember *pMember);
  46. HRESULT Fire_StateChanged(NM_SHAPP_STATE uState, INmSharableApp *pApp);
  47. void _OnActivate(bool bActive) {;}
  48. virtual CNmConferenceObj* GetConfObj() = 0;
  49. virtual void RemoveMembers() = 0;
  50. virtual BOOL GetbActive() = 0;
  51. STDMETHOD(Activate)(BOOL bActive);
  52. HRESULT _IsActive();
  53. HRESULT _SetActive(BOOL bActive);
  54. static HRESULT GetSharableAppName(HWND hWnd, LPTSTR sz, UINT cchMax);
  55. };
  56. #endif // __NmChannelAppShare_h__