aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDLL/plugins/pluginbackend.h
diff options
context:
space:
mode:
Diffstat (limited to 'NorthstarDLL/plugins/pluginbackend.h')
-rw-r--r--NorthstarDLL/plugins/pluginbackend.h45
1 files changed, 45 insertions, 0 deletions
diff --git a/NorthstarDLL/plugins/pluginbackend.h b/NorthstarDLL/plugins/pluginbackend.h
new file mode 100644
index 00000000..ef42c508
--- /dev/null
+++ b/NorthstarDLL/plugins/pluginbackend.h
@@ -0,0 +1,45 @@
+#pragma once
+#include "pch.h"
+#include "plugin_abi.h"
+#include "shared/gamepresence.h"
+
+#include <queue>
+#include <mutex>
+
+enum PluginDataRequestType
+{
+ END = 0,
+};
+
+union PluginRespondDataCallable
+{
+ // Empty for now
+ void* UNUSED;
+};
+
+class PluginDataRequest
+{
+ public:
+ PluginDataRequestType type;
+ PluginRespondDataCallable func;
+ PluginDataRequest(PluginDataRequestType type, PluginRespondDataCallable func) : type(type), func(func) {}
+};
+
+class PluginCommunicationHandler
+{
+ public:
+ void RunFrame();
+ void PushRequest(PluginDataRequestType type, PluginRespondDataCallable func);
+
+ void GeneratePresenceObjects();
+
+ public:
+ std::queue<PluginDataRequest> requestQueue;
+ std::mutex requestMutex;
+
+ PluginEngineData m_sEngineData {};
+};
+
+void init_plugincommunicationhandler();
+
+extern PluginCommunicationHandler* g_pPluginCommunicationhandler;