File indexing completed on 2024-11-24 04:49:52
0001 /* 0002 SPDX-FileCopyrightText: 2017-2024 Laurent Montel <montel@kde.org> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #pragma once 0008 0009 #include "util/abstractakonadiimapsettinginterface.h" 0010 #include <QObject> 0011 struct AkonadiImapSettingInterfaceDataTest { 0012 bool sieveSupport = true; 0013 bool sieveReuseConfig = true; 0014 QString imapServer; 0015 QString userName; 0016 int sievePort = -1; 0017 QString sieveCustomUsername; 0018 QString sieveCustomAuthentification; 0019 QString sieveVacationFilename; 0020 QString safety; 0021 int alternateAuthentication = -1; 0022 int authentication = -1; 0023 QString sieveAlternateUrl; 0024 QString password; 0025 QString sieveCustomPassword; 0026 int imapPort = -1; 0027 }; 0028 0029 class AkonadiImapSettingInterfaceTest : public KSieveCore::AbstractAkonadiImapSettingInterface 0030 { 0031 public: 0032 explicit AkonadiImapSettingInterfaceTest(const AkonadiImapSettingInterfaceDataTest &data); 0033 ~AkonadiImapSettingInterfaceTest() override; 0034 0035 [[nodiscard]] bool sieveSupport() const override; 0036 [[nodiscard]] bool sieveReuseConfig() const override; 0037 [[nodiscard]] QString imapServer() const override; 0038 [[nodiscard]] QString userName() const override; 0039 [[nodiscard]] int sievePort() const override; 0040 [[nodiscard]] QString sieveCustomUsername() const override; 0041 [[nodiscard]] QString sieveCustomAuthentification() const override; 0042 [[nodiscard]] QString sieveVacationFilename() const override; 0043 [[nodiscard]] QString safety() const override; 0044 [[nodiscard]] int alternateAuthentication() const override; 0045 [[nodiscard]] int authentication() const override; 0046 [[nodiscard]] QString sieveAlternateUrl() const override; 0047 [[nodiscard]] int imapPort() const override; 0048 0049 private: 0050 AkonadiImapSettingInterfaceDataTest mData; 0051 }; 0052 0053 Q_DECLARE_METATYPE(AkonadiImapSettingInterfaceDataTest)