本文整理汇总了C++中CConfigFile::getInt32方法的典型用法代码示例。如果您正苦于以下问题:C++ CConfigFile::getInt32方法的具体用法?C++ CConfigFile::getInt32怎么用?C++ CConfigFile::getInt32使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CConfigFile
的用法示例。
在下文中一共展示了CConfigFile::getInt32方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: init
void eMountMgr::init()
{
t_mount mp;
mountPoints.clear();
CConfigFile *config = new CConfigFile(',');
if (config->loadConfig(MOUNTCONFIGFILE))
{
for (int i = 0; true; i++)
{
if (config->getString(eString().sprintf("localdir_%d", i)) != "")
{
mp.localDir = config->getString(eString().sprintf("localdir_%d", i));
mp.fstype = config->getInt32(eString().sprintf("fstype_%d", i));
mp.password = config->getString(eString().sprintf("password_%d", i));
mp.userName = config->getString(eString().sprintf("username_%d", i));
mp.mountDir = config->getString(eString().sprintf("mountdir_%d", i));
mp.automount = config->getInt32(eString().sprintf("automount_%d", i));
mp.options = config->getString(eString().sprintf("options_%d", i));
mp.description = config->getString(eString().sprintf("description_%d", i));
eString sip = config->getString(eString().sprintf("ip_%d", i));
sscanf(sip.c_str(), "%d.%d.%d.%d", &mp.ip[0], &mp.ip[1], &mp.ip[2], &mp.ip[3]);
mp.id = i;
eMountPoint m = eMountPoint(mp);
m.mp.mounted = m.isMounted();
mountPoints.push_back(m);
}
else
break;
}
}
delete config;
addMountedFileSystems();
}
示例2: init
void eNetworkMountMgr::init()
{
eDebug("[MOUNT] init");
eMountPoint mp;
mountPoints.clear();
CConfigFile *config = new CConfigFile(',');
if (config->loadConfig(MOUNTCONFIGFILE))
{
unsigned int i = 0;
eString extra_options;
while (config->getString(eString().sprintf("localdir_%d", i)) != "")
{
mp.localDir = config->getString(eString().sprintf("localdir_%d", i));
mp.localDir = fixNonRecommendedMountpoint(mp.localDir);
mp.fstype = (enum eMountPoint::mountType)config->getInt32(eString().sprintf("fstype_%d", i));
mp.password = config->getString(eString().sprintf("password_%d", i));
mp.userName = config->getString(eString().sprintf("username_%d", i));
mp.mountDir = config->getString(eString().sprintf("mountdir_%d", i));
mp.automount = config->getInt32(eString().sprintf("automount_%d", i));
mp.options = config->getString(eString().sprintf("options_%d", i));
mp.linuxExtensions = config->getInt32(eString().sprintf("linuxextensions_%d", i), 1);
// Compatibility for extra_options in mount.conf
extra_options = config->getString(eString().sprintf("extra_options_%d", i));
if(extra_options.length() > 0)
{
mp.options = mp.options + "," + extra_options;
}
mp.description = config->getString(eString().sprintf("description_%d", i));
mp.remoteHost = config->getString(eString().sprintf("ip_%d", i));
mp.id = i;
eDebug("[MOUNT] adding %d - %s", i, mp.localDir.c_str());
eMountPoint m = eMountPoint(mp);
eDebug("[MOUNT] checkmounted");
m.setMounted(m.isReallyMounted());
#ifndef ENABLE_DEVMOUNTS
// Keep this if. Although it's "impossible" to read dev mounts from the
// config file, somebody could have an old file and we don't want to add them.
if (mp.fstype != eMountPoint::deviceMount)
#endif
mountPoints.push_back(m);
i++;
}
}
delete config;
//addMountedFileSystems();
save();
}
示例3: func_mount_get_list
//=============================================================================
// y-func : Functions for Neutrino
//=============================================================================
//-------------------------------------------------------------------------
// y-func : mount_get_list
//-------------------------------------------------------------------------
std::string CNeutrinoYParser::func_mount_get_list(CyhookHandler *, std::string)
{
CConfigFile *Config = new CConfigFile(',');
std::string ysel, ytype, yip, ylocal_dir, ydir, ynr, yresult;
int yitype;
Config->loadConfig(NEUTRINO_CONFIGFILE);
for(unsigned int i=0; i <= 7; i++)
{
ynr=itoa(i);
ysel = ((i==0) ? "checked=\"checked\"" : "");
yitype = Config->getInt32("network_nfs_type_"+ynr,0);
ytype = ( (yitype==0) ? "NFS" :((yitype==1) ? "CIFS" : "FTPFS") );
yip = Config->getString("network_nfs_ip_"+ynr,"");
ydir = Config->getString("network_nfs_dir_"+ynr,"");
ylocal_dir = Config->getString("network_nfs_local_dir_"+ynr,"");
if(ydir != "")
ydir="("+ydir+")";
yresult += string_printf("<input type='radio' name='R1' value='%d' %s />%d %s - %s %s %s<br/>",
i,ysel.c_str(),i,ytype.c_str(),yip.c_str(),ylocal_dir.c_str(), ydir.c_str());
}
delete Config;
return yresult;
}
示例4: ReadSettings
void CFBCallMonitor::ReadSettings()
{
CConfigFile *bpfbconfig = new CConfigFile(',');
bpfbconfig->clear();
bpfbconfig->loadConfig(CONFIG_FILE);
FB_IP_STRG = bpfbconfig->getString("FRITZBOXIP", "fritz.box");
FB_PORT_STRG = bpfbconfig->getString("TELDPORT", "1012");
FB_ZIEL1_STRG = bpfbconfig->getString("Ziel_1", "01234567890");
FB_ZIEL1N_STRG = bpfbconfig->getString("Ziel_1_name", "Nummer_1");
FB_ZIEL2_STRG = bpfbconfig->getString("Ziel_2", "01234567890");
FB_ZIEL2N_STRG = bpfbconfig->getString("Ziel_2_name", "Nummer_2");
FB_ZIEL3_STRG = bpfbconfig->getString("Ziel_3", "01234567890");
FB_ZIEL3N_STRG = bpfbconfig->getString("Ziel_3_name", "Nummer_3");
FB_BOXIP_STRG = bpfbconfig->getString("ip", "127.0.0.1");
FB_BOXUSERNAME_STRG = bpfbconfig->getString("loginname", "root");
FB_BOXPASSWORD_STRG = bpfbconfig->getString("passwort", "root");
FB_DEBUG = bpfbconfig->getInt32("debug", 0);
FB_ALLE = bpfbconfig->getInt32("Alle", 0);
FB_MONRING = bpfbconfig->getInt32("monRing", 1);
FB_MONDISCONNECT = bpfbconfig->getInt32("monDisconnect", 1);
FB_MUTERING = bpfbconfig->getInt32("muteRing", 1);
FB_POPUP = bpfbconfig->getInt32("popup", 0);
FB_INVERS = bpfbconfig->getInt32("invers", 1);
}
示例5: getOption
virtual const char * getOption(void)
{
sprintf(value, "%u", configfile->getInt32(locale_real_names[text], defaultvalue));
return value;
}
示例6: loadTimersFromConfig
void loadTimersFromConfig()
{
CConfigFile *config = new CConfigFile(',');
if(!config->loadConfig(CONFIGFILE))
{
/* set defaults if no configuration file exists */
dprintf("%s not found\n", CONFIGFILE);
}
else
{
vector<int> savedIDs;
savedIDs = config->getInt32Vector ("IDS");
dprintf("%d timer(s) in config\n",savedIDs.size());
for(unsigned int i=0; i < savedIDs.size(); i++)
{
stringstream ostr;
ostr << savedIDs[i];
string id=ostr.str();
CTimerd::CTimerEventTypes type=(CTimerd::CTimerEventTypes)config->getInt32 ("EVENT_TYPE_"+id,0);
time_t now = time(NULL);
switch(type)
{
case CTimerd::TIMER_SHUTDOWN :
{
CTimerEvent_Shutdown *event=
new CTimerEvent_Shutdown(config, savedIDs[i]);
if((event->alarmTime >= now) || (event->stopTime > now))
{
CTimerManager::getInstance()->addEvent(event,false);
}
else if(event->eventRepeat != CTimerd::TIMERREPEAT_ONCE)
{
// old periodic timers need to be rescheduled
event->eventState = CTimerd::TIMERSTATE_HASFINISHED;
CTimerManager::getInstance()->addEvent(event,false);
}
else
{
dprintf("Timer too old %d/%d\n",(int)now,(int) event->alarmTime);
delete event;
}
break;
}
case CTimerd::TIMER_NEXTPROGRAM :
{
CTimerEvent_NextProgram *event=
new CTimerEvent_NextProgram(config, savedIDs[i]);
if((event->alarmTime >= now) || (event->stopTime > now))
{
CTimerManager::getInstance()->addEvent(event,false);
}
else if(event->eventRepeat != CTimerd::TIMERREPEAT_ONCE)
{
// old periodic timers need to be rescheduled
event->eventState = CTimerd::TIMERSTATE_HASFINISHED;
CTimerManager::getInstance()->addEvent(event,false);
}
else
{
dprintf("Timer too old %d/%d\n",(int)now,(int) event->alarmTime);
delete event;
}
break;
}
case CTimerd::TIMER_ZAPTO :
{
CTimerEvent_Zapto *event=
new CTimerEvent_Zapto(config, savedIDs[i]);
if((event->alarmTime >= now) || (event->stopTime > now))
{
CTimerManager::getInstance()->addEvent(event,false);
}
else if(event->eventRepeat != CTimerd::TIMERREPEAT_ONCE)
{
// old periodic timers need to be rescheduled
event->eventState = CTimerd::TIMERSTATE_HASFINISHED;
CTimerManager::getInstance()->addEvent(event,false);
}
else
{
dprintf("Timer too old %d/%d\n",(int)now,(int) event->alarmTime);
delete event;
}
break;
}
case CTimerd::TIMER_STANDBY :
{
CTimerEvent_Standby *event=
new CTimerEvent_Standby(config, savedIDs[i]);
if((event->alarmTime >= now) || (event->stopTime > now))
{
CTimerManager::getInstance()->addEvent(event,false);
}
else if(event->eventRepeat != CTimerd::TIMERREPEAT_ONCE)
{
// old periodic timers need to be rescheduled
event->eventState = CTimerd::TIMERSTATE_HASFINISHED;
CTimerManager::getInstance()->addEvent(event,false);
}
//.........这里部分代码省略.........
示例7: 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
//.........这里部分代码省略.........
示例8: getTheme
void CThemes::getTheme(CConfigFile &configfile)
{
SNeutrinoTheme &t = g_settings.theme;
t.menu_Head_alpha = configfile.getInt32( "menu_Head_alpha", 0x00 );
t.menu_Head_red = configfile.getInt32( "menu_Head_red", 0x00 );
t.menu_Head_green = configfile.getInt32( "menu_Head_green", 0x0A );
t.menu_Head_blue = configfile.getInt32( "menu_Head_blue", 0x19 );
t.menu_Head_Text_alpha = configfile.getInt32( "menu_Head_Text_alpha", 0x00 );
t.menu_Head_Text_red = configfile.getInt32( "menu_Head_Text_red", 0x5f );
t.menu_Head_Text_green = configfile.getInt32( "menu_Head_Text_green", 0x46 );
t.menu_Head_Text_blue = configfile.getInt32( "menu_Head_Text_blue", 0x00 );
t.menu_Head_gradient = configfile.getInt32( "menu_Head_gradient", 1);
t.menu_Content_alpha = configfile.getInt32( "menu_Content_alpha", 0x14 );
t.menu_Content_red = configfile.getInt32( "menu_Content_red", 0x00 );
t.menu_Content_green = configfile.getInt32( "menu_Content_green", 0x0f );
t.menu_Content_blue = configfile.getInt32( "menu_Content_blue", 0x23 );
t.menu_Content_Text_alpha = configfile.getInt32( "menu_Content_Text_alpha", 0x00 );
t.menu_Content_Text_red = configfile.getInt32( "menu_Content_Text_red", 0x64 );
t.menu_Content_Text_green = configfile.getInt32( "menu_Content_Text_green", 0x64 );
t.menu_Content_Text_blue = configfile.getInt32( "menu_Content_Text_blue", 0x64 );
t.menu_Content_Selected_alpha = configfile.getInt32( "menu_Content_Selected_alpha", 0x14 );
t.menu_Content_Selected_red = configfile.getInt32( "menu_Content_Selected_red", 0x19 );
t.menu_Content_Selected_green = configfile.getInt32( "menu_Content_Selected_green", 0x37 );
t.menu_Content_Selected_blue = configfile.getInt32( "menu_Content_Selected_blue", 0x64 );
t.menu_Content_Selected_Text_alpha = configfile.getInt32( "menu_Content_Selected_Text_alpha", 0x00 );
t.menu_Content_Selected_Text_red = configfile.getInt32( "menu_Content_Selected_Text_red", 0x00 );
t.menu_Content_Selected_Text_green = configfile.getInt32( "menu_Content_Selected_Text_green", 0x00 );
t.menu_Content_Selected_Text_blue = configfile.getInt32( "menu_Content_Selected_Text_blue", 0x00 );
t.menu_Content_inactive_alpha = configfile.getInt32( "menu_Content_inactive_alpha", 0x14 );
t.menu_Content_inactive_red = configfile.getInt32( "menu_Content_inactive_red", 0x00 );
t.menu_Content_inactive_green = configfile.getInt32( "menu_Content_inactive_green", 0x0f );
t.menu_Content_inactive_blue = configfile.getInt32( "menu_Content_inactive_blue", 0x23 );
t.menu_Content_inactive_Text_alpha = configfile.getInt32( "menu_Content_inactive_Text_alpha", 0x00 );
t.menu_Content_inactive_Text_red = configfile.getInt32( "menu_Content_inactive_Text_red", 55 );
t.menu_Content_inactive_Text_green = configfile.getInt32( "menu_Content_inactive_Text_green", 70 );
t.menu_Content_inactive_Text_blue = configfile.getInt32( "menu_Content_inactive_Text_blue", 85 );
t.menu_Hint_gradient = configfile.getInt32( "menu_Hint_gradient", 0);
t.infobar_alpha = configfile.getInt32( "infobar_alpha", 0x14 );
t.infobar_red = configfile.getInt32( "infobar_red", 0x00 );
t.infobar_green = configfile.getInt32( "infobar_green", 0x0e );
t.infobar_blue = configfile.getInt32( "infobar_blue", 0x23 );
t.infobar_gradient_top = configfile.getInt32( "infobar_gradient_top", 0 );
t.infobar_gradient_bottom = configfile.getInt32( "infobar_gradient_bottom", 0 );
t.infobar_Text_alpha = configfile.getInt32( "infobar_Text_alpha", 0x00 );
t.infobar_Text_red = configfile.getInt32( "infobar_Text_red", 0x64 );
t.infobar_Text_green = configfile.getInt32( "infobar_Text_green", 0x64 );
t.infobar_Text_blue = configfile.getInt32( "infobar_Text_blue", 0x64 );
t.colored_events_alpha = configfile.getInt32( "colored_events_alpha", 0x00 );
t.colored_events_red = configfile.getInt32( "colored_events_red", 95 );
t.colored_events_green = configfile.getInt32( "colored_events_green", 70 );
t.colored_events_blue = configfile.getInt32( "colored_events_blue", 0 );
t.colored_events_channellist = configfile.getInt32( "colored_events_channellist", 0 );
t.colored_events_infobar = configfile.getInt32( "colored_events_infobar", 2 );
t.clock_Digit_alpha = configfile.getInt32( "clock_Digit_alpha", t.menu_Content_Text_alpha );
t.clock_Digit_red = configfile.getInt32( "clock_Digit_red", t.menu_Content_Text_red );
t.clock_Digit_green = configfile.getInt32( "clock_Digit_green", t.menu_Content_Text_green );
t.clock_Digit_blue = configfile.getInt32( "clock_Digit_blue", t.menu_Content_Text_blue );
t.gradient_c2c = configfile.getInt32( "gradient_c2c", 0 );
}
示例9: 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;
}
示例10: getColors
void CThemes::getColors(CConfigFile &configfile)
{
g_settings.menu_Head_alpha = configfile.getInt32( "menu_Head_alpha", 0x00 );
g_settings.menu_Head_red = configfile.getInt32( "menu_Head_red", 0x00 );
g_settings.menu_Head_green = configfile.getInt32( "menu_Head_green", 0x0A );
g_settings.menu_Head_blue = configfile.getInt32( "menu_Head_blue", 0x19 );
g_settings.menu_Head_Text_alpha = configfile.getInt32( "menu_Head_Text_alpha", 0x00 );
g_settings.menu_Head_Text_red = configfile.getInt32( "menu_Head_Text_red", 0x5f );
g_settings.menu_Head_Text_green = configfile.getInt32( "menu_Head_Text_green", 0x46 );
g_settings.menu_Head_Text_blue = configfile.getInt32( "menu_Head_Text_blue", 0x00 );
g_settings.menu_Content_alpha = configfile.getInt32( "menu_Content_alpha", 0x14 );
g_settings.menu_Content_red = configfile.getInt32( "menu_Content_red", 0x00 );
g_settings.menu_Content_green = configfile.getInt32( "menu_Content_green", 0x0f );
g_settings.menu_Content_blue = configfile.getInt32( "menu_Content_blue", 0x23 );
g_settings.menu_Content_Text_alpha = configfile.getInt32( "menu_Content_Text_alpha", 0x00 );
g_settings.menu_Content_Text_red = configfile.getInt32( "menu_Content_Text_red", 0x64 );
g_settings.menu_Content_Text_green = configfile.getInt32( "menu_Content_Text_green", 0x64 );
g_settings.menu_Content_Text_blue = configfile.getInt32( "menu_Content_Text_blue", 0x64 );
g_settings.menu_Content_Selected_alpha = configfile.getInt32( "menu_Content_Selected_alpha", 0x14 );
g_settings.menu_Content_Selected_red = configfile.getInt32( "menu_Content_Selected_red", 0x19 );
g_settings.menu_Content_Selected_green = configfile.getInt32( "menu_Content_Selected_green", 0x37 );
g_settings.menu_Content_Selected_blue = configfile.getInt32( "menu_Content_Selected_blue", 0x64 );
g_settings.menu_Content_Selected_Text_alpha = configfile.getInt32( "menu_Content_Selected_Text_alpha", 0x00 );
g_settings.menu_Content_Selected_Text_red = configfile.getInt32( "menu_Content_Selected_Text_red", 0x00 );
g_settings.menu_Content_Selected_Text_green = configfile.getInt32( "menu_Content_Selected_Text_green", 0x00 );
g_settings.menu_Content_Selected_Text_blue = configfile.getInt32( "menu_Content_Selected_Text_blue", 0x00 );
g_settings.menu_Content_inactive_alpha = configfile.getInt32( "menu_Content_inactive_alpha", 0x14 );
g_settings.menu_Content_inactive_red = configfile.getInt32( "menu_Content_inactive_red", 0x00 );
g_settings.menu_Content_inactive_green = configfile.getInt32( "menu_Content_inactive_green", 0x0f );
g_settings.menu_Content_inactive_blue = configfile.getInt32( "menu_Content_inactive_blue", 0x23 );
g_settings.menu_Content_inactive_Text_alpha = configfile.getInt32( "menu_Content_inactive_Text_alpha", 0x00 );
g_settings.menu_Content_inactive_Text_red = configfile.getInt32( "menu_Content_inactive_Text_red", 55 );
g_settings.menu_Content_inactive_Text_green = configfile.getInt32( "menu_Content_inactive_Text_green", 70 );
g_settings.menu_Content_inactive_Text_blue = configfile.getInt32( "menu_Content_inactive_Text_blue", 85 );
g_settings.infobar_alpha = configfile.getInt32( "infobar_alpha", 0x14 );
g_settings.infobar_red = configfile.getInt32( "infobar_red", 0x00 );
g_settings.infobar_green = configfile.getInt32( "infobar_green", 0x0e );
g_settings.infobar_blue = configfile.getInt32( "infobar_blue", 0x23 );
g_settings.infobar_Text_alpha = configfile.getInt32( "infobar_Text_alpha", 0x00 );
g_settings.infobar_Text_red = configfile.getInt32( "infobar_Text_red", 0x64 );
g_settings.infobar_Text_green = configfile.getInt32( "infobar_Text_green", 0x64 );
g_settings.infobar_Text_blue = configfile.getInt32( "infobar_Text_blue", 0x64 );
}