Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members | Related Pages | Examples

P::FTPClient Class Reference
[Networking library]

FTP Client. More...

#include <pftpclient.h>

Inheritance diagram for P::FTPClient:

P::StreamSocket P::Socket P::IODevice List of all members.

Public Types

enum  transMode_t { ModeStream, ModeBlock, ModeCompressed }
 FTP transfer modes. More...

enum  transType_t { TypeASCII, TypeEBCDIC, TypeImage }
enum  dataMode_t { Passive, Active }

Public Member Functions

 FTPClient (int domain) throw (IOError)
 FTPClient (const NetworkAddress &addr, port_t port) throw (IOError)
 ~FTPClient () throw ()
void connect (const NetworkAddress &addr, port_t port) throw (IOError, FTPError)
void close () throw (IOError)
 Close the socket.

void sendCmd (const std::string &cmd) throw (IOError)
const FTPResponsereadResponse () throw (IOError)
const FTPResponselastResponse ()
void login (const std::string &user, const std::string &passwd, const std::string &account="") throw (IOError, FTPError)
void logout () throw (IOError, FTPError)
void setMode (transMode_t mode) throw (IOError, FTPError)
transMode_t mode () const throw ()
void setType (transType_t type) throw (IOError,FTPError)
transType_t type () const throw ()
 Socket type.

std::string cwd () throw (IOError, FTPError)
 Current working directory.

void chdir (const std::string &path) throw (IOError, FTPError)
 Change working directory.

void cdup () throw (IOError, FTPError)
 Change directory one level up.

void mkdir (const std::string &path) throw (IOError, FTPError)
 Remove directory.

void rmdir (const std::string &path) throw (IOError, FTPError)
 Remove directory.

void remove (const std::string &path) throw (IOError, FTPError)
 Remove file.

FTPDatadir (const std::string &path="") throw (IOError, FTPError)
 Retrieve directory listing.

FTPDatastore (const std::string &path) throw (IOError, FTPError)
FTPDataretrieve (const std::string &path) throw (IOError, FTPError)
void noop () throw (IOError, FTPError)
 No operation.

bool testResponse () throw (IOError)
 Test if data is available.

FTPDatadataConn () const throw ()

Detailed Description

FTP Client.

Definition at line 120 of file pftpclient.h.


Member Enumeration Documentation

enum P::FTPClient::dataMode_t
 

Enumeration values:
Passive 
Active 

Definition at line 135 of file pftpclient.h.

enum P::FTPClient::transMode_t
 

FTP transfer modes.

Enumeration values:
ModeStream 
ModeBlock 
ModeCompressed 

Definition at line 123 of file pftpclient.h.

enum P::FTPClient::transType_t
 

Enumeration values:
TypeASCII 
TypeEBCDIC 
TypeImage 

Definition at line 129 of file pftpclient.h.


Constructor & Destructor Documentation

P::FTPClient::FTPClient int  domain  )  throw (IOError)
 

P::FTPClient::FTPClient const NetworkAddress addr,
port_t  port
throw (IOError)
 

P::FTPClient::~FTPClient  )  throw ()
 


Member Function Documentation

void P::FTPClient::cdup  )  throw (IOError, FTPError)
 

Change directory one level up.

void P::FTPClient::chdir const std::string &  path  )  throw (IOError, FTPError)
 

Change working directory.

void P::FTPClient::close  )  throw (IOError) [virtual]
 

Close the socket.

Reimplemented from P::StreamSocket.

void P::FTPClient::connect const NetworkAddress addr,
port_t  port
throw (IOError, FTPError)
 

Reimplemented from P::StreamSocket.

std::string P::FTPClient::cwd  )  throw (IOError, FTPError)
 

Current working directory.

This method is used to retrieve the current working directory from the server.

FTPData* P::FTPClient::dataConn  )  const throw () [inline]
 

Definition at line 219 of file pftpclient.h.

FTPData* P::FTPClient::dir const std::string &  path = ""  )  throw (IOError, FTPError)
 

Retrieve directory listing.

const FTPResponse* P::FTPClient::lastResponse  ) 
 

void P::FTPClient::login const std::string &  user,
const std::string &  passwd,
const std::string &  account = ""
throw (IOError, FTPError)
 

void P::FTPClient::logout  )  throw (IOError, FTPError)
 

void P::FTPClient::mkdir const std::string &  path  )  throw (IOError, FTPError)
 

Remove directory.

Use this method to create a directory on the server.

Parameters:
path the path of the Directory that should be created
Returns:
true on success, false otherwise

transMode_t P::FTPClient::mode  )  const throw () [inline]
 

Definition at line 160 of file pftpclient.h.

void P::FTPClient::noop  )  throw (IOError, FTPError)
 

No operation.

This method executes a NO-OP on the server. This command can be used to keep the server from closing the connection after a idle timeout.

Returns:
true on success, false otherwise

const FTPResponse* P::FTPClient::readResponse  )  throw (IOError)
 

void P::FTPClient::remove const std::string &  path  )  throw (IOError, FTPError)
 

Remove file.

FTPData* P::FTPClient::retrieve const std::string &  path  )  throw (IOError, FTPError)
 

void P::FTPClient::rmdir const std::string &  path  )  throw (IOError, FTPError)
 

Remove directory.

Use this method to remove a directory on the server.

Parameters:
path the path of the Directory to remove
Returns:
true on success, false otherwise

void P::FTPClient::sendCmd const std::string &  cmd  )  throw (IOError)
 

void P::FTPClient::setMode transMode_t  mode  )  throw (IOError, FTPError)
 

void P::FTPClient::setType transType_t  type  )  throw (IOError,FTPError)
 

FTPData* P::FTPClient::store const std::string &  path  )  throw (IOError, FTPError)
 

bool P::FTPClient::testResponse  )  throw (IOError)
 

Test if data is available.

transType_t P::FTPClient::type  )  const throw () [inline]
 

Socket type.

Reimplemented from P::Socket.

Definition at line 165 of file pftpclient.h.


The documentation for this class was generated from the following file:
Generated on Fri Mar 12 21:08:33 2004 for P::Classes by doxygen 1.3.3