Main Page | Class Hierarchy | Class List | Class Members

OkResponse Class Reference

Inheritance diagram for OkResponse:

Response List of all members.

Detailed Description

OkResponse is a class that represents an IMAP4 OK response.

An OK response indicates a positive result at the server. If the OK response is tagged, it indicates that the client command with the same tag was successful. If the OK response is untagged (that is, the tag is "*"), then it contains information from the server in a response code.

When you receive a OkResponse following a client command, you will want to check the tag of the OkResponse by calling the Tag member function. If the tag is "*", it indicates an informational message from the server. In this case, you may want to check the response code by calling the ResponseCode member function. If the tag is not "*", then this response indicates that the client command with the same tag was successful.

Typically, an OK response contains human-readable text. You can get this text by calling the ResponseText member function.


Public Member Functions

 OkResponse ()
 Default constructor.
 OkResponse (const char *tag)
 Constructor that takes the tag as a parameter.
 OkResponse (const OkResponse &other)
 Copy constructor.
virtual ~OkResponse ()
 Destructor.
OkResponseoperator= (const OkResponse &other)
 Assignment operator.
const char * Tag () const
 Returns the tag of a tagged response.
const char * ResponseCode () const
 Returns the response code.
const char * ResponseText () const
 Returns the response text.
void SetParams (const char *s)
 Sets parameters for the response.


Constructor & Destructor Documentation

OkResponse  ) 
 

Default constructor.

OkResponse const char *  tag  ) 
 

Constructor that takes the tag as a parameter.

The argument is the tag of a tagged response, or "*" if the response is untagged.

Parameters:
tag the tag of a tagged response; or "*" for an untagged response

OkResponse const OkResponse other  ) 
 

Copy constructor.

Parameters:
other other object to copy

~OkResponse  )  [virtual]
 

Destructor.


Member Function Documentation

OkResponse & operator= const OkResponse other  ) 
 

Assignment operator.

Parameters:
other other object to copy
Returns:
*this

const char * ResponseCode  )  const
 

Returns the response code.

Response codes are delimited in the response by square bracket characters ([...]). See the IMAP4 spec for the possible response codes and their meanings.

Returns:
the response code, if present; otherwise, an empty string

const char * ResponseText  )  const
 

Returns the response text.

The response text is intended to be meaningful to humans, for example, for debugging. (However, it's a mistake to assume that the response text will be meaningful to a user who is not familiar with IMAP4!)

Returns:
the response text, if present; otherwise, an empty string

void SetParams const char *  s  ) 
 

Sets parameters for the response.

Only the parser should call this function.

Parameters:
s string that contains unparsed parameters

const char * Tag  )  const
 

Returns the tag of a tagged response. If the response is not a tagged response, the function returns "*".

Returns:
the tag of a tagged response; otherwise "*"

Copyright © 2001-2005 Hunny Software, Inc. All rights reserved.