File indexing completed on 2024-06-23 05:19:40
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 ExportAddressbookJobInterface : public AbstractImportExportJob 0014 { 0015 Q_OBJECT 0016 public: 0017 explicit ExportAddressbookJobInterface(QObject *parent, Utils::StoredTypes typeSelected, ArchiveStorage *archiveStorage, int numberOfStep); 0018 ~ExportAddressbookJobInterface() override; 0019 0020 void start() override; 0021 void slotWriteNextArchiveResource(); 0022 void slotAddressbookJobTerminated(); 0023 0024 protected: 0025 virtual void convertCollectionToRealPath(KConfigGroup &group, const QString ¤tKey) = 0; 0026 virtual void convertCollectionListToRealPath(KConfigGroup &group, const QString ¤tKey) = 0; 0027 void slotCheckBackupConfig(); 0028 virtual void exportResourceToArchive(const QString &archivePath, const QString &url, const QString &identifier) = 0; 0029 [[nodiscard]] virtual QList<Utils::AkonadiInstanceInfo> listOfResource() = 0; 0030 [[nodiscard]] virtual QString resourcePath(const QString &agentIdentifier, const QString &defaultPath) const = 0; 0031 virtual void backupAddressBookResourceFile(const QString &agentIdentifier, const QString &defaultPath) = 0; 0032 [[nodiscard]] QString applicationName() const override; 0033 0034 private: 0035 void slotCheckBackupResource(); 0036 0037 void backupConfig(); 0038 int mIndexIdentifier = 0; 0039 };