/usr/include/akonadi/resourcesynchronizationjob.h is in kdepimlibs5-dev 4:4.14.10-7+b2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 | /*
* Copyright (c) 2009 Volker Krause <vkrause@kde.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef AKONADI_RESOURCESYNCHRONIZATIONJOB_H
#define AKONADI_RESOURCESYNCHRONIZATIONJOB_H
#include "akonadi_export.h"
#include <kjob.h>
namespace Akonadi {
class AgentInstance;
class ResourceSynchronizationJobPrivate;
/**
* @short 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:
*
* @code
* 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();
*
* @endcode
*
* @note This is a KJob, not an Akonadi::Job, so it won't auto-start!
*
* @author Volker Krause <vkrause@kde.org>
* @since 4.4
*/
class AKONADI_EXPORT ResourceSynchronizationJob : public KJob
{
Q_OBJECT
public:
/**
* Creates a new synchronization job for the given resource.
*
* @param instance The resource instance to synchronize.
*/
explicit ResourceSynchronizationJob(const AgentInstance &instance, QObject *parent = 0);
/**
* Destroys the synchronization job.
*/
~ResourceSynchronizationJob();
/**
* Returns whether a full synchronization will be done, or just the collection tree (without items).
* The default is @c false, i.e. a full sync will be requested.
*
* @since 4.8
*/
bool collectionTreeOnly() const;
/**
* Sets the collectionTreeOnly property.
*
* @param collectionTreeOnly If set, only the collection tree will be synchronized.
* @since 4.8
*/
void setCollectionTreeOnly(bool collectionTreeOnly);
/**
* Returns the resource that has been synchronized.
*/
AgentInstance resource() const;
/* reimpl */
void start();
private:
//@cond PRIVATE
ResourceSynchronizationJobPrivate *const d;
friend class ResourceSynchronizationJobPrivate;
Q_PRIVATE_SLOT(d, void slotSynchronized())
Q_PRIVATE_SLOT(d, void slotTimeout())
//@endcond
};
}
#endif
|