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.

69 lines
1.6 KiB

  1. #ifndef __NmFt_h__
  2. #define __NmFt_h__
  3. class CNmChannelFtObj;
  4. class ATL_NO_VTABLE CNmFtObj :
  5. public CComObjectRootEx<CComSingleThreadModel>,
  6. public INmFt,
  7. public IInternalFtObj
  8. {
  9. protected:
  10. CNmChannelFtObj* m_pChannelFtObj;
  11. MBFTEVENTHANDLE m_hFileEvent;
  12. MBFTFILEHANDLE m_hFile;
  13. bool m_bIncoming;
  14. CComBSTR m_strFileName;
  15. DWORD m_dwSizeInBytes;
  16. CComPtr<INmMember> m_spSDKMember;
  17. NM_FT_STATE m_State;
  18. DWORD m_dwBytesTransferred;
  19. bool m_bSomeoneCanceled;
  20. public:
  21. DECLARE_NO_REGISTRY()
  22. DECLARE_NOT_AGGREGATABLE(CNmFtObj)
  23. BEGIN_COM_MAP(CNmFtObj)
  24. COM_INTERFACE_ENTRY(INmFt)
  25. COM_INTERFACE_ENTRY(IInternalFtObj)
  26. END_COM_MAP()
  27. ////////////////////////////////////////////////
  28. // Construction and destruction
  29. static HRESULT CreateInstance(
  30. CNmChannelFtObj* pChannelObj,
  31. MBFTEVENTHANDLE hFileEvent,
  32. MBFTFILEHANDLE hFile,
  33. bool bIncoming,
  34. LPCTSTR szFileName,
  35. DWORD dwSizeInBytes,
  36. INmMember* pSDKMember,
  37. INmFt** ppNmFt);
  38. ////////////////////////////////////////////////
  39. // INmFt interface
  40. STDMETHOD(IsIncoming)(void);
  41. STDMETHOD(GetState)(NM_FT_STATE *puState);
  42. STDMETHOD(GetName)(BSTR *pbstrName);
  43. STDMETHOD(GetSize)(ULONG *puBytes);
  44. STDMETHOD(GetBytesTransferred)(ULONG *puBytes);
  45. STDMETHOD(GetMember)(INmMember **ppMember);
  46. STDMETHOD(Cancel)(void);
  47. ////////////////////////////////////////////////
  48. // IInternalFtObj interface
  49. STDMETHOD(GetHEvent)(UINT *phEvent);
  50. STDMETHOD(OnFileProgress)(UINT hFile, ULONG lFileSize, ULONG lBytesTransmitted);
  51. STDMETHOD(FileTransferDone)();
  52. STDMETHOD(OnError)();
  53. };
  54. #endif // __NmFt_h__