FtpObject.h
资源名称:FTP总集.rar [点击查看]
上传用户:tjfeida
上传日期:2013-03-10
资源大小:1917k
文件大小:3k
源码类别:
Ftp客户端
开发平台:
Visual C++
- // FtpObject.h: interface for the CFtpObject class.
- //
- //////////////////////////////////////////////////////////////////////
- #if !defined(AFX_FTPOBJECT_H__DFF26ACE_CF54_46C8_A392_14142CD13171__INCLUDED_)
- #define AFX_FTPOBJECT_H__DFF26ACE_CF54_46C8_A392_14142CD13171__INCLUDED_
- /*********************************************
- **该文件是属于WolfFTP工程中的。如果有什么问题
- **请联系
- ** tablejiang@21cn.com
- **或者访问
- ** http://wolfftp.51.net
- **以得到最新的支持。
- *********************************************/
- #if _MSC_VER > 1000
- #pragma once
- #endif // _MSC_VER > 1000
- #include "FtpFunction.h"
- #define FTP_COMM_EXIT 0
- #define FTP_COMM_NORMAL_COMMAND 1
- #define FTP_COMM_LIST_DIR 2
- #define FTP_COMM_GET_CUR_DIR 3
- #define FTP_COMM_DOWN_UP_FILE 4
- #define FTP_COMM_DEL_FILE 5
- /***********************************************************
- ** @Description:
- ** this class manages your ftp connect to a ftp server .
- ** you can use this class communication with ftp server.
- **
- ** @Note:
- ** before you can connect ftp server ,you must set member
- ** m_hWndInfo ,and set the file queue save file name .
- ** you can use member function StartFtpCommunication( )
- ** connect with ftp server .
- ** use LogOut() function disconnect with server .
- ** use SendCommand( ) function send a commadn to ftp server.
- **
- **
- ** @Author: JHM
- ** e-mail: tablejiang@21cn.com
- ** Date: 2001 3 26
- ***********************************************************/
- class CFtpObject : public CFtpFunction
- {
- public:
- CFtpObject();
- virtual ~CFtpObject();
- public:
- void GetCurrentDir( );
- void CreateDirectory( LPCTSTR szPath );
- BOOL RunJobList( );
- void RenameFile( LPSTR szSrc , LPSTR szDes );
- void DeleteFile( FTPFILEINFO* pFtpFile );
- void EnterDirectory( LPSTR RemotePath );
- void PutGetFileToServer( FTPFILEINFO* pFtpFile );
- void ListCurrentDirectory( );
- void Logout( );
- BOOL SetSiteInfo ( SITEINFO* pSite , HWNDINFO* pWndInfo );
- void SendCommand( LPSTR szCommand );
- BOOL StartFtpCommunication( );
- BOOL StartCommunication( );
- BOOL StopNowCommand( );
- void EnterParentDir ( );
- protected:
- BOOL DeleteSingleItem( FTPFILEINFO* pItem );
- BOOL DownUpSingleItem( FTPFILEINFO *pFile , FTPITEM* pItemCur );
- BOOL DeleteItem( FTPFILEINFO * pFile );
- BOOL InitDate( );
- BOOL EnterInitFtpDirectory( );
- BOOL StartMessageCycle( );
- BOOL Start( );
- BOOL DownUpFtpItem( FTPFILEINFO* pFile );
- };
- #endif // !defined(AFX_FTPOBJECT_H__DFF26ACE_CF54_46C8_A392_14142CD13171__INCLUDED_)