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

akonadi

  • Akonadi
  • CollectionSync
Public Member Functions | Protected Member Functions
Akonadi::CollectionSync Class Reference

#include <collectionsync_p.h>

Inheritance diagram for Akonadi::CollectionSync:
Inheritance graph
[legend]

List of all members.

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)

Protected Member Functions

void doStart ()

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

Akonadi::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.
Akonadi::CollectionSync::~CollectionSync ( )

Destroys this job.


Member Function Documentation

void Akonadi::CollectionSync::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.

Reimplemented from Akonadi::TransactionSequence.

void Akonadi::CollectionSync::retrievalDone ( )

Indicate that all collections have been retrieved in streaming mode.

void Akonadi::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().

void Akonadi::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.
void Akonadi::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.
void Akonadi::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().


The documentation for this class was generated from the following file:
  • collectionsync_p.h
This file is part of the KDE documentation.
Documentation copyright © 1996-2012 The KDE developers.
Generated on Mon Apr 30 2012 21:49:16 by doxygen 1.8.0 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.8.3 API Reference

Skip menu "kdepimlibs-4.8.3 API Reference"
  • akonadi
  •   contact
  •   kmime
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  •   richtextbuilders
  • 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