LunaHook-mirror/LunaHost/GUI/pluginmanager.h
恍兮惚兮 07083bd5ec qt
2024-03-27 20:36:43 +08:00

24 lines
819 B
C++

#ifndef LUNA_PLUGINMANAGER_H
#define LUNA_PLUGINMANAGER_H
#include"Plugin/plugindef.h"
#include"textthread.h"
class LunaHost;
class Pluginmanager{
std::unordered_map<std::wstring,LPVOID>OnNewSentenceS;
std::optional<LPVOID> checkisvalidplugin(const std::wstring&);
concurrency::reader_writer_lock OnNewSentenceSLock;
bool checkisdump(LPVOID);
LunaHost* host;
std::array<InfoForExtension, 20> GetSentenceInfo(TextThread& thread);
void loadqtdlls(std::vector<std::wstring>&collectQtplugs);
public:
std::vector<std::wstring>PluginRank;
Pluginmanager(LunaHost*);
bool dispatch(TextThread&, std::wstring& sentence);
bool addplugin(const std::wstring&);
void swaprank(int,int);
void remove(const std::wstring&);
std::optional<std::wstring>selectpluginfile();
};
#endif