kmail

kmmsgbase.cpp File Reference

#include <config.h>
#include "globalsettings.h"
#include "kmmsgbase.h"
#include "kmfolderindex.h"
#include "kmfolder.h"
#include "kmheaders.h"
#include "kmmsgdict.h"
#include "messageproperty.h"
#include <kdebug.h>
#include <kglobal.h>
#include <kcharsets.h>
#include <kasciistringtools.h>
#include <kmdcodec.h>
#include <krfcdate.h>
#include <mimelib/mimepp.h>
#include <kmime_codecs.h>
#include <qtextcodec.h>
#include <qdeepcopy.h>
#include <qregexp.h>
#include <ctype.h>
#include <stdlib.h>
#include <unistd.h>

Include dependency graph for kmmsgbase.cpp:

Go to the source code of this file.


Defines

#define kmail_swap_16(x)   ((((x) >> 8) & 0xff) | (((x) & 0xff) << 8))
#define kmail_swap_32(x)
#define kmail_swap_64(x)
#define memcpy_networkorder(to, from, len)   swab((char *)(from), (char *)(to), len)
#define STORE_DATA(type, x)   STORE_DATA_LEN(type, &x, sizeof(x), false)
#define STORE_DATA_LEN(type, x, len, network_order)

Functions

static void swapEndian (QString &str)

Variables

static const QCString especials = "()<>@,;:\"/[]?.= \033"
static uchar * g_chunk = 0
static int g_chunk_length = 0
static int g_chunk_offset = 0
static QStringList sForwardSubjPrefixes
static bool sReplaceForwSubjPrefix
static bool sReplaceSubjPrefix
static QStringList sReplySubjPrefixes

Define Documentation

#define kmail_swap_16 (  )     ((((x) >> 8) & 0xff) | (((x) & 0xff) << 8))

Definition at line 44 of file kmmsgbase.cpp.

#define kmail_swap_32 (  ) 

Value:

((((x) & 0xff000000) >> 24) | (((x) & 0x00ff0000) >>  8) |            \
      (((x) & 0x0000ff00) <<  8) | (((x) & 0x000000ff) << 24))

Definition at line 52 of file kmmsgbase.cpp.

#define kmail_swap_64 (  ) 

Value:

((((x) & 0xff00000000000000ull) >> 56)                    \
      | (((x) & 0x00ff000000000000ull) >> 40)                     \
      | (((x) & 0x0000ff0000000000ull) >> 24)                     \
      | (((x) & 0x000000ff00000000ull) >> 8)                      \
      | (((x) & 0x00000000ff000000ull) << 8)                      \
      | (((x) & 0x0000000000ff0000ull) << 24)                     \
      | (((x) & 0x000000000000ff00ull) << 40)                     \
      | (((x) & 0x00000000000000ffull) << 56))

Definition at line 61 of file kmmsgbase.cpp.

#define memcpy_networkorder ( to,
from,
len   )     swab((char *)(from), (char *)(to), len)

Definition at line 1303 of file kmmsgbase.cpp.

#define STORE_DATA ( type,
 )     STORE_DATA_LEN(type, &x, sizeof(x), false)

Definition at line 1321 of file kmmsgbase.cpp.

#define STORE_DATA_LEN ( type,
x,
len,
network_order   ) 

Value:

do { \
    int len2 = (len > 256) ? 256 : len; \
    if(csize < (length + (len2 + sizeof(short) + sizeof(MsgPartType)))) \
           ret = (uchar *)realloc(ret, csize += len2+sizeof(short)+sizeof(MsgPartType)); \
        Q_UINT32 t = (Q_UINT32) type; memcpy(ret+length, &t, sizeof(t)); \
        Q_UINT16 l = len2; memcpy(ret+length+sizeof(t), &l, sizeof(l)); \
        if (network_order) \
           memcpy_networkorder(ret+length+sizeof(t)+sizeof(l), x, len2); \
        else \
           memcpy(ret+length+sizeof(t)+sizeof(l), x, len2); \
        length += len2+sizeof(t)+sizeof(l); \
    } while(0)

Definition at line 1309 of file kmmsgbase.cpp.


Function Documentation

static void swapEndian ( QString str  )  [static]

Definition at line 1081 of file kmmsgbase.cpp.


Variable Documentation

const QCString especials = "()<>@,;:\"/[]?.= \033" [static]

Definition at line 754 of file kmmsgbase.cpp.

uchar* g_chunk = 0 [static]

Definition at line 1092 of file kmmsgbase.cpp.

int g_chunk_length = 0 [static]

Definition at line 1091 of file kmmsgbase.cpp.

int g_chunk_offset = 0 [static]

Definition at line 1091 of file kmmsgbase.cpp.

Definition at line 1400 of file kmmsgbase.cpp.

bool sReplaceForwSubjPrefix [static]

Definition at line 1401 of file kmmsgbase.cpp.

bool sReplaceSubjPrefix [static]

Definition at line 1401 of file kmmsgbase.cpp.

Definition at line 1400 of file kmmsgbase.cpp.