, ExternalWarningLog("")
, ExternalWarningLevel(0)
, StartOffline(false)
+ , WebcheckEnabled(false)
{
// Available service description config options
po::options_description opt_desc_service("Service description options");
("loglevel",po::value<int>()->default_value(0),"Loglevel.")
("syslog",po::value<bool>()->default_value(false),"Use syslog facility.")
("enable_ipv6",po::value<bool>()->default_value(false),"Try to use IPv6.")
+ ("webcheck_enabled",po::value<bool>()->default_value(false),"Use webcheck url to determine actual IP address.")
("webcheck_url",po::value<string>()->default_value(""),"Use this URL to determine IP.")
("webcheck_url_alt",po::value<string>()->default_value(""),"Use this alternative URL to determine IP.")
("webcheck_interval",po::value<int>()->default_value(10),"The webcheck interval in minutes.")
, ExternalWarningLog("")
, ExternalWarningLevel(0)
, StartOffline(false)
+ , WebcheckEnabled(false)
{
// Available service description config options
po::options_description opt_desc_service("Service description options");
("loglevel",po::value<int>()->default_value(0),"Loglevel.")
("syslog",po::value<bool>()->default_value(false),"Use syslog facility.")
("enable_ipv6",po::value<bool>()->default_value(false),"Try to use IPv6.")
+ ("webcheck_enabled",po::value<bool>()->default_value(false),"Use webcheck url to determine actual IP address.")
("webcheck_url",po::value<string>()->default_value(""),"Use this URL to determine IP.")
("webcheck_url_alt",po::value<string>()->default_value(""),"Use this alternative URL to determine IP.")
("webcheck_interval",po::value<int>()->default_value(10),"The webcheck interval in minutes.")
if ( VariablesMap.count("enable_ipv6") )
EnableIPv6 = VariablesMap["enable_ipv6"].as<bool>();
+ if ( VariablesMap.count("webcheck_enabled") )
+ WebcheckEnabled = VariablesMap["webcheck_enabled"].as<bool>();
+
if ( VariablesMap.count("webcheck_url") )
WebcheckIpUrl = VariablesMap["webcheck_url"].as<string>();
if ( VariablesMap.count("enable_ipv6") )
EnableIPv6 = VariablesMap["enable_ipv6"].as<bool>();
+ if ( VariablesMap.count("webcheck_enabled") )
+ WebcheckEnabled = VariablesMap["webcheck_enabled"].as<bool>();
+
if ( VariablesMap.count("webcheck_url") )
WebcheckIpUrl = VariablesMap["webcheck_url"].as<string>();
/**
+ * Getter for member WebcheckEnabled
+ * @return Is webcheck enabled by default.
+ */
+bool Config::get_webcheck_enabled() const
+{
+ return WebcheckEnabled;
+}
+
+
+/**
+ * Setter for member WebcheckEnabled
+ * @return Is webcheck enabled by default.
+ */
+void Config::set_webcheck_enabled( bool webcheck_enabled )
+{
+ WebcheckEnabled = webcheck_enabled;
+}
+
+
+/**
* Getter for member WebcheckIpUrl
* @return The primary IP Webcheck URL
*/
std::string ExternalWarningLog;
int ExternalWarningLevel;
bool StartOffline;
+ bool WebcheckEnabled;
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);
int get_proxy_port() const;
+ bool get_webcheck_enabled() const;
+
+ void set_webcheck_enabled( bool webcheck_enabled );
+
std::string get_webcheck_ip_url() const;
std::string get_webcheck_ip_url_alt() const;