File indexing completed on 2024-06-16 05:00:29

0001 /*
0002    SPDX-FileCopyrightText: 2013-2024 Laurent Montel <montel@kde.org>
0003 
0004    SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 #pragma once
0008 
0009 #include "abstractimportexportjob.h"
0010 #include "pimdataexportercore_private_export.h"
0011 class ArchiveStorage;
0012 
0013 class PIMDATAEXPORTER_TESTS_EXPORT ImportAkregatorJobInterface : public AbstractImportExportJob
0014 {
0015     Q_OBJECT
0016 public:
0017     explicit ImportAkregatorJobInterface(QObject *parent, Utils::StoredTypes typeSelected, ArchiveStorage *archiveStorage, int numberOfStep);
0018     ~ImportAkregatorJobInterface() override;
0019 
0020     void start() override;
0021 
0022 protected:
0023     [[nodiscard]] Akonadi::Collection::Id convertFolderPathToCollectionId(const QString &path) override;
0024     [[nodiscard]] QString adaptNewResourceUrl(bool overwriteResources, const KSharedConfig::Ptr &resourceConfig, const QString &storePath) override;
0025     [[nodiscard]] QString createResource(const QString &resources, const QString &name, const QMap<QString, QVariant> &settings, bool synchronizeTree) override;
0026     [[nodiscard]] QString applicationName() const override;
0027 
0028 private:
0029     void slotNextStep() override;
0030 
0031 private:
0032     void restoreConfig();
0033     void restoreData();
0034 };