String ("config");
}
+String
+SimpleConfig::get_sysconf2_filename ()
+{
+ return get_sysconf_dir () +
+ String (SCIM_PATH_DELIM_STRING) +
+ String ("conf/config");
+}
+
String
SimpleConfig::get_userconf_filename ()
{
SimpleConfig::load_all_config ()
{
String sysconf = get_sysconf_filename ();
+ String sysconf2 = get_sysconf2_filename ();
String userconf = get_userconf_filename ();
KeyValueRepository config;
}
}
+ if (sysconf2.length ()) {
+ std::ifstream is (sysconf2.c_str ());
+ if (is) {
+ SCIM_DEBUG_CONFIG(1) << "Parsing user_system config file: "
+ << sysconf2 << "\n";
+ parse_config (is, config);
+ }
+ }
+
if (sysconf.length ()) {
std::ifstream is (sysconf.c_str ());
if (is) {
} else {
std::cerr << __func__ << " Cannot open(" << sysconf << ")\n";
}
-
if (!m_config.size () || (m_update_timestamp.tv_sec == 0 && m_update_timestamp.tv_usec == 0)) {
m_config.swap (config);
gettimeofday (&m_update_timestamp, 0);
String get_sysconf_dir ();
String get_userconf_dir ();
String get_sysconf_filename ();
+ String get_sysconf2_filename ();
String get_userconf_filename ();
String trim_blank (const String &str);