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

mailcommon

  • MailCommon
  • ScheduledTask
Public Member Functions | List of all members
MailCommon::ScheduledTask Class Referenceabstract

#include <jobscheduler.h>

Inheritance diagram for MailCommon::ScheduledTask:
Inheritance graph
[legend]

Public Member Functions

 ScheduledTask (const Akonadi::Collection &folder, bool immediate)
 
virtual ~ScheduledTask ()
 
Akonadi::Collection folder () const
 
bool isImmediate () const
 
virtual ScheduledJob * run ()=0
 
virtual int taskTypeId () const =0
 

Detailed Description

A scheduled task is some information about a folder job that should be run later.

As long as it's not running, it's called a "task", i.e. something that needs to be done. Tasks are held in the JobScheduler.

Definition at line 54 of file jobscheduler.h.

Constructor & Destructor Documentation

MailCommon::ScheduledTask::ScheduledTask ( const Akonadi::Collection &  folder,
bool  immediate 
)

Create a scheduled task for a given folder If immediate is true, the scheduler will run this task as soon as possible (but won't interrupt a currently running job for it)

Definition at line 35 of file jobscheduler.cpp.

MailCommon::ScheduledTask::~ScheduledTask ( )
virtual

Definition at line 40 of file jobscheduler.cpp.

Member Function Documentation

Akonadi::Collection MailCommon::ScheduledTask::folder ( ) const
inline

The folder which this task is about, 0 if it was deleted meanwhile.

Definition at line 78 of file jobscheduler.h.

bool MailCommon::ScheduledTask::isImmediate ( ) const
inline

Definition at line 80 of file jobscheduler.h.

virtual ScheduledJob* MailCommon::ScheduledTask::run ( )
pure 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.

Implemented in MailCommon::ScheduledExpireTask.

virtual int MailCommon::ScheduledTask::taskTypeId ( ) const
pure 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.

Implemented in MailCommon::ScheduledExpireTask.


The documentation for this class was generated from the following files:
  • jobscheduler.h
  • jobscheduler.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:55:15 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

mailcommon

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

kdepim API Reference

Skip menu "kdepim API Reference"
  • akonadi_next
  • akregator
  • blogilo
  • calendarsupport
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt2
  • kjots
  • kleopatra
  • kmail
  • knode
  • knotes
  • kontact
  • korgac
  • korganizer
  • ktimetracker
  • libkdepim
  • libkleo
  • libkpgp
  • mailcommon
  • messagelist
  • messageviewer

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal