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()
voidAbor(void)
voidAcct(const TDesC8 &)
voidAllo(const TDesC8 &)
voidAllo(const TDesC8 &, const TDesC8 &)
voidAppe(const TDesC8 &)
voidCdup(void)
voidConnect(TSockAddr &)
voidConnect(const THostName &)
voidConnect(const THostName &, const TUint)
voidCwd(const TDesC8 &)
voidDele(const TDesC8 &)
voidFTPServerAnswer(TDes &)
IMPORT_C TUint32GetVersion(void)
voidHelp(const TDesC8 &)
voidHelp(void)
voidList(void)
voidList(const TDesC8 &)
voidMkd(const TDesC8 &)
voidMode(const TDesC8 &)
IMPORT_C CFtpProtocol *NewL(MFtpProtocolNotifier *)
voidNlst(void)
voidNlst(const TDesC8 &)
voidNoop(void)
voidPass(const TDesC8 &)
voidPasv(void)
voidPort(void)
voidPort(TUint)
voidPwd(void)
voidQuit(void)
voidRecvBuffer(TDes8 *)
voidRein(void)
voidRest(const TDesC8 &)
voidRetr(const TDesC8 &)
voidRmd(const TDesC8 &)
voidRnfr(const TDesC8 &)
voidRnto(const TDesC8 &)
voidSendBuffer(TDes8 *)
voidSendEOF(void)
voidSite(const TDesC8 &)
voidSmnt(const TDesC8 &)
voidStat(const TDesC8 &)
voidStat(void)
voidStor(const TDesC8 &)
voidStou(void)
voidStru(const TDesC8 &)
voidSyst(void)
voidType(const TDesC8 &)
voidType(const TDesC8 &, const TDesC8 &)
voidUser(const TDesC8 &)
voidUserCancel(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)

voidAbor(void)[pure virtual]

Issues the ABOR command.

Parameters

void

Acct(const TDesC8 &)

voidAcct(const TDesC8 &aParam)[pure virtual]

Issues the ACCT command.

Parameters

const TDesC8 & aParamTelnet string identifying the user's account

Allo(const TDesC8 &)

voidAllo(const TDesC8 &aParam)[pure virtual]

Issues the ALLO command (single parameter).

Parameters

const TDesC8 & aParamNumber of bytes (using the logical byte size) of storage to be reserved for the file

Allo(const TDesC8 &, const TDesC8 &)

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

Issues the ALLO command (two parameters).

Parameters

const TDesC8 & aParam1Number of bytes (using the logical byte size) of storage to be reserved for the file
const TDesC8 & aParam2Maximum record or page size (in logical bytes)

Appe(const TDesC8 &)

voidAppe(const TDesC8 &aFileName)[pure virtual]

Issues the APPE command.

Parameters

const TDesC8 & aFileNameFile name

Cdup(void)

voidCdup(void)[pure virtual]

Issues the CDUP command.

Parameters

void

Connect(TSockAddr &)

voidConnect(TSockAddr &aNetAddr)[pure virtual]

Connect to an FTP server, specifying an IP address.

Parameters

TSockAddr & aNetAddrFTP server's IP address

Connect(const THostName &)

voidConnect(const THostName &aServerName)[pure virtual]

Connect to an FTP server, specifying a DNS name.

Parameters

const THostName & aServerNameFTP server's DNS name

Connect(const THostName &, const TUint)

voidConnect(const THostName &aServerName,
const TUintaPort
)[pure virtual]

Connect to an FTP server, specifying a DNS name and port number.

Parameters

const THostName & aServerNameFTP server's DNS name
const TUint aPortFTP server's port

Cwd(const TDesC8 &)

voidCwd(const TDesC8 &aParam)[pure virtual]

Issues the CWD command.

Parameters

const TDesC8 & aParamDirectory or other system dependent file group designator

Dele(const TDesC8 &)

voidDele(const TDesC8 &aFileName)[pure virtual]

Issues the DELE command.

Parameters

const TDesC8 & aFileNameFile name

FTPServerAnswer(TDes &)

voidFTPServerAnswer(TDes &aServerAnswer)[pure virtual]

Gets the 3 digits answer received from the FTP server.

Parameters

TDes & aServerAnswer3 digit answer

GetVersion(void)

IMPORT_C TUint32GetVersion(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 &)

voidHelp(const TDesC8 &aParam)[pure virtual]

Issues the HELP command.

Parameters

const TDesC8 & aParamHELP command argument

Help(void)

voidHelp(void)[pure virtual]

Issues the HELP command (no argument).

Parameters

void

List(void)

voidList(void)[pure virtual]

Issues the LIST command, giving a null argument.

Parameters

void

List(const TDesC8 &)

voidList(const TDesC8 &aParam)[pure virtual]

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

Parameters

const TDesC8 & aParamFile/directory name

Mkd(const TDesC8 &)

