akonadi
Akonadi::ResourceSynchronizationJob Class Reference
Job that synchronizes a resource. More...
#include <resourcesynchronizationjob.h>
Inherits KJob.
Public Member Functions | |
| ResourceSynchronizationJob (const AgentInstance &instance, QObject *parent=0) | |
| ~ResourceSynchronizationJob () | |
| AgentInstance | resource () const |
| 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* ) ) );
- Note:
- This is a KJob not an Akonadi::Job, so it wont auto-start!
- Since:
- 4.4
Definition at line 58 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:
-
instance The resource instance to synchronize.
Definition at line 56 of file resourcesynchronizationjob.cpp.
| Akonadi::ResourceSynchronizationJob::~ResourceSynchronizationJob | ( | ) |
Destroys the synchronization job.
Definition at line 67 of file resourcesynchronizationjob.cpp.
Member Function Documentation
| AgentInstance Akonadi::ResourceSynchronizationJob::resource | ( | ) | const |
Returns the resource that has been synchronized.
Definition at line 124 of file resourcesynchronizationjob.cpp.
The documentation for this class was generated from the following files:
KDE 4.4 API Reference