, ProxyPort(0)
, ExternalWarningLog("")
, ExternalWarningLevel(0)
+ , StartOffline(false)
{
// Available service description config options
po::options_description opt_desc_service("Service description options");
("http_proxy_port",po::value<int>(),"Port of the proxy.")
("external_warning_log",po::value<string>()->default_value(""),"External programm to pass warning log messages to.")
("external_warning_level",po::value<int>()->default_value(0),"Warning messages of which loglevel should be passed to external programm.")
+ ("start_offline",po::value<bool>()->default_value(false),"Start in offline mode.")
;
// Define valid command line parameters
, ProxyPort(0)
, ExternalWarningLog("")
, ExternalWarningLevel(0)
+ , StartOffline(false)
{
// Available service description config options
po::options_description opt_desc_service("Service description options");
("http_proxy_port",po::value<int>(),"Port of the proxy.")
("external_warning_log",po::value<string>()->default_value(""),"External programm to pass warning log messages to.")
("external_warning_level",po::value<int>()->default_value(0),"Warning messages of which loglevel should be passed to external programm.")
+ ("start_offline",po::value<bool>()->default_value(false),"Start in offline mode.")
;
// Define valid command line parameters
if ( VariablesMap.count("external_warning_level") )
ExternalWarningLevel = VariablesMap["external_warning_level"].as<int>();
+ if ( VariablesMap.count("start_offline") )
+ StartOffline = VariablesMap["start_offline"].as<bool>();
+
}
catch( const po::unknown_option& e )
{
if ( VariablesMap.count("external_warning_level") )
ExternalWarningLevel = VariablesMap["external_warning_level"].as<int>();
+ if ( VariablesMap.count("start_offline") )
+ StartOffline = VariablesMap["start_offline"].as<bool>();
+
}
catch( const po::unknown_option& e ) // at the moment 04-08-2009 this exception is never thrown :-(
{
return ExternalWarningLevel;
}
+
+/**
+ * Get member StartOffline
+ * @return StartOffline
+ */
+bool Config::get_start_offline() const
+{
+ return StartOffline;
+}
int ProxyPort;
std::string ExternalWarningLog;
int ExternalWarningLevel;
+ bool StartOffline;
Service::Ptr create_service(const std::string& protocol, const std::string& server, const std::string& hostname, const std::string& login, const std::string& password, const int update_interval, const int max_updates_within_interval, const int dns_cache_ttl);
int load_main_config_file(const std::string& full_filename);
std::string get_external_warning_log() const;
+ bool get_start_offline() const;
+
};
#endif