kmail Library API Documentation

KMail::JobScheduler Class Reference

The unique JobScheduler instance (owned by kmkernel) implements "background processing" of folder operations (like expiration and compaction). More...

#include <jobscheduler.h>

Inheritance diagram for KMail::JobScheduler:

Inheritance graph
[legend]
Collaboration diagram for KMail::JobScheduler:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 JobScheduler (QObject *parent, const char *name=0)
void registerTask (ScheduledTask *task)
void notifyOpeningFolder (KMFolder *folder)

Detailed Description

The unique JobScheduler instance (owned by kmkernel) implements "background processing" of folder operations (like expiration and compaction).

Tasks (things to be done) are registered with the JobScheduler, and it will execute them one at a time, separated with a 1-minute timer. The jobs themselves should use timers to avoid using too much CPU for too long. Tasks for opened folders are not executed until the folder is closed.

Definition at line 96 of file jobscheduler.h.


Member Function Documentation

void JobScheduler::registerTask ScheduledTask task  ) 
 

Register a task to be done for a given folder The ownership of the task is transferred to the JobScheduler.

Definition at line 57 of file jobscheduler.cpp.

References KMail::ScheduledTask::folder(), KMail::ScheduledTask::isImmediate(), KMFolder::label(), and KMail::ScheduledTask::taskTypeId().

void JobScheduler::notifyOpeningFolder KMFolder folder  ) 
 

Called by [implementations of] FolderStorage::open() Interrupt any running job for this folder and re-schedule it for later.

Definition at line 102 of file jobscheduler.cpp.

References KMail::ScheduledTask::folder(), and KMail::ScheduledJob::isOpeningFolder().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for kmail Library Version 3.3.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Thu May 3 20:24:20 2007 by doxygen 1.4.2 written by Dimitri van Heesch, © 1997-2003