VMime
importanceHelper Class Reference

Public Types

enum  Importance {
  IMPORTANCE_HIGHEST, IMPORTANCE_HIGH, IMPORTANCE_NORMAL, IMPORTANCE_LOW,
  IMPORTANCE_LOWEST
}
 

Static Public Member Functions

static void resetImportance (shared_ptr< message > msg)
 
static void resetImportanceHeader (shared_ptr< header > hdr)
 
static Importance getImportance (shared_ptr< const message > msg)
 
static Importance getImportanceHeader (shared_ptr< const header > hdr)
 
static void setImportance (shared_ptr< message > msg, const Importance i)
 
static void setImportanceHeader (shared_ptr< header > hdr, const Importance i)
 

Detailed Description

Deals with setting and retrieving message importance (also known as priority).

Basically, it wraps the use of the 'X-Priority' (non standard) and 'Importance' (RFC-1327, RFC-1911) fields.

Member Enumeration Documentation

enum Importance

Different levels of importance.

Enumerator
IMPORTANCE_HIGHEST 
IMPORTANCE_HIGH 
IMPORTANCE_NORMAL 
IMPORTANCE_LOW 
IMPORTANCE_LOWEST 

Member Function Documentation

importanceHelper::Importance getImportance ( shared_ptr< const message msg)
static

Return the importance of the specified message.

Parameters
msgmessage from which to retrieve importance
Returns
importance of the message, or default importance is no information about importance is given in the message

References importanceHelper::getImportanceHeader().

importanceHelper::Importance getImportanceHeader ( shared_ptr< const header hdr)
static

Return the importance of a message, given its header.

Parameters
hdrmessage header from which to retrieve importance
Returns
importance of the message, or default importance is no information about importance is given in the message

References text::getWholeBuffer(), importanceHelper::IMPORTANCE_HIGH, importanceHelper::IMPORTANCE_HIGHEST, importanceHelper::IMPORTANCE_LOW, importanceHelper::IMPORTANCE_LOWEST, importanceHelper::IMPORTANCE_NORMAL, stringUtils::toLower(), and stringUtils::trim().

Referenced by importanceHelper::getImportance().

void resetImportance ( shared_ptr< message msg)
static

Reset the importance of the message to the default importance.

Parameters
msgmessage on which to reset importance

References importanceHelper::resetImportanceHeader().

void resetImportanceHeader ( shared_ptr< header hdr)
static

Reset the importance of a message to the default importance.

Parameters
hdrmessage header on which to reset importance

Referenced by importanceHelper::resetImportance().

void setImportance ( shared_ptr< message msg,
const Importance  i 
)
static

Set the importance of the specified message.

Parameters
msgmessage on which to set importance
inew message importance

References importanceHelper::setImportanceHeader().

void setImportanceHeader ( shared_ptr< header hdr,
const Importance  i 
)
static

Set the importance of a message, given its header.

Parameters
hdrmessage header on which to set importance
inew message importance

References importanceHelper::IMPORTANCE_HIGH, importanceHelper::IMPORTANCE_HIGHEST, importanceHelper::IMPORTANCE_LOW, importanceHelper::IMPORTANCE_LOWEST, and importanceHelper::IMPORTANCE_NORMAL.

Referenced by importanceHelper::setImportance().


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