Files
video-shader-toys/apps/LoopThroughWithOpenGLCompositing/control/RuntimeServices.h
Aiden b3705d96cc
Some checks failed
CI / React UI Build (push) Successful in 11s
CI / Native Windows Build And Tests (push) Successful in 2m37s
CI / Windows Release Package (push) Has been cancelled
event dispatcher
2026-05-11 15:15:42 +10:00

36 lines
1.3 KiB
C++

#pragma once
#include "ControlServices.h"
#include <memory>
#include <string>
class OpenGLComposite;
class RuntimeCoordinator;
class RuntimeEventDispatcher;
class RuntimeStore;
class RuntimeServices
{
public:
using AppliedOscUpdate = ControlServices::AppliedOscUpdate;
using CompletedOscCommit = ControlServices::CompletedOscCommit;
explicit RuntimeServices(RuntimeEventDispatcher& runtimeEventDispatcher);
~RuntimeServices();
bool Start(OpenGLComposite& composite, RuntimeStore& runtimeStore, std::string& error);
void BeginPolling(RuntimeCoordinator& runtimeCoordinator);
void Stop();
void BroadcastState();
void RequestBroadcastState();
bool QueueOscUpdate(const std::string& layerKey, const std::string& parameterKey, const std::string& valueJson, std::string& error);
bool ApplyPendingOscUpdates(std::vector<AppliedOscUpdate>& appliedUpdates, std::string& error);
bool QueueOscCommit(const std::string& routeKey, const std::string& layerKey, const std::string& parameterKey, const JsonValue& value, uint64_t generation, std::string& error);
void ClearOscState();
void ConsumeCompletedOscCommits(std::vector<CompletedOscCommit>& completedCommits);
void ConsumeRuntimeCoordinatorResults(std::vector<RuntimeCoordinatorServiceResult>& results);
private:
std::unique_ptr<ControlServices> mControlServices;
};