feat(plugins): add c2.WebSocket (#6076)

This commit is contained in:
nerix
2025-04-07 19:38:10 +02:00
committed by GitHub
parent d3bab9132f
commit ab66be21b3
31 changed files with 1859 additions and 29 deletions
@@ -2,6 +2,7 @@
#ifdef CHATTERINO_HAVE_PLUGINS
# include "common/websockets/WebSocketPool.hpp"
# include "controllers/commands/CommandContext.hpp"
# include "controllers/plugins/Plugin.hpp"
@@ -61,6 +62,8 @@ public:
const QString &query, const QString &fullTextContent,
int cursorPosition, bool isFirstWord) const;
WebSocketPool &webSocketPool();
private:
void loadPlugins();
void load(const QFileInfo &index, const QDir &pluginDir,
@@ -74,6 +77,7 @@ private:
static void loadChatterinoLib(lua_State *l);
bool tryLoadFromDir(const QDir &pluginDir);
std::map<QString, std::unique_ptr<Plugin>> plugins_;
WebSocketPool webSocketPool_;
// This is for tests, pay no attention
friend class PluginControllerAccess;