MailTransport

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

KDE's Doxygen guidelines are available online.