summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour/control_protocol.h
diff options
context:
space:
mode:
Diffstat (limited to 'libs/ardour/ardour/control_protocol.h')
-rw-r--r--libs/ardour/ardour/control_protocol.h48
1 files changed, 7 insertions, 41 deletions
diff --git a/libs/ardour/ardour/control_protocol.h b/libs/ardour/ardour/control_protocol.h
index 64658fc199..70c7d2dc0d 100644
--- a/libs/ardour/ardour/control_protocol.h
+++ b/libs/ardour/ardour/control_protocol.h
@@ -5,37 +5,25 @@
#include <list>
#include <sigc++/sigc++.h>
+#include <ardour/basic_ui.h>
+
namespace ARDOUR {
class Route;
class Session;
-class ControlProtocol : public sigc::trackable {
+class ControlProtocol : public sigc::trackable, public BasicUI {
public:
ControlProtocol (Session&, std::string name);
virtual ~ControlProtocol();
- virtual int init () { return 0; }
-
- sigc::signal<void> ActiveChanged;
-
- enum SendWhat {
- SendRoute,
- SendGlobal
- };
-
std::string name() const { return _name; }
- void set_send (SendWhat);
- void set_active (bool yn);
- bool get_active() const { return active_thread > 0; }
+ virtual int set_active (bool yn) = 0;
+ bool get_active() const { return _active; }
- bool send() const { return _send != 0; }
- bool send_route_feedback () const { return _send & SendRoute; }
- bool send_global_feedback () const { return _send & SendGlobal; }
+ sigc::signal<void> ActiveChanged;
- virtual void send_route_feedback (std::list<Route*>&) {}
- virtual void send_global_feedback () {}
/* signals that a control protocol can emit and other (presumably graphical)
user interfaces can respond to
@@ -48,30 +36,8 @@ class ControlProtocol : public sigc::trackable {
static sigc::signal<void,float> ScrollTimeline;
protected:
-
- ARDOUR::Session& session;
- SendWhat _send;
std::string _name;
- int active_thread;
- int thread_request_pipe[2];
- pthread_t _thread;
-
- static void* _thread_work (void *);
- void* thread_work ();
-
- struct ThreadRequest {
- enum Type {
- Start,
- Stop,
- Quit
- };
- };
-
- int init_thread();
- int start_thread ();
- int stop_thread ();
- void terminate_thread ();
- int poke_thread (ThreadRequest::Type);
+ bool _active;
};
extern "C" {