2007-02-14 14:56:16 -05:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2006 Paul Davis
|
|
|
|
* Copyright (C) 2007 Michael Taht
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
|
|
*
|
|
|
|
* */
|
|
|
|
|
2006-06-15 17:54:26 -04:00
|
|
|
#include <control_protocol/control_protocol.h>
|
2006-04-04 20:21:43 -04:00
|
|
|
#include "tranzport_control_protocol.h"
|
|
|
|
|
|
|
|
using namespace ARDOUR;
|
|
|
|
|
|
|
|
ControlProtocol*
|
|
|
|
new_tranzport_protocol (ControlProtocolDescriptor* descriptor, Session* s)
|
|
|
|
{
|
2006-04-09 23:54:00 -04:00
|
|
|
TranzportControlProtocol* tcp = new TranzportControlProtocol (*s);
|
|
|
|
|
2006-04-24 18:45:19 -04:00
|
|
|
if (tcp->set_active (true)) {
|
2006-04-09 23:54:00 -04:00
|
|
|
delete tcp;
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
return tcp;
|
|
|
|
|
2006-04-04 20:21:43 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
delete_tranzport_protocol (ControlProtocolDescriptor* descriptor, ControlProtocol* cp)
|
|
|
|
{
|
|
|
|
delete cp;
|
|
|
|
}
|
|
|
|
|
2006-05-23 15:54:52 -04:00
|
|
|
bool
|
|
|
|
probe_tranzport_protocol (ControlProtocolDescriptor* descriptor)
|
|
|
|
{
|
|
|
|
return TranzportControlProtocol::probe();
|
|
|
|
}
|
|
|
|
|
2006-04-04 20:21:43 -04:00
|
|
|
static ControlProtocolDescriptor tranzport_descriptor = {
|
|
|
|
name : "Tranzport",
|
2006-04-09 23:54:00 -04:00
|
|
|
id : "uri://ardour.org/surfaces/tranzport:0",
|
2006-04-04 20:21:43 -04:00
|
|
|
ptr : 0,
|
|
|
|
module : 0,
|
2006-05-19 22:57:38 -04:00
|
|
|
mandatory : 0,
|
2006-10-13 11:07:50 -04:00
|
|
|
supports_feedback : false,
|
2006-05-23 15:54:52 -04:00
|
|
|
probe : probe_tranzport_protocol,
|
2006-04-04 20:21:43 -04:00
|
|
|
initialize : new_tranzport_protocol,
|
|
|
|
destroy : delete_tranzport_protocol
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
extern "C" {
|
|
|
|
ControlProtocolDescriptor*
|
|
|
|
protocol_descriptor () {
|
|
|
|
return &tranzport_descriptor;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|