• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • KDE-PIM Libraries
  • Sitemap
  • Contact Us
 

akonadi

Akonadi::TransactionSequence

Akonadi::TransactionSequence Class Reference

Base class for jobs that need to run a sequence of sub-jobs in a transaction. More...

#include <transactionsequence.h>

Inheritance diagram for Akonadi::TransactionSequence:

Inheritance graph
[legend]

List of all members.


Public Member Functions

void commit ()
 TransactionSequence (QObject *parent=0)
 ~TransactionSequence ()

Protected Slots

void slotResult (KJob *job)

Protected Member Functions

bool addSubjob (KJob *job)
void doStart ()

Detailed Description

Base class for jobs that need to run a sequence of sub-jobs in a transaction.

As soon as the first subjob is added, the transaction is started. As soon as the last subjob has successfully finished, the transaction is committed. If any subjob fails, the transaction is rolled back.

Alternatively, a TransactionSequence object can be used as a parent object for a set of jobs to achieve the same behaviour without subclassing.

Author:
Volker Krause <vkrause@kde.org>

Definition at line 43 of file transactionsequence.h.


Constructor & Destructor Documentation

TransactionSequence::TransactionSequence ( QObject *  parent = 0  )  [explicit]

Creates a new transaction sequence.

Parameters:
parent The parent object.

Definition at line 69 of file transactionsequence.cpp.

TransactionSequence::~TransactionSequence (  ) 

Destroys the transaction sequence.

Definition at line 74 of file transactionsequence.cpp.


Member Function Documentation

bool TransactionSequence::addSubjob ( KJob *  job  )  [protected, virtual]

Adds the given job as a subjob to this job.

This method is automatically called if you construct a job using another job as parent object. The base implementation does the necessary setup to share the network connection with the backend.

Parameters:
job The new subjob.

Reimplemented from Akonadi::Job.

Definition at line 78 of file transactionsequence.cpp.

void TransactionSequence::commit (  ) 

Commits the transaction as soon as all pending sub-jobs finished successfully.

Definition at line 113 of file transactionsequence.cpp.

void TransactionSequence::doStart (  )  [protected, virtual]

This method must be reimplemented in the concrete jobs.

It will be called after the job has been started and a connection to the Akonadi backend has been established.

Implements Akonadi::Job.

Reimplemented in Akonadi::CollectionSync.

Definition at line 135 of file transactionsequence.cpp.


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

akonadi

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

KDE-PIM Libraries

Skip menu "KDE-PIM Libraries"
  • akonadi
  • kabc
  • kblog
  • kcal
  • kimap
  • kioslave
  •   imap4
  •   mbox
  • kldap
  • kmime
  • kpimidentities
  •   richtextbuilders
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
Generated for KDE-PIM Libraries by doxygen 1.5.8
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