libkmime

KMime::HeaderParsing Namespace Reference


Functions

bool parseEncodedWord (const char *&scursor, const char *const send, QString &result, QCString &language) KDE_EXPORT
static void eatWhiteSpace (const char *&scursor, const char *const send)
bool parseAtom (const char *&scursor, const char *const send, QString &result, bool allow8Bit=false) KDE_EXPORT
bool parseAtom (const char *&scursor, const char *const send, QPair< const char *, int > &result, bool allow8Bit)
bool parseToken (const char *&scursor, const char *const send, QString &result, bool allow8Bit=false) KDE_EXPORT
bool parseToken (const char *&scursor, const char *const send, QPair< const char *, int > &result, bool allow8Bit)
bool parseGenericQuotedString (const char *&scursor, const char *const send, QString &result, bool isCRLF, const char openChar='"', const char closeChar='"') KDE_EXPORT
bool parseComment (const char *&scursor, const char *const send, QString &result, bool isCRLF=false, bool reallySave=true) KDE_EXPORT
bool parsePhrase (const char *&scursor, const char *const send, QString &result, bool isCRLF=false) KDE_EXPORT
bool parseDotAtom (const char *&scursor, const char *const send, QString &result, bool isCRLF=false) KDE_EXPORT
void eatCFWS (const char *&scursor, const char *const send, bool isCRLF) KDE_EXPORT
bool parseDomain (const char *&scursor, const char *const send, QString &result, bool isCRLF)
bool parseObsRoute (const char *&scursor, const char *const send, QStringList &result, bool isCRLF, bool save)
bool parseAddrSpec (const char *&scursor, const char *const send, AddrSpec &result, bool isCRLF)
bool parseAngleAddr (const char *&scursor, const char *const send, AddrSpec &result, bool isCRLF)
bool parseMailbox (const char *&scursor, const char *const send, Mailbox &result, bool isCRLF)
bool parseGroup (const char *&scursor, const char *const send, Address &result, bool isCRLF)
bool parseAddress (const char *&scursor, const char *const send, Address &result, bool isCRLF)
bool parseAddressList (const char *&scursor, const char *const send, AddressList &result, bool isCRLF)
bool parseParameter (const char *&scursor, const char *const send, QPair< QString, QStringOrQPair > &result, bool isCRLF)
bool parseRawParameterList (const char *&scursor, const char *const send, QMap< QString, QStringOrQPair > &result, bool isCRLF)
static void decodeRFC2231Value (Codec *&rfc2231Codec, QTextCodec *&textcodec, bool isContinuation, QString &value, QPair< const char *, int > &source)
bool parseParameterList (const char *&scursor, const char *const send, QMap< QString, QString > &result, bool isCRLF)
static bool parseDayName (const char *&scursor, const char *const send)
static bool parseMonthName (const char *&scursor, const char *const send, int &result)
static bool parseAlphaNumericTimeZone (const char *&scursor, const char *const send, long int &secsEastOfGMT, bool &timeZoneKnown)
static int parseDigits (const char *&scursor, const char *const send, int &result)
static bool parseTimeOfDay (const char *&scursor, const char *const send, int &hour, int &min, int &sec, bool isCRLF=false)
bool parseTime (const char *&scursor, const char *send, int &hour, int &min, int &sec, long int &secsEastOfGMT, bool &timeZoneKnown, bool isCRLF)
bool parseDateTime (const char *&scursor, const char *const send, Types::DateTime &result, bool isCRLF)
bool parseParameter (const char *&scursor, const char *const send, QPair< QString, Types::QStringOrQPair > &result, bool isCRLF=false) KDE_EXPORT
bool parseRawParameterList (const char *&scursor, const char *const send, QMap< QString, Types::QStringOrQPair > &result, bool isCRLF=false) KDE_EXPORT

Variables

