• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdepimlibs-4.14.10 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();
Akonadi::AgentInstance
A representation of an agent instance.
Definition agentinstance.h:63
Akonadi::AgentManager::self
static AgentManager * self()
Returns the global instance of the agent manager.
Definition agentmanager.cpp:377
Akonadi::AgentManager::instance
AgentInstance instance(const QString &identifier) const
Returns the agent instance with the given identifier or an invalid agent instance if the identifier d...
Definition agentmanager.cpp:401
Akonadi::ResourceSynchronizationJob
Job that synchronizes a resource.
Definition resourcesynchronizationjob.h:60
Akonadi::ResourceSynchronizationJob::ResourceSynchronizationJob
ResourceSynchronizationJob(const AgentInstance &instance, QObject *parent=0)
Creates a new synchronization job for the given resource.
Definition resourcesynchronizationjob.cpp:63
Akonadi::ResourceSynchronizationJob::resource
AgentInstance resource() const
Returns the resource that has been synchronized.
Definition resourcesynchronizationjob.cpp:164
Akonadi
FreeBusyManager::Singleton.
Definition actionstatemanager_p.h:28
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

◆ ResourceSynchronizationJob()

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.

◆ ~ResourceSynchronizationJob()

Akonadi::ResourceSynchronizationJob::~ResourceSynchronizationJob ( )

Destroys the synchronization job.

Definition at line 74 of file resourcesynchronizationjob.cpp.

Member Function Documentation

◆ collectionTreeOnly()

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.

◆ resource()

AgentInstance Akonadi::ResourceSynchronizationJob::resource ( ) const

Returns the resource that has been synchronized.

Definition at line 164 of file resourcesynchronizationjob.cpp.

◆ setCollectionTreeOnly()

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.

◆ start()

void Akonadi::ResourceSynchronizationJob::start ( )

Definition at line 79 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-2024 The KDE developers.
Generated on Wed Jan 24 2024 00:00:00 by doxygen 1.10.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
  • Related Pages

kdepimlibs-4.14.10 API Reference

Skip menu "kdepimlibs-4.14.10 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