2018-07-26 22:42:21 -07:00
|
|
|
#ifndef EXTENSIONS_H
|
|
|
|
#define EXTENSIONS_H
|
|
|
|
|
2018-08-22 12:24:55 -04:00
|
|
|
#include "qtcommon.h"
|
2018-10-10 07:03:15 -04:00
|
|
|
#include <set>
|
2018-07-26 22:42:21 -07:00
|
|
|
|
2018-07-29 14:36:45 -07:00
|
|
|
struct InfoForExtension
|
|
|
|
{
|
2018-10-10 07:03:15 -04:00
|
|
|
const char* name;
|
|
|
|
int64_t value;
|
|
|
|
InfoForExtension* next;
|
|
|
|
~InfoForExtension() { if (next) delete next; };
|
|
|
|
};
|
|
|
|
|
|
|
|
struct Extension
|
|
|
|
{
|
|
|
|
int number;
|
|
|
|
QString name;
|
|
|
|
wchar_t*(*callback)(const wchar_t*, const InfoForExtension*);
|
|
|
|
bool operator<(const Extension& other) const { return number < other.number; }
|
2018-07-29 14:36:45 -07:00
|
|
|
};
|
2018-10-10 07:03:15 -04:00
|
|
|
|
|
|
|
std::set<Extension> LoadExtensions();
|
|
|
|
bool DispatchSentenceToExtensions(std::wstring& sentence, std::unordered_map<std::string, int64_t> miscInfo);
|
2018-10-17 01:08:31 -04:00
|
|
|
void UnloadExtension(int extenNumber);
|
2018-07-26 22:42:21 -07:00
|
|
|
|
|
|
|
#endif // EXTENSIONS_H
|