Commit 50fa7c0f authored by Laurent Montel's avatar Laurent Montel 😁

Continue to implement plugin support

parent 4f396cdb
......@@ -6,6 +6,7 @@ ecm_setup_version(PROJECT VARIABLE_PREFIX MAILTRANSPORT
set(mailtransport_lib_smtp_srcs
smtp/smtpjob.cpp
smtp/smtpconfigwidget.cpp
)
set(mailtransport_lib_srcs
......@@ -25,11 +26,11 @@ set(mailtransport_widgets_srcs
widgets/transportlistview.cpp
widgets/transportmanagementwidget.cpp
widgets/transportconfigdialog.cpp
widgets/smtpconfigwidget.cpp
)
set(mailtransport_plugins_srcs
plugins/transportabstractplugin.cpp
plugins/transportpluginmanager.cpp
)
ecm_qt_declare_logging_category(mailtransport_lib_srcs HEADER mailtransport_debug.h IDENTIFIER MAILTRANSPORT_LOG CATEGORY_NAME org.kde.pim.mailtransport)
......
......@@ -35,3 +35,8 @@ TransportJob *TransportAbstractPlugin::createTransportJob()
{
return nullptr;
}
void TransportAbstractPlugin::cleanUp(const QString &identifier)
{
Q_UNUSED(identifier);
}
......@@ -24,6 +24,7 @@
#include "mailtransport_export.h"
namespace MailTransport {
class TransportJob;
class Transport;
class MAILTRANSPORT_EXPORT TransportAbstractPlugin : public QObject
{
Q_OBJECT
......@@ -32,6 +33,9 @@ public:
~TransportAbstractPlugin();
virtual TransportJob *createTransportJob();
virtual QString name() const = 0;
virtual bool configureTransport(Transport *transport, QWidget *parent) = 0;
virtual void cleanUp(const QString &identifier);
};
}
......
/*
Copyright (c) 2017 Laurent Montel <montel@kde.org>
This library is free software; you can redistribute it and/or modify it
under the terms of the GNU Library General Public License as published by
the Free Software Foundation; either version 2 of the License, or (at your
option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
*/
#include "transportpluginmanager.h"
using namespace MailTransport;
TransportPluginManager::TransportPluginManager(QObject *parent)
: QObject(parent)
{
}
TransportPluginManager::~TransportPluginManager()
{
}
/*
Copyright (c) 2017 Laurent Montel <montel@kde.org>
This library is free software; you can redistribute it and/or modify it
under the terms of the GNU Library General Public License as published by
the Free Software Foundation; either version 2 of the License, or (at your
option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
*/
#ifndef TRANSPORTPLUGINMANAGER_H
#define TRANSPORTPLUGINMANAGER_H
#include <QObject>
namespace MailTransport {
class TransportPluginManager : public QObject
{
Q_OBJECT
public:
explicit TransportPluginManager(QObject *parent = nullptr);
~TransportPluginManager();
};
}
#endif // TRANSPORTPLUGINMANAGER_H
......@@ -27,7 +27,7 @@
#include "smtpconfigwidget.h"
#include "ui_smtpsettings.h"
#include "transportconfigwidget_p.h"
#include "widgets/transportconfigwidget_p.h"
#include "transport.h"
#include "transportmanager.h"
#include "servertest.h"
......
......@@ -26,7 +26,7 @@
#ifndef MAILTRANSPORT_SMTPCONFIGWIDGET_H
#define MAILTRANSPORT_SMTPCONFIGWIDGET_H
#include "transportconfigwidget.h"
#include "widgets/transportconfigwidget.h"
namespace MailTransport {
class Transport;
......
......@@ -28,7 +28,7 @@
#include "widgets/addtransportdialog.h"
#include "widgets/transportconfigdialog.h"
#include "widgets/transportconfigwidget.h"
#include "widgets/smtpconfigwidget.h"
#include "smtp/smtpconfigwidget.h"
#include <QApplication>
#include <QDBusConnection>
......
......@@ -27,7 +27,7 @@
#include "transportconfigwidget.h"
#include "transportmanager.h"
#include "transporttype.h"
#include "smtpconfigwidget.h"
#include "smtp/smtpconfigwidget.h"
#include <QDialogButtonBox>
#include <QLabel>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment