kmail
bodypartformatter.cpp File Reference
#include "bodypartformatter.h"
#include "bodypartformatterfactory_p.h"
#include "interfaces/bodypartformatter.h"
#include "objecttreeparser.h"
#include "partNode.h"
#include <mimelib/enum.h>
#include <mimelib/string.h>
#include <mimelib/utility.h>
#include <kdebug.h>
#include <kasciistricmp.h>
Go to the source code of this file.
Defines | |
#define | CREATE_BODY_PART_FORMATTER(subtype) |
#define | DIM(x) sizeof(x) / sizeof(*x) |
Typedefs | |
typedef const KMail::BodyPartFormatter *(* | BodyPartFormatterCreator )() |
Functions | |
static const KMail::BodyPartFormatter * | createForApplication (const char *subtype) |
static const KMail::BodyPartFormatter * | createForImage (const char *) |
static const KMail::BodyPartFormatter * | createForMessage (const char *subtype) |
static const KMail::BodyPartFormatter * | createForMultiPart (const char *subtype) |
static const KMail::BodyPartFormatter * | createForText (const char *subtype) |
Variables | |
static const SubtypeBuiltin | anySubtypeBuiltins [] |
static const SubtypeBuiltin | applicationSubtypeBuiltins [] |
struct { | |
unsigned int num_subtypes | |
const SubtypeBuiltin * subtypes | |
const char * type | |
} | builtins [] |
static const SubtypeBuiltin | imageSubtypeBuiltins [] |
static const SubtypeBuiltin | messageSubtypeBuiltins [] |
static const SubtypeBuiltin | multipartSubtypeBuiltins [] |
static const SubtypeBuiltin | textSubtypeBuiltins [] |
Define Documentation
#define CREATE_BODY_PART_FORMATTER | ( | subtype | ) |
Value:
class subtype##BodyPartFormatter : public KMail::BodyPartFormatter { \ static const subtype##BodyPartFormatter * self; \ public: \ bool process( KMail::ObjectTreeParser *, partNode *, KMail::ProcessResult & ) const; \ static const KMail::BodyPartFormatter * create() { \ if ( !self ) \ self = new subtype##BodyPartFormatter(); \ return self; \ } \ }; \ \ const subtype##BodyPartFormatter * subtype##BodyPartFormatter::self; \ \ bool subtype##BodyPartFormatter::process( KMail::ObjectTreeParser * otp, partNode * node, KMail::ProcessResult & result ) const { \ return otp->process##subtype##Subtype( node, result ); \ }
Definition at line 91 of file bodypartformatter.cpp.
#define DIM | ( | x | ) | sizeof(x) / sizeof(*x) |
Definition at line 189 of file bodypartformatter.cpp.
Typedef Documentation
typedef const KMail::BodyPartFormatter*(* BodyPartFormatterCreator)() |
Definition at line 138 of file bodypartformatter.cpp.
Function Documentation
static const KMail::BodyPartFormatter* createForApplication | ( | const char * | subtype | ) | [static] |
Definition at line 275 of file bodypartformatter.cpp.
static const KMail::BodyPartFormatter* createForImage | ( | const char * | ) | [static] |
Definition at line 242 of file bodypartformatter.cpp.
static const KMail::BodyPartFormatter* createForMessage | ( | const char * | subtype | ) | [static] |
Definition at line 246 of file bodypartformatter.cpp.
static const KMail::BodyPartFormatter* createForMultiPart | ( | const char * | subtype | ) | [static] |
Definition at line 252 of file bodypartformatter.cpp.
static const KMail::BodyPartFormatter* createForText | ( | const char * | subtype | ) | [static] |
Definition at line 216 of file bodypartformatter.cpp.
Variable Documentation
const SubtypeBuiltin anySubtypeBuiltins[] [static] |
Initial value:
{
{ "*", &AnyTypeBodyPartFormatter::create },
}
Definition at line 182 of file bodypartformatter.cpp.
const SubtypeBuiltin applicationSubtypeBuiltins[] [static] |
Initial value:
{ { "octet-stream", &ApplicationOctetStreamBodyPartFormatter::create }, { "pkcs7-mime", &ApplicationPkcs7MimeBodyPartFormatter::create }, { "x-pkcs7-mime", &ApplicationPkcs7MimeBodyPartFormatter::create }, { "vnd.de.bund.bsi.chiasmus-text", &ApplicationChiasmusTextBodyPartFormatter::create }, { "pgp", &ApplicationPgpBodyPartFormatter::create }, { "ms-tnef", &ApplicationMsTnefBodyPartFormatter::create } }
Definition at line 145 of file bodypartformatter.cpp.
struct { ... } builtins[] [static] |
const SubtypeBuiltin imageSubtypeBuiltins[] [static] |
Initial value:
{
{ "*", &ImageTypeBodyPartFormatter::create },
}
Definition at line 178 of file bodypartformatter.cpp.
const SubtypeBuiltin messageSubtypeBuiltins[] [static] |
Initial value:
{
{ "rfc822", &MessageRfc822BodyPartFormatter::create },
}
Definition at line 174 of file bodypartformatter.cpp.
const SubtypeBuiltin multipartSubtypeBuiltins[] [static] |
Initial value:
{ { "mixed", &MultiPartMixedBodyPartFormatter::create }, { "alternative", &MultiPartAlternativeBodyPartFormatter::create }, { "signed", &MultiPartSignedBodyPartFormatter::create }, { "encrypted", &MultiPartEncryptedBodyPartFormatter::create }, }
Definition at line 163 of file bodypartformatter.cpp.
unsigned int num_subtypes |
Definition at line 194 of file bodypartformatter.cpp.
const SubtypeBuiltin* subtypes |
Definition at line 193 of file bodypartformatter.cpp.
const SubtypeBuiltin textSubtypeBuiltins[] [static] |
Initial value:
{ { "html", &TextHtmlBodyPartFormatter::create }, { "x-vcard", &AnyTypeBodyPartFormatter::create }, { "vcard", &AnyTypeBodyPartFormatter::create }, { "rtf", &AnyTypeBodyPartFormatter::create }, { "*", &TextPlainBodyPartFormatter::create }, }
Definition at line 154 of file bodypartformatter.cpp.
const char* type |
Definition at line 192 of file bodypartformatter.cpp.