23#include <tqvaluelist.h>
54 template< class> friend class KStaticDeleter;
75 static TQValueList<unsigned long> serNumList(TQPtrList<KMMsgBase> msgList);
82 friend class FolderStorage;
83 friend class KMMsgList;
84 friend class KMFolderIndex;
87 static KMMsgDict* mutableInstance();
92 unsigned long insert( unsigned long msgSerNum, const KMMsgBase *msg, int index = -1);
97 unsigned long insert( const KMMsgBase *msg, int index = -1);
100 void replace( unsigned long msgSerNum,
101 const KMMsgBase *msg, int index = -1);
104 void remove( unsigned long msgSerNum);
107 unsigned long remove( const KMMsgBase *msg);
110 void update( const KMMsgBase *msg, int index, int newIndex);
116 static TQString getFolderIdsLocation( const FolderStorage &folder );
119 bool isFolderIdsOutdated( const FolderStorage &folder );
122 int readFolderIds( FolderStorage & );
125 int writeFolderIds( const FolderStorage & );
128 int touchFolderIds( const FolderStorage & );
132 int appendToFolderIds( FolderStorage&, int index );
135 bool hasFolderIds( const FolderStorage & );
138 bool removeFolderIds( FolderStorage & );
142 KMMsgDictREntry *openFolderIds( const FolderStorage &, bool truncate);
149 static void deleteRentry(KMMsgDictREntry *entry);
152 unsigned long getNextMsgSerNum();
159 unsigned long nextMsgSerNum;
165 static KMMsgDict *m_self;
The FolderStorage class is the bass class for the storage related aspects of a collection of mail (a ...
KMDict implements a lightweight dictionary with serial numbers as keys.
unsigned long getMsgSerNum(KMFolder *folder, int index) const Find the message serial number for the message located at index index in folder folder.
static TQValueList< unsigned long > serNumList(TQPtrList< KMMsgBase > msgList) Convert a list of KMMsgBase pointers to a list of serial numbers.
void 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 folde...
static const KMMsgDict * instance() Access the globally unique MessageDict.
|