mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-12 02:40:00 +01:00
Initial implementation of Control manager
Control manager will handle control actions, recorded or from OSC. Here skeleton for receiving OSC messages is in place. Cleanup of includes for NetworkToolkit. Touched a bit the BaseToolkit.
This commit is contained in:
43
ControlManager.h
Normal file
43
ControlManager.h
Normal file
@@ -0,0 +1,43 @@
|
||||
#ifndef CONTROL_H
|
||||
#define CONTROL_H
|
||||
|
||||
#include "NetworkToolkit.h"
|
||||
|
||||
class Control
|
||||
{
|
||||
// Private Constructor
|
||||
Control();
|
||||
Control(Control const& copy) = delete;
|
||||
Control& operator=(Control const& copy) = delete;
|
||||
|
||||
public:
|
||||
|
||||
static Control& manager ()
|
||||
{
|
||||
// The only instance
|
||||
static Control _instance;
|
||||
return _instance;
|
||||
}
|
||||
~Control();
|
||||
|
||||
bool init();
|
||||
void terminate();
|
||||
|
||||
// void setOscPort(int P);
|
||||
|
||||
protected:
|
||||
|
||||
class RequestListener : public osc::OscPacketListener {
|
||||
protected:
|
||||
virtual void ProcessMessage( const osc::ReceivedMessage& m,
|
||||
const IpEndpointName& remoteEndpoint );
|
||||
};
|
||||
|
||||
private:
|
||||
|
||||
static void listen();
|
||||
RequestListener listener_;
|
||||
UdpListeningReceiveSocket *receiver_;
|
||||
};
|
||||
|
||||
#endif // CONTROL_H
|
||||
Reference in New Issue
Block a user