Main Page | Modules | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

CP_FTPResponse Class Reference

A CP_InternetResponse class to manage responses from an FTP server and the CP_FTP class.

Inheritance diagram for CP_FTPResponse:

CP_InternetResponse List of all members.

Public Types

enum  {
  kCP_FTP__DataConOpen = 125, kCP_FTP__AboutToOpen = 150, kCP_FTP__CommandOK = 200, kCP_FTP__CmdNotImp = 202,
  kCP_FTP__NameSystem = 215, kCP_FTP__ServiceReady = 220, kCP_FTP__ServiceClosing = 221, kCP_FTP__ClosingDataCon = 226,
  kCP_FTP__EnteringPsv = 227, kCP_FTP__UserLoggedIn = 230, kCP_FTP__FileActionOK = 250, kCP_FTP__PathCreated = 257,
  kCP_FTP__UserNameOK = 331, kCP_FTP__ReqOKPending = 350, kCP_FTP__ConnectionClosed = 426, kCP_FTP__SyntaxErr = 500,
  kCP_FTP__PermissionDenied = 553
}

Public Member Functions

Constructor / Destructor
 CP_FTPResponse (CP_Socket *inSocket)
 Constructor.
 CP_FTPResponse (const CP_FTPResponse &inResponse)
virtual ~CP_FTPResponse () throw ()
 Destructor.
Resonse
virtual bool GetServerResponse ()

Protected Attributes

CP_String fServerResponseString
CP_String fServerBodyString
SInt32 fServerResponseCode
CP_SocketfSocketConnection

Member Enumeration Documentation

anonymous enum
 

Various response codes returned from the FTP server.

Enumeration values:
kCP_FTP__DataConOpen 
kCP_FTP__AboutToOpen 
kCP_FTP__CommandOK 
kCP_FTP__CmdNotImp 
kCP_FTP__NameSystem 
kCP_FTP__ServiceReady 
kCP_FTP__ServiceClosing 
kCP_FTP__ClosingDataCon 
kCP_FTP__EnteringPsv 
kCP_FTP__UserLoggedIn 
kCP_FTP__FileActionOK 
kCP_FTP__PathCreated 
kCP_FTP__UserNameOK 
kCP_FTP__ReqOKPending 
kCP_FTP__ConnectionClosed 
kCP_FTP__SyntaxErr 
kCP_FTP__PermissionDenied 


Constructor & Destructor Documentation

CPLAT_Begin_Namespace_CPLAT CP_FTPResponse::CP_FTPResponse CP_Socket inSocket  ) 
 

Constructor.

Parameters:
inSocket The socket connection we get the responses from.
Exceptions:
none 

CP_FTPResponse::CP_FTPResponse const CP_FTPResponse inResponse  ) 
 

Copy constructor.

Parameters:
inResponse The CP_FTPResponse object to copy the data from.
Exceptions:
none 

CP_FTPResponse::~CP_FTPResponse  )  throw () [virtual]
 

Destructor.

Exceptions:
none 


Member Function Documentation

bool CP_FTPResponse::GetServerResponse  )  [virtual]
 

Returns the response from the FTP server.

Exceptions:
none 
Returns:
bool Returns true if we have a valid response

Reimplemented from CP_InternetResponse.

CP_String CP_InternetResponse::GetResponseString  )  [inherited]
 

Return the text of the response.

Exceptions:
none 
Returns:
CP_String The response string.

CP_String CP_InternetResponse::GetBodyString  )  [inherited]
 

Return the text of the response.

Exceptions:
none 
Returns:
CP_String The response string.

SInt32 CP_InternetResponse::GetResponseCode  )  [inherited]
 

Return the resonse code

Exceptions:
none 
Returns:
SInt32 The response code.

void CP_InternetResponse::SetResponseString const CP_String inResponse  )  [inherited]
 

Sets the text of the response. This text comes from the server.

Parameters:
inResponse The servers response.
Exceptions:
none 
Returns:
void

void CP_InternetResponse::SetResponseCode SInt32  inResponseCode  )  [inherited]
 

Sets the response code. This text comes from the server.

Parameters:
inResponseCode The servers response code.
Exceptions:
none 
Returns:
void

void CP_InternetResponse::ResetResponse  )  [inherited]
 

Resets the fields of this response to initial or empty values.

Exceptions:
none 
Returns:
void

SInt32 CP_InternetResponse::ReadLine CP_Socket inSocket,
CP_String inOutResult
[protected, inherited]
 

Receive the next line from our server. We keep receiving until the end of line is reached.

Parameters:
inSocket The socket we communicate to the server with.
inOutResult Location to return the resulting text in.
Exceptions:
OSError exceptions
Returns:
SInt32 The result of reading from the server. It will either be CP_noErr or CP_Err_ReceivingFromSocket.


Member Data Documentation

CP_String CP_InternetResponse::fServerResponseString [protected, inherited]
 

CP_String CP_InternetResponse::fServerBodyString [protected, inherited]
 

CP_String containing the response from the server.

SInt32 CP_InternetResponse::fServerResponseCode [protected, inherited]
 

CP_String containing the body of the response from the server

CP_Socket* CP_InternetResponse::fSocketConnection [protected, inherited]
 

Any numeric response code from the server.


The documentation for this class was generated from the following files:
Generated on Sat Sep 17 20:01:42 2005 for CPLAT by  doxygen 1.4.0