kmail

KMFolderSearch Class Reference

Inheritance diagram for KMFolderSearch:

FolderStorage List of all members.

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 KMSearchsearch () const
void stopSearch ()
virtual KMMessagegetMsg (int idx)
virtual void ignoreJobsForMessage (KMMessage *)
virtual void tryReleasingFolder (KMFolder *folder)
virtual bool isMoveable () const
virtual QCString & getMsgString (int idx, QCString &mDest)
virtual int addMsg (KMMessage *msg, int *index_return=0)
virtual int open ()
virtual int canAccess ()
virtual void sync ()
virtual void close (bool force=FALSE)
virtual int create ()
virtual int compact (bool)
virtual bool isReadOnly () const
virtual const KMMsgBasegetMsgBase (int idx) const
virtual KMMsgBasegetMsgBase (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 KMMessagereadMsg (int idx)
virtual bool readIndex ()
virtual int removeContents ()
virtual int expungeContents ()
virtual int count (bool cache=false) const
virtual KMMsgBasetakeIndexEntry (int idx)
virtual KMMsgInfosetIndexEntry (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 663 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 677 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 1120 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 722 of file kmfoldersearch.cpp.

QCString & KMFolderSearch::getMsgString ( int  idx,
QCString &  mDest 
) [virtual]

Read a message and return a referece to a string.

Implements FolderStorage.

Definition at line 480 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 487 of file kmfoldersearch.cpp.

int KMFolderSearch::open (  )  [virtual]

Open folder for access.

Does nothing if the folder is already opened. To reopen a folder call close() first. Returns zero on success and an error code equal to the c-library fopen call otherwise (errno).

Implements FolderStorage.

Definition at line 502 of file kmfoldersearch.cpp.

int KMFolderSearch::canAccess (  )  [virtual]

Check folder for permissions Returns zero if readable and writable.

Implements FolderStorage.

Definition at line 522 of file kmfoldersearch.cpp.

void KMFolderSearch::sync (  )  [virtual]

fsync buffers to disk

Implements FolderStorage.

Definition at line 531 of file kmfoldersearch.cpp.

void KMFolderSearch::close ( bool  force = FALSE  )  [virtual]

Close folder.

If force is TRUE the files are closed even if others still use it (e.g. other mail reader windows).

Implements FolderStorage.

Definition at line 540 of file kmfoldersearch.cpp.

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 574 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 612 of file kmfoldersearch.cpp.

bool KMFolderSearch::isReadOnly (  )  const [virtual]

Is the folder read-only?

Implements FolderStorage.

Definition at line 618 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 639 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 696 of file kmfoldersearch.cpp.

QString KMFolderSearch::indexLocation (  )  const [virtual]

Returns full path to index file.

Implements FolderStorage.

Definition at line 709 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 732 of file kmfoldersearch.cpp.

DwString KMFolderSearch::getDwString ( int  idx  )  [virtual]

Read a message and returns a DwString.

Implements FolderStorage.

Definition at line 783 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 788 of file kmfoldersearch.cpp.

bool KMFolderSearch::readIndex (  )  [protected, virtual]

Read index file and fill the message-info list mMsgList.

Implements FolderStorage.

Definition at line 797 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 875 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 883 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 889 of file kmfoldersearch.cpp.


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