MailTransport

transportabstractplugin.h
1 /*
2  SPDX-FileCopyrightText: 2017-2023 Laurent Montel <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6 
7 #pragma once
8 
9 #include "mailtransport_export.h"
10 #include <QObject>
11 #include <QVector>
12 namespace MailTransport
13 {
14 class TransportJob;
15 class Transport;
16 /**
17  * @brief The TransportAbstractPluginInfo struct
18  * @author Laurent Montel <[email protected]>
19  */
20 struct MAILTRANSPORT_EXPORT TransportAbstractPluginInfo {
21  QString name;
22  QString identifier;
23  QString description;
24  bool isAkonadi = false;
25 };
26 
27 /**
28  * @brief The TransportAbstractPlugin class
29  * @author Laurent Montel <[email protected]>
30  */
31 class MAILTRANSPORT_EXPORT TransportAbstractPlugin : public QObject
32 {
33  Q_OBJECT
34 public:
35  explicit TransportAbstractPlugin(QObject *parent = nullptr);
36  ~TransportAbstractPlugin() override;
37 
38  Q_REQUIRED_RESULT virtual TransportJob *createTransportJob(MailTransport::Transport *t, const QString &identifier) = 0;
39  Q_REQUIRED_RESULT virtual QVector<TransportAbstractPluginInfo> names() const = 0;
40  Q_REQUIRED_RESULT virtual bool configureTransport(const QString &identifier, Transport *transport, QWidget *parent) = 0;
41  virtual void cleanUp(MailTransport::Transport *t);
42  virtual void initializeTransport(MailTransport::Transport *t, const QString &identifier);
43 
44 Q_SIGNALS:
45  void updatePluginList();
46 };
47 }
48 Q_DECLARE_TYPEINFO(MailTransport::TransportAbstractPluginInfo, Q_MOVABLE_TYPE);
Abstract base class for all mail transport jobs.
Definition: transportjob.h:30
The TransportAbstractPluginInfo struct.
The TransportAbstractPlugin class.
Represents the settings of a specific mail transport.
Definition: transport.h:32
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Tue Feb 7 2023 03:58:25 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.