allow for mandatory control protocols, plus some ongoing work on automation control...
[ardour.git] / libs / surfaces / tranzport / interface.cc
1 #include <ardour/control_protocol.h>
2
3 #include "tranzport_control_protocol.h"
4
5 using namespace ARDOUR;
6
7 ControlProtocol*
8 new_tranzport_protocol (ControlProtocolDescriptor* descriptor, Session* s)
9 {
10         TranzportControlProtocol* tcp = new TranzportControlProtocol (*s);
11
12         if (tcp->set_active (true)) {
13                 delete tcp;
14                 return 0;
15         }
16
17         return tcp;
18         
19 }
20
21 void
22 delete_tranzport_protocol (ControlProtocolDescriptor* descriptor, ControlProtocol* cp)
23 {
24         delete cp;
25 }
26
27 static ControlProtocolDescriptor tranzport_descriptor = {
28         name : "Tranzport",
29         id : "uri://ardour.org/surfaces/tranzport:0",
30         ptr : 0,
31         module : 0,
32         mandatory : 1,
33         initialize : new_tranzport_protocol,
34         destroy : delete_tranzport_protocol
35 };
36         
37
38 extern "C" {
39 ControlProtocolDescriptor* 
40 protocol_descriptor () {
41         return &tranzport_descriptor;
42 }
43 }
44