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

Public Types

enum  PredefinedFetchAttributes {
  ENVELOPE = (1 << 0), STRUCTURE = (1 << 1), CONTENT_INFO = (1 << 2), FLAGS = (1 << 3),
  SIZE = (1 << 4), FULL_HEADER = (1 << 5), UID = (1 << 6), IMPORTANCE = (1 << 7),
  CUSTOM = (1 << 16)
}
 

Public Member Functions

 fetchAttributes ()
 
 fetchAttributes (const int attribs)
 
 fetchAttributes (const fetchAttributes &attribs)
 
void add (const int attribs)
 
void add (const string &header)
 
bool has (const int attribs) const
 
bool has (const string &header) const
 
VMIME_DEPRECATED bool operator& (const int attribs) const
 
const std::vector< stringgetHeaderFields () const
 

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 to fetch for a message.

Member Enumeration Documentation

Predefined attributes that can be fetched.

Enumerator
ENVELOPE 

Sender, recipients, date, subject.

STRUCTURE 

MIME structure (body parts).

CONTENT_INFO 

Top-level content type.

FLAGS 

Message flags.

SIZE 

Message size (exact or estimated).

FULL_HEADER 

Full RFC-[2]822 header.

UID 

Unique identifier (protocol specific).

IMPORTANCE 

Header fields suitable for use with misc::importanceHelper.

CUSTOM 

Reserved for future use.

Constructor & Destructor Documentation

Constructs an empty fetchAttributes object.

fetchAttributes ( const int  attribs)

Constructs a new fetchAttributes object by specifying one or more predefined objects.

Parameters
attribsone or more OR-ed values of the PredefinedFetchAttributes enum
fetchAttributes ( const fetchAttributes attribs)

Constructs a new fetchAttributes object by copying an existing object.

Parameters
attribsobject to copy

Member Function Documentation

void add ( const int  attribs)

Adds the specified predefined attribute to the set of attributes to fetch.

Parameters
attribsone or more OR-ed values of the PredefinedFetchAttributes enum

Referenced by IMAPFolder::getAndFetchMessages().

void add ( const string header)

Adds the specified header field to the set of attributes to fetch.

Fetching custom header fields is not supported by all protocols. At this time, only IMAP supports this.

Parameters
headername of header field (eg. "X-Mailer")

References stringUtils::toLower().

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

Returns a list of header fields to fetch.

Returns
list of header names (eg. "X-Mailer")
bool has ( const int  attribs) const

Returns true if the set contains the specified attribute(s).

Parameters
attribsone or more OR-ed values of the PredefinedFetchAttributes enum
Returns
true if the specified attributes are to be fetched

Referenced by POP3Folder::fetchMessage(), and POP3Folder::fetchMessages().

bool has ( const string header) const

Returns true if the set contains the specified header field.

Parameters
headername of header field (eg. "X-Mailer")
Returns
true if the specified header fields are to be fetched

References stringUtils::toLower().

VMIME_DEPRECATED bool operator& ( const int  attribs) const

Returns true if the set contains the specified attribute(s).

Deprecated:
Use the has() methods instead
Parameters
attribsone or more OR-ed values of the PredefinedFetchAttributes enum
Returns
true if the specified attributes are to be fetched

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