diff options
author | Jan200101 <sentrycraft123@gmail.com> | 2023-09-10 21:17:03 +0200 |
---|---|---|
committer | Jan200101 <sentrycraft123@gmail.com> | 2023-09-10 21:17:03 +0200 |
commit | ac01bde6b9673b80dd225be3edebbe2255d9ebd2 (patch) | |
tree | b458d57204d4c7377917a316f36db29165b9b2ae /src/plugin.cpp | |
parent | 94841a78b8126f0ed02db3e7066f4680031011a6 (diff) | |
download | SouthRPC-ac01bde6b9673b80dd225be3edebbe2255d9ebd2.tar.gz SouthRPC-ac01bde6b9673b80dd225be3edebbe2255d9ebd2.zip |
implement plugin as class, create server class
Diffstat (limited to 'src/plugin.cpp')
-rw-r--r-- | src/plugin.cpp | 24 |
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 |