kmail
KMail::FolderJob Class Reference
Inheritance diagram for KMail::FolderJob:

Detailed Description
Definition at line 44 of file folderjob.h.
Public Types | |
| enum | JobType { tListMessages, tGetFolder, tCreateFolder, tExpungeFolder, tDeleteMessage, tGetMessage, tPutMessage, tAddSubfolders, tDeleteFolders, tCheckUidValidity, tRenameFolder, tCopyMessage, tMoveMessage, tOther } |
Signals | |
| void | messageRetrieved (KMMessage *) |
| void | messageUpdated (KMMessage *, QString) |
| void | messageStored (KMMessage *) |
| void | messageCopied (QPtrList< KMMessage >) |
| void | messageCopied (KMMessage *) |
| void | finished () |
| void | result (KMail::FolderJob *job) |
| void | progress (unsigned long bytesDownloaded, unsigned long bytesTotal) |
Public Member Functions | |
| FolderJob (KMMessage *msg, JobType jt=tGetMessage, KMFolder *folder=0, QString partSpecifier=QString::null) | |
| FolderJob (const QPtrList< KMMessage > &msgList, const QString &sets, JobType jt=tGetMessage, KMFolder *folder=0) | |
| FolderJob (JobType jt) | |
| virtual | ~FolderJob () |
| QPtrList< KMMessage > | msgList () const |
| void | start () |
| virtual void | kill () |
| int | error () const |
| bool | isCancellable () const |
| void | setCancellable (bool b) |
| void | setPassiveDestructor (bool passive) |
| bool | passiveDestructor () |
Protected Member Functions | |
| virtual void | execute ()=0 |
Protected Attributes | |
| QPtrList< KMMessage > | mMsgList |
| JobType | mType |
| QString | mSets |
| KMFolder * | mSrcFolder |
| KMFolder * | mDestFolder |
| QString | mPartSpecifier |
| int | mErrorCode |
| bool | mPassiveDestructor |
| bool | mStarted |
| bool | mCancellable |
Constructor & Destructor Documentation
| KMail::FolderJob::FolderJob | ( | KMMessage * | msg, | |
| JobType | jt = tGetMessage, |
|||
| KMFolder * | folder = 0, |
|||
| QString | partSpecifier = QString::null | |||
| ) |
Constructs a new job, operating on the message msg, of type jt and with a parent folder folder.
Definition at line 46 of file folderjob.cpp.
| KMail::FolderJob::FolderJob | ( | const QPtrList< KMMessage > & | msgList, | |
| const QString & | sets, | |||
| JobType | jt = tGetMessage, |
|||
| KMFolder * | folder = 0 | |||
| ) |
Constructs a new job, operating on a message list msgList, set , JobType jt and with the parent folder folder.
Definition at line 60 of file folderjob.cpp.
| KMail::FolderJob::FolderJob | ( | JobType | jt | ) |
This one should ONLY be used in derived folders, when a job does something internal and needs to construct an empty parent FolderJob.
Definition at line 71 of file folderjob.cpp.
Member Function Documentation
| void KMail::FolderJob::start | ( | ) |
| void KMail::FolderJob::kill | ( | ) | [virtual] |
Interrupt the job.
Note that the finished() and result() signal will be emitted, unless you called setPassiveDestructor(true) before. This kills the job, don't use it afterwards.
Reimplemented in KMail::MboxCompactionJob, KMail::MaildirCompactionJob, and KMail::ExpireJob.
Definition at line 115 of file folderjob.cpp.
| int KMail::FolderJob::error | ( | ) | const [inline] |
- Returns:
- the error code of the job.
This must only be called from the slot connected to the finished() signal.
Definition at line 92 of file folderjob.h.
| bool KMail::FolderJob::isCancellable | ( | ) | const [inline] |
- Returns:
- true if this job can be cancelled, e.g.
to exit the application
Definition at line 97 of file folderjob.h.
| void KMail::FolderJob::setCancellable | ( | bool | b | ) | [inline] |
Call this to change the "cancellable" property of this job.
By default, tListMessages, tGetMessage, tGetFolder and tCheckUidValidity are cancellable, the others are not. But when copying, a non-cancellable tGetMessage is needed.
Definition at line 105 of file folderjob.h.
| void KMail::FolderJob::messageRetrieved | ( | KMMessage * | ) | [signal] |
Emitted whenever a KMMessage has been completely retrieved from the server/folder.
| void KMail::FolderJob::messageUpdated | ( | KMMessage * | , | |
| QString | ||||
| ) | [signal] |
Emitted whenever a KMMessage was updated.
| void KMail::FolderJob::messageStored | ( | KMMessage * | ) | [signal] |
Emitted whenever a message has been stored in the folder.
| void KMail::FolderJob::messageCopied | ( | QPtrList< KMMessage > | ) | [signal] |
Emitted when a list of messages has been copied to the specified location.
QPtrList contains the list of the copied messages.
| void KMail::FolderJob::messageCopied | ( | KMMessage * | ) | [signal] |
Overloaded signal to the one above.
A lot of copying specifies only one message as the argument and this signal is easier to use when this happens.
| void KMail::FolderJob::finished | ( | ) | [signal] |
Emitted when the job finishes all processing.
| void KMail::FolderJob::result | ( | KMail::FolderJob * | job | ) | [signal] |
Emitted when the job finishes all processing.
More convenient signal than finished(), since it provides a pointer to the job. This signal is emitted by the FolderJob destructor => do NOT downcast the job to a subclass!
| void KMail::FolderJob::progress | ( | unsigned long | bytesDownloaded, | |
| unsigned long | bytesTotal | |||
| ) | [signal] |
This progress signal contains the "done" and the "total" numbers so that the caller can either make a % out of it, or combine it into a higher-level progress info.
| virtual void KMail::FolderJob::execute | ( | ) | [protected, pure virtual] |
Has to be reimplemented.
It's called by the start() method. Should start the processing of the specified job function.
Implemented in KMail::CachedImapJob, KMail::MboxCompactionJob, KMail::MaildirCompactionJob, KMail::CopyFolderJob, KMail::ExpireJob, KMail::ListJob, KMail::MaildirJob, KMail::MboxJob, KMail::RenameJob, and KMail::SearchJob.
The documentation for this class was generated from the following files:

