obs-websocket/src/eventhandler/EventHandler_Config.cpp

31 lines
1.1 KiB
C++
Raw Normal View History

2021-05-14 02:11:19 +00:00
#include "EventHandler.h"
#include "../plugin-macros.generated.h"
void EventHandler::HandleCurrentSceneCollectionChanged()
{
json eventData;
eventData["sceneCollectionName"] = Utils::Obs::StringHelper::GetCurrentSceneCollection();
_webSocketServer->BroadcastEvent(EventSubscription::Config, "CurrentSceneCollectionChanged", eventData);
2021-05-14 02:11:19 +00:00
}
void EventHandler::HandleSceneCollectionListChanged()
{
json eventData;
eventData["sceneCollections"] = Utils::Obs::ListHelper::GetSceneCollectionList();
_webSocketServer->BroadcastEvent(EventSubscription::Config, "SceneCollectionListChanged", eventData);
2021-05-14 02:11:19 +00:00
}
void EventHandler::HandleCurrentProfileChanged()
{
json eventData;
eventData["profileName"] = Utils::Obs::StringHelper::GetCurrentProfile();
_webSocketServer->BroadcastEvent(EventSubscription::Config, "CurrentProfileChanged", eventData);
2021-05-14 02:11:19 +00:00
}
void EventHandler::HandleProfileListChanged()
{
json eventData;
eventData["profiles"] = Utils::Obs::ListHelper::GetProfileList();
_webSocketServer->BroadcastEvent(EventSubscription::Config, "ProfileListChanged", eventData);
2021-05-14 02:11:19 +00:00
}