2 Copyright (C) 2012 Paul Davis
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 #ifndef __ardour_mackie_control_protocol_device_profile_h__
20 #define __ardour_mackie_control_protocol_device_profile_h__
31 namespace ArdourSurface {
38 DeviceProfile (const std::string& name = "");
41 std::string get_button_action (Button::ID, int modifier_state) const;
42 void set_button_action (Button::ID, int modifier_state, const std::string&);
44 std::string name() const;
45 void set_path (const std::string&);
47 static void reload_device_profiles ();
48 static std::map<std::string,DeviceProfile> device_profiles;
49 static std::string name_when_edited (std::string const& name);
50 static const std::string default_profile_name;
53 struct ButtonActions {
59 std::string shiftcontrol;
62 typedef std::map<Button::ID,ButtonActions> ButtonActionMap;
66 ButtonActionMap _button_map;
69 static const std::string edited_indicator;
71 int set_state (const XMLNode&, int version);
72 XMLNode& get_state () const;
80 #endif /* __ardour_mackie_control_protocol_device_profile_h__ */