24 #include <glib/gstdio.h>
25 #include <glibmm/miscutils.h>
62 #include
"ardour/rc_configuration_vars.h"
65 _control_protocol_state (0)
86 if (g_stat (rcfile.c_str(), &statbuf)) {
90 if (statbuf.st_size != 0) {
94 if (!tree.
read (rcfile.c_str())) {
104 error <<
string_compose (
_(
"Your system %1 configuration file is empty. This probably means that there was an error installing %1"), PROGRAM_NAME) <<
endmsg;
114 if (g_stat (rcfile.c_str(), &statbuf)) {
118 if (statbuf.st_size != 0) {
122 if (!tree.
read (rcfile)) {
145 if (!rcfile.empty()) {
148 if (!tree.
write (rcfile.c_str())){
199 #undef CONFIG_VARIABLE
200 #undef CONFIG_VARIABLE_SPECIAL
201 #define CONFIG_VARIABLE(type,var,Name,value) \
202 var.add_to_node (*node);
203 #define CONFIG_VARIABLE_SPECIAL(type,var,Name,value,mutator) \
204 var.add_to_node (*node);
206 #undef CONFIG_VARIABLE
207 #undef CONFIG_VARIABLE_SPECIAL
215 if (root.
name() !=
"Ardour") {
225 for (niter = nlist.begin(); niter != nlist.end(); ++niter) {
229 if (node->
name() ==
"Config") {
231 }
else if (node->
name() ==
"Metadata") {
247 #undef CONFIG_VARIABLE
248 #undef CONFIG_VARIABLE_SPECIAL
249 #define CONFIG_VARIABLE(type,var,name,value) \
250 if (var.set_from_node (node)) { \
251 ParameterChanged (name); \
253 #define CONFIG_VARIABLE_SPECIAL(type,var,name,value,mutator) \
254 if (var.set_from_node (node)) { \
255 ParameterChanged (name); \
259 #undef CONFIG_VARIABLE
260 #undef CONFIG_VARIABLE_SPECIAL
266 #undef CONFIG_VARIABLE
267 #undef CONFIG_VARIABLE_SPECIAL
268 #define CONFIG_VARIABLE(type,var,name,value) functor (name);
269 #define CONFIG_VARIABLE_SPECIAL(type,var,name,value,mutator) functor (name);
271 #undef CONFIG_VARIABLE
272 #undef CONFIG_VARIABLE_SPECIAL
void set_variables(XMLNode const &)
#define CONFIG_VARIABLE(Type, var, name, value)
#define CONFIG_VARIABLE_SPECIAL(Type, var, name, value, mutator)
static const char * user_config_file_name
LIBARDOUR_API gain_t speed_quietning
void save_extra_xml(const XMLNode &)
int set_state(XMLNode const &, int version)
const std::string & name() const
XMLNode * add_child_copy(const XMLNode &)
LIBPBD_API Transmitter error
LIBPBD_API Transmitter warning
static ControlProtocolManager & instance()
const XMLNodeList & children(const std::string &str=std::string()) const
static void set_disk_read_chunk_frames(framecnt_t n)
std::ostream & endmsg(std::ostream &ostr)
static void set_disk_write_chunk_frames(framecnt_t n)
XMLNode * instant_xml(const std::string &str)
bool find_file(const Searchpath &search_path, const string &filename, std::string &result)
std::list< XMLNode * > XMLNodeList
LIBARDOUR_API std::string user_config_directory(int version=-1)
static int current_state_version
static const char * system_config_file_name
XMLNode * set_root(XMLNode *n)
XMLNode & get_variables()
static const std::string state_node_name
LIBARDOUR_API PBD::Searchpath ardour_config_search_path()
LIBPBD_API Transmitter info
void add_instant_xml(XMLNode &, const std::string &directory_path)
void map_parameters(boost::function< void(std::string)> &)
void add_child_nocopy(XMLNode &)
XMLNode * instant_xml(const std::string &str, const std::string &directory_path)
void add_instant_xml(XMLNode &)
XMLNodeList::const_iterator XMLNodeConstIterator
XMLNode * _control_protocol_state
std::string string_compose(const std::string &fmt, const T1 &o1)