LunaHook-mirror/LunaHost/GUI/pluginmanager.h

23 lines
807 B
C
Raw Normal View History

2024-02-08 19:12:20 +08:00
#ifndef LUNA_PLUGINMANAGER_H
#define LUNA_PLUGINMANAGER_H
2024-02-08 16:45:23 +08:00
#include"Plugin/plugindef.h"
2024-02-08 16:18:33 +08:00
#include"textthread.h"
2024-02-08 19:12:20 +08:00
class LunaHost;
2024-02-09 09:25:26 +08:00
class Pluginmanager{
std::unordered_map<std::wstring,LPVOID>OnNewSentenceS;
std::optional<LPVOID> checkisvalidplugin(const std::wstring&);
2024-02-08 16:18:33 +08:00
concurrency::reader_writer_lock OnNewSentenceSLock;
bool checkisdump(LPVOID);
2024-02-08 19:12:20 +08:00
LunaHost* host;
std::array<InfoForExtension, 20> GetSentenceInfo(TextThread& thread);
2024-02-09 09:25:26 +08:00
void loadqtdlls(std::vector<std::wstring>&collectQtplugs);
2024-02-08 16:18:33 +08:00
public:
2024-02-09 09:25:26 +08:00
std::vector<std::wstring>PluginRank;
Pluginmanager(LunaHost*);
2024-02-08 19:12:20 +08:00
bool dispatch(TextThread&, std::wstring& sentence);
2024-02-09 09:25:26 +08:00
bool addplugin(const std::wstring&,bool isQt=false);
void remove(const std::wstring&);
2024-02-08 19:12:20 +08:00
std::optional<std::wstring>selectpluginfile();
2024-02-08 16:18:33 +08:00
};
2024-02-08 19:12:20 +08:00
#endif