You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
45 lines
1.1 KiB
C++
45 lines
1.1 KiB
C++
/////////////////////////////////////////////////////////////////////////////
|
|
//主要功能:
|
|
// FTP类
|
|
//
|
|
//程序编写: 2008-11-09
|
|
//
|
|
//
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
#pragma once
|
|
#include "internetget.h"
|
|
|
|
class CFtpGet :
|
|
public CInternetGet
|
|
{
|
|
public:
|
|
CFtpGet(void);
|
|
virtual ~CFtpGet(void);
|
|
|
|
virtual bool IsOpenConnection(void);
|
|
// open the connection
|
|
virtual bool OpenConnection(CString server, LPCTSTR lpstrUserName=NULL, LPCTSTR lpstrPassordword=NULL);
|
|
// close the connection
|
|
virtual bool CloseConnection();
|
|
|
|
virtual bool Open(LPCTSTR lpstrRemote);
|
|
virtual void Close(void);
|
|
virtual bool IsOpen(void);
|
|
virtual UINT Read(void* lpBuf, UINT nCount);
|
|
virtual ULONGLONG Seek(ULONGLONG nOffset, UINT nFrom);
|
|
virtual CStdioFile* GetStdioFile(void);
|
|
|
|
bool GetFileTotal(LPCTSTR lpstrRemote, LPCTSTR lpstrLocal); //直接下载整个文件
|
|
|
|
// a full CString array
|
|
int GetMultipleFile(CStringArray *remoteArray, CStringArray *localArray, int number_file);
|
|
|
|
BOOL IsFtpFileExists(LPCTSTR lpstrRemote,ULONG* pFileLength=NULL);
|
|
|
|
protected:
|
|
CFtpConnection *m_pFtpConnection;
|
|
CInternetFile *m_pFtpFile;
|
|
bool missed[200];
|
|
};
|