add copyright comments
[ardour.git] / libs / ardour / ardour / rc_configuration.h
index 35b22106dd060fa35ebbc2a58aae2a8ce3366ea0..ff1c5f035c7582033e153fff6969760ce7f0194f 100644 (file)
@@ -43,8 +43,6 @@ class RCConfiguration : public Configuration
        XMLNode& get_variables ();
        void set_variables (XMLNode const &);
 
-       std::map<std::string, XMLNode> midi_ports;
-
        int load_state ();
        int save_state ();
 
@@ -54,17 +52,18 @@ class RCConfiguration : public Configuration
        XMLNode * instant_xml (const std::string& str);
 
        XMLNode* control_protocol_state () { return _control_protocol_state; }
+       std::list<XMLNode*> midi_port_states () { return _midi_port_states; }
 
        /* define accessor methods */
 
 #undef  CONFIG_VARIABLE
 #undef  CONFIG_VARIABLE_SPECIAL
 #define CONFIG_VARIABLE(Type,var,name,value) \
-        Type get_##var () const { return var.get(); } \
-        bool set_##var (Type val) { bool ret = var.set (val); if (ret) { ParameterChanged (name); } return ret;  }
+       Type get_##var () const { return var.get(); } \
+       bool set_##var (Type val) { bool ret = var.set (val); if (ret) { ParameterChanged (name); } return ret;  }
 #define CONFIG_VARIABLE_SPECIAL(Type,var,name,value,mutator) \
-        Type get_##var () const { return var.get(); } \
-        bool set_##var (Type val) { bool ret = var.set (val); if (ret) { ParameterChanged (name); } return ret; }
+       Type get_##var () const { return var.get(); } \
+       bool set_##var (Type val) { bool ret = var.set (val); if (ret) { ParameterChanged (name); } return ret; }
 #include "ardour/rc_configuration_vars.h"
 #undef  CONFIG_VARIABLE
 #undef  CONFIG_VARIABLE_SPECIAL
@@ -82,6 +81,11 @@ class RCConfiguration : public Configuration
 #undef  CONFIG_VARIABLE_SPECIAL
 
        XMLNode* _control_protocol_state;
+
+       /** MIDI port nodes from the RC configuration.  We store them so that we can set their
+           state once the audio engine and hence ports are up.
+       */
+       std::list<XMLNode*> _midi_port_states;
 };
 
 /* XXX: rename this */