Search for usage in LXR

KMime::Headers::Base Class Referenceabstract

#include <kmime_headers.h>

Inheritance diagram for KMime::Headers::Base:

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 clear ()=0
virtual void from7BitString (const char *s, size_t len)
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
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.

Definition at line 96 of file kmime_headers.h.

Member Typedef Documentation

◆ List

A vector of headers.

Definition at line 102 of file kmime_headers.h.

Constructor & Destructor Documentation

◆ Base()

KMime::Headers::Base::Base ( )

Creates an empty header.

Definition at line 93 of file kmime_headers.cpp.

◆ ~Base()

KMime::Headers::Base::~Base ( )


Definition at line 102 of file kmime_headers.cpp.

Member Function Documentation

◆ as7BitString()

◆ asUnicodeString()

virtual QString KMime::Headers::Base::asUnicodeString ( ) const
pure virtual

Returns the decoded content of the header without the header-type.

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::Unstructured, KMime::Headers::Generics::Structured, KMime::Headers::Generics::MailboxList, KMime::Headers::Generics::AddressList, KMime::Headers::Generics::PhraseList, KMime::Headers::Generics::DotAtom, KMime::Headers::MailCopiesTo, KMime::Headers::Newsgroups, and KMime::Headers::Lines.

◆ clear()

◆ from7BitString()

void KMime::Headers::Base::from7BitString ( const char * s,
size_t len )

Parses the given string.

Take care of RFC2047-encoded strings.

sThe encoded header data.

Reimplemented in KMime::Headers::Generics::Unstructured, and KMime::Headers::Generics::Structured.

Definition at line 108 of file kmime_headers.cpp.

◆ fromUnicodeString()

virtual void KMime::Headers::Base::fromUnicodeString ( const QString & s,
const QByteArray & b )
pure virtual

Parses the given string and set the charset.

sThe header data as unicode string.
bThe charset preferred for encoding.

Implemented in KMime::Headers::Generics::Unstructured, KMime::Headers::Generics::Structured, KMime::Headers::Generics::MailboxList, KMime::Headers::Generics::AddressList, and KMime::Headers::Newsgroups.

◆ is()

bool KMime::Headers::Base::is ( const char * t) const

Checks if this header is of type t.

Definition at line 132 of file kmime_headers.cpp.

◆ isEmpty()

◆ isMimeHeader()

bool KMime::Headers::Base::isMimeHeader ( ) const

Checks if this header is a MIME header.

Definition at line 137 of file kmime_headers.cpp.

◆ rfc2047Charset()

QByteArray KMime::Headers::Base::rfc2047Charset ( ) const

Returns the charset that is used for RFC2047-encoding.

Definition at line 113 of file kmime_headers.cpp.

◆ setRFC2047Charset()

void KMime::Headers::Base::setRFC2047Charset ( const QByteArray & cs)

Sets the charset for RFC2047-encoding.

csThe new charset used for RFC2047 encoding.

Definition at line 122 of file kmime_headers.cpp.

◆ type()

const char * KMime::Headers::Base::type ( ) const

Returns the type of this header (e.g.


Reimplemented in KMime::Headers::Generic.

Definition at line 127 of file kmime_headers.cpp.

◆ typeIntro()

QByteArray KMime::Headers::Base::typeIntro ( ) const

Helper method, returns the header prefix including ":".

Definition at line 142 of file kmime_headers.cpp.

The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri May 17 2024 11:49:32 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.