KMime

headers.cpp File Reference
#include "headers.h"
#include "headers_p.h"
#include "headerparsing_p.h"
#include "util.h"
#include "util_p.h"
#include "codecs_p.h"
#include "headerfactory_p.h"
#include "kmime_debug.h"
#include "warning_p.h"
#include <KCodecs>
#include <cassert>
#include <cctype>
Include dependency graph for headers.cpp:

Go to the source code of this file.

Macros

#define kmime_mk_dptr_ctor(subclass, baseclass)
 
#define kmime_mk_trivial_ctor(subclass, baseclass)
 
#define kmime_mk_trivial_ctor_with_dptr(subclass, baseclass)
 
#define kmime_mk_trivial_ctor_with_name(subclass, baseclass, name)
 
#define kmime_mk_trivial_ctor_with_name_and_dptr(subclass, baseclass, name)
 

Functions

BaseKMime::Headers::createHeader (QByteArrayView type)
 
 KMime::Headers::Generics::kmime_mk_dptr_ctor (Structured, Base) Structured
 
 KMime::Headers::Generics::kmime_mk_trivial_ctor_with_dptr (MailboxList, Structured) kmime_mk_dptr_ctor(MailboxList
 
 KMime::Headers::kmime_mk_trivial_ctor_with_name_and_dptr (ContentID, SingleIdent, Content-ID) kmime_mk_dptr_ctor(ContentID
 
static bool KMime::Headers::Generics::stringToMailbox (const QByteArray &address, const QString &displayName, Types::Mailbox &mbox)
 

Variables

struct { 
 
   contentEncoding   KMime::Headers::e 
 
   const char *   KMime::Headers::s 
 
KMime::Headers::encTable [] 
 

Detailed Description

This file is part of the API for handling MIME data and defines the various header classes:

  • header's base class defining the common interface
  • generic base classes for different types of fields
  • incompatible, Structured-based field classes
  • compatible, Unstructured-based field classes

Defines the various headers classes.

Author(s)
the KMime authors (see AUTHORS file), Volker Krause <vkrau.nosp@m.se@k.nosp@m.de.or.nosp@m.g>

Definition in file headers.cpp.

Macro Definition Documentation

◆ kmime_mk_dptr_ctor

#define kmime_mk_dptr_ctor ( subclass,
baseclass )
Value:
subclass::subclass( subclass##Private *d ) : baseclass( d ) {}

Definition at line 77 of file headers.cpp.

◆ kmime_mk_trivial_ctor

#define kmime_mk_trivial_ctor ( subclass,
baseclass )
Value:
subclass::subclass() = default; \
subclass::~subclass() = default;

Definition at line 44 of file headers.cpp.

◆ kmime_mk_trivial_ctor_with_dptr

#define kmime_mk_trivial_ctor_with_dptr ( subclass,
baseclass )
Value:
subclass::subclass() : baseclass( new subclass##Private ) \
{ \
} \
\
subclass::~subclass() { \
Q_D(subclass); \
delete d; /* see comment above the BasePrivate class */ \
d_ptr = nullptr; \
}

Definition at line 50 of file headers.cpp.

◆ kmime_mk_trivial_ctor_with_name

#define kmime_mk_trivial_ctor_with_name ( subclass,
baseclass,
name )
Value:
kmime_mk_trivial_ctor( subclass, baseclass ) \
\
const char *subclass::type() const \
{ \
return staticType(); \
} \
const char *subclass::staticType() { return #name; }

Definition at line 63 of file headers.cpp.

◆ kmime_mk_trivial_ctor_with_name_and_dptr

#define kmime_mk_trivial_ctor_with_name_and_dptr ( subclass,
baseclass,
name )
Value:
kmime_mk_trivial_ctor_with_dptr( subclass, baseclass ) \
const char *subclass::type() const { return staticType(); } \
const char *subclass::staticType() { return #name; }

Definition at line 72 of file headers.cpp.

Function Documentation

◆ createHeader()

KMIME_EXPORT Base * KMime::Headers::createHeader ( QByteArrayView type)
nodiscard

Creates a header based on.

Parameters
type.If
typeis a known header type, the right object type will be created, otherwise a null pointer is returned.

Definition at line 2020 of file headers.cpp.

◆ kmime_mk_dptr_ctor()

KMime::Headers::Generics::kmime_mk_dptr_ctor ( Structured ,
Base  )

Definition at line 198 of file headers.cpp.

◆ stringToMailbox()

static bool KMime::Headers::Generics::stringToMailbox ( const QByteArray & address,
const QString & displayName,
Types::Mailbox & mbox )
static

Definition at line 232 of file headers.cpp.

Variable Documentation

◆ e

contentEncoding KMime::Headers::e

Definition at line 1851 of file headers.cpp.

◆ [struct]

struct { ... } KMime::Headers::encTable[]
Initial value:
= {
{ "7Bit", CE7Bit },
{ "8Bit", CE8Bit },
{ "quoted-printable", CEquPr },
{ "base64", CEbase64 },
{ "x-uuencode", CEuuenc },
{ "binary", CEbinary },
}
@ CE8Bit
8bit
Definition headers.h:54
@ CEbase64
base64
Definition headers.h:56
@ CE7Bit
7bit
Definition headers.h:53
@ CEbinary
binary
Definition headers.h:58
@ CEquPr
quoted-printable
Definition headers.h:55
@ CEuuenc
uuencode
Definition headers.h:57

◆ s

const char* KMime::Headers::s

Definition at line 1850 of file headers.cpp.

This file is part of the KDE documentation.
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.