kmail

KMMsgDict Class Reference

#include <kmmsgdict.h>

List of all members.


Detailed Description

KMail message dictionary.

Keeps location information for every message. The message serial number is the key for the dictionary.

The KMMsgDict singleton is used to look up at which index in which folder a certain serial number can be found. Each folder holds a "reverse entry", which is an array of message dict entries for that folder and persists that to disk as an array of serial numbers, the "$folder.index.ids" file. In effect the whole message dict is therefor persisted per folder and restored on startup when all folder dict entries are read and re-enter their respective entries (serial numbers) into the global dict. The code for creating, deleting and manipulating these files is in this class, rather than the FolderStorage class, which only holds the pointer to the reverse entry and otherwise knows nothing of the message dict.

Author:
Ronen Tzur <rtzur@shani.net>

Definition at line 49 of file kmmsgdict.h.


Public Member Functions

void getLocation (unsigned long key, KMFolder **retFolder, int *retIndex) const
void getLocation (const KMMsgBase *msg, KMFolder **retFolder, int *retIndex) const
void getLocation (const KMMessage *msg, KMFolder **retFolder, int *retIndex) const
unsigned long getMsgSerNum (KMFolder *folder, int index) const

Static Public Member Functions

static const KMMsgDictinstance ()

Friends

class KStaticDeleter
class FolderStorage
class KMMsgList
class KMFolderIndex

Member Function Documentation

void KMMsgDict::getLocation const KMMessage msg,
KMFolder **  retFolder,
int *  retIndex
const
 

Returns the folder the message represented by msg is in and the index in that folder at which it is stored.

Definition at line 320 of file kmmsgdict.cpp.

void KMMsgDict::getLocation const KMMsgBase msg,
KMFolder **  retFolder,
int *  retIndex
const
 

Returns the folder the message represented by msg is in and the index in that folder at which it is stored.

Definition at line 314 of file kmmsgdict.cpp.

void KMMsgDict::getLocation unsigned long  key,
KMFolder **  retFolder,
int *  retIndex
const
 

Returns the folder the message represented by the serial number key is in and the index in that folder at which it is stored.

Definition at line 301 of file kmmsgdict.cpp.

unsigned long KMMsgDict::getMsgSerNum KMFolder folder,
int  index
const
 

Find the message serial number for the message located at index index in folder folder.

Returns:
the message serial number or zero is no such message can be found

Definition at line 327 of file kmmsgdict.cpp.

const KMMsgDict * KMMsgDict::instance  )  [static]
 

Access the globally unique MessageDict.

Definition at line 167 of file kmmsgdict.cpp.


The documentation for this class was generated from the following files:
KDE Home | KDE Accessibility Home | Description of Access Keys