Signed-off-by: faumaray <faumaray@gmail.com>
This commit is contained in:
faumaray committed 2026-07-25 23:44:48 +03:00
1 parent 11850b1a8d
commit 46ff4068cf
9 files changed
+4657 -96

No files matched your search

@@ -10,6 +10,7 @@
#include <Void/TeamSpeak/TeamSpeak.hpp>
#include <atomic>
#include <functional>
#include <map>
#include <memory>
#include <mutex>
@@ -124,6 +125,12 @@ namespace Echoion::Standalone
// Events
void registerEventCallback(const Api::EventCallback& cb) override;
void unregisterEventCallback(const Api::EventCallback& cb) override;
[[nodiscard]] Api::Result<std::string>
hostControl(const std::string& method,
const std::string& requestJson) override;
using HostControlHandler = std::function<Api::Result<std::string>(
const std::string&, const std::string&)>;
void setHostControlHandler(HostControlHandler handler);
// Prevent new event dispatches, release registered callbacks and
// wait until every callback already in flight has returned. The
// host must call this before unloading code that owns an event
@@ -157,6 +164,8 @@ namespace Echoion::Standalone
std::map<uint64_t, std::string> avatarPaths_;
std::vector<uint64_t> whisperList_;
std::jthread snapshotThread_;
mutable std::mutex hostControlMutex_;
HostControlHandler hostControlHandler_;
EventCallbackGate eventCallbacks_;
};