1 #include <pbd/failed_constructor.h>
3 #include <control_protocol/control_protocol.h>
6 #include <ardour/session.h>
8 using namespace ARDOUR;
10 static WiimoteControlProtocol *foo;
13 new_wiimote_protocol (ControlProtocolDescriptor* descriptor, Session* s)
15 WiimoteControlProtocol* wmcp;
18 wmcp = new WiimoteControlProtocol (*s);
19 } catch (failed_constructor& err) {
23 if (wmcp-> set_active (true)) {
34 wiimote_control_protocol_cwiid_callback(cwiid_wiimote_t *wiimote, int mesg_count, union cwiid_mesg mesg[], struct timespec *t)
38 foo->wiimote_callback(wiimote,mesg_count,mesg,t);
42 delete_wiimote_protocol (ControlProtocolDescriptor* descriptor, ControlProtocol* cp)
49 probe_wiimote_protocol (ControlProtocolDescriptor* descriptor)
51 return WiimoteControlProtocol::probe ();
54 static ControlProtocolDescriptor wiimote_descriptor = {
56 id : "uri://ardour.org/surfaces/wiimote:0",
60 supports_feedback : false,
61 probe : probe_wiimote_protocol,
62 initialize : new_wiimote_protocol,
63 destroy : delete_wiimote_protocol
68 ControlProtocolDescriptor*
69 protocol_descriptor () {
70 return &wiimote_descriptor;