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)