»
Developer Library »
API Reference »
C++ API reference »
FTP Engine »
CFtpProtocol
Location:
FTPPROT.h
Link against: ftpprot.lib
class CFtpProtocol : public CBase
Support
Supported from 6.0
Description
Implements an FTP engine, and allows the client to access the individual FTP commands as defined per the RFC959.
Note that before commands that cause data to transit on the
DTP channel, (NLST, LIST, RETR, STOR),
a data buffer must be provided using SendBuffer()/RecvBuffer().
Also, when the client is notified of a MoreData() event,
it must reissue RecvBuffer() to get the rest of
the data.
Derivation
CBase | Base class for all classes to be instantiated on the heap |
CFtpProtocol | Implements an FTP engine, and allows the client to access the individual FTP commands as defined per the RFC959 |
|
Defined in CFtpProtocol:
Abor(), Acct(), Allo(), Allo(), Appe(), Cdup(), Connect(), Connect(), Connect(), Cwd(), Dele(), FTPServerAnswer(), GetVersion(), Help(), Help(), List(), List(), Mkd(), Mode(), NewL(), Nlst(), Nlst(), Noop(), Pass(), Pasv(), Port(), Port(), Pwd(), Quit(), RecvBuffer(), Rein(), Rest(), Retr(), Rmd(), Rnfr(), Rnto(), SendBuffer(), SendEOF(), Site(), Smnt(), Stat(), Stat(), Stor(), Stou(), Stru(), Syst(), Type(), Type(), User(), UserCancel(), ~CFtpProtocol()
Inherited from CBase:
operator new()
Construction and destruction
static CFtpProtocol* NewL(MFtpProtocolNotifier* aNotifier);
Description
Allocates and constructs a new FTP engine object.
Parameters
MFtpProtocolNotifier* aNotifier |
Client callback interface. The FTP engine calls this interface to pass server responses and status messages to the client. |
|
Return value
~CFtpProtocol();
Description
Destructor.
virtual void Connect(TSockAddr& aNetAddr)=0;
Description
Connect to an FTP server, specifying an IP address.
Parameters
virtual void Connect(const THostName& aServerName)=0;
Description
Connect to an FTP server, specifying a DNS name.
Parameters
const THostName& aServerName |
FTP server's DNS name |
|
virtual void Connect(const THostName& aServerName, const TUint aPort)=0;
Description
Connect to an FTP server, specifying a DNS name and port number.
Parameters
const THostName& aServerName |
FTP server's DNS name |
const TUint aPort |
FTP server's port |
|
virtual void User(const TDesC8& aParam)=0;
Description
Issues the USER command.
Parameters
const TDesC8& aParam |
Telnet string identifying the user |
|
virtual void Pass(const TDesC8& aParam)=0;
Description
Issues the PASS command.
Parameters
const TDesC8& aParam |
Telnet string specifying the user's
password |
|
virtual void Acct(const TDesC8& aParam)=0;
Description
Issues the ACCT command.
Parameters
const TDesC8& aParam |
Telnet string identifying the user's
account |
|
virtual void Cwd(const TDesC8& aParam)=0;
Description
Issues the CWD command.
Parameters
const TDesC8& aParam |
Directory or other system dependent
file group designator |
|
virtual void Cdup(void)=0;
Description
Issues the CDUP command.
virtual void Smnt(const TDesC8& aParam)=0;
Description
Issues the SMNT command.
Parameters
const TDesC8& aParam |
Pathname specifying a
directory or other system dependent file group designator |
|
virtual void Quit(void)=0;
Description
Issues the QUIT command.
virtual void Rein(void)=0;
Description
Issues the REIN command.
virtual void Port(void)=0;
Description
Issues the PORT command, setting the Data Transfer Process port to a value allocated by the Sockets Server.
virtual void Port(TUint aPort)=0;
Description
Issues the PORT command, specifying a port number.
Parameters
virtual void Pasv(void)=0;
Description
Issues the PASV command.
virtual void Type(const TDesC8& aParam)=0;
Description
Issues the TYPE command (single parameter).
Parameters
const TDesC8& aParam |
First representation type parameter |
|
virtual void Type(const TDesC8& aParam1, const TDesC8& aParam2)=0;
Description
Issues the TYPE command (two parameters).
Parameters
const TDesC8& aParam1 |
First representation type parameter |
const TDesC8& aParam2 |
Second representation type parameter |
|
virtual void Stru(const TDesC8& aParam)=0;
Description
Issues the STRU command.
Parameters
const TDesC8& aParam |
Telnet character code specifying
the file structure |
|
virtual void Mode(const TDesC8& aParam)=0;
Description
Issues the MODE command.
Parameters
const TDesC8& aParam |
Telnet character code specifying
the data transfer mode |
|
virtual void Retr(const TDesC8& aFileName)=0;
Description
Issues the RETR command.
Parameters
const TDesC8& aFileName |
File name |
|
virtual void Stor(const TDesC8& aFileName)=0;
Description
Issues the STOR command.
Parameters
const TDesC8& aFileName |
File name |
|
virtual void Stou(void)=0;
Description
Issues the STOU command.
virtual void Appe(const TDesC8& aFileName)=0;
Description
Issues the APPE command.
Parameters
const TDesC8& aFileName |
File name |
|
virtual void Allo(const TDesC8& aParam)=0;
Description
Issues the ALLO command (single parameter).
Parameters
const TDesC8& aParam |
Number of bytes (using the logical byte
size) of storage to be reserved for the file |
|
virtual void Allo(const TDesC8& aParam1, const TDesC8& aParam2)=0;
Description
Issues the ALLO command (two parameters).
Parameters
const TDesC8& aParam1 |
Number of bytes (using the logical byte
size) of storage to be reserved for the file |
const TDesC8& aParam2 |
Maximum record or page
size (in logical bytes) |
|
virtual void Rest(const TDesC8& aParam)=0;
Description
Issues the REST command.
Parameters
const TDesC8& aParam |
The server marker at which
file transfer is to be restarted |
|
virtual void Rnfr(const TDesC8& aFileName)=0;
Description
Issues the RNFR command.
Parameters
const TDesC8& aFileName |
File name |
|
virtual void Rnto(const TDesC8& aFileName)=0;
Description
Issues the RNTO command.
Parameters
const TDesC8& aFileName |
File name |
|
virtual void Abor(void)=0;
Description
Issues the ABOR command.
virtual void Dele(const TDesC8& aFileName)=0;
Description
Issues the DELE command.
Parameters
const TDesC8& aFileName |
File name |
|
virtual void Rmd(const TDesC8& aParam)=0;
Description
Issues the RMD command.
Parameters
const TDesC8& aParam |
Directory name |
|
virtual void Mkd(const TDesC8& aParam)=0;
Description
Issues the MKD command.
Parameters
const TDesC8& aParam |
Directory name |
|
virtual void Pwd(void)=0;
Description
Issues the PWD command.
virtual void List(void)=0;
Description
Issues the LIST command, giving a null argument.
virtual void List(const TDesC8& aParam)=0;
Description
Issues the LIST command, specifying a file/directory name.
Parameters
const TDesC8& aParam |
File/directory name |
|
virtual void Nlst(void)=0;
Description
Issues the NLST command, giving a null argument.
virtual void Nlst(const TDesC8& aParam)=0;
Description
Issues the NLST command, specifying a directory name.
Parameters
const TDesC8& aParam |
Directory name |
|
virtual void Site(const TDesC8& aParam)=0;
Description
Issues the SITE command.
Parameters
const TDesC8& aParam |
SITE command argument |
|
virtual void Syst(void)=0;
Description
Issues the SYST command.
virtual void Stat(const TDesC8& aParam)=0;
Description
Issues the STAT command, specifying an argument.
Parameters
const TDesC8& aParam |
STAT command argument |
|
virtual void Stat(void)=0;
Description
Issues the STAT command (no argument).
virtual void Help(const TDesC8& aParam)=0;
Description
Issues the HELP command.
Parameters
const TDesC8& aParam |
HELP command argument |
|
virtual void Help(void)=0;
Description
Issues the HELP command (no argument).
virtual void Noop(void)=0;
Description
Issues the NOOP command.
virtual void SendBuffer(TDes8* aBuffer)=0;
Description
Specifies a buffer
to transfer data to the DTP channel.
Parameters
TDes8* aBuffer |
Send receive |
|
virtual void RecvBuffer(TDes8* aBuffer)=0;
Description
Specifies a buffer
to receive data from the DTP channel.
Parameters
TDes8* aBuffer |
Receive buffer |
|
virtual void SendEOF(void)=0;
Description
Finishes the transfer initiated by a STOR command.
virtual void UserCancel(void)=0;
Description
Cancels current operation.
virtual void FTPServerAnswer(TDes& aServerAnswer)=0;
Description
Gets the 3 digits answer received from the FTP server.
Parameters
TDes& aServerAnswer |
3 digit answer |
|
static TUint32 GetVersion(void);
Description
Gets API version number.
Return value
TUint32 |
32-bit number, with major version number in the highest byte
and minor version number in the next byte |
|