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
|
/*
SPDX-FileCopyrightText: 2013-2022 Laurent Montel <montel@kde.org>
SPDX-License-Identifier: GPL-2.0-or-later
*/
#pragma once
#include "pimdataexporter_export.h"
#include <QObject>
#include <QStringList>
class KJob;
class PIMDATAEXPORTER_EXPORT SynchronizeResourceJob : public QObject
{
Q_OBJECT
public:
explicit SynchronizeResourceJob(QObject *parent = nullptr);
~SynchronizeResourceJob() override;
void start();
void setListResources(const QStringList &resources);
void setSynchronizeOnlyCollection(bool onlyCollection);
Q_SIGNALS:
void synchronizationFinished();
void synchronizationInstanceDone(const QString &name, const QString &identifier);
void synchronizationInstanceFailed(const QString &);
private:
void slotSynchronizationFinished(KJob *);
void slotNextSync();
QStringList mListResources;
int mIndex = 0;
bool mOnlyCollection = true;
};
|