KMime::Headers::Generics::Structured Class Reference

Base class for structured header fields. More...

#include <kmime_headers.h>

Inheritance diagram for KMime::Headers::Generics::Structured:

List of all members.

Public Member Functions

 Structured (Content *p, const QString &s, const QByteArray &cs)
 Structured (Content *p, const QByteArray &s)
 Structured (Content *p=0)
virtual QString asUnicodeString () const
virtual void from7BitString (const QByteArray &s)
virtual void fromUnicodeString (const QString &s, const QByteArray &b)

Protected Member Functions

virtual bool parse (const char *&scursor, const char *const send, bool isCRLF=false)=0

Detailed Description

Base class for structured header fields.

This is the base class for all structured header fields. It contains parsing methods for all basic token types found in rfc2822.

Parsing

At the basic level, there are tokens & tspecials (rfc2045), atoms & specials, quoted-strings, domain-literals (all rfc822) and encoded-words (rfc2047).

As a special token, we have the comment. It is one of the basic tokens defined in rfc822, but it's parsing relies in part on the basic token parsers (e.g. comments may contain encoded-words). Also, most upper-level parsers (notably those for phrase and dot-atom) choose to ignore any comment when parsing.

Then there are the real composite tokens, which are made up of one or more of the basic tokens (and semantically invisible comments): phrases (rfc822 with rfc2047) and dot-atoms (rfc2822).

This finishes the list of supported token types. Subclasses will provide support for more higher-level tokens, where necessary, using these parsers.

Author:
Marc Mutz <mutz@kde.org>

Definition at line 324 of file kmime_headers.h.


Member Function Documentation

QString KMime::Headers::Generics::Structured::asUnicodeString (  )  const [virtual]
void KMime::Headers::Generics::Structured::from7BitString ( const QByteArray &  s  )  [virtual]

Parses the given string.

Take care of RFC2047-encoded strings.

Parameters:
s The encoded header data.

Implements KMime::Headers::Base.

Definition at line 317 of file kmime_headers.cpp.

void KMime::Headers::Generics::Structured::fromUnicodeString ( const QString &  s,
const QByteArray &  b 
) [virtual]

Parses the given string and set the charset.

Parameters:
s The header data as unicode string.
b The charset preferred for encoding.

Implements KMime::Headers::Base.

Reimplemented in KMime::Headers::Generics::MailboxList, KMime::Headers::Generics::AddressList, and KMime::Headers::Newsgroups.

Definition at line 332 of file kmime_headers.cpp.

virtual bool KMime::Headers::Generics::Structured::parse ( const char *&  scursor,
const char *const   send,
bool  isCRLF = false 
) [protected, pure virtual]

The documentation for this class was generated from the following files:
KDE Home | KDE Accessibility Home | Description of Access Keys