From 795d191f27260bf5d8190f3f9ce8c05209565976 Mon Sep 17 00:00:00 2001 From: 0xFEEDC0DE64 <0xFEEDC0DE64@gmail.com> Date: Mon, 17 Sep 2018 19:25:45 +0200 Subject: [PATCH] Imported existing sources --- proxyapplication.cpp | 12 ++++++++++++ proxyapplication.h | 15 +++++++++++++++ proxyplugin.cpp | 19 +++++++++++++++++++ proxyplugin.h | 16 ++++++++++++++++ proxyplugin.json | 0 proxyplugin.pro | 19 +++++++++++++++++++ 6 files changed, 81 insertions(+) create mode 100644 proxyapplication.cpp create mode 100644 proxyapplication.h create mode 100644 proxyplugin.cpp create mode 100644 proxyplugin.h create mode 100644 proxyplugin.json create mode 100644 proxyplugin.pro diff --git a/proxyapplication.cpp b/proxyapplication.cpp new file mode 100644 index 0000000..8241896 --- /dev/null +++ b/proxyapplication.cpp @@ -0,0 +1,12 @@ +#include "proxyapplication.h" + +ProxyApplication::ProxyApplication(const QJsonObject &config, QObject *parent) : + WebApplication(parent) +{ + +} + +void ProxyApplication::start() +{ + +} diff --git a/proxyapplication.h b/proxyapplication.h new file mode 100644 index 0000000..642f870 --- /dev/null +++ b/proxyapplication.h @@ -0,0 +1,15 @@ +#pragma once + +#include "webapplication.h" + +class QJsonObject; + +class ProxyApplication : public WebApplication +{ + Q_OBJECT + +public: + ProxyApplication(const QJsonObject &config, QObject *parent = Q_NULLPTR); + + void start() Q_DECL_OVERRIDE; +}; diff --git a/proxyplugin.cpp b/proxyplugin.cpp new file mode 100644 index 0000000..71cc0f8 --- /dev/null +++ b/proxyplugin.cpp @@ -0,0 +1,19 @@ +#include "proxyplugin.h" + +#include "proxyapplication.h" + +ProxyPlugin::ProxyPlugin(QObject *parent) : + WebPlugin(parent) +{ + +} + +QString ProxyPlugin::pluginName() const +{ + return QStringLiteral("proxy"); +} + +WebApplication *ProxyPlugin::createApplication(const QJsonObject &config) const +{ + return new ProxyApplication(config); +} diff --git a/proxyplugin.h b/proxyplugin.h new file mode 100644 index 0000000..97ed5da --- /dev/null +++ b/proxyplugin.h @@ -0,0 +1,16 @@ +#pragma once + +#include "webplugin.h" + +class ProxyPlugin : public WebPlugin +{ + Q_OBJECT + Q_PLUGIN_METADATA(IID "dbsoftware.webserver.plugin/1.0" FILE "proxyplugin.json") + Q_INTERFACES(WebPlugin) + +public: + ProxyPlugin(QObject *parent = Q_NULLPTR); + + QString pluginName() const Q_DECL_OVERRIDE; + WebApplication *createApplication(const QJsonObject &config) const Q_DECL_OVERRIDE; +}; diff --git a/proxyplugin.json b/proxyplugin.json new file mode 100644 index 0000000..e69de29 diff --git a/proxyplugin.pro b/proxyplugin.pro new file mode 100644 index 0000000..31646b2 --- /dev/null +++ b/proxyplugin.pro @@ -0,0 +1,19 @@ +QT += core network + +DBLIBS += webserverlib + +HEADERS += proxyplugin.h \ + proxyapplication.h + +SOURCES += proxyplugin.cpp \ + proxyapplication.cpp + +FORMS += + +RESOURCES += + +TRANSLATIONS += + +OTHER_FILES += proxyplugin.json + +include(../plugin.pri)