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.

95 lines
2.9 KiB

  1. #ifndef __NmChannelFt_h__
  2. #define __NmChannelFt_h__
  3. #include "SDKInternal.h"
  4. #include "FtHook.h"
  5. /////////////////////////////////////////////////////////////////////////////
  6. // CNmChannelFtObj
  7. class ATL_NO_VTABLE CNmChannelFtObj :
  8. public CComObjectRootEx<CComSingleThreadModel>,
  9. public IConnectionPointContainerImpl<CNmChannelFtObj>,
  10. public IConnectionPointImpl<CNmChannelFtObj, &IID_INmChannelNotify, CComDynamicUnkArray>,
  11. public IConnectionPointImpl<CNmChannelFtObj, &IID_INmChannelFtNotify, CComDynamicUnkArray>,
  12. public INmChannelFt,
  13. public IInternalChannelObj,
  14. public IMbftEvents
  15. {
  16. protected:
  17. CSimpleArray<INmFt*> m_SDKFtObjs;
  18. bool m_bSentSinkLocalMember;
  19. public:
  20. DECLARE_NO_REGISTRY()
  21. DECLARE_NOT_AGGREGATABLE(CNmChannelFtObj)
  22. BEGIN_COM_MAP(CNmChannelFtObj)
  23. COM_INTERFACE_ENTRY(INmChannel)
  24. COM_INTERFACE_ENTRY(INmChannelFt)
  25. COM_INTERFACE_ENTRY(IInternalChannelObj)
  26. COM_INTERFACE_ENTRY(IConnectionPointContainer)
  27. END_COM_MAP()
  28. BEGIN_CONNECTION_POINT_MAP(CNmChannelFtObj)
  29. CONNECTION_POINT_ENTRY(IID_INmChannelNotify)
  30. CONNECTION_POINT_ENTRY(IID_INmChannelFtNotify)
  31. END_CONNECTION_POINT_MAP()
  32. // Construction and destruection
  33. CNmChannelFtObj();
  34. ~CNmChannelFtObj();
  35. static HRESULT CreateInstance(CNmConferenceObj* pConfObj, INmChannel** ppChannel);
  36. // INmChannelFtMethods
  37. STDMETHOD(SendFile)(INmFt **ppFt, INmMember *pMember, BSTR bstrFile, ULONG uOptions);
  38. STDMETHOD(SetReceiveFileDir)(BSTR bstrDir);
  39. STDMETHOD(GetReceiveFileDir)(BSTR *pbstrDir);
  40. // IInternalChannelObj methods
  41. STDMETHOD(GetInternalINmChannel)(INmChannel** ppChannel);
  42. STDMETHOD(ChannelRemoved)();
  43. STDMETHOD(Activate)(BOOL bActive);
  44. // IMbftEvent Interface
  45. STDMETHOD(OnInitializeComplete)(void);
  46. STDMETHOD(OnPeerAdded)(MBFT_PEER_INFO *pInfo);
  47. STDMETHOD(OnPeerRemoved)(MBFT_PEER_INFO *pInfo);
  48. STDMETHOD(OnFileOffer)(MBFT_FILE_OFFER *pOffer);
  49. STDMETHOD(OnFileProgress)(MBFT_FILE_PROGRESS *pProgress);
  50. STDMETHOD(OnFileEnd)(MBFTFILEHANDLE hFile);
  51. STDMETHOD(OnFileError)(MBFT_EVENT_ERROR *pEvent);
  52. STDMETHOD(OnFileEventEnd)(MBFTEVENTHANDLE hEvent);
  53. STDMETHOD(OnSessionEnd)(void);
  54. INmMember* GetSDKMemberFromInternalMember(INmMember* pInternalMember);
  55. INmFt* GetSDKFtFromInternalFt(INmFt* pInternalFt);
  56. // Helpers
  57. HRESULT Fire_MemberChanged(NM_MEMBER_NOTIFY uNotify, INmMember *pMember);
  58. HRESULT Fire_FtUpdate(CONFN uNotify, INmFt* pNmFt);
  59. void _OnActivate(bool bActive);
  60. virtual CNmConferenceObj* GetConfObj() = 0;
  61. virtual void RemoveMembers() = 0;
  62. virtual BOOL GetbActive() = 0;
  63. virtual bool _MemberInChannel(INmMember* pSDKMember) = 0;
  64. virtual void NotifySinkOfMembers(INmChannelNotify* pNotify) = 0;
  65. void _RemoveFt(INmFt* pFt);
  66. HRESULT _IsActive();
  67. HRESULT _SetActive(BOOL bActive);
  68. HRESULT _ChangeRecDir(LPTSTR pszRecDir);
  69. INmFt* _GetFtFromHEvent(MBFTEVENTHANDLE hEvent);
  70. };
  71. #endif // __NmChannelFt_h__