Source code of Windows XP (NT5)
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.

99 lines
2.3 KiB

  1. #ifndef _FILE_TRANSFER_APPLET_H_
  2. #define _FILE_TRANSFER_APPLET_H_
  3. #include <it120app.h>
  4. #include "cntlist.h"
  5. #include <gencontainers.h>
  6. #define FT_SHUTDOWN_TIMEOUT 5000 // 5 seconds
  7. #define FT_STARTUP_TIMEOUT 5000 // 5 seconds
  8. class MBFTEngine;
  9. class CEngineList : public CList
  10. {
  11. DEFINE_CLIST(CEngineList, MBFTEngine*)
  12. MBFTEngine *FindByConfID(T120ConfID nConfID);
  13. #ifdef ENABLE_HEARTBEAT_TIMER
  14. MBFTEngine *FindByTimerID(UINT_PTR nTimerID);
  15. #endif
  16. };
  17. class CAppletWindow;
  18. class CWindowList : public CList
  19. {
  20. DEFINE_CLIST(CWindowList, CAppletWindow*)
  21. };
  22. class CConfList : public CList
  23. {
  24. DEFINE_CLIST_(CConfList, T120ConfID)
  25. };
  26. class CFtHiddenWindow : public CGenWindow
  27. {
  28. public:
  29. CFtHiddenWindow() {}
  30. BOOL Create();
  31. virtual ~CFtHiddenWindow() {}
  32. protected:
  33. virtual LRESULT ProcessMessage(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam);
  34. };
  35. class CFileTransferApplet
  36. {
  37. public:
  38. CFileTransferApplet(HRESULT *);
  39. ~CFileTransferApplet(void);
  40. IT120Applet *GetAppletSAP(void) { return m_pAppletSAP; }
  41. void RegisterEngine(MBFTEngine *p);
  42. void UnregisterEngine(MBFTEngine *p);
  43. MBFTEngine * FindEngineWithNoIntf(void);
  44. MBFTEngine * FindEngineWithIntf(void);
  45. void RegisterWindow(CAppletWindow *pWindow);
  46. void UnregisterWindow(CAppletWindow *pWindow);
  47. CAppletWindow *GetUnattendedWindow(void);
  48. CWindowList *GetWindowList(void) { return &m_WindowList; }
  49. T120Error CreateAppletSession(IT120AppletSession **pp, T120ConfID nConfID)
  50. {
  51. return m_pAppletSAP->CreateSession(pp, nConfID);
  52. }
  53. MBFTEngine *FindEngineByTimerID(UINT_PTR nTimerID) { return m_EngineList.FindByTimerID(nTimerID); }
  54. void T120Callback(T120AppletMsg *);
  55. BOOL QueryShutdown(BOOL fGoAheadShutdown);
  56. CAppletWindow *GetMainUI(void) { m_WindowList.Reset(); return m_WindowList.Iterate(); }
  57. LRESULT BringUIToFront(void);
  58. BOOL Has2xNodeInConf(void);
  59. BOOL InConf(void);
  60. BOOL HasSDK(void);
  61. HWND GetHiddenWnd(void) { return m_pHwndHidden->GetWindow(); }
  62. private:
  63. IT120Applet *m_pAppletSAP;
  64. CEngineList m_EngineList;
  65. CConfList m_UnattendedConfList;
  66. CWindowList m_WindowList;
  67. CFtHiddenWindow *m_pHwndHidden; // hidden window for processing MBFTMSG
  68. };
  69. extern CFileTransferApplet *g_pFileXferApplet;
  70. #endif // _FILE_TRANSFER_APPLET_H_
  71.