sptk2 logo
SPTK Home Page

sptk::CFTPConnect Class Reference
[Utility Classes]

Connection to the FTP server. More...

#include <CFTPConnect.h>

List of all members.

Public Member Functions

 CFTPConnect ()
 Constructor.
 ~CFTPConnect ()
 Destructor.
void passive (bool p)
 Sets the passive mode true/false.
bool passive () const
 Returns the passive mode.
void user (std::string u)
 Sets the user name.
std::string user () const
 Returns the user name.
void password (std::string p)
 Sets the user password.
std::string password () const
 Returns the user password.
void host (std::string hostName, int portNumber=21)
 Sets the host name and port.
void open ()
 Opens the FTP connection.
void close ()
 Closes the FTP connection.
const CStringsresponse () const
 Returns the referense on the server response string list.
bool active () const
 Returns true if the connection is active.
void cmd_quit ()
 FTP quit command.
void cmd_type (char type)
 FTP type command.
void cmd_cd (std::string dir)
 FTP cd command.
void cmd_pwd ()
 FTP pwd command.
void cmd_list (CStrings &result)
 FTP list command.
void cmd_nlst (CStrings &result)
 FTP nlist command.
void cmd_retr (std::string fileName)
 FTP retr command.
void cmd_store (std::string fileName)
 FTP store command.

Protected Member Functions

void openDataPort ()
 Opens data port on the FTP server.
void command (std::string cmd)
 Sends command to the FTP server.
void getList (std::string cmd, CStrings &list)
 Gets the list from the FTP server.

Protected Attributes

CFTPSocket m_commandSocket
 FTP command socket.
CFTPSocket m_dataSocket
 FTP data socket.
std::string m_user
 FTP user name.
std::string m_password
 FTP user password.
std::string m_host
 FTP host name.
int m_port
 FTP port.
bool m_passive
 Passive mode.


Detailed Description

Connection to the FTP server.
The documentation for this class was generated from the following file:

Mon Mar 5 11:56:05 2012: SPTK 3.5.7