File indexing completed on 2024-11-24 04:43:05

0001 /*
0002    SPDX-FileCopyrightText: 2015-2024 Laurent Montel <montel@kde.org>
0003 
0004    SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 #pragma once
0008 
0009 #include <PimCommonAkonadi/GenericPluginInterface>
0010 
0011 class SendMailPluginInterface : public PimCommon::GenericPluginInterface
0012 {
0013     Q_OBJECT
0014 public:
0015     explicit SendMailPluginInterface(QObject *parent = nullptr);
0016     ~SendMailPluginInterface() override;
0017 
0018     void exec() override;
0019     void createAction(KActionCollection *ac) override;
0020     void setCurrentItems(const Akonadi::Item::List &items) override;
0021     [[nodiscard]] PimCommon::GenericPluginInterface::RequireTypes requiresFeatures() const override;
0022     void updateActions(int numberOfSelectedItems, int numberOfSelectedCollections) override;
0023 
0024 private:
0025     void slotActivated();
0026     void slotSendMailError(const QString &error);
0027     void slotSendMails(const QStringList &emails);
0028     Akonadi::Item::List mListItems;
0029     QAction *mAction = nullptr;
0030 };