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

CP_POP3Response Class Reference

A CP_InternetResponse class to handle POP3 server responses. This class is designed to be used with the CP_POP3 class.

Inheritance diagram for CP_POP3Response:

CP_InternetResponse List of all members.

Public Types

enum  { kCP_POP3__ServerResponseOK = CP_FOUR_CHAR_CODE('+OK '), kCP_POP3__ServerResponseError = CP_FOUR_CHAR_CODE('-ERR') }

Public Member Functions

Constructor / Destructor
 CP_POP3Response (CP_Socket *inSocket)
 Constructor.
 CP_POP3Response (const CP_POP3Response &inResponse)
virtual ~CP_POP3Response () throw ()
 Destructor.
Server response
virtual bool GetServerResponse ()
bool GetMultiLineResponse (CP_InternetProtocolProgress &inProtocolProgress)

Protected Attributes

CP_String fServerResponseString
CP_String fServerBodyString
SInt32 fServerResponseCode
CP_SocketfSocketConnection

Member Enumeration Documentation

anonymous enum
 

Enumeration values:
kCP_POP3__ServerResponseOK 
kCP_POP3__ServerResponseError 


Constructor & Destructor Documentation

CPLAT_Begin_Namespace_CPLAT CP_POP3Response::CP_POP3Response CP_Socket inSocket  ) 
 

Constructor.

Parameters:
inSocket The socket we are connected to the server over.
Exceptions:
none 

CP_POP3Response::CP_POP3Response const CP_POP3Response inResponse  ) 
 

Copy constructor.

Parameters:
inResponse The response object to copy the fields from.
Exceptions:
none 

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

Destructor.

Exceptions:
none 


Member Function Documentation

bool CP_POP3Response::GetServerResponse  )  [virtual]
 

Copies the response of the server into this object, and returns true if the server has a response.

Exceptions:
none 
Returns:
bool True if there was a response.

Reimplemented from CP_InternetResponse.

bool CP_POP3Response::GetMultiLineResponse CP_InternetProtocolProgress inProtocolProgress  ) 
 

Handle replies from our POP3 server. This method is used to retrieve multi-line responses.

Parameters:
inProtocolResponse Location to return the response in.
Exceptions:
none 
Returns:
bool True if there is a response.

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:58 2005 for CPLAT by  doxygen 1.4.0