1
mirror of https://github.com/R2Northstar/NorthstarLauncher synced 2024-10-30 11:26:40 +01:00
NorthstarLauncher/primedev/plugins/pluginbackend.h

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

41 lines
786 B
C
Raw Normal View History

#pragma once
#include "plugin_abi.h"
#include <queue>
#include <mutex>
enum PluginDataRequestType
{
END = 0,
};
union PluginRespondDataCallable
{
// Empty for now
void* UNUSED;
};
class PluginDataRequest
{
2023-12-20 15:20:02 +01:00
public:
PluginDataRequestType type;
PluginRespondDataCallable func;
PluginDataRequest(PluginDataRequestType type, PluginRespondDataCallable func) : type(type), func(func) {}
};
class PluginCommunicationHandler
{
2023-12-20 15:20:02 +01:00
public:
void RunFrame();
void PushRequest(PluginDataRequestType type, PluginRespondDataCallable func);
2023-12-20 15:20:02 +01:00
public:
std::queue<PluginDataRequest> requestQueue = {};
std::mutex requestMutex;
PluginEngineData m_sEngineData {};
};
void InformPluginsDLLLoad(fs::path dllPath, void* address);
extern PluginCommunicationHandler* g_pPluginCommunicationhandler;