aboutsummaryrefslogtreecommitdiff
path: root/src/plugin.cpp
diff options
context:
space:
mode:
authorJan200101 <sentrycraft123@gmail.com>2023-09-10 21:17:03 +0200
committerJan200101 <sentrycraft123@gmail.com>2023-09-10 21:17:03 +0200
commitac01bde6b9673b80dd225be3edebbe2255d9ebd2 (patch)
treeb458d57204d4c7377917a316f36db29165b9b2ae /src/plugin.cpp
parent94841a78b8126f0ed02db3e7066f4680031011a6 (diff)
downloadSouthRPC-ac01bde6b9673b80dd225be3edebbe2255d9ebd2.tar.gz
SouthRPC-ac01bde6b9673b80dd225be3edebbe2255d9ebd2.zip
implement plugin as class, create server class
Diffstat (limited to 'src/plugin.cpp')
-rw-r--r--src/plugin.cpp24
1 files changed, 24 insertions, 0 deletions
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<EngineData*>(data);
+
+ spdlog::info("Engine data loaded");
+} \ No newline at end of file