#include <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 KMMsgDict * | instance () |
static TQValueList< unsigned long > | serNumList (TQPtrList< KMMsgBase > msgList) |
Friends | |
template<class > | |
class | KStaticDeleter |
class | FolderStorage |
class | KMMsgList |
class | KMFolderIndex |
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.
Definition at line 52 of file kmmsgdict.h.
Member Function Documentation
◆ getLocation() [1/3]
Returns the folder the message represented by msg
is in and the index in that folder at which it is stored.
Definition at line 338 of file kmmsgdict.cpp.
◆ getLocation() [2/3]
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 332 of file kmmsgdict.cpp.
◆ getLocation() [3/3]
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 319 of file kmmsgdict.cpp.
◆ getMsgSerNum()
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 345 of file kmmsgdict.cpp.
◆ instance()
|
static |
Access the globally unique MessageDict.
Definition at line 167 of file kmmsgdict.cpp.
◆ serNumList()
|
static |
Convert a list of KMMsgBase pointers to a list of serial numbers.
Definition at line 359 of file kmmsgdict.cpp.
The documentation for this class was generated from the following files: