From ac01bde6b9673b80dd225be3edebbe2255d9ebd2 Mon Sep 17 00:00:00 2001 From: Jan200101 Date: Sun, 10 Sep 2023 21:17:03 +0200 Subject: implement plugin as class, create server class --- src/plugin.cpp | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 src/plugin.cpp (limited to 'src/plugin.cpp') diff --git a/src/plugin.cpp b/src/plugin.cpp new file mode 100644 index 0000000..a1098da --- /dev/null +++ b/src/plugin.cpp @@ -0,0 +1,24 @@ +#include "ns_plugin.h" +#include "plugin.h" +#include "server.h" + +Plugin::Plugin(PluginInitFuncs* funcs, PluginNorthstarData* data) + : server(new jsonrpc_server(this)) +{ + this->funcs = funcs; + this->data = data; + + spdlog::info(PLUGIN_NAME " initialised!"); +} + +Plugin::~Plugin() +{ + delete server; +} + +void Plugin::LoadEngineData(void* data) +{ + this->engine_data = static_cast(data); + + spdlog::info("Engine data loaded"); +} \ No newline at end of file -- cgit v1.2.3