• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdepimlibs-4.10.5 API Reference
  • KDE Home
  • Contact Us
 

akonadi

  • Akonadi
  • CollectionSync
Public Member Functions | Protected Member Functions | List of all members
Akonadi::CollectionSync Class Reference

#include <collectionsync_p.h>

Inheritance diagram for Akonadi::CollectionSync:
Akonadi::TransactionSequence Akonadi::Job

Public Member Functions

 CollectionSync (const QString &resourceId, QObject *parent=0)
 
 ~CollectionSync ()
 
void retrievalDone ()
 
void setHierarchicalRemoteIds (bool hierarchical)
 
void setRemoteCollections (const Collection::List &remoteCollections)
 
void setRemoteCollections (const Collection::List &changedCollections, const Collection::List &removedCollections)
 
void setStreamingEnabled (bool streaming)
 
- Public Member Functions inherited from Akonadi::TransactionSequence
 TransactionSequence (QObject *parent=0)
 
 ~TransactionSequence ()
 
void commit ()
 
void rollback ()
 
void setAutomaticCommittingEnabled (bool enable)
 
void setIgnoreJobFailure (KJob *job)
 
- Public Member Functions inherited from Akonadi::Job
 Job (QObject *parent=0)
 
virtual ~Job ()
 
virtual QString errorString () const
 
void start ()
 

Protected Member Functions

void doStart ()
 
- Protected Member Functions inherited from Akonadi::TransactionSequence
bool addSubjob (KJob *job)
 
void doStart ()
 
- Protected Member Functions inherited from Akonadi::Job
virtual void doHandleResponse (const QByteArray &tag, const QByteArray &data)
 
virtual bool doKill ()
 
void emitWriteFinished ()
 
virtual bool removeSubjob (KJob *job)
 

Additional Inherited Members

- Public Types inherited from Akonadi::Job
enum  Error {
  ConnectionFailed = UserDefinedError, ProtocolVersionMismatch, UserCanceled, Unknown,
  UserError = UserDefinedError + 42
}
 
typedef QList< Job * > List
 
- Signals inherited from Akonadi::Job
void aboutToStart (Akonadi::Job *job)
 
void writeFinished (Akonadi::Job *job)
 
- Protected Slots inherited from Akonadi::TransactionSequence
void slotResult (KJob *job)
 

Detailed Description

Syncs remote and local collections.

Basic terminology:

  • "local": The current state in the Akonadi server
  • "remote": The state in the backend, which is also the state the Akonadi server is supposed to have afterwards.

There are three options to influence the way syncing is done:

  • Streaming vs. complete delivery: If streaming is enabled remote collections do not need to be delivered in a single batch but can be delivered in multiple chunks. This improves performance but requires an explicit notification when delivery has been completed.
  • Incremental vs. non-incremental: In the incremental case only remote changes since the last sync have to be delivered, in the non-incremental mode the full remote state has to be provided. The first is obviously the preferred way, but requires support by the backend.
  • Hierarchical vs. global RIDs: The first requires RIDs to be unique per parent collection, the second one requires globally unique RIDs (per resource). Those have different advantages and disadvantages, esp. regarding moving. Which one to chose mostly depends on what the backend provides in this regard.

Definition at line 53 of file collectionsync_p.h.

Constructor & Destructor Documentation

CollectionSync::CollectionSync ( const QString &  resourceId,
QObject *  parent = 0 
)
explicit

Creates a new collection synchronzier.

Parameters
resourceIdThe identifier of the resource we are syncing.
parentThe parent object.

Definition at line 615 of file collectionsync.cpp.

CollectionSync::~CollectionSync ( )

Destroys this job.

Definition at line 623 of file collectionsync.cpp.

Member Function Documentation

void CollectionSync::doStart ( )
protectedvirtual

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.

Definition at line 656 of file collectionsync.cpp.

void CollectionSync::retrievalDone ( )

Indicate that all collections have been retrieved in streaming mode.

Definition at line 672 of file collectionsync.cpp.

void CollectionSync::setHierarchicalRemoteIds ( bool  hierarchical)

Indicate whether the resource supplies collections with hierarchical or global remote identifiers.

false by default. Must be called before the first call to setRemoteCollections().

Definition at line 678 of file collectionsync.cpp.

void CollectionSync::setRemoteCollections ( const Collection::List &  remoteCollections)

Sets the result of a full remote collection listing.

Parameters
remoteCollectionsA list of collections. Important: All of these need a unique remote identifier and parent remote identifier.

Definition at line 628 of file collectionsync.cpp.

void CollectionSync::setRemoteCollections ( const Collection::List &  changedCollections,
const Collection::List &  removedCollections 
)

Sets the result of an incremental remote collection listing.

Parameters
changedCollectionsA list of remotely added or changed collections.
removedCollectionsA lost of remotely deleted collections.

Definition at line 641 of file collectionsync.cpp.

void CollectionSync::setStreamingEnabled ( bool  streaming)

Enables streaming, that is not all collections are delivered at once.

Use setRemoteCollections() multiple times when streaming is enabled and call retrievalDone() when all collections have been retrieved. Must be called before the first call to setRemoteCollections().

Definition at line 667 of file collectionsync.cpp.


The documentation for this class was generated from the following files:
  • collectionsync_p.h
  • collectionsync.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2013 The KDE developers.
Generated on Sat Jul 13 2013 01:27:47 by doxygen 1.8.3.1 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

akonadi

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

kdepimlibs-4.10.5 API Reference

Skip menu "kdepimlibs-4.10.5 API Reference"
  • akonadi
  •   contact
  •   kmime
  •   socialutils
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
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