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

0001 /*
0002    SPDX-FileCopyrightText: 2017-2024 Laurent Montel <montel@kde.org>
0003 
0004    SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 #pragma once
0008 
0009 #include "abstractimapsettingspassword.h"
0010 
0011 #include <qt6keychain/keychain.h>
0012 
0013 class ImportImapSettingsAkonadiPassword : public AbstractImapSettingsPassword
0014 {
0015     Q_OBJECT
0016 public:
0017     explicit ImportImapSettingsAkonadiPassword(QObject *parent = nullptr);
0018     ~ImportImapSettingsAkonadiPassword() override;
0019 
0020     void importPasswords(const SieveEditorUtil::SieveServerConfig &config, const QString &filename, bool reuseImapSettings) override;
0021 
0022 private:
0023     void loadImapAccountSettings();
0024     void readSieveServerPasswordFinished(QKeychain::Job *baseJob);
0025     void readSieveServerCustomPasswordFinished(QKeychain::Job *baseJob);
0026     SieveEditorUtil::SieveServerConfig mCurrentConfig;
0027     bool mReuseImapSettings = false;
0028 };