LunaHook-mirror/LunaHost/GUI/pluginmanager.h

23 lines
804 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-08 16:18:33 +08:00
class pluginmanager{
std::vector<std::pair<std::wstring,LPVOID>>OnNewSentenceS;
std::optional<std::pair<std::wstring,LPVOID>> checkisvalidplugin(const std::wstring&);
std::vector<std::wstring>readpluginfile();
void writepluginfile(const std::wstring&);
std::wstring pluginfilename;
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-08 16:18:33 +08:00
public:
2024-02-08 19:12:20 +08:00
pluginmanager(LunaHost*);
bool dispatch(TextThread&, std::wstring& sentence);
2024-02-08 16:18:33 +08:00
bool addplugin(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