File indexing completed on 2025-01-19 04:46:43
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 <MessageComposer/PluginEditorCheckBeforeSendInterface> 0010 #include <QHash> 0011 class ConfirmAddressInterface : public MessageComposer::PluginEditorCheckBeforeSendInterface 0012 { 0013 Q_OBJECT 0014 public: 0015 explicit ConfirmAddressInterface(QObject *parent = nullptr); 0016 ~ConfirmAddressInterface() override; 0017 bool exec(const MessageComposer::PluginEditorCheckBeforeSendParams ¶ms) override; 0018 0019 Q_SIGNALS: 0020 void forceReloadConfig(); 0021 0022 public Q_SLOTS: 0023 void reloadConfig() override; 0024 0025 private: 0026 void slotAddWhiteListEmails(const QStringList &lst, uint currentIdentity); 0027 0028 struct ConfirmAddressSettings { 0029 QStringList mDomains; 0030 QStringList mWhiteLists; 0031 bool mRejectedDomain = false; 0032 }; 0033 0034 QHash<uint, ConfirmAddressSettings> mHashSettings; 0035 };