File indexing completed on 2024-12-15 04:55:35

0001 /*
0002    SPDX-FileCopyrightText: 2016-2024 Laurent Montel <montel@kde.org>
0003 
0004    SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 #pragma once
0008 
0009 #include "abstractimapsettingscheckjob.h"
0010 #include "libsieveeditor_private_export.h"
0011 class LIBSIEVEEDITOR_TESTS_EXPORT ImportImapSettingsAkonadiCheckJob : public AbstractImapSettingsCheckJob
0012 {
0013     Q_OBJECT
0014 public:
0015     explicit ImportImapSettingsAkonadiCheckJob(QObject *parent = nullptr);
0016     ~ImportImapSettingsAkonadiCheckJob() override;
0017 
0018     void start() override;
0019 
0020     [[nodiscard]] bool settingsCanBeImported() const override;
0021     [[nodiscard]] QString name() const override;
0022     void setImapSettingsPassword(AbstractImapSettingsPassword *passwordImporter) override;
0023 
0024 private:
0025     [[nodiscard]] inline bool resourceCanHaveSieveSupport(const QString &filename) const;
0026     void loadSieveServerSettings();
0027     void slotImportNextServerSieveDone(const SieveEditorUtil::SieveServerConfig &config, const QString &filename);
0028     void importNextServerSieve();
0029     void importSettings(const QString &directory, const QString &filename);
0030     QMultiMap<QString, QString> mSieveServerLst;
0031     QMultiMap<QString, QString>::const_iterator mSieveServerMapIterator;
0032 };