diff options
Diffstat (limited to 'primedev/plugins/pluginbackend.h')
-rw-r--r-- | primedev/plugins/pluginbackend.h | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/primedev/plugins/pluginbackend.h b/primedev/plugins/pluginbackend.h new file mode 100644 index 00000000..45cd42f3 --- /dev/null +++ b/primedev/plugins/pluginbackend.h @@ -0,0 +1,40 @@ +#pragma once +#include "plugin_abi.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); + +public: + std::queue<PluginDataRequest> requestQueue = {}; + std::mutex requestMutex; + + PluginEngineData m_sEngineData {}; +}; + +void InformPluginsDLLLoad(fs::path dllPath, void* address); +extern PluginCommunicationHandler* g_pPluginCommunicationhandler; |