MailTransport

transportabstractplugin.h
1/*
2 SPDX-FileCopyrightText: 2017-2024 Laurent Montel <montel@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7#pragma once
8
9#include "mailtransport_export.h"
10#include <QList>
11#include <QObject>
12namespace MailTransport
13{
14class TransportJob;
15class Transport;
16/**
17 * @brief The TransportAbstractPluginInfo struct
18 * @author Laurent Montel <montel@kde.org>
19 */
20struct 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 <montel@kde.org>
30 */
31class MAILTRANSPORT_EXPORT TransportAbstractPlugin : public QObject
32{
33 Q_OBJECT
34public:
35 explicit TransportAbstractPlugin(QObject *parent = nullptr);
36 ~TransportAbstractPlugin() override;
37
38 [[nodiscard]] virtual TransportJob *createTransportJob(MailTransport::Transport *t, const QString &identifier) = 0;
39 [[nodiscard]] virtual QList<TransportAbstractPluginInfo> names() const = 0;
40 [[nodiscard]] 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
44Q_SIGNALS:
45 void updatePluginList();
46};
47}
48Q_DECLARE_TYPEINFO(MailTransport::TransportAbstractPluginInfo, Q_RELOCATABLE_TYPE);
The TransportAbstractPlugin class.
Abstract base class for all mail transport jobs.
Represents the settings of a specific mail transport.
Definition transport.h:33
The TransportAbstractPluginInfo struct.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:07:17 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.