kmail

KMail::ScheduledCompactionTask Class Reference

A scheduled "compact mails in this folder" task. More...

#include <compactionjob.h>

Inheritance diagram for KMail::ScheduledCompactionTask:

List of all members.


Public Member Functions

virtual ScheduledJobrun ()
 ScheduledCompactionTask (KMFolder *folder, bool immediate)
virtual int taskTypeId () const
virtual ~ScheduledCompactionTask ()

Detailed Description

A scheduled "compact mails in this folder" task.

Definition at line 99 of file compactionjob.h.


Constructor & Destructor Documentation

KMail::ScheduledCompactionTask::ScheduledCompactionTask ( KMFolder folder,
bool  immediate 
) [inline]

If immediate is set, the job will execute synchronously.

This is used when the user requests explicitely that the operation should happen immediately.

Definition at line 104 of file compactionjob.h.

virtual KMail::ScheduledCompactionTask::~ScheduledCompactionTask (  )  [inline, virtual]

Definition at line 106 of file compactionjob.h.


Member Function Documentation

ScheduledJob * ScheduledCompactionTask::run (  )  [virtual]

Run this task, i.e.

create a job for it. Important: the job's execute() method must either call open() on the folder or storage immediately, or abort (deleting itself). Usually, that job should also be cancellable. Otherwise (if the open() is delayed) an unrelated open() could happen first and mess things up. If for some reason (e.g. folder deleted) nothing should be done, return 0.

Implements KMail::ScheduledTask.

Definition at line 277 of file compactionjob.cpp.

virtual int KMail::ScheduledCompactionTask::taskTypeId (  )  const [inline, virtual]

An identifier for the type of task (a bit like QListViewItem::rtti) This allows to automatically prevent two identical tasks from being scheduled for the same folder.

To circumvent this feature and make every task unique, return 0 here.

Implements KMail::ScheduledTask.

Definition at line 108 of file compactionjob.h.


The documentation for this class was generated from the following files: