kmail
KMFolderSearch Class Reference
Inheritance diagram for KMFolderSearch:

Detailed Description
Definition at line 109 of file kmfoldersearch.h.
Public Slots | |
void | addSerNum (Q_UINT32 serNum) |
void | removeSerNum (Q_UINT32 serNum) |
virtual int | updateIndex () |
void | slotSearchExamineMsgDone (KMFolder *, Q_UINT32 serNum, const KMSearchPattern *, bool) |
Public Member Functions | |
KMFolderSearch (KMFolder *folder, const char *name=0) | |
virtual | ~KMFolderSearch () |
virtual KMFolderType | folderType () const |
void | setSearch (KMSearch *search) |
const KMSearch * | search () const |
void | stopSearch () |
virtual KMMessage * | getMsg (int idx) |
virtual void | ignoreJobsForMessage (KMMessage *) |
virtual void | tryReleasingFolder (KMFolder *folder) |
virtual bool | isMoveable () const |
virtual int | addMsg (KMMessage *msg, int *index_return=0) |
virtual int | open (const char *owner) |
virtual int | canAccess () |
virtual void | sync () |
virtual void | reallyDoClose (const char *owner) |
virtual int | create () |
virtual int | compact (bool) |
virtual bool | isReadOnly () const |
virtual const KMMsgBase * | getMsgBase (int idx) const |
virtual KMMsgBase * | getMsgBase (int idx) |
virtual int | find (const KMMsgBase *msg) const |
virtual QString | indexLocation () const |
virtual int | writeIndex (bool createEmptyIndex=false) |
DwString | getDwString (int idx) |
Q_UINT32 | serNum (int idx) |
Protected Slots | |
bool | readSearch () |
void | executeSearch () |
void | searchFinished (bool success) |
void | examineAddedMessage (KMFolder *folder, Q_UINT32 serNum) |
void | examineRemovedMessage (KMFolder *folder, Q_UINT32 serNum) |
void | examineChangedMessage (KMFolder *folder, Q_UINT32 serNum, int delta) |
void | examineInvalidatedFolder (KMFolder *folder) |
void | examineRemovedFolder (KMFolder *folder) |
void | propagateHeaderChanged (KMFolder *folder, int idx) |
Protected Member Functions | |
virtual FolderJob * | doCreateJob (KMMessage *msg, FolderJob::JobType jt, KMFolder *folder, QString partSpecifier, const AttachmentStrategy *as) const |
virtual FolderJob * | doCreateJob (QPtrList< KMMessage > &msgList, const QString &sets, FolderJob::JobType jt, KMFolder *folder) const |
virtual KMMessage * | readMsg (int idx) |
virtual bool | readIndex () |
virtual int | removeContents () |
virtual int | expungeContents () |
virtual int | count (bool cache=false) const |
virtual KMMsgBase * | takeIndexEntry (int idx) |
virtual KMMsgInfo * | setIndexEntry (int idx, KMMessage *msg) |
virtual void | clearIndex (bool autoDelete=true, bool syncDict=false) |
virtual void | truncateIndex () |
Friends | |
class | ::KMFolderSearchJob |
Member Function Documentation
virtual KMFolderType KMFolderSearch::folderType | ( | ) | const [inline, virtual] |
Returns the type of this folder.
Reimplemented from FolderStorage.
Definition at line 118 of file kmfoldersearch.h.
KMMessage * KMFolderSearch::getMsg | ( | int | idx | ) | [virtual] |
Read message at given index.
Indexing starts at zero
Reimplemented from FolderStorage.
Definition at line 667 of file kmfoldersearch.cpp.
void KMFolderSearch::ignoreJobsForMessage | ( | KMMessage * | ) | [virtual] |
Removes and deletes all jobs associated with the particular message.
Reimplemented from FolderStorage.
Definition at line 681 of file kmfoldersearch.cpp.
void KMFolderSearch::tryReleasingFolder | ( | KMFolder * | folder | ) | [virtual] |
Try releasing folder
if possible, something is attempting an exclusive access to it.
Currently used for KMFolderSearch and the background tasks like expiry.
Reimplemented from FolderStorage.
Definition at line 1131 of file kmfoldersearch.cpp.
virtual bool KMFolderSearch::isMoveable | ( | ) | const [inline, virtual] |
Returns true if this folder can be moved.
Reimplemented from FolderStorage.
Definition at line 133 of file kmfoldersearch.h.
int KMFolderSearch::updateIndex | ( | ) | [virtual, slot] |
Incrementally update the index if possible else call writeIndex.
Implements FolderStorage.
Definition at line 726 of file kmfoldersearch.cpp.
int KMFolderSearch::addMsg | ( | KMMessage * | msg, | |
int * | index_return = 0 | |||
) | [virtual] |
Add the given message to the folder.
Usually the message is added at the end of the folder. Returns zero on success and an errno error code on failure. The index of the new message is stored in index_return if given. Please note that the message is added as is to the folder and the folder takes ownership of the message (deleting it in the destructor).
Implements FolderStorage.
Definition at line 495 of file kmfoldersearch.cpp.
int KMFolderSearch::open | ( | const char * | owner | ) | [virtual] |
Open folder for access.
open() and close() use reference counting. Returns zero on success and an error code equal to the c-library fopen call otherwise (errno).
- See also:
- KMFolderOpener
Implements FolderStorage.
Definition at line 510 of file kmfoldersearch.cpp.
int KMFolderSearch::canAccess | ( | ) | [virtual] |
Check folder for permissions Returns zero if readable and writable.
Implements FolderStorage.
Definition at line 530 of file kmfoldersearch.cpp.
void KMFolderSearch::sync | ( | ) | [virtual] |
int KMFolderSearch::create | ( | ) | [virtual] |
Create a new folder with the name of this object and open it.
Returns zero on success and an error code equal to the c-library fopen call otherwise.
Implements FolderStorage.
Definition at line 578 of file kmfoldersearch.cpp.
int KMFolderSearch::compact | ( | bool | ) | [virtual] |
Remove deleted messages from the folder.
Returns zero on success and an errno on failure. A statusbar message will inform the user that the compaction worked, unless silent
is set.
Implements FolderStorage.
Definition at line 616 of file kmfoldersearch.cpp.
bool KMFolderSearch::isReadOnly | ( | ) | const [virtual] |
Is the folder read-only?
Implements FolderStorage.
Definition at line 622 of file kmfoldersearch.cpp.
const KMMsgBase * KMFolderSearch::getMsgBase | ( | int | idx | ) | const [virtual] |
Provides access to the basic message fields that are also stored in the index.
Whenever you only need subject, from, date, status you should use this method instead of getMsg() because getMsg() will load the message if necessary and this method does not.
Implements FolderStorage.
Definition at line 643 of file kmfoldersearch.cpp.
int KMFolderSearch::find | ( | const KMMsgBase * | msg | ) | const [virtual] |
Returns the index of the given message or -1 if not found.
Implements FolderStorage.
Definition at line 700 of file kmfoldersearch.cpp.
QString KMFolderSearch::indexLocation | ( | ) | const [virtual] |
Returns full path to index file.
Implements FolderStorage.
Definition at line 713 of file kmfoldersearch.cpp.
int KMFolderSearch::writeIndex | ( | bool | createEmptyIndex = false |
) | [virtual] |
Write index to index-file.
Returns 0 on success and errno error on failure.
Implements FolderStorage.
Definition at line 736 of file kmfoldersearch.cpp.
DwString KMFolderSearch::getDwString | ( | int | idx | ) | [virtual] |
Read a message and returns a DwString.
Implements FolderStorage.
Definition at line 787 of file kmfoldersearch.cpp.
virtual FolderJob* KMFolderSearch::doCreateJob | ( | KMMessage * | msg, | |
FolderJob::JobType | jt, | |||
KMFolder * | folder, | |||
QString | partSpecifier, | |||
const AttachmentStrategy * | as | |||
) | const [protected, virtual] |
These two methods actually create the jobs.
They have to be implemented in all folders.
- See also:
- createJob
Implements FolderStorage.
KMMessage * KMFolderSearch::readMsg | ( | int | idx | ) | [protected, virtual] |
Load message from file and store it at given index.
Returns 0 on failure.
Implements FolderStorage.
Definition at line 792 of file kmfoldersearch.cpp.
bool KMFolderSearch::readIndex | ( | ) | [protected, virtual] |
Read index file and fill the message-info list mMsgList.
Implements FolderStorage.
Definition at line 801 of file kmfoldersearch.cpp.
int KMFolderSearch::removeContents | ( | ) | [protected, virtual] |
Called by KMFolder::remove() to delete the actual contents.
At the time of the call the folder has already been closed, and the various index files deleted. Returns 0 on success.
Implements FolderStorage.
Definition at line 879 of file kmfoldersearch.cpp.
int KMFolderSearch::expungeContents | ( | ) | [protected, virtual] |
Called by KMFolder::expunge() to delete the actual contents.
At the time of the call the folder has already been closed, and the various index files deleted. Returns 0 on success.
Implements FolderStorage.
Definition at line 887 of file kmfoldersearch.cpp.
int KMFolderSearch::count | ( | bool | cache = false |
) | const [protected, virtual] |
Number of messages in this folder.
Reimplemented from FolderStorage.
Definition at line 893 of file kmfoldersearch.cpp.
The documentation for this class was generated from the following files: