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:

QObject 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(), KMail::ScheduledJob::isOpeningFolder(), and KMFolder::label().


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.0.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Fri Oct 1 15:19:26 2004 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003