2 Copyright (C) 2006,2007 John Anderson
3 Copyright (C) 2012 Paul Davis
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 #include "pbd/xml++.h"
22 #include "device_info.h"
26 using namespace Mackie;
30 DeviceInfo::DeviceInfo()
32 , _has_two_character_display (true)
33 , _has_master_fader (true)
34 , _has_segmented_display (false)
35 , _has_timecode_display (true)
36 , _name (X_("Mackie Control Universal Pro"))
41 DeviceInfo::DeviceInfo (const XMLNode& node)
43 , _has_two_character_display (true)
44 , _has_master_fader (true)
45 , _has_segmented_display (false)
46 , _has_timecode_display (true)
47 , _name (X_("Mackie Control Universal Pro"))
49 const XMLProperty* prop;
51 if ((prop = node.property ("strips")) != 0) {
52 if ((_strip_cnt = atoi (prop->value())) == 0) {
57 if ((prop = node.property ("two-character-display")) != 0) {
58 _has_two_character_display = string_is_affirmative (prop->value());
61 if ((prop = node.property ("master-fader")) != 0) {
62 _has_master_fader = string_is_affirmative (prop->value());
65 if ((prop = node.property ("display-segmented")) != 0) {
66 _has_segmented_display = string_is_affirmative (prop->value());
69 if ((prop = node.property ("timecode-display")) != 0) {
70 _has_timecode_display = string_is_affirmative (prop->value());
73 if ((prop = node.property ("name")) != 0) {
74 _name = prop->value();
79 DeviceInfo::strip_cnt() const
85 DeviceInfo::has_master_fader() const
87 return _has_master_fader;
91 DeviceInfo::has_two_character_display() const
93 return _has_two_character_display;
97 DeviceInfo::has_segmented_display() const
99 return _has_segmented_display;
103 DeviceInfo::has_timecode_display () const
105 return _has_timecode_display;