TreeForFtp.h
上传用户:maryhy001
上传日期:2007-05-02
资源大小:2317k
文件大小:2k
- // TreeForFtp.h : header file
- #ifndef _TREE_FOR_FTPVIEW_H
- #define _TREE_FOR_FTPVIEW_H
- #include "FtpPublic.h"
- #include "FtpWorker.h"
- class CTreeForFtp : public CTreeCtrl
- {
- // Construction
- public:
- CTreeForFtp();
- // Attributes
- public:
- // Operations
- public:
- BOOL ExistsConnection(void);
- BOOL IsConnectingState(void);
- BOOL RefreshContents(void);
-
- CString GetNodeFTPDir(HTREEITEM hNode);
-
- void GetCurOpendFtpSite(CFtpSite &oFtpSite);
- CString MakeLocalFileName(LPCSTR lpszFtpDir, LPCSTR lpszFtpFileName);
- BOOL DownloadFile(LPREMOTEFILEINFO lpRemoteFile,
- LPCSTR lpszLocalFileName);
- static DWORD CALLBACK Routine_ConnectFtpSvr(LPVOID lpParameters);
- // Overrides
- // ClassWizard generated virtual function overrides
- //{{AFX_VIRTUAL(CTreeForFtp)
- //}}AFX_VIRTUAL
- // Implementation
- public:
- virtual ~CTreeForFtp();
- // Generated message map functions
- protected:
- //{{AFX_MSG(CTreeForFtp)
- afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
- afx_msg void OnSelchanged(NMHDR* pNMHDR, LRESULT* pResult);
- //}}AFX_MSG
- afx_msg void OnRefreshView();
- afx_msg void OnConnectFtpSvr();
- afx_msg void OnDisConnectFtpSvr();
-
- DECLARE_MESSAGE_MAP()
- protected:
- //get current clicked tree node's ftp-site info.
- //if nothing selected then return false.
- BOOL GetCurClickedFtpNodeInfo(CFtpSite &oFtpSite, HTREEITEM &hnode);
- //disconnect with remote ftp-server event.
- void OnDisconnectFtp(void);
- protected:
- CImageList m_imgTree; //tree's image list object.
- CFtpWorker m_oFtpWorker; //ftp-worker object.
- BOOL m_bIsConnecting;//flag that ftp worker is in connecting state.
- };
- #endif // !_TREE_FOR_FTPVIEW_H