FtpFunction.h
资源名称:FTP总集.rar [点击查看]
上传用户:tjfeida
上传日期:2013-03-10
资源大小:1917k
文件大小:4k
源码类别:
Ftp客户端
开发平台:
Visual C++
- // FtpTransmitFile.h: interface for the CFtpTransmitFile class.
- //
- //////////////////////////////////////////////////////////////////////
- #if !defined(AFX_FTPTRANSMITFILE_H__9FBE8C59_B355_4146_8A7D_5C771C57570C__INCLUDED_)
- #define AFX_FTPTRANSMITFILE_H__9FBE8C59_B355_4146_8A7D_5C771C57570C__INCLUDED_
- /*********************************************
- **该文件是属于WolfFTP工程中的。如果有什么问题
- **请联系
- ** tablejiang@21cn.com
- **或者访问
- ** http://wolfftp.51.net
- **以得到最新的支持。
- *********************************************/
- #if _MSC_VER > 1000
- #pragma once
- #endif // _MSC_VER > 1000
- #include "FtpLib.h"
- #include "SelectActionDlg.h"
- /***********************************************************
- ** @Description:
- ** this class encapsulation the CFtpLib class function
- ** and ftp communication core function .
- ** it offer higher function than CFtpLib .
- **
- ** @Note:
- **
- **
- **
- ** @Author :Table.JHM.太子
- ** e-mail: tablejiang@21cn.com
- ** Date: 2001 3 26
- ***********************************************************/
- class CFtpFunction : public CFtpLib
- {
- public:
- CFtpFunction();
- virtual ~CFtpFunction();
- //public member variable
- public:
- char m_CurrentFtpDirectory[MAX_PATH] ; //store ftp current path.
- SITEINFO m_SiteInfo ; //store ftp current site info.
- FTPITEM* m_ListItem ; //store ftp file list.
- CFileQueue m_FileQueue ; //store ftp transmit file info.
- CDeleteFileQueue m_DeleteFileQueue ; //store ftp delete file list.
- //protected member variable
- protected:
- THREADINFO m_ControlThread ; //the control thread info.
- THREADINFO m_AbordThread ; //the abort command thread info.
- SOCKET m_hControlSocket ; //control socket handle .
- HANDLE m_hEvent ; //sync event.
- BOOL m_bIsConnected ; //ftp connected status.
- THREADINFO* m_pThreadQueue ; //thread queue.
- int m_iWhenExistAction ; //what action will do , when file exist
- BOOL m_bAskUser ; //is ask user how to do , when file exist.
- CSelectActionDlg m_SelActionDlg ;
- //protected member function .
- protected:
- __int64 FindFileInFileList( LPCTSTR szFileName , FTPITEM* pFileList );
- BOOL RemoveFtpDirectory( LPSTR szDirName );
- BOOL DeleteFtpFile( LPSTR szFileName );
- BOOL CheckBrokenDownload( );
- BOOL CheckServerType( );
- void ClearUpReceiveBuffer( );
- BOOL PutGetFileFunction( FTPFILEINFO* pParam );
- BOOL CreateFtpDirectory( LPCTSTR szPath );
- void SendStatusStr( char* pText );
- BOOL SendFileNameToParentWnd( LPCTSTR szName );
- BOOL MakeBrokenPos( char* szCommand , FTPFILEINFO* pFile , HANDLE hFile );
- HANDLE OpenLocalFile( FTPFILEINFO* pFile , LPCTSTR szPathName );
- __int64 FindFileInLocal( LPCTSTR szPathName );
- //public member function .
- public:
- BOOL BrokenDownload( FTPFILEINFO* pFile );
- BOOL IsConnect() ;
- BOOL DeleteFtpDirectory( FTPFILEINFO* pFileInfo );
- BOOL AbordThreadFunction( );
- BOOL DownLoadDirectory( FTPFILEINFO* pFileInfo );
- BOOL UploadDirectory( FTPFILEINFO* pFileInfo );
- BOOL MakeFtpDownloadPath( FTPFILEINFO *pFileInfo );
- BOOL FreeItemList( FTPITEM* pFtpItem );
- BOOL MakeFtpUploadPath( FTPFILEINFO* pFileInfo );
- BOOL ListDirectory( BOOL bWantSend );
- BOOL GetCurrentFtpDir( );
- BOOL EnterFtpDirectory( LPSTR strPath );
- UINT ReadDataCannel(SOCKET hControlSocket, SOCKET hDataSocket , BOOL bWantSend );
- void ParseDirectroyInfo( CString buffer , BOOL bWantSend );
- };
- #endif // !defined(AFX_FTPTRANSMITFILE_H__9FBE8C59_B355_4146_8A7D_5C771C57570C__INCLUDED_)