2021-05-14 02:11:19 +00:00
|
|
|
#include "EventHandler.h"
|
|
|
|
|
|
|
|
void EventHandler::HandleCurrentSceneCollectionChanged()
|
|
|
|
{
|
2021-05-14 08:13:27 +00:00
|
|
|
json eventData;
|
2021-06-13 07:39:52 +00:00
|
|
|
eventData["sceneCollectionName"] = Utils::Obs::StringHelper::GetCurrentSceneCollection();
|
2021-09-04 17:04:00 +00:00
|
|
|
BroadcastEvent(EventSubscription::Config, "CurrentSceneCollectionChanged", eventData);
|
2021-05-14 02:11:19 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void EventHandler::HandleSceneCollectionListChanged()
|
|
|
|
{
|
2021-05-14 08:13:27 +00:00
|
|
|
json eventData;
|
|
|
|
eventData["sceneCollections"] = Utils::Obs::ListHelper::GetSceneCollectionList();
|
2021-09-04 17:04:00 +00:00
|
|
|
BroadcastEvent(EventSubscription::Config, "SceneCollectionListChanged", eventData);
|
2021-05-14 02:11:19 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void EventHandler::HandleCurrentProfileChanged()
|
|
|
|
{
|
2021-05-14 08:13:27 +00:00
|
|
|
json eventData;
|
2021-06-13 07:39:52 +00:00
|
|
|
eventData["profileName"] = Utils::Obs::StringHelper::GetCurrentProfile();
|
2021-09-04 17:04:00 +00:00
|
|
|
BroadcastEvent(EventSubscription::Config, "CurrentProfileChanged", eventData);
|
2021-05-14 02:11:19 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void EventHandler::HandleProfileListChanged()
|
|
|
|
{
|
2021-05-14 08:13:27 +00:00
|
|
|
json eventData;
|
|
|
|
eventData["profiles"] = Utils::Obs::ListHelper::GetProfileList();
|
2021-09-04 17:04:00 +00:00
|
|
|
BroadcastEvent(EventSubscription::Config, "ProfileListChanged", eventData);
|
2021-05-14 02:11:19 +00:00
|
|
|
}
|