Files
video-shader-toys/apps/LoopThroughWithOpenGLCompositing/control/RuntimeServices.h
Aiden 718e4dcadd
All checks were successful
CI / React UI Build (push) Successful in 11s
CI / Native Windows Build And Tests (push) Successful in 2m40s
CI / Windows Release Package (push) Successful in 2m44s
step 3
2026-05-11 19:05:29 +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 ClearOscStateForLayerKey(const std::string& layerKey);
void ConsumeCompletedOscCommits(std::vector<CompletedOscCommit>& completedCommits);
private:
std::unique_ptr<ControlServices> mControlServices;
};