本文整理汇总了C++中CConfigFile::setInt32方法的典型用法代码示例。如果您正苦于以下问题:C++ CConfigFile::setInt32方法的具体用法?C++ CConfigFile::setInt32怎么用?C++ CConfigFile::setInt32使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CConfigFile
的用法示例。
在下文中一共展示了CConfigFile::setInt32方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SaveSettings
bool CFBCallMonitor::SaveSettings()
{
CConfigFile *bpfbconfig = new CConfigFile(',');
bpfbconfig->setString("FRITZBOXIP", FB_IP_STRG);
bpfbconfig->setString("TELDPORT", FB_PORT_STRG);
bpfbconfig->setString("Ziel_1", FB_ZIEL1_STRG);
bpfbconfig->setString("Ziel_1_name", FB_ZIEL1N_STRG);
bpfbconfig->setString("Ziel_2", FB_ZIEL2_STRG);
bpfbconfig->setString("Ziel_2_name", FB_ZIEL2N_STRG);
bpfbconfig->setString("Ziel_3", FB_ZIEL3_STRG);
bpfbconfig->setString("Ziel_3_name", FB_ZIEL3N_STRG);
bpfbconfig->setString("ip", FB_BOXIP_STRG);
bpfbconfig->setString("loginname", FB_BOXUSERNAME_STRG);
bpfbconfig->setString("passwort", FB_BOXPASSWORD_STRG);
bpfbconfig->setInt32("debug", FB_DEBUG);
bpfbconfig->setInt32("Alle", FB_ALLE);
bpfbconfig->setInt32("monRing", FB_MONRING);
bpfbconfig->setInt32("monDisconnect", FB_MONDISCONNECT);
bpfbconfig->setInt32("muteRing", FB_MUTERING);
bpfbconfig->setInt32("popup", FB_POPUP);
bpfbconfig->setInt32("invers", FB_INVERS);
bpfbconfig->saveConfig(CONFIG_FILE);
return true;
}
示例2: changeNotify
virtual bool changeNotify(const neutrino_locale_t OptionName, void * Data)
{
configfile->setInt32(locale_real_names[text], atoi(value));
return observer->changeNotify(OptionName, Data);
}
示例3: ReadConfig
//-----------------------------------------------------------------------------
// Read Webserver Configurationfile
// Call "Hooks_ReadConfig" so Hooks can read/write own Configuration Values
//-----------------------------------------------------------------------------
void Cyhttpd::ReadConfig(void) {
log_level_printf(3, "ReadConfig Start\n");
CConfigFile *Config = new CConfigFile(',');
bool have_config = false;
if (access(HTTPD_CONFIGFILE, R_OK) == 0)
have_config = true;
Config->loadConfig(HTTPD_CONFIGFILE);
// convert old config files
if (have_config) {
if (Config->getInt32("configfile.version", 0) == 0) {
CConfigFile OrgConfig = *Config;
Config->clear();
Config->setInt32("server.log.loglevel", OrgConfig.getInt32(
"LogLevel", 0));
Config->setInt32("configfile.version", CONF_VERSION);
Config->setString("webserver.websites", "WebsiteMain");
Config->setBool("webserver.threading", OrgConfig.getBool("THREADS",
true));
Config->setInt32("WebsiteMain.port", OrgConfig.getInt32("Port",
HTTPD_STANDARD_PORT));
Config->setString("WebsiteMain.directory", OrgConfig.getString(
"PrivatDocRoot", PRIVATEDOCUMENTROOT));
if (!OrgConfig.getString("PublicDocRoot", "").empty())
Config->setString("WebsiteMain.override_directory",
OrgConfig.getString("PublicDocRoot",
PRIVATEDOCUMENTROOT));
// mod_auth
Config->setString("mod_auth.username", OrgConfig.getString(
"AuthUser", AUTHUSER));
Config->setString("mod_auth.password", OrgConfig.getString(
"AuthPassword", AUTHPASSWORD));
Config->setString("mod_auth.no_auth_client", OrgConfig.getString(
"NoAuthClient", ""));
Config->setString("mod_auth.authenticate", OrgConfig.getString(
"Authenticate", "false"));
Config->setString("mod_sendfile.mime_types", HTTPD_SENDFILE_EXT);
Config->saveConfig(HTTPD_CONFIGFILE);
}
// Add Defaults for Version 2
if (Config->getInt32("configfile.version") < 2) {
Config->setString("mod_sendfile.mime_types", HTTPD_SENDFILE_EXT);
Config->setInt32("configfile.version", CONF_VERSION);
Config->setString("mod_sendfile.sendAll", "false");
Config->saveConfig(HTTPD_CONFIGFILE);
}
// Add Defaults for Version 4
if (Config->getInt32("configfile.version") < 4) {
Config->setInt32("configfile.version", CONF_VERSION);
Config->setString("Language.selected", HTTPD_DEFAULT_LANGUAGE);
Config->setString("Language.directory", HTTPD_LANGUAGEDIR);
if (Config->getString("WebsiteMain.hosted_directory", "").empty())
Config->setString("WebsiteMain.hosted_directory", HOSTEDDOCUMENTROOT);
Config->saveConfig(HTTPD_CONFIGFILE);
}
}
// configure debugging & logging
if (CLogging::getInstance()->LogLevel == 0)
CLogging::getInstance()->LogLevel = Config->getInt32("server.log.loglevel", 0);
if (CLogging::getInstance()->LogLevel > 0)
CLogging::getInstance()->setDebug(true);
// get variables
webserver->init(Config->getInt32("WebsiteMain.port", HTTPD_STANDARD_PORT),
Config->getBool("webserver.threading", true));
// informational use
ConfigList["WebsiteMain.port"] = itoa(Config->getInt32("WebsiteMain.port",
HTTPD_STANDARD_PORT));
ConfigList["webserver.threading"] = Config->getString(
"webserver.threading", "true");
ConfigList["configfile.version"] = Config->getInt32("configfile.version",
CONF_VERSION);
ConfigList["server.log.loglevel"] = itoa(Config->getInt32(
"server.log.loglevel", 0));
ConfigList["server.no_keep-alive_ips"] = Config->getString(
"server.no_keep-alive_ips", "");
webserver->conf_no_keep_alive_ips = Config->getStringVector(
"server.no_keep-alive_ips");
// MainSite
ConfigList["WebsiteMain.directory"] = Config->getString(
"WebsiteMain.directory", PRIVATEDOCUMENTROOT);
ConfigList["WebsiteMain.override_directory"] = Config->getString(
"WebsiteMain.override_directory", PUBLICDOCUMENTROOT);
ConfigList["WebsiteMain.hosted_directory"] = Config->getString(
"WebsiteMain.hosted_directory", HOSTEDDOCUMENTROOT);
ConfigList["Tuxbox.DisplayLogos"] = Config->getString("Tuxbox.DisplayLogos", "true");
// Check location of logos
if (Config->getString("Tuxbox.LogosURL", "").empty()) {
if (access(ConfigList["WebsiteMain.override_directory"] + "/logos", R_OK) == 0) {
Config->setString("Tuxbox.LogosURL", ConfigList["WebsiteMain.override_directory"] + "/logos");
have_config = false; //save config
//.........这里部分代码省略.........
示例4: setTheme
void CThemes::setTheme(CConfigFile &configfile)
{
SNeutrinoTheme &t = g_settings.theme;
configfile.setInt32( "menu_Head_alpha", t.menu_Head_alpha );
configfile.setInt32( "menu_Head_red", t.menu_Head_red );
configfile.setInt32( "menu_Head_green", t.menu_Head_green );
configfile.setInt32( "menu_Head_blue", t.menu_Head_blue );
configfile.setInt32( "menu_Head_Text_alpha", t.menu_Head_Text_alpha );
configfile.setInt32( "menu_Head_Text_red", t.menu_Head_Text_red );
configfile.setInt32( "menu_Head_Text_green", t.menu_Head_Text_green );
configfile.setInt32( "menu_Head_Text_blue", t.menu_Head_Text_blue );
configfile.setInt32( "menu_Head_gradient" , t.menu_Head_gradient);
configfile.setInt32( "menu_Content_alpha", t.menu_Content_alpha );
configfile.setInt32( "menu_Content_red", t.menu_Content_red );
configfile.setInt32( "menu_Content_green", t.menu_Content_green );
configfile.setInt32( "menu_Content_blue", t.menu_Content_blue );
configfile.setInt32( "menu_Content_Text_alpha", t.menu_Content_Text_alpha );
configfile.setInt32( "menu_Content_Text_red", t.menu_Content_Text_red );
configfile.setInt32( "menu_Content_Text_green", t.menu_Content_Text_green );
configfile.setInt32( "menu_Content_Text_blue", t.menu_Content_Text_blue );
configfile.setInt32( "menu_Content_Selected_alpha", t.menu_Content_Selected_alpha );
configfile.setInt32( "menu_Content_Selected_red", t.menu_Content_Selected_red );
configfile.setInt32( "menu_Content_Selected_green", t.menu_Content_Selected_green );
configfile.setInt32( "menu_Content_Selected_blue", t.menu_Content_Selected_blue );
configfile.setInt32( "menu_Content_Selected_Text_alpha", t.menu_Content_Selected_Text_alpha );
configfile.setInt32( "menu_Content_Selected_Text_red", t.menu_Content_Selected_Text_red );
configfile.setInt32( "menu_Content_Selected_Text_green", t.menu_Content_Selected_Text_green );
configfile.setInt32( "menu_Content_Selected_Text_blue", t.menu_Content_Selected_Text_blue );
configfile.setInt32( "menu_Content_inactive_alpha", t.menu_Content_inactive_alpha );
configfile.setInt32( "menu_Content_inactive_red", t.menu_Content_inactive_red );
configfile.setInt32( "menu_Content_inactive_green", t.menu_Content_inactive_green );
configfile.setInt32( "menu_Content_inactive_blue", t.menu_Content_inactive_blue );
configfile.setInt32( "menu_Content_inactive_Text_alpha", t.menu_Content_inactive_Text_alpha );
configfile.setInt32( "menu_Content_inactive_Text_red", t.menu_Content_inactive_Text_red );
configfile.setInt32( "menu_Content_inactive_Text_green", t.menu_Content_inactive_Text_green );
configfile.setInt32( "menu_Content_inactive_Text_blue", t.menu_Content_inactive_Text_blue );
configfile.setInt32( "menu_Hint_gradient" , t.menu_Hint_gradient);
configfile.setInt32( "infobar_alpha", t.infobar_alpha );
configfile.setInt32( "infobar_red", t.infobar_red );
configfile.setInt32( "infobar_green", t.infobar_green );
configfile.setInt32( "infobar_blue", t.infobar_blue );
configfile.setInt32( "infobar_gradient_top", t.infobar_gradient_top );
configfile.setInt32( "infobar_gradient_bottom", t.infobar_gradient_bottom );
configfile.setInt32( "infobar_Text_alpha", t.infobar_Text_alpha );
configfile.setInt32( "infobar_Text_red", t.infobar_Text_red );
configfile.setInt32( "infobar_Text_green", t.infobar_Text_green );
configfile.setInt32( "infobar_Text_blue", t.infobar_Text_blue );
configfile.setInt32( "colored_events_alpha", t.colored_events_alpha );
configfile.setInt32( "colored_events_red", t.colored_events_red );
configfile.setInt32( "colored_events_green", t.colored_events_green );
configfile.setInt32( "colored_events_blue", t.colored_events_blue );
configfile.setInt32( "colored_events_channellist", t.colored_events_channellist );
configfile.setInt32( "colored_events_infobar", t.colored_events_infobar );
configfile.setInt32( "clock_Digit_alpha", t.clock_Digit_alpha );
configfile.setInt32( "clock_Digit_red", t.clock_Digit_red );
configfile.setInt32( "clock_Digit_green", t.clock_Digit_green );
configfile.setInt32( "clock_Digit_blue", t.clock_Digit_blue );
configfile.setInt32( "gradient_c2c", t.gradient_c2c );
}
示例5: ReadConfig
//-----------------------------------------------------------------------------
// Read Webserver Configurationfile
// Call "Hooks_ReadConfig" so Hooks can read/write own Configuration Values
//-----------------------------------------------------------------------------
void Cyhttpd::ReadConfig(void)
{
log_level_printf(3,"ReadConfig Start\n");
CConfigFile *Config = new CConfigFile(',');
bool have_config = false;
if(access(HTTPD_CONFIGFILE,4) == 0)
have_config = true;
Config->loadConfig(HTTPD_CONFIGFILE);
// convert old config files
if(have_config)
if(Config->getInt32("Port", 0) != 0)
{
CConfigFile OrgConfig = *Config;
Config->clear();
Config->setInt32("server.log.loglevel", OrgConfig.getInt32("LogLevel", 0));
Config->setString("configfile.version", "1");
Config->setString("webserver.websites", "WebsiteMain");
Config->setBool("webserver.threading", OrgConfig.getBool("THREADS", true));
Config->setInt32("WebsiteMain.port",OrgConfig.getInt32("Port", HTTPD_STANDARD_PORT));
Config->setString("WebsiteMain.directory", OrgConfig.getString("PrivatDocRoot", PRIVATEDOCUMENTROOT));
if(OrgConfig.getString("PublicDocRoot", "") != "")
Config->setString("WebsiteMain.override_directory", OrgConfig.getString("PublicDocRoot", PRIVATEDOCUMENTROOT));
if(OrgConfig.getString("HostedDocRoot", "") != "")
Config->setString("WebsiteMain.special_locations", "/hosted/="+OrgConfig.getString("HostedDocRoot", PRIVATEDOCUMENTROOT));
if(OrgConfig.getString("HostedDocRoot", "") != "")
Config->setString("Tuxbox.HostedDocumentRoot", OrgConfig.getString("HostedDocRoot", PRIVATEDOCUMENTROOT));
// mod_auth
Config->setString("mod_auth.username", OrgConfig.getString("AuthUser", AUTHUSER));
Config->setString("mod_auth.password", OrgConfig.getString("AuthPassword", AUTHPASSWORD));
Config->setString("mod_auth.no_auth_client", OrgConfig.getString("NoAuthClient", ""));
Config->setString("mod_auth.authenticate", OrgConfig.getString("Authenticate", "false"));
Config->setString("mod_sendfile.mime_types", HTTPD_SENDFILE_EXT);
Config->saveConfig(HTTPD_CONFIGFILE);
}
// configure debugging & logging
if(CLogging::getInstance()->LogLevel == 0)
CLogging::getInstance()->LogLevel = Config->getInt32("server.log.loglevel", 0);
// get variables
webserver->init(Config->getInt32("WebsiteMain.port", HTTPD_STANDARD_PORT), Config->getBool("webserver.threading", true));
// informational use
ConfigList["WebsiteMain.port"]= itoa(Config->getInt32("WebsiteMain.port", HTTPD_STANDARD_PORT));
ConfigList["webserver.threading"]= Config->getString("webserver.threading", "true");
ConfigList["configfile.version"]= Config->getString("configfile.version", "1");
ConfigList["server.log.loglevel"]= itoa(Config->getInt32("server.log.loglevel", 0));
ConfigList["server.no_keep-alive_ips"]= Config->getString("server.no_keep-alive_ips", "");
webserver->conf_no_keep_alive_ips = Config->getStringVector("server.no_keep-alive_ips");
// MainSite
ConfigList["PrivatDocumentRoot"]= Config->getString("WebsiteMain.directory", PRIVATEDOCUMENTROOT);
ConfigList["PublicDocumentRoot"]= Config->getString("WebsiteMain.override_directory", PUBLICDOCUMENTROOT);
ConfigList["HostedDocumentRoot"]= Config->getString("Tuxbox.HostedDocumentRoot", HOSTEDDOCUMENTROOT);
#ifdef Y_CONFIG_USE_OPEN_SSL
ConfigList["SSL"] = Config->getString("WebsiteMain.ssl", "false");
ConfigList["SSL_pemfile"] = Config->getString("WebsiteMain.ssl_pemfile", SSL_PEMFILE);
ConfigList["SSL_CA_file"] = Config->getString("WebsiteMain.ssl_ca_file", SSL_CA_FILE);
CySocket::SSL_pemfile = ConfigList["SSL_pemfile"];
CySocket::SSL_CA_file = ConfigList["SSL_CA_file"];
if(ConfigList["SSL"] == "true")
CySocket::initSSL();
#endif
ConfigList["server.user_name"]= Config->getString("server.user_name", "");
ConfigList["server.group_name"]= Config->getString("server.group_name", "");
ConfigList["server.chroot"]= Config->getString("server.chroot", "");
// Read App specifig settings by Hook
CyhookHandler::Hooks_ReadConfig(Config, ConfigList);
// Save if new defaults are set
if (!have_config)
Config->saveConfig(HTTPD_CONFIGFILE);
log_level_printf(3,"ReadConfig End\n");
delete Config;
}
示例6: setColors
void CThemes::setColors(CConfigFile &configfile)
{
configfile.setInt32( "menu_Head_alpha", g_settings.menu_Head_alpha );
configfile.setInt32( "menu_Head_red", g_settings.menu_Head_red );
configfile.setInt32( "menu_Head_green", g_settings.menu_Head_green );
configfile.setInt32( "menu_Head_blue", g_settings.menu_Head_blue );
configfile.setInt32( "menu_Head_Text_alpha", g_settings.menu_Head_Text_alpha );
configfile.setInt32( "menu_Head_Text_red", g_settings.menu_Head_Text_red );
configfile.setInt32( "menu_Head_Text_green", g_settings.menu_Head_Text_green );
configfile.setInt32( "menu_Head_Text_blue", g_settings.menu_Head_Text_blue );
configfile.setInt32( "menu_Content_alpha", g_settings.menu_Content_alpha );
configfile.setInt32( "menu_Content_red", g_settings.menu_Content_red );
configfile.setInt32( "menu_Content_green", g_settings.menu_Content_green );
configfile.setInt32( "menu_Content_blue", g_settings.menu_Content_blue );
configfile.setInt32( "menu_Content_Text_alpha", g_settings.menu_Content_Text_alpha );
configfile.setInt32( "menu_Content_Text_red", g_settings.menu_Content_Text_red );
configfile.setInt32( "menu_Content_Text_green", g_settings.menu_Content_Text_green );
configfile.setInt32( "menu_Content_Text_blue", g_settings.menu_Content_Text_blue );
configfile.setInt32( "menu_Content_Selected_alpha", g_settings.menu_Content_Selected_alpha );
configfile.setInt32( "menu_Content_Selected_red", g_settings.menu_Content_Selected_red );
configfile.setInt32( "menu_Content_Selected_green", g_settings.menu_Content_Selected_green );
configfile.setInt32( "menu_Content_Selected_blue", g_settings.menu_Content_Selected_blue );
configfile.setInt32( "menu_Content_Selected_Text_alpha", g_settings.menu_Content_Selected_Text_alpha );
configfile.setInt32( "menu_Content_Selected_Text_red", g_settings.menu_Content_Selected_Text_red );
configfile.setInt32( "menu_Content_Selected_Text_green", g_settings.menu_Content_Selected_Text_green );
configfile.setInt32( "menu_Content_Selected_Text_blue", g_settings.menu_Content_Selected_Text_blue );
configfile.setInt32( "menu_Content_inactive_alpha", g_settings.menu_Content_inactive_alpha );
configfile.setInt32( "menu_Content_inactive_red", g_settings.menu_Content_inactive_red );
configfile.setInt32( "menu_Content_inactive_green", g_settings.menu_Content_inactive_green );
configfile.setInt32( "menu_Content_inactive_blue", g_settings.menu_Content_inactive_blue );
configfile.setInt32( "menu_Content_inactive_Text_alpha", g_settings.menu_Content_inactive_Text_alpha );
configfile.setInt32( "menu_Content_inactive_Text_red", g_settings.menu_Content_inactive_Text_red );
configfile.setInt32( "menu_Content_inactive_Text_green", g_settings.menu_Content_inactive_Text_green );
configfile.setInt32( "menu_Content_inactive_Text_blue", g_settings.menu_Content_inactive_Text_blue );
configfile.setInt32( "infobar_alpha", g_settings.infobar_alpha );
configfile.setInt32( "infobar_red", g_settings.infobar_red );
configfile.setInt32( "infobar_green", g_settings.infobar_green );
configfile.setInt32( "infobar_blue", g_settings.infobar_blue );
configfile.setInt32( "infobar_Text_alpha", g_settings.infobar_Text_alpha );
configfile.setInt32( "infobar_Text_red", g_settings.infobar_Text_red );
configfile.setInt32( "infobar_Text_green", g_settings.infobar_Text_green );
configfile.setInt32( "infobar_Text_blue", g_settings.infobar_Text_blue );
}