Main Page | Namespace List | Class Hierarchy | Class List | Namespace Members | Class Members

FlagsResponse Class Reference

Inheritance diagram for FlagsResponse:

Response List of all members.

Detailed Description

FlagsResponse is a class that represents an IMAP4 FLAGS response. A FLAGS response is sent by the server in response to a SELECT or EXAMINE client command. The FLAGS response informs the client about the flags that are recognized for messages in the currently selected mailbox.

Note: Do not confuse the FLAGS response, represented by FlagsResponse, and the FLAGS data item of a FETCH response, represented by FlagsData. The FLAGS response indicates which flags are recognized by the server. The FLAGS data of a FETCH response indicates the flags that are set for a particular message.


Public Member Functions

 FlagsResponse ()
 Default constructor.
 FlagsResponse (const FlagsResponse &other)
 Copy constructor.
virtual ~FlagsResponse ()
 Destructor.
FlagsResponseoperator= (const FlagsResponse &other)
 Assignment operator.
bool Answered () const
 Indicates if \Answered flag was present in response.
bool Flagged () const
 Indicates if \Flagged flag was present in response.
bool Deleted () const
 Indicates if \Deleted flag was present in response.
bool Seen () const
 Indicates if \Seen flag was present in response.
bool Draft () const
 Indicates if \Draft flag was present in response.
bool Flag (const char *name) const
 Indicates if specified flag was present in response.
unsigned NumFlags () const
 Gets the number of flags.
const char * FlagAt (unsigned index)
 Gets the flag at the specified position.
void SetParams (const char *str)
 Sets parameters for the response.


Constructor & Destructor Documentation

FlagsResponse  ) 
 

Default constructor.

FlagsResponse const FlagsResponse other  ) 
 

Copy constructor.

Parameters:
other other object to copy

~FlagsResponse  )  [virtual]
 

Destructor.


Member Function Documentation

bool Answered  )  const
 

Returns true if the \Answered flag was present in the response.

The \Answered flag indicates that the message has been answered.

Returns:
true if \Answered flag was present; otherwise, false

bool Deleted  )  const
 

Returns true if the \Deleted flag was present in the response.

The \Deleted flag indicates that the message has been marked for deletion. When a message is marked for deletion, it is still present in the mailbox, and can still have the \Deleted flag cleared. However, when the mailbox is closed or the EXPUNGE command is sent by the client, all messages marked with the \Deleted flag are permanently deleted.

Returns:
true if \Deleted flag was present; otherwise, false

bool Draft  )  const
 

Returns true if the \Draft flag was present in the response.

The \Draft flag indicates that the message is being stored in the mailbox while it is being composed.

Returns:
true if \Draft flag was present; otherwise, false

bool Flag const char *  name  )  const
 

Returns true if the specified flag was present in the response.

Parameters:
name the flag to check for
Returns:
true if flag was present; otherwise, false

const char * FlagAt unsigned  index  ) 
 

Gets the flag at the specified position.

You may use this member function and the NumFlags() member function to discover all the flags in the response. For the most common flags, you may use the convenience member functions Answered(), Flagged(), Deleted(), Seen(), and Draft() to learn if those flags are in the response.

The parameter index must satisfy the constraint index < NumFlags().

Parameters:
index position of the flag to get
Returns:
flag at the specified position

bool Flagged  )  const
 

Returns true if the \Flagged flag was present in the response.

The \Flagged flag indicates that the message has been marked for special attention (e.g. the messages is urgent).

Returns:
true if \Flagged flag was present; otherwise, false

unsigned NumFlags  )  const
 

Gets the number of flags.

You may use this member function and the FlagAt() member function to discover all the flags in the response. For the most common flags, you may use the convenience member functions Answered(), Flagged(), Deleted(), Seen(), and Draft() to learn if those flags are in the response.

Returns:
number of flags in the response

FlagsResponse & operator= const FlagsResponse other  ) 
 

Assignment operator.

Parameters:
other other object to copy
Returns:
*this

bool Seen  )  const
 

Returns true if the \Seen flag was present in the response.

The \Seen flag indicates that the message has been seen by the client.

Returns:
true if \Seen flag was present; otherwise, false

void SetParams const char *  str  ) 
 

Sets parameters for the response.

Only the parser should call this function.

Parameters:
str string that contains unparsed parameters

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