ResourceSynchronizationJob Class Reference
from PyKDE4.akonadi import *
Inherits: KJob → QObject
Namespace: Akonadi
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!
- Since:
- 4.4
Methods | |
__init__ (self, Akonadi.AgentInstance instance, QObject parent=0) | |
bool | collectionTreeOnly (self) |
Akonadi.AgentInstance | resource (self) |
setCollectionTreeOnly (self, bool collectionTreeOnly) | |
start (self) |
Method Documentation
__init__ | ( | self, | ||
Akonadi.AgentInstance | instance, | |||
QObject | parent=0 | |||
) |
Creates a new synchronization job for the given resource.
- Parameters:
-
instance The resource instance to synchronize.
bool collectionTreeOnly | ( | self ) |
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
Akonadi.AgentInstance resource | ( | self ) |
Returns the resource that has been synchronized.
setCollectionTreeOnly | ( | self, | ||
bool | collectionTreeOnly | |||
) |
Sets the collectionTreeOnly property.
- Parameters:
-
collectionTreeOnly If set, only the collection tree will be synchronized.
- Since:
- 4.8
start | ( | self ) |