CFtpProtocol Class Reference

class CFtpProtocol : public CBase

Implements an FTP engine, and allows the client to access the individual FTP commands as defined in RFC959.

Note that before commands that cause data to transit on the DTP channel (e.g. 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 re-issue RecvBuffer() to get the rest of the data.

Inherits from

Public Member Functions
~CFtpProtocol ()
void Abor (void)
void Acct (const TDesC8 &)
void Allo (const TDesC8 &)
void Allo (const TDesC8 &, const TDesC8 &)
void Appe (const TDesC8 &)
void Cdup (void)
void Connect ( TSockAddr &)
void Connect (const THostName &)
void Connect (const THostName &, const TUint )
void Cwd (const TDesC8 &)
void Dele (const TDesC8 &)
void FTPServerAnswer ( TDes &)
IMPORT_C TUint32 GetVersion (void)
void Help (const TDesC8 &)
void Help (void)
void List (void)
void List (const TDesC8 &)
void Mkd (const TDesC8 &)
void Mode (const TDesC8 &)
IMPORT_C CFtpProtocol * NewL ( MFtpProtocolNotifier *)
void Nlst (void)
void Nlst (const TDesC8 &)
void Noop (void)
void Pass (const TDesC8 &)
void Pasv (void)
void Port (void)
void Port ( TUint )
void Pwd (void)
void Quit (void)
void RecvBuffer ( TDes8 *)
void Rein (void)
void Rest (const TDesC8 &)
void Retr (const TDesC8 &)
void Rmd (const TDesC8 &)
void Rnfr (const TDesC8 &)
void Rnto (const TDesC8 &)
void SendBuffer ( TDes8 *)
void SendEOF (void)
void Site (const TDesC8 &)
void Smnt (const TDesC8 &)
void Stat (const TDesC8 &)
void Stat (void)
void Stor (const TDesC8 &)
void Stou (void)
void Stru (const TDesC8 &)
void Syst (void)
void Type (const TDesC8 &)
void Type (const TDesC8 &, const TDesC8 &)
void User (const TDesC8 &)
void UserCancel (void)
Inherited Functions
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()

Constructor & Destructor Documentation

~CFtpProtocol()

~CFtpProtocol ( ) [virtual]

Destructor.

Member Functions Documentation

Abor(void)

void Abor ( void ) [pure virtual]

Issues the ABOR command.

Parameters

void

Acct(const TDesC8 &)

void Acct ( const TDesC8 & aParam ) [pure virtual]

Issues the ACCT command.

Parameters

const TDesC8 & aParam Telnet string identifying the user's account

Allo(const TDesC8 &)

void Allo ( const TDesC8 & aParam ) [pure virtual]

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

Allo(const TDesC8 &, const TDesC8 &)

void Allo ( const TDesC8 & aParam1,
const TDesC8 & aParam2
) [pure virtual]

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)

Appe(const TDesC8 &)

void Appe ( const TDesC8 & aFileName ) [pure virtual]

Issues the APPE command.

Parameters

const TDesC8 & aFileName File name

Cdup(void)

void Cdup ( void ) [pure virtual]

Issues the CDUP command.

Parameters

void

Connect(TSockAddr &)

void Connect ( TSockAddr & aNetAddr ) [pure virtual]

Connect to an FTP server, specifying an IP address.

Parameters

TSockAddr & aNetAddr FTP server's IP address

Connect(const THostName &)

void Connect ( const THostName & aServerName ) [pure virtual]

Connect to an FTP server, specifying a DNS name.

Parameters

const THostName & aServerName FTP server's DNS name

Connect(const THostName &, const TUint)

void Connect ( const THostName & aServerName,
const TUint aPort
) [pure virtual]

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

Cwd(const TDesC8 &)

void Cwd ( const TDesC8 & aParam ) [pure virtual]

Issues the CWD command.

Parameters

const TDesC8 & aParam Directory or other system dependent file group designator

Dele(const TDesC8 &)

void Dele ( const TDesC8 & aFileName ) [pure virtual]

Issues the DELE command.

Parameters

const TDesC8 & aFileName File name

FTPServerAnswer(TDes &)

void FTPServerAnswer ( TDes & aServerAnswer ) [pure virtual]

Gets the 3 digits answer received from the FTP server.

Parameters

TDes & aServerAnswer 3 digit answer

GetVersion(void)

IMPORT_C TUint32 GetVersion ( void ) [static]

Returns 32-bit, with MAJOR_VERSION in the highest byte MINOR_VERSION in the next byte i.e. MAJOR 2, MINOR 0x34, BUILD 0x278 would be "ver 2.52

Parameters

void

Help(const TDesC8 &)

void Help ( const TDesC8 & aParam ) [pure virtual]

Issues the HELP command.

Parameters

const TDesC8 & aParam HELP command argument

Help(void)

void Help ( void ) [pure virtual]

Issues the HELP command (no argument).

Parameters

void

List(void)

void List ( void ) [pure virtual]

Issues the LIST command, giving a null argument.

Parameters

void

List(const TDesC8 &)

void List ( const TDesC8 & aParam ) [pure virtual]

Issues the LIST command, specifying a file/directory name.

Parameters

const TDesC8 & aParam File/directory name

Mkd(const TDesC8 &)

void Mkd ( const TDesC8 & aParam ) [pure virtual]

Issues the MKD command.

Parameters

const TDesC8 & aParam Directory name

Mode(const TDesC8 &)

