35 lines
1.2 KiB
C++
35 lines
1.2 KiB
C++
#pragma once
|
|
|
|
#include "ControlServices.h"
|
|
|
|
#include <memory>
|
|
#include <string>
|
|
class OpenGLComposite;
|
|
class RuntimeHost;
|
|
class RuntimeStore;
|
|
|
|
class RuntimeServices
|
|
{
|
|
public:
|
|
using AppliedOscUpdate = ControlServices::AppliedOscUpdate;
|
|
using CompletedOscCommit = ControlServices::CompletedOscCommit;
|
|
|
|
RuntimeServices();
|
|
~RuntimeServices();
|
|
|
|
bool Start(OpenGLComposite& composite, RuntimeHost& runtimeHost, std::string& error);
|
|
void BeginPolling(RuntimeHost& runtimeHost, RuntimeStore& runtimeStore);
|
|
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);
|
|
RuntimePollEvents ConsumePollEvents();
|
|
|
|
private:
|
|
std::unique_ptr<ControlServices> mControlServices;
|
|
};
|