static QString asterisk = QString::fromLatin1("*0*",1)
static QString asteriskZero = QString::fromLatin1("*0*",2)
static const char * stdDayNames []
static const int stdDayNamesLen = sizeof stdDayNames / sizeof *stdDayNames
static const char * stdMonthNames []
static const int stdMonthNamesLen
struct {
   const char *   KMime::HeaderParsing::tzName
   long int   KMime::HeaderParsing::secsEastOfGMT
timeZones []
static const int timeZonesLen = sizeof timeZones / sizeof *timeZones

Function Documentation

void KMime::HeaderParsing::eatCFWS ( const char *&  scursor,
const char *const  send,
bool  isCRLF 
)

Eats comment-folding-white-space, skips whitespace, folding and comments (even nested ones) and stops at the next non-CFWS character.

After calling this function, you should check whether scursor == send (end of header reached).

If a comment with unbalanced parantheses is encountered, scursor is being positioned on the opening '(' of the outmost comment.

Definition at line 689 of file kmime_header_parsing.cpp.

bool KMime::HeaderParsing::parseAtom ( const char *&  scursor,
const char *const  send,
QString &  result,
bool  allow8Bit = false 
)

You may or may not have already started parsing into the atom.

This function will go on where you left off.

Definition at line 252 of file kmime_header_parsing.cpp.

bool KMime::HeaderParsing::parseComment ( const char *&  scursor,
const char *const  send,
QString &  result,
bool  isCRLF = false,
bool  reallySave = true 
)

scursor must be positioned right after the opening '('

Definition at line 444 of file kmime_header_parsing.cpp.

bool KMime::HeaderParsing::parseDotAtom ( const char *&  scursor,
const char *const  send,
QString &  result,
bool  isCRLF = false 
)

You may or may not have already started parsing into the initial atom, but not up to it's end.

Definition at line 643 of file kmime_header_parsing.cpp.

bool KMime::HeaderParsing::parseEncodedWord ( const char *&  scursor,
const char *const  send,
QString &  result,
QCString &  language 
)

Parse the encoded word in str pointed to by pos (actually, pos-2, see below).

Parameters:
str the source string
pos in: the starting position (must already point to the character following the initial '=?'; out: the new postion
ok only out: if true, the encoded-word was correct up to and including the encoding specifier. The encoded-text is quite generously parsed and ok is still set to true when e.g. the encoded-word appears to be truncated or contains whitespace.
Returns:
the decoded string the encoded word represented.

Definition at line 82 of file kmime_header_parsing.cpp.

bool KMime::HeaderParsing::parseGenericQuotedString ( const char *&  scursor,
const char *const  send,
QString &  result,
bool  isCRLF,
const char  openChar = '"',
const char  closeChar = '"' 
)

scursor must be positioned after the opening openChar.

Definition at line 344 of file kmime_header_parsing.cpp.

bool KMime::HeaderParsing::parsePhrase ( const char *&  scursor,
const char *const  send,
QString &  result,
bool  isCRLF = false 
)

You may or may not have already started parsing into the phrase, but only if it starts with atext.

If you setup this function to parse a phrase starting with an encoded-word or quoted-string, scursor has to point to the char introducing the encoded-word or quoted-string, resp.

Definition at line 500 of file kmime_header_parsing.cpp.

bool KMime::HeaderParsing::parseToken ( const char *&  scursor,
const char *const  send,
QString &  result,
bool  allow8Bit = false 
)

You may or may not have already started parsing into the token.

This function will go on where you left off.

Definition at line 292 of file kmime_header_parsing.cpp.


Variable Documentation

const char* KMime::HeaderParsing::stdDayNames[] [static]

Initial value:

 {
  "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"
}

Definition at line 1393 of file kmime_header_parsing.cpp.

const char* KMime::HeaderParsing::stdMonthNames[] [static]

Initial value:

 {
  "Jan", "Feb", "Mar", "Apr", "May", "Jun",
  "Jul", "Aug", "Sep", "Oct", "Nov", "Dez"
}

Definition at line 1414 of file kmime_header_parsing.cpp.

Initial value:

  sizeof stdMonthNames / sizeof *stdMonthNames

Definition at line 1418 of file kmime_header_parsing.cpp.

KDE Home | KDE Accessibility Home | Description of Access Keys