• Skip to content
  • Skip to link menu
KDE 4.1 API Reference
  • KDE API Reference
  • kdepim
  • Sitemap
  • Contact Us
 

kmail

KMail::FolderJob

KMail::FolderJob Class Reference

#include <folderjob.h>

Inheritance diagram for KMail::FolderJob:

Inheritance graph
[legend]

List of all members.


Detailed Description

Definition at line 43 of file folderjob.h.


Public Types

enum  JobType {
  tListMessages, tGetFolder, tCreateFolder, tExpungeFolder,
  tDeleteMessage, tGetMessage, tPutMessage, tAddSubfolders,
  tDeleteFolders, tCheckUidValidity, tRenameFolder, tCopyMessage,
  tMoveMessage, tOther
}

Signals

void finished ()
void messageCopied (KMMessage *)
void messageCopied (QList< KMMessage * >)
void messageRetrieved (KMMessage *)
void messageStored (KMMessage *)
void messageUpdated (KMMessage *, const QString &)
void progress (unsigned long bytesDownloaded, unsigned long bytesTotal)
void result (KMail::FolderJob *job)

Public Member Functions

int error () const
 FolderJob (JobType jt)
 FolderJob (const QList< KMMessage * > &msgList, const QString &sets, JobType jt=tGetMessage, KMFolder *folder=0)
 FolderJob (KMMessage *msg, JobType jt=tGetMessage, KMFolder *folder=0, const QString &partSpecifier=QString())
bool isCancellable () const
virtual void kill ()
QList< KMMessage * > msgList () const
bool passiveDestructor ()
void setCancellable (bool b)
void setPassiveDestructor (bool passive)
void start ()
virtual ~FolderJob ()

Protected Member Functions

virtual void execute ()=0

Protected Attributes

bool mCancellable
KMFolder * mDestFolder
int mErrorCode
QList< KMMessage * > mMsgList
QString mPartSpecifier
bool mPassiveDestructor
QString mSets
KMFolder * mSrcFolder
bool mStarted
JobType mType

Member Enumeration Documentation

enum KMail::FolderJob::JobType

Enumerator:
tListMessages 
tGetFolder 
tCreateFolder 
tExpungeFolder 
tDeleteMessage 
tGetMessage 
tPutMessage 
tAddSubfolders 
tDeleteFolders 
tCheckUidValidity 
tRenameFolder 
tCopyMessage 
tMoveMessage 
tOther 

Definition at line 48 of file folderjob.h.


Constructor & Destructor Documentation

KMail::FolderJob::FolderJob ( KMMessage *  msg,
JobType  jt = tGetMessage,
KMFolder *  folder = 0,
const QString &  partSpecifier = QString() 
) [explicit]

Constructs a new job, operating on the message msg, of type jt and with a parent folder folder.

Definition at line 43 of file folderjob.cpp.

KMail::FolderJob::FolderJob ( const QList< 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 57 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 68 of file folderjob.cpp.

KMail::FolderJob::~FolderJob (  )  [virtual]

Definition at line 92 of file folderjob.cpp.


Member Function Documentation

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 91 of file folderjob.h.

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.

void KMail::FolderJob::finished (  )  [signal]

Emitted when the job finishes all processing.

bool KMail::FolderJob::isCancellable (  )  const [inline]

Returns:
true if this job can be canceled, e.g.

to exit the application

Definition at line 96 of file folderjob.h.

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 111 of file folderjob.cpp.

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::messageCopied ( QList< 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::messageRetrieved ( KMMessage *   )  [signal]

Emitted whenever a KMMessage has been completely retrieved from the server/folder.

void KMail::FolderJob::messageStored ( KMMessage *   )  [signal]

Emitted whenever a message has been stored in the folder.

void KMail::FolderJob::messageUpdated ( KMMessage *  ,
const QString &   
) [signal]

Emitted whenever a KMMessage was updated.

QList< KMMessage * > KMail::FolderJob::msgList (  )  const

Definition at line 118 of file folderjob.cpp.

bool KMail::FolderJob::passiveDestructor (  )  [inline]

Definition at line 107 of file folderjob.h.

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.

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::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 104 of file folderjob.h.

void KMail::FolderJob::setPassiveDestructor ( bool  passive  )  [inline]

Definition at line 106 of file folderjob.h.

void KMail::FolderJob::start (  ) 

Start the job.

Definition at line 101 of file folderjob.cpp.


Member Data Documentation

bool KMail::FolderJob::mCancellable [protected]

Definition at line 182 of file folderjob.h.

KMFolder* KMail::FolderJob::mDestFolder [protected]

Definition at line 175 of file folderjob.h.

int KMail::FolderJob::mErrorCode [protected]

Definition at line 177 of file folderjob.h.

QList<KMMessage*> KMail::FolderJob::mMsgList [protected]

Definition at line 171 of file folderjob.h.

QString KMail::FolderJob::mPartSpecifier [protected]

Definition at line 176 of file folderjob.h.

bool KMail::FolderJob::mPassiveDestructor [protected]

Definition at line 180 of file folderjob.h.

QString KMail::FolderJob::mSets [protected]

Definition at line 173 of file folderjob.h.

KMFolder* KMail::FolderJob::mSrcFolder [protected]

Definition at line 174 of file folderjob.h.

bool KMail::FolderJob::mStarted [protected]

Definition at line 181 of file folderjob.h.

JobType KMail::FolderJob::mType [protected]

Reimplemented in KMail::ListJob.

Definition at line 172 of file folderjob.h.


The documentation for this class was generated from the following files:
  • folderjob.h
  • folderjob.cpp

kmail

Skip menu "kmail"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdepim

Skip menu "kdepim"
  • akonadi
  •   clients
  •   kabc
  •   kcal
  •   kcm
  • akregator
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt
  • kdgantt1
  • kjots
  • kleopatra
  • kmail
  • kmobiletools
  • knode
  • knotes
  • kontact
  • kontactinterfaces
  • korganizer
  •   korgac
  • kpilot
  • ktimetracker
  •   doc
  • libkdepim
  • libkholidays
  • libkleo
  • libkpgp
  • maildir
Generated for kdepim by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal