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

akonadi

  • Akonadi
  • ResourceSynchronizationJob
Public Member Functions
Akonadi::ResourceSynchronizationJob Class Reference

#include <resourcesynchronizationjob.h>

Inherits KJob.

List of all members.

Public Member Functions

 ResourceSynchronizationJob (const AgentInstance &instance, QObject *parent=0)
 ~ResourceSynchronizationJob ()
bool collectionTreeOnly () const
AgentInstance resource () const
void setCollectionTreeOnly (bool collectionTreeOnly)
void start ()

Detailed Description

Job that synchronizes a resource.

This job will trigger a resource to synchronize the backend it is responsible for (e.g. a local file or a groupware server) with the Akonadi storage.

If you only want to trigger the synchronization without being interested in the result, using Akonadi::AgentInstance::synchronize() is enough. If you want to wait until it's finished, use this class.

Example:

 using namespace Akonadi;

 const AgentInstance resource = AgentManager::self()->instance( "myresourceidentifier" );

 ResourceSynchronizationJob *job = new ResourceSynchronizationJob( resource );
 connect( job, SIGNAL( result( KJob* ) ), SLOT( synchronizationFinished( KJob* ) ) );
 job->start();
Note:
This is a KJob, not an Akonadi::Job, so it won't auto-start!
Author:
Volker Krause <vkrause@kde.org>
Since:
4.4

Constructor & Destructor Documentation

Akonadi::ResourceSynchronizationJob::ResourceSynchronizationJob ( const AgentInstance &  instance,
QObject *  parent = 0 
) [explicit]

Creates a new synchronization job for the given resource.

Parameters:
instanceThe resource instance to synchronize.

Definition at line 62 of file resourcesynchronizationjob.cpp.

Akonadi::ResourceSynchronizationJob::~ResourceSynchronizationJob ( )

Destroys the synchronization job.

Definition at line 73 of file resourcesynchronizationjob.cpp.


Member Function Documentation

bool Akonadi::ResourceSynchronizationJob::collectionTreeOnly ( ) const

Returns whether a full synchronization will be done, or just the collection tree (without items).

The default is false, i.e. a full sync will be requested.

Since:
4.8

Definition at line 83 of file resourcesynchronizationjob.cpp.

AgentInstance Akonadi::ResourceSynchronizationJob::resource ( ) const

Returns the resource that has been synchronized.

Definition at line 189 of file collection.cpp.

void Akonadi::ResourceSynchronizationJob::setCollectionTreeOnly ( bool  collectionTreeOnly)

Sets the collectionTreeOnly property.

Parameters:
collectionTreeOnlyIf set, only the collection tree will be synchronized.
Since:
4.8

Definition at line 88 of file resourcesynchronizationjob.cpp.


The documentation for this class was generated from the following files:
  • resourcesynchronizationjob.h
  • collection.cpp
  • objectnotificationmessage.cpp
  • resourcesynchronizationjob.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2012 The KDE developers.
Generated on Mon May 14 2012 04:53:12 by doxygen 1.7.5 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