VMime
folderAttributes Class Reference
Inheritance diagram for folderAttributes:
Collaboration diagram for folderAttributes:

Public Types

enum  Types { TYPE_CONTAINS_FOLDERS = (1 << 0), TYPE_CONTAINS_MESSAGES = (1 << 1) }
 
enum  Flags { FLAG_HAS_CHILDREN = (1 << 0), FLAG_NO_OPEN = (1 << 1) }
 
enum  SpecialUses {
  SPECIALUSE_NONE, SPECIALUSE_ALL, SPECIALUSE_ARCHIVE, SPECIALUSE_DRAFTS,
  SPECIALUSE_FLAGGED, SPECIALUSE_JUNK, SPECIALUSE_SENT, SPECIALUSE_TRASH,
  SPECIALUSE_IMPORTANT
}
 

Public Member Functions

 folderAttributes ()
 
 folderAttributes (const folderAttributes &attribs)
 
int getType () const
 
void setType (const int type)
 
int getSpecialUse () const
 
void setSpecialUse (const int use)
 
int getFlags () const
 
void setFlags (const int flags)
 
bool hasFlag (const int flag)
 
const std::vector< stringgetUserFlags () const
 
void setUserFlags (const std::vector< string > &flags)
 
bool hasUserFlag (const string &flag)
 

Additional Inherited Members

- Protected Member Functions inherited from object
 object ()
 
 object (const object &)
 
objectoperator= (const object &)
 
virtual ~object ()
 

Detailed Description

Holds a set of attributes for a folder.

Member Enumeration Documentation

enum Flags

Folder flags.

Enumerator
FLAG_HAS_CHILDREN 

Folder contains subfolders.

FLAG_NO_OPEN 

Folder cannot be open.

Folder special uses.

Not all protocols support this. At the current time, only IMAP supports this, if the server has the SPECIAL-USE capability.

Enumerator
SPECIALUSE_NONE 

User folder, no special use (or unknown).

SPECIALUSE_ALL 

Virtual folder containing all messages.

SPECIALUSE_ARCHIVE 

Folder is used to archives messages (server-dependent).

SPECIALUSE_DRAFTS 

Folder is used to hold draft messages - typically, messages that are being composed but have not yet been sent.

SPECIALUSE_FLAGGED 

Virtual folder containing all messages which are marked in some way as "important" or "flagged".

SPECIALUSE_JUNK 

Folder is used to hold junk mail.

SPECIALUSE_SENT 

Folder is is used to hold copies of messages that have been sent.

SPECIALUSE_TRASH 

Folder is used to hold messages that have been deleted or marked for deletion (may be a virtual folder).

SPECIALUSE_IMPORTANT 

Folder contains messages that are likely important to the user.

enum Types

Folder types.

Enumerator
TYPE_CONTAINS_FOLDERS 

Folder can contain folders.

TYPE_CONTAINS_MESSAGES 

Folder can contain messages.

Constructor & Destructor Documentation

Construct a new folderAttributes object with the default set of attributes.

folderAttributes ( const folderAttributes attribs)

Construct a new folderAttributes object by copying an existing object.

Parameters
attribsobject to copy

Member Function Documentation

int getFlags ( ) const

Return the standard (non-user) flags of the folder.

Returns
combination of one ore more folder flags (see folderAttributes::Flags enum)

Referenced by folder::getFlags().

int getSpecialUse ( ) const

Return the special use of the folder.

Not all protocols support this. At the current time, only IMAP supports this, if the server has the SPECIAL-USE capability.

Returns
a value which indicates a special use (see folderAttributes::SpecialUses enum)

Referenced by IMAPFolder::create().

int getType ( ) const

Return the type of the folder.

Returns
combination of one ore more folder types (see folderAttributes::Types enum)

Referenced by IMAPFolder::create(), and folder::getType().

const std::vector< string > getUserFlags ( ) const

Set the user-defined flags of the folder.

Returns
a list of user-defined flags
bool hasFlag ( const int  flag)

Return whether the specified folder flag(s) is/are set.

Parameters
flagcombination of one ore more folder flags (see folderAttributes::Flags enum)
Returns
true if the specified flags are all set, or false otherwise
bool hasUserFlag ( const string flag)

Return whether the specified user-defined flag is set.

Returns
true if the specified flag is set, or false otherwise
void setFlags ( const int  flags)

Set the standard (non-user) flags of the folder.

Parameters
typecombination of one ore more folder flags (see folderAttributes::Flags enum)

Referenced by POP3Folder::getAttributes(), maildirFolder::getAttributes(), and IMAPFolder::getAttributes().

void setSpecialUse ( const int  use)

Set the special use of the folder.

Not all protocols support this. At the current time, only IMAP supports this, if the server has the SPECIAL-USE capability.

Parameters
usea value which indicates a special use (see folderAttributes::SpecialUses enum)
void setType ( const int  type)

Set the type of the folder.

Parameters
typecombination of one ore more folder types (see folderAttributes::Types enum)

Referenced by POP3Folder::getAttributes(), maildirFolder::getAttributes(), and IMAPFolder::getAttributes().

void setUserFlags ( const std::vector< string > &  flags)

Set the user-defined flags of the folder.

Parameters
flagsa list of user-defined flags

The documentation for this class was generated from the following files: