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

FlagsData Class Reference

List of all members.

Detailed Description

FlagsData is a class that contains the data of an IMAP4 FLAGS list.

An IMAP4 FETCH response may optionally contain a FLAGS item, which reports the flags that are set for the specified message. The flags that are specified in IMAP4rev1 include \Seen, \Answered, \Flagged, \Deleted, \Draft, and \Recent.

To check if a flag is set, use the member function Flag(const char*)const and supply the name of the flag as the argument. To iterate over all flags that are present, call the member function NumFlags() to discover how many flags are present, then call Flag(int)const to access each flag in the list.

See also:
Imap4Client::Store

Imap4Client::Fetch

Imap4Client::UidStore

Imap4Client::UidFetch

FetchResponse


Public Member Functions

 FlagsData ()
 Default constructor.
 FlagsData (const FlagsData &other)
 Copy constructor.
virtual ~FlagsData ()
 Destructor.
FlagsDataoperator= (const FlagsData &other)
 Assignment operator.
unsigned NumFlags () const
 Gets the number of flags.
const char * Flag (unsigned index) const
 Gets the flag at the specified position.
bool Flag (const char *which) const
 Returns true if the specified flag is present.
void ImportData (const ListItem *root)
 Called by the parser to set the data for this object.


Constructor & Destructor Documentation

FlagsData  ) 
 

Default constructor.

FlagsData const FlagsData other  ) 
 

Copy constructor.

Parameters:
other other object to copy

~FlagsData  )  [virtual]
 

Destructor.


Member Function Documentation

bool Flag const char *  which  )  const
 

Returns true if the specified flag is present.

Parameters:
which the flag to check for
Returns:
true if the specified flag is present

const char * Flag unsigned  index  )  const
 

Gets the flag at the specified position.

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

Parameters:
index position of flag to return (0-based)
Returns:
flag at the specified position

void ImportData const ListItem *  root  ) 
 

Called by the parser to set the data for this object.

Only the parser should call this function.

Parameters:
root root item of parse tree

unsigned NumFlags  )  const
 

Gets the number of flags.

Returns:
number of flags

FlagsData & operator= const FlagsData other  ) 
 

Assignment operator.

Parameters:
other other object to copy
Returns:
*this

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