voidMkd(const TDesC8 &aParam)[pure virtual]

Issues the MKD command.

Parameters

const TDesC8 & aParamDirectory name

Mode(const TDesC8 &)

voidMode(const TDesC8 &aParam)[pure virtual]

Issues the MODE command.

Parameters

const TDesC8 & aParamTelnet 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)

voidNlst(void)[pure virtual]

Issues the NLST command, giving a null argument.

Parameters

void

Nlst(const TDesC8 &)

voidNlst(const TDesC8 &aParam)[pure virtual]

Issues the NLST command, specifying a directory name.

Parameters

const TDesC8 & aParamDirectory name

Noop(void)

voidNoop(void)[pure virtual]

Issues the NOOP command.

Parameters

void

Pass(const TDesC8 &)

voidPass(const TDesC8 &aParam)[pure virtual]

Issues the PASS command.

Parameters

const TDesC8 & aParamTelnet string specifying the user's password

Pasv(void)

voidPasv(void)[pure virtual]

Issues the PASV command.

Parameters

void

Port(void)

voidPort(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)

voidPort(TUintaPort)[pure virtual]

Issues the PORT command, specifying a port number.

Parameters

TUint aPortPort number

Pwd(void)

voidPwd(void)[pure virtual]

Issues the PWD command.

Parameters

void

Quit(void)

voidQuit(void)[pure virtual]

Issues the QUIT command.

Parameters

void

RecvBuffer(TDes8 *)

voidRecvBuffer(TDes8 *aBuffer)[pure virtual]

Specifies a buffer to receive data from the DTP channel.

Parameters

TDes8 * aBufferReceive buffer

Rein(void)

voidRein(void)[pure virtual]

Issues the REIN command.

Parameters

void

Rest(const TDesC8 &)

voidRest(const TDesC8 &aParam)[pure virtual]

Issues the REST command.

Parameters

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

Retr(const TDesC8 &)

voidRetr(const TDesC8 &aFileName)[pure virtual]

Issues the RETR command.

Parameters

const TDesC8 & aFileNameFile name

Rmd(const TDesC8 &)

voidRmd(const TDesC8 &aParam)[pure virtual]

Issues the RMD command.

Parameters

const TDesC8 & aParamDirectory name

Rnfr(const TDesC8 &)

voidRnfr(const TDesC8 &aFileName)[pure virtual]

Issues the RNFR command.

Parameters

const TDesC8 & aFileNameFile name

Rnto(const TDesC8 &)

voidRnto(const TDesC8 &aFileName)[pure virtual]

Issues the RNTO command.

Parameters

const TDesC8 & aFileNameFile name

SendBuffer(TDes8 *)

voidSendBuffer(TDes8 *aBuffer)[pure virtual]

Specifies a buffer to transfer data to the DTP channel.

Parameters

TDes8 * aBufferSend receive

SendEOF(void)

voidSendEOF(void)[pure virtual]

Finishes the transfer initiated by a STOR command.

Parameters

void

Site(const TDesC8 &)

voidSite(const TDesC8 &aParam)[pure virtual]

Issues the SITE command.

Parameters

const TDesC8 & aParamSITE command argument

Smnt(const TDesC8 &)

voidSmnt(const TDesC8 &aParam)[pure virtual]

Issues the SMNT command.

Parameters

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

Stat(const TDesC8 &)

voidStat(const TDesC8 &aParam)[pure virtual]

Issues the STAT command, specifying an argument.

Parameters

const TDesC8 & aParamSTAT command argument

Stat(void)

voidStat(void)[pure virtual]

Issues the STAT command (no argument).

Parameters

void

Stor(const TDesC8 &)

voidStor(const TDesC8 &aFileName)[pure virtual]

Issues the STOR command.

Parameters

const TDesC8 & aFileNameFile name

Stou(void)

voidStou(void)[pure virtual]

Issues the STOU command.

Parameters

void

Stru(const TDesC8 &)

voidStru(const TDesC8 &aParam)[pure virtual]

Issues the STRU command.

Parameters

const TDesC8 & aParamTelnet character code specifying the file structure

Syst(void)

voidSyst(void)[pure virtual]

Issues the SYST command.

Parameters

void

Type(const TDesC8 &)

voidType(const TDesC8 &aParam)[pure virtual]

Issues the TYPE command (single parameter).

Parameters

const TDesC8 & aParamFirst representation type parameter

Type(const TDesC8 &, const TDesC8 &)

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

Issues the TYPE command (two parameters).

Parameters

const TDesC8 & aParam1First representation type parameter
const TDesC8 & aParam2Second representation type parameter

User(const TDesC8 &)

voidUser(const TDesC8 &aParam)[pure virtual]

Issues the USER command.

Parameters

const TDesC8 & aParamTelnet string identifying the user

UserCancel(void)

voidUserCancel(void)[pure virtual]

Cancels current operation.

Parameters

void