From 8a005319b82361e8c54398b326d6162004fcbd69 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Sat, 21 Dec 2013 15:27:57 -0500 Subject: [PATCH] clean up aspects of ControlProtocol API --- .../control_protocol/control_protocol.cc | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/libs/surfaces/control_protocol/control_protocol.cc b/libs/surfaces/control_protocol/control_protocol.cc index e0eb57fc87..cd379b10dc 100644 --- a/libs/surfaces/control_protocol/control_protocol.cc +++ b/libs/surfaces/control_protocol/control_protocol.cc @@ -53,6 +53,8 @@ PBD::Signal0 ControlProtocol::ClearRouteSelection; PBD::Signal0 ControlProtocol::StepTracksDown; PBD::Signal0 ControlProtocol::StepTracksUp; +const std::string ControlProtocol::state_node_name ("Protocol"); + ControlProtocol::ControlProtocol (Session& s, string str) : BasicUI (s) , _name (str) @@ -64,6 +66,13 @@ ControlProtocol::~ControlProtocol () { } +int +ControlProtocol::set_active (bool yn) +{ + _active = yn; + return 0; +} + void ControlProtocol::next_track (uint32_t initial_id) { @@ -356,5 +365,15 @@ ControlProtocol:: route_get_name (uint32_t table_index) list > ControlProtocol::bundles () { - return list > (); + return list > (); +} + +XMLNode& +ControlProtocol::get_state () +{ + XMLNode* node = new XMLNode (state_node_name); + + node->add_property ("name", _name); + + return *node; }