KMime::Headers::Base
#include <headers.h>
Public Types | |
typedef QList< KMime::Headers::Base * > | List |
Public Member Functions | |
Base () | |
virtual | ~Base () |
virtual QByteArray | as7BitString (bool withHeaderType=true) const =0 |
virtual QString | asUnicodeString () const =0 |
virtual void | from7BitString (QByteArrayView s)=0 |
virtual void | fromUnicodeString (const QString &s)=0 |
void | fromUnicodeString (const QString &s, const QByteArray &b) |
bool | is (QByteArrayView t) const |
virtual bool | isEmpty () const =0 |
QByteArray | rfc2047Charset () const |
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.
Member Typedef Documentation
◆ List
Constructor & Destructor Documentation
◆ Base()
KMime::Headers::Base::Base | ( | ) |
Creates an empty header.
Definition at line 90 of file headers.cpp.
◆ ~Base()
|
virtual |
Destructor.
Definition at line 99 of file headers.cpp.
Member Function Documentation
◆ as7BitString()
|
nodiscardpure virtual |
Returns the encoded header.
- Parameters
-
withHeaderType Specifies whether the header-type should be included.
Implemented in KMime::Headers::ContentDisposition, KMime::Headers::ContentTransferEncoding, KMime::Headers::ContentType, KMime::Headers::Control, KMime::Headers::Date, KMime::Headers::Generics::AddressList, KMime::Headers::Generics::DotAtom, KMime::Headers::Generics::Ident, KMime::Headers::Generics::MailboxList, KMime::Headers::Generics::Parametrized, KMime::Headers::Generics::PhraseList, KMime::Headers::Generics::SingleIdent, KMime::Headers::Generics::Token, KMime::Headers::Generics::Unstructured, KMime::Headers::Lines, KMime::Headers::MailCopiesTo, KMime::Headers::Newsgroups, and KMime::Headers::ReturnPath.
◆ asUnicodeString()
|
nodiscardpure 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::Generics::AddressList, KMime::Headers::Generics::DotAtom, KMime::Headers::Generics::MailboxList, KMime::Headers::Generics::PhraseList, KMime::Headers::Generics::Structured, KMime::Headers::Generics::Unstructured, KMime::Headers::Lines, KMime::Headers::MailCopiesTo, and KMime::Headers::Newsgroups.
◆ from7BitString()
|
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.
◆ fromUnicodeString() [1/2]
|
pure virtual |
Parses the given Unicode representation of the header content.
- Parameters
-
s The header data as Unicode string.
Implemented in KMime::Headers::Generics::AddressList, KMime::Headers::Generics::MailboxList, KMime::Headers::Generics::Structured, KMime::Headers::Generics::Unstructured, and KMime::Headers::Newsgroups.
◆ fromUnicodeString() [2/2]
|
inline |
◆ is()
|
nodiscard |
Checks if this header is of type t
.
Definition at line 124 of file headers.cpp.
◆ isEmpty()
|
nodiscardpure virtual |
Checks if this header contains any data.
Implemented in KMime::Headers::ContentDisposition, KMime::Headers::ContentTransferEncoding, KMime::Headers::ContentType, KMime::Headers::Control, KMime::Headers::Date, KMime::Headers::Generic, KMime::Headers::Generics::AddressList, KMime::Headers::Generics::DotAtom, KMime::Headers::Generics::Ident, KMime::Headers::Generics::MailboxList, KMime::Headers::Generics::Parametrized, KMime::Headers::Generics::PhraseList, KMime::Headers::Generics::SingleIdent, KMime::Headers::Generics::Token, KMime::Headers::Generics::Unstructured, KMime::Headers::Lines, KMime::Headers::MailCopiesTo, KMime::Headers::Newsgroups, and KMime::Headers::ReturnPath.
◆ rfc2047Charset()
|
nodiscard |
Returns the charset that is used for RFC2047-encoding.
Definition at line 105 of file headers.cpp.
◆ setRFC2047Charset()
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 114 of file headers.cpp.
◆ type()
|
nodiscardvirtual |
Returns the type of this header (e.g.
"From").
Reimplemented in KMime::Headers::Generic.
Definition at line 119 of file headers.cpp.
◆ typeIntro()
|
nodiscardprotected |
Helper method, returns the header prefix including ":".
Definition at line 129 of file headers.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 22 2024 12:02:08 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.