obs-websocket/src/eventhandler/EventHandler_Config.cpp

44 lines
1.4 KiB
C++
Raw Normal View History

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