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

akonadi

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

#include <resourcesynchronizationjob.h>

Inherits KJob.

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 vkrau.nosp@m.se@k.nosp@m.de.or.nosp@m.g
Since
4.4

Definition at line 59 of file resourcesynchronizationjob.h.

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 63 of file resourcesynchronizationjob.cpp.

Akonadi::ResourceSynchronizationJob::~ResourceSynchronizationJob ( )

Destroys the synchronization job.

Definition at line 74 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 84 of file resourcesynchronizationjob.cpp.

AgentInstance Akonadi::ResourceSynchronizationJob::resource ( ) const

Returns the resource that has been synchronized.

Definition at line 160 of file resourcesynchronizationjob.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 89 of file resourcesynchronizationjob.cpp.


The documentation for this class was generated from the following files:
  • resourcesynchronizationjob.h
  • resourcesynchronizationjob.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:00:29 by doxygen 1.8.7 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 API Reference

Skip menu "kdepimlibs API Reference"
  • akonadi
  •   contact
  •   kmime
  •   socialutils
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kldap
  • kmbox
  • kmime
  • kpimidentities
  • kpimtextedit
  • kresources
  • ktnef
  • kxmlrpcclient
  • microblog

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