File indexing completed on 2024-06-23 05:19:45

0001 /*
0002    SPDX-FileCopyrightText: 2022-2024 Laurent Montel <montel@kde.org>
0003 
0004    SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 #pragma once
0007 #include "importexportmailutil.h"
0008 #include "pimdataexportercore_private_export.h"
0009 #include <QObject>
0010 class KZip;
0011 class ExportMailJobInterface;
0012 class PIMDATAEXPORTER_TESTS_EXPORT ExportMailFolderAttributeJob : public QObject
0013 {
0014     Q_OBJECT
0015 public:
0016     explicit ExportMailFolderAttributeJob(QObject *parent = nullptr);
0017     ~ExportMailFolderAttributeJob() override;
0018 
0019     [[nodiscard]] bool canStart() const;
0020 
0021     void start();
0022     void setArchive(KZip *zip);
0023     void setExportInterface(ExportMailJobInterface *interface);
0024 
0025 Q_SIGNALS:
0026     void successed();
0027     void failed();
0028 
0029 protected:
0030     virtual void fetchAttributes() = 0;
0031 
0032     void storeFileFolderAttribute(const QMap<QString, ImportExportMailUtil::AttributeInfo> &lstAttributeInfo);
0033 
0034     KZip *mArchive = nullptr;
0035     ExportMailJobInterface *mInterface = nullptr;
0036 };