Milestone in SourceCallbacks and Keyboard callback trigger

Updated SourceCallback class to accept cloning, reversing, and visitors for saving./loading. New mechanism in Source to listen to key triggers for launching SourceCallbacks. Saving and loading in SessionVisitor and SessionCreator.
This commit is contained in:
Bruno Herbelin
2022-01-30 00:25:08 +01:00
parent 3605ae14b5
commit 8404e0f670
17 changed files with 660 additions and 79 deletions

View File

@@ -2,8 +2,12 @@
#define CONTROL_H
#include <map>
#include <list>
#include <string>
#include <condition_variable>
#include "SourceList.h"
#include "BaseToolkit.h"
#include "NetworkToolkit.h"
#define OSC_SYNC "/sync"
@@ -44,6 +48,7 @@
class Session;
class Source;
class SourceCallback;
class Control
{
@@ -65,10 +70,12 @@ public:
bool init();
void terminate();
std::string translate (std::string addresspattern);
// OSC translation
std::string translate (std::string addresspqattern);
protected:
// OSC management
class RequestListener : public osc::OscPacketListener {
protected:
virtual void ProcessMessage( const osc::ReceivedMessage& m,
@@ -78,15 +85,14 @@ protected:
bool receiveOutputAttribute(const std::string &attribute,
osc::ReceivedMessageArgumentStream arguments);
bool receiveSourceAttribute(Source *target, const std::string &attribute,
osc::ReceivedMessageArgumentStream arguments);
bool receiveSessionAttribute(const std::string &attribute,
osc::ReceivedMessageArgumentStream arguments);
void sendSourceAttibutes(const IpEndpointName& remoteEndpoint, std::string target, Source *s = nullptr);
void sendSourcesStatus(const IpEndpointName& remoteEndpoint, osc::ReceivedMessageArgumentStream arguments);
void sendSourceAttibutes(const IpEndpointName& remoteEndpoint,
std::string target, Source *s = nullptr);
void sendSourcesStatus(const IpEndpointName& remoteEndpoint,
osc::ReceivedMessageArgumentStream arguments);
void sendOutputStatus(const IpEndpointName& remoteEndpoint);
private: