KMIME Library
#include <kmime_headers.h>
Public Types | |
typedef QList < KMime::Headers::Base * > | List |
Public Member Functions | |
Base (KMime::Content *parent=0) | |
virtual | ~Base () |
virtual QByteArray | as7BitString (bool withHeaderType=true) const =0 |
virtual QString | asUnicodeString () const =0 |
virtual void | clear ()=0 |
QByteArray | defaultCharset () const |
bool | forceDefaultCharset () const |
virtual void | from7BitString (const QByteArray &s)=0 |
virtual void | fromUnicodeString (const QString &s, const QByteArray &b)=0 |
bool | is (const char *t) const |
virtual bool | isEmpty () const =0 |
bool | isMimeHeader () const |
bool | isXHeader () const |
KMime::Content * | parent () const |
QByteArray | rfc2047Charset () const |
void | setParent (KMime::Content *parent) |
void | setRFC2047Charset (const QByteArray &cs) |
virtual const char * | type () const |
Protected Member Functions | |
QByteArray | typeIntro () const |
Detailed Description
Baseclass of all header-classes.
It represents a header-field as described in RFC-822.
Definition at line 124 of file kmime_headers.h.
Member Typedef Documentation
typedef QList<KMime::Headers::Base*> KMime::Headers::Base::List |
A list of headers.
Definition at line 130 of file kmime_headers.h.
Constructor & Destructor Documentation
|
explicit |
Creates an empty header with a parent-content.
Definition at line 148 of file kmime_headers.cpp.
|
virtual |
Destructor.
Definition at line 162 of file kmime_headers.cpp.
Member Function Documentation
|
pure virtual |
Returns the encoded header.
- Parameters
-
withHeaderType Specifies whether the header-type should be included.
Implemented in KMime::Headers::Lines, KMime::Headers::Newsgroups, KMime::Headers::Date, KMime::Headers::Control, KMime::Headers::ContentDisposition, KMime::Headers::ContentType, KMime::Headers::MailCopiesTo, KMime::Headers::ReturnPath, KMime::Headers::Generics::Parametrized, KMime::Headers::Generics::DotAtom, KMime::Headers::Generics::PhraseList, KMime::Headers::Generics::Token, KMime::Headers::Generics::Ident, KMime::Headers::Generics::AddressList, KMime::Headers::Generics::MailboxList, and KMime::Headers::Generics::Unstructured.
|
pure virtual |
Returns the decoded content of the header without the header-type.
- Note
- The return value of this method should only be used when showing an address to the user. It is not guaranteed that fromUnicodeString( asUnicodeString(), ... ) will return the original string.
Implemented in KMime::Headers::Lines, KMime::Headers::Newsgroups, KMime::Headers::MailCopiesTo, KMime::Headers::Generics::DotAtom, KMime::Headers::Generics::PhraseList, KMime::Headers::Generics::AddressList, KMime::Headers::Generics::MailboxList, KMime::Headers::Generics::Structured, and KMime::Headers::Generics::Unstructured.
|
pure virtual |
Deletes.
Implemented in KMime::Headers::Lines, KMime::Headers::Newsgroups, KMime::Headers::Date, KMime::Headers::Control, KMime::Headers::Generic, KMime::Headers::ContentDisposition, KMime::Headers::ContentType, KMime::Headers::ContentTransferEncoding, KMime::Headers::MailCopiesTo, KMime::Headers::ReturnPath, KMime::Headers::Generics::Parametrized, KMime::Headers::Generics::DotAtom, KMime::Headers::Generics::PhraseList, KMime::Headers::Generics::Token, KMime::Headers::Generics::Ident, KMime::Headers::Generics::AddressList, KMime::Headers::Generics::MailboxList, and KMime::Headers::Generics::Unstructured.
QByteArray KMime::Headers::Base::defaultCharset | ( | ) | const |
Returns the default charset.
Definition at line 197 of file kmime_headers.cpp.
bool KMime::Headers::Base::forceDefaultCharset | ( | ) | const |
Returns if the default charset is mandatory.
Definition at line 192 of file kmime_headers.cpp.
|
pure virtual |
Parses the given string.
Take care of RFC2047-encoded strings.
- Parameters
-
s The encoded header data.
Implemented in KMime::Headers::Generics::Structured, and KMime::Headers::Generics::Unstructured.
|
pure virtual |
Parses the given string and set the charset.
- Parameters
-
s The header data as unicode string. b The charset preferred for encoding.
Implemented in KMime::Headers::Newsgroups, KMime::Headers::Generics::AddressList, KMime::Headers::Generics::MailboxList, KMime::Headers::Generics::Structured, and KMime::Headers::Generics::Unstructured.
bool KMime::Headers::Base::is | ( | const char * | t | ) | const |
Checks if this header is of type t
.
Definition at line 207 of file kmime_headers.cpp.
|
pure virtual |
Checks if this header contains any data.
Implemented in KMime::Headers::Lines, KMime::Headers::Newsgroups, KMime::Headers::Date, KMime::Headers::Control, KMime::Headers::Generic, KMime::Headers::ContentDisposition, KMime::Headers::ContentType, KMime::Headers::MailCopiesTo, KMime::Headers::ReturnPath, KMime::Headers::Generics::Parametrized, KMime::Headers::Generics::DotAtom, KMime::Headers::Generics::PhraseList, KMime::Headers::Generics::Token, KMime::Headers::Generics::Ident, KMime::Headers::Generics::AddressList, KMime::Headers::Generics::MailboxList, and KMime::Headers::Generics::Unstructured.
bool KMime::Headers::Base::isMimeHeader | ( | ) | const |
Checks if this header is a MIME header.
Definition at line 212 of file kmime_headers.cpp.
bool KMime::Headers::Base::isXHeader | ( | ) | const |
Checks if this header is a X-Header.
Definition at line 217 of file kmime_headers.cpp.
KMime::Content * KMime::Headers::Base::parent | ( | ) | const |
Returns the parent of this header.
Definition at line 168 of file kmime_headers.cpp.
QByteArray KMime::Headers::Base::rfc2047Charset | ( | ) | const |
Returns the charset that is used for RFC2047-encoding.
Definition at line 178 of file kmime_headers.cpp.
void KMime::Headers::Base::setParent | ( | KMime::Content * | parent | ) |
Sets the parent for this header to parent
.
Definition at line 173 of file kmime_headers.cpp.
void KMime::Headers::Base::setRFC2047Charset | ( | const QByteArray & | cs | ) |
Sets the charset for RFC2047-encoding.
- Parameters
-
cs The new charset used for RFC2047 encoding.
Definition at line 187 of file kmime_headers.cpp.
|
virtual |
Returns the type of this header (e.g.
"From").
Reimplemented in KMime::Headers::Generic.
Definition at line 202 of file kmime_headers.cpp.
|
protected |
Helper method, returns the header prefix including ":".
Definition at line 222 of file kmime_headers.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:00:11 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.