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.

76 lines
2.6 KiB

  1. #ifndef __MBFTAPI_HPP__
  2. #define __MBFTAPI_HPP__
  3. class MBFTEngine;
  4. class FileOfferNotifyMsg;
  5. class FileTransmitMsg;
  6. class FileErrorMsg;
  7. class PeerMsg;
  8. class InitUnInitNotifyMsg;
  9. class FileEventEndNotifyMsg;
  10. enum
  11. {
  12. MBFTNOTIFY_BASIC = WM_APP + 0x101,
  13. };
  14. class MBFTInterface : public IMbftControl, public CRefCount
  15. {
  16. public:
  17. STDMETHOD_(void, ReleaseInterface)( THIS);
  18. STDMETHOD_(void, Update)( THIS);
  19. STDMETHOD_(void, CancelFt)( THIS_
  20. MBFTEVENTHANDLE hEvent,
  21. MBFTFILEHANDLE hFile);
  22. STDMETHOD(AcceptFileOffer)( THIS_
  23. MBFT_FILE_OFFER *pOffer,
  24. LPCSTR pszRecDir,
  25. LPCSTR pszFileName);
  26. STDMETHOD_(void, RejectFileOffer)( THIS_
  27. MBFT_FILE_OFFER *pOffer);
  28. STDMETHOD(SendFile)( THIS_
  29. LPCSTR pszFileName,
  30. T120NodeID nidReceiver,
  31. MBFTEVENTHANDLE *phEvent,
  32. MBFTFILEHANDLE *phFile);
  33. private:
  34. IMbftEvents *m_pEvents;
  35. MBFTEngine * m_pEngine;
  36. HWND m_hwndNotify;
  37. BOOL m_bFileOfferOK;
  38. LPARAM m_lpUserDefined;
  39. MBFTFILEHANDLE m_FileHandle;
  40. BOOL m_InStateMachine;
  41. T120UserID m_MBFTUserID;
  42. MBFTEVENTHANDLE m_SendEventHandle;
  43. MBFTEVENTHANDLE m_ReceiveEventHandle;
  44. //Sigh..., the CTK people don't give you a choice...
  45. static LRESULT PASCAL CTKCallBackFunction(HWND hWnd,UINT Message,
  46. WPARAM wParam,LPARAM lParam);
  47. public:
  48. MBFTInterface(IMbftEvents *, HRESULT *);
  49. ~MBFTInterface(void);
  50. void SetEngine(MBFTEngine *p) { m_pEngine = p; }
  51. HRESULT SafePostNotifyMessage(MBFTMsg *pMsg);
  52. void DoStateMachine(MBFTMsg *pMsg);
  53. void HandlePeerNotification(PeerMsg * lpNewMessage);
  54. void HandleFileOfferNotify(FileOfferNotifyMsg * lpNotifyMessage);
  55. void HandleProgressNotify(FileTransmitMsg * lpProgressMessage);
  56. void HandleErrorNotify(FileErrorMsg * lpErrorMessage);
  57. void HandleInitUninitNotification(InitUnInitNotifyMsg * lpNewMessage);
  58. void HandleGenericNotification(FileEventEndNotifyMsg * lpNewMessage);
  59. };
  60. #endif //__MBFTAPI_HPP__