void Mode ( const TDesC8 & aParam ) [pure virtual]

Issues the MODE command.

Parameters

const TDesC8 & aParam Telnet character code specifying the data transfer mode

NewL(MFtpProtocolNotifier *)

IMPORT_C CFtpProtocol * NewL ( MFtpProtocolNotifier * ) [static]

Allocates and constructs a new FTP engine object.

Nlst(void)

void Nlst ( void ) [pure virtual]

Issues the NLST command, giving a null argument.

Parameters

void

Nlst(const TDesC8 &)

void Nlst ( const TDesC8 & aParam ) [pure virtual]

Issues the NLST command, specifying a directory name.

Parameters

const TDesC8 & aParam Directory name

Noop(void)

void Noop ( void ) [pure virtual]

Issues the NOOP command.

Parameters

void

Pass(const TDesC8 &)

void Pass ( const TDesC8 & aParam ) [pure virtual]

Issues the PASS command.

Parameters

const TDesC8 & aParam Telnet string specifying the user's password

Pasv(void)

void Pasv ( void ) [pure virtual]

Issues the PASV command.

Parameters

void

Port(void)

void Port ( void ) [pure virtual]

Issues the PORT command, setting the Data Transfer Process port to a value allocated by the Sockets Server.

Parameters

void

Port(TUint)

void Port ( TUint aPort ) [pure virtual]

Issues the PORT command, specifying a port number.

Parameters

TUint aPort Port number

Pwd(void)

void Pwd ( void ) [pure virtual]

Issues the PWD command.

Parameters

void

Quit(void)

void Quit ( void ) [pure virtual]

Issues the QUIT command.

Parameters

void

RecvBuffer(TDes8 *)

void RecvBuffer ( TDes8 * aBuffer ) [pure virtual]

Specifies a buffer to receive data from the DTP channel.

Parameters

TDes8 * aBuffer Receive buffer

Rein(void)

void Rein ( void ) [pure virtual]

Issues the REIN command.

Parameters

void

Rest(const TDesC8 &)

void Rest ( const TDesC8 & aParam ) [pure virtual]

Issues the REST command.

Parameters

const TDesC8 & aParam The server marker at which file transfer is to be restarted

Retr(const TDesC8 &)

void Retr ( const TDesC8 & aFileName ) [pure virtual]

Issues the RETR command.

Parameters

const TDesC8 & aFileName File name

Rmd(const TDesC8 &)

void Rmd ( const TDesC8 & aParam ) [pure virtual]

Issues the RMD command.

Parameters

const TDesC8 & aParam Directory name

Rnfr(const TDesC8 &)

void Rnfr ( const TDesC8 & aFileName ) [pure virtual]

Issues the RNFR command.

Parameters

const TDesC8 & aFileName File name

Rnto(const TDesC8 &)

void Rnto ( const TDesC8 & aFileName ) [pure virtual]

Issues the RNTO command.

Parameters

const TDesC8 & aFileName File name

SendBuffer(TDes8 *)

void SendBuffer ( TDes8 * aBuffer ) [pure virtual]

Specifies a buffer to transfer data to the DTP channel.

Parameters

TDes8 * aBuffer Send receive

SendEOF(void)

void SendEOF ( void ) [pure virtual]

Finishes the transfer initiated by a STOR command.

Parameters

void

Site(const TDesC8 &)

void Site ( const TDesC8 & aParam ) [pure virtual]

Issues the SITE command.

Parameters

const TDesC8 & aParam SITE command argument

Smnt(const TDesC8 &)

void Smnt ( const TDesC8 & aParam ) [pure virtual]

Issues the SMNT command.

Parameters

const TDesC8 & aParam Pathname specifying a directory or other system dependent file group designator

Stat(const TDesC8 &)

void Stat ( const TDesC8 & aParam ) [pure virtual]

Issues the STAT command, specifying an argument.

Parameters

const TDesC8 & aParam STAT command argument

Stat(void)

void Stat ( void ) [pure virtual]

Issues the STAT command (no argument).

Parameters

void

Stor(const TDesC8 &)

void Stor ( const TDesC8 & aFileName ) [pure virtual]

Issues the STOR command.

Parameters

const TDesC8 & aFileName File name

Stou(void)

void Stou ( void ) [pure virtual]

Issues the STOU command.

Parameters

void

Stru(const TDesC8 &)

void Stru ( const TDesC8 & aParam ) [pure virtual]

Issues the STRU command.

Parameters

const TDesC8 & aParam Telnet character code specifying the file structure

Syst(void)

void Syst ( void ) [pure virtual]

Issues the SYST command.

Parameters

void

Type(const TDesC8 &)

void Type ( const TDesC8 & aParam ) [pure virtual]

Issues the TYPE command (single parameter).

Parameters

const TDesC8 & aParam First representation type parameter

Type(const TDesC8 &, const TDesC8 &)

void Type ( const TDesC8 & aParam1,
const TDesC8 & aParam2
) [pure virtual]

Issues the TYPE command (two parameters).

Parameters

const TDesC8 & aParam1 First representation type parameter
const TDesC8 & aParam2 Second representation type parameter

User(const TDesC8 &)

void User ( const TDesC8 & aParam ) [pure virtual]

Issues the USER command.

Parameters

const TDesC8 & aParam Telnet string identifying the user

UserCancel(void)

void UserCancel ( void ) [pure virtual]

Cancels current operation.

Parameters

void