summaryrefslogtreecommitdiff
path: root/libs/surfaces/push2/push2.h
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2016-09-30 11:22:30 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2016-09-30 11:23:01 -0400
commit1b830f2604f18149d88b3f2c34cb64660f46d7aa (patch)
tree8762ce900e66393e6425028be9bc99b069dc8a77 /libs/surfaces/push2/push2.h
parent8cff66c7e0493b1d597422f3f6541d3ac94e3376 (diff)
reorganize push 2 code and logic to better handle device arrival after program startup
Note: we do not handle device departure correctly yet, mostly because the shadow (pad) port has a retained reference somewhere
Diffstat (limited to 'libs/surfaces/push2/push2.h')
-rw-r--r--libs/surfaces/push2/push2.h16
1 files changed, 10 insertions, 6 deletions
diff --git a/libs/surfaces/push2/push2.h b/libs/surfaces/push2/push2.h
index ab98b92445..38421a10bc 100644
--- a/libs/surfaces/push2/push2.h
+++ b/libs/surfaces/push2/push2.h
@@ -370,12 +370,19 @@ class Push2 : public ARDOUR::ControlProtocol
private:
libusb_device_handle *handle;
+ bool in_use;
ModifierState _modifier_state;
void do_request (Push2Request*);
- int stop ();
- int open ();
- int close ();
+
+ int begin_using_device ();
+ int stop_using_device ();
+ int device_acquire ();
+ void device_release ();
+ int ports_acquire ();
+ void ports_release ();
+ void run_event_loop ();
+ void stop_event_loop ();
void relax () {}
@@ -431,9 +438,6 @@ class Push2 : public ARDOUR::ControlProtocol
bool midi_input_handler (Glib::IOCondition ioc, MIDI::Port* port);
- sigc::connection periodic_connection;
- bool periodic ();
-
void thread_init ();
PBD::ScopedConnectionList session_connections;