From: Bjoern Sikora Date: Mon, 7 Sep 2009 14:53:40 +0000 (+0200) Subject: Refactoring unexpected part two: Class naming adopted to I2N coding style ;-). X-Git-Tag: v1.1~194 X-Git-Url: http://developer.intra2net.com/git/?a=commitdiff_plain;h=629d8110af7b7820baed241dee42a4dd472d874d;p=bpdyndnsd Refactoring unexpected part two: Class naming adopted to I2N coding style ;-). --- diff --git a/src/config.cpp b/src/config.cpp index db8095b..08b44fa 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -263,37 +263,37 @@ Service::Ptr Config::create_service(const string &protocol,const string &hostnam if(protocol == "dhs") { - Service::Ptr service_dhs(new SERVICE_DHS(protocol,hostname,login,password,Log,update_interval,max_updates_within_interval,dns_cache_ttl,Proxy,ProxyPort)); + Service::Ptr service_dhs(new ServiceDhs(protocol,hostname,login,password,Log,update_interval,max_updates_within_interval,dns_cache_ttl,Proxy,ProxyPort)); return service_dhs; } else if(protocol == "ods") { - Service::Ptr service_ods(new SERVICE_ODS(protocol,hostname,login,password,Log,update_interval,max_updates_within_interval,dns_cache_ttl)); + Service::Ptr service_ods(new ServiceOds(protocol,hostname,login,password,Log,update_interval,max_updates_within_interval,dns_cache_ttl)); return service_ods; } else if(protocol == "dyndns") { - Service::Ptr service_dyndns(new SERVICE_DYNDNS(protocol,hostname,login,password,Log,update_interval,max_updates_within_interval,dns_cache_ttl,Proxy,ProxyPort)); + Service::Ptr service_dyndns(new ServiceDyndns(protocol,hostname,login,password,Log,update_interval,max_updates_within_interval,dns_cache_ttl,Proxy,ProxyPort)); return service_dyndns; } else if(protocol == "dyns") { - Service::Ptr service_dyns(new SERVICE_DYNS(protocol,hostname,login,password,Log,update_interval,max_updates_within_interval,dns_cache_ttl,Proxy,ProxyPort)); + Service::Ptr service_dyns(new ServiceDyns(protocol,hostname,login,password,Log,update_interval,max_updates_within_interval,dns_cache_ttl,Proxy,ProxyPort)); return service_dyns; } else if(protocol == "easydns") { - Service::Ptr service_easydns(new SERVICE_EASYDNS(protocol,hostname,login,password,Log,update_interval,max_updates_within_interval,dns_cache_ttl,Proxy,ProxyPort)); + Service::Ptr service_easydns(new ServiceEasydns(protocol,hostname,login,password,Log,update_interval,max_updates_within_interval,dns_cache_ttl,Proxy,ProxyPort)); return service_easydns; } else if(protocol == "tzo") { - Service::Ptr service_tzo(new SERVICE_TZO(protocol,hostname,login,password,Log,update_interval,max_updates_within_interval,dns_cache_ttl,Proxy,ProxyPort)); + Service::Ptr service_tzo(new ServiceTzo(protocol,hostname,login,password,Log,update_interval,max_updates_within_interval,dns_cache_ttl,Proxy,ProxyPort)); return service_tzo; } else if(protocol == "zoneedit") { - Service::Ptr service_zoneedit(new SERVICE_ZONEEDIT(protocol,hostname,login,password,Log,update_interval,max_updates_within_interval,dns_cache_ttl,Proxy,ProxyPort)); + Service::Ptr service_zoneedit(new ServiceZoneedit(protocol,hostname,login,password,Log,update_interval,max_updates_within_interval,dns_cache_ttl,Proxy,ProxyPort)); return service_zoneedit; } else diff --git a/src/service_dhs.cpp b/src/service_dhs.cpp index f70ccfa..a9486bc 100644 --- a/src/service_dhs.cpp +++ b/src/service_dhs.cpp @@ -21,7 +21,7 @@ using namespace std; /** * Default Constructor, needed for object serialization. */ -SERVICE_DHS::SERVICE_DHS() +ServiceDhs::ServiceDhs() { } @@ -32,7 +32,7 @@ SERVICE_DHS::SERVICE_DHS() * @param _login The login name. * @param _password The corresponding password. */ -SERVICE_DHS::SERVICE_DHS(const string& _protocol, const string& _hostname, const string& _login, const string& _password, const Logger::Ptr& _logger, const int _update_interval, const int _max_updates_within_interval, const int _dns_cache_ttl, const string& _proxy, const int _proxy_port) +ServiceDhs::ServiceDhs(const string& _protocol, const string& _hostname, const string& _login, const string& _password, const Logger::Ptr& _logger, const int _update_interval, const int _max_updates_within_interval, const int _dns_cache_ttl, const string& _proxy, const int _proxy_port) { if ( _update_interval == -1 ) // If _update_interval is default po::option_desc (not specified via config) set_update_interval(15); // use default protocol value @@ -70,7 +70,7 @@ SERVICE_DHS::SERVICE_DHS(const string& _protocol, const string& _hostname, const /** * Default destructor */ -SERVICE_DHS::~SERVICE_DHS() +ServiceDhs::~ServiceDhs() { } @@ -81,7 +81,7 @@ SERVICE_DHS::~SERVICE_DHS() * @param domain_part The domain_part in which the hostname is located. * @return The assembled update url without IP. */ -string SERVICE_DHS::assemble_base_url(const string& hostname, const string& domain_part) const +string ServiceDhs::assemble_base_url(const string& hostname, const string& domain_part) const { string base_url; @@ -101,7 +101,7 @@ string SERVICE_DHS::assemble_base_url(const string& hostname, const string& doma * @param fqdn Hostname with domain part. * @return A list with 2 elements (first element is the hostname, second element the domain part), or a list with 1 element if the domain part couldn't be determined. */ -list SERVICE_DHS::separate_domain_and_host_part(const string& fqdn) const +list ServiceDhs::separate_domain_and_host_part(const string& fqdn) const { list splitted; ba::split(splitted,fqdn,boost::is_any_of(".")); @@ -134,7 +134,7 @@ list SERVICE_DHS::separate_domain_and_host_part(const string& fqdn) cons * @param ip IP Address to set. * @return 0 if all is fine, -1 otherwise. */ -int SERVICE_DHS::perform_update(const std::string& ip) +int ServiceDhs::perform_update(const std::string& ip) { int ret_val = -1; @@ -167,7 +167,7 @@ int SERVICE_DHS::perform_update(const std::string& ip) * @param version Version */ template -void SERVICE_DHS::serialize(Archive & ar, const unsigned int version) +void ServiceDhs::serialize(Archive & ar, const unsigned int version) { ar & boost::serialization::base_object(*this); } diff --git a/src/service_dhs.h b/src/service_dhs.h index 1d05898..cb7f46a 100644 --- a/src/service_dhs.h +++ b/src/service_dhs.h @@ -7,8 +7,8 @@ * @license GPLv2 */ -#ifndef SERVICE_DHS_H -#define SERVICE_DHS_H +#ifndef ServiceDhs_H +#define ServiceDhs_H #include @@ -19,7 +19,7 @@ #include #include -class SERVICE_DHS : public Service +class ServiceDhs : public Service { private: @@ -38,13 +38,13 @@ private: public: - typedef boost::shared_ptr Ptr; + typedef boost::shared_ptr Ptr; - SERVICE_DHS(); + ServiceDhs(); - SERVICE_DHS(const std::string& _protocol, const std::string& _hostname, const std::string& _login, const std::string& _password, const Logger::Ptr& _logger, const int _update_interval, const int _max_updates_within_interval, const int dns_cache_ttl, const std::string& proxy, const int proxy_port); + ServiceDhs(const std::string& _protocol, const std::string& _hostname, const std::string& _login, const std::string& _password, const Logger::Ptr& _logger, const int _update_interval, const int _max_updates_within_interval, const int dns_cache_ttl, const std::string& proxy, const int proxy_port); - ~SERVICE_DHS(); + ~ServiceDhs(); int perform_update(const std::string& ip); }; diff --git a/src/service_dyndns.cpp b/src/service_dyndns.cpp index f16940e..fa9fcc1 100644 --- a/src/service_dyndns.cpp +++ b/src/service_dyndns.cpp @@ -18,7 +18,7 @@ using namespace std; /** * Default Constructor, needed for object serialization. */ -SERVICE_DYNDNS::SERVICE_DYNDNS() +ServiceDyndns::ServiceDyndns() { } @@ -29,7 +29,7 @@ SERVICE_DYNDNS::SERVICE_DYNDNS() * @param _login The login name. * @param _password The corresponding password. */ -SERVICE_DYNDNS::SERVICE_DYNDNS(const string& _protocol, const string& _hostname, const string& _login, const string& _password, const Logger::Ptr& _logger, const int _update_interval, const int _max_updates_within_interval, const int _dns_cache_ttl, const string& _proxy, const int _proxy_port) +ServiceDyndns::ServiceDyndns(const string& _protocol, const string& _hostname, const string& _login, const string& _password, const Logger::Ptr& _logger, const int _update_interval, const int _max_updates_within_interval, const int _dns_cache_ttl, const string& _proxy, const int _proxy_port) { if ( _update_interval == -1 ) // If _update_interval is default po::option_desc (not specified via config) set_update_interval(0); // use default protocol value @@ -64,7 +64,7 @@ SERVICE_DYNDNS::SERVICE_DYNDNS(const string& _protocol, const string& _hostname, /** * Default destructor */ -SERVICE_DYNDNS::~SERVICE_DYNDNS() +ServiceDyndns::~ServiceDyndns() { } @@ -74,7 +74,7 @@ SERVICE_DYNDNS::~SERVICE_DYNDNS() * @param hostname The fqhn hostname to update IP for. * @return The assembled update url without IP. */ -string SERVICE_DYNDNS::assemble_base_url(const string& fqhn) const +string ServiceDyndns::assemble_base_url(const string& fqhn) const { string base_url; @@ -92,7 +92,7 @@ string SERVICE_DYNDNS::assemble_base_url(const string& fqhn) const * @param ip IP Address to set. * @return 0 if all is fine, -1 otherwise. */ -int SERVICE_DYNDNS::perform_update(const std::string& ip) +int ServiceDyndns::perform_update(const std::string& ip) { int ret_val = -1; @@ -134,7 +134,7 @@ int SERVICE_DYNDNS::perform_update(const std::string& ip) * @param version Version */ template -void SERVICE_DYNDNS::serialize(Archive & ar, const unsigned int version) +void ServiceDyndns::serialize(Archive & ar, const unsigned int version) { ar & boost::serialization::base_object(*this); } diff --git a/src/service_dyndns.h b/src/service_dyndns.h index 35b8568..8373b71 100644 --- a/src/service_dyndns.h +++ b/src/service_dyndns.h @@ -7,8 +7,8 @@ * @license GPLv2 */ -#ifndef SERVICE_DYNDNS_H -#define SERVICE_DYNDNS_H +#ifndef ServiceDyndns_H +#define ServiceDyndns_H #include @@ -19,7 +19,7 @@ #include #include -class SERVICE_DYNDNS : public Service +class ServiceDyndns : public Service { private: @@ -36,13 +36,13 @@ private: public: - typedef boost::shared_ptr Ptr; + typedef boost::shared_ptr Ptr; - SERVICE_DYNDNS(); + ServiceDyndns(); - SERVICE_DYNDNS(const std::string& _protocol, const std::string& _hostname, const std::string& _login, const std::string& _password, const Logger::Ptr& _logger, const int _update_interval, const int _max_updates_within_interval, const int dns_cache_ttl, const std::string& proxy, const int proxy_port); + ServiceDyndns(const std::string& _protocol, const std::string& _hostname, const std::string& _login, const std::string& _password, const Logger::Ptr& _logger, const int _update_interval, const int _max_updates_within_interval, const int dns_cache_ttl, const std::string& proxy, const int proxy_port); - ~SERVICE_DYNDNS(); + ~ServiceDyndns(); int perform_update(const std::string& ip); diff --git a/src/service_dyns.cpp b/src/service_dyns.cpp index 975ea2a..ed43578 100644 --- a/src/service_dyns.cpp +++ b/src/service_dyns.cpp @@ -21,7 +21,7 @@ using namespace std; /** * Default Constructor, needed for object serialization. */ -SERVICE_DYNS::SERVICE_DYNS() +ServiceDyns::ServiceDyns() { } @@ -32,7 +32,7 @@ SERVICE_DYNS::SERVICE_DYNS() * @param _login The login name. * @param _password The corresponding password. */ -SERVICE_DYNS::SERVICE_DYNS(const string& _protocol, const string& _hostname, const string& _login, const string& _password, const Logger::Ptr& _logger, const int _update_interval, const int _max_updates_within_interval, const int _dns_cache_ttl, const string& _proxy, const int _proxy_port) +ServiceDyns::ServiceDyns(const string& _protocol, const string& _hostname, const string& _login, const string& _password, const Logger::Ptr& _logger, const int _update_interval, const int _max_updates_within_interval, const int _dns_cache_ttl, const string& _proxy, const int _proxy_port) { if ( _update_interval == -1 ) // If _update_interval is default po::option_desc (not specified via config) set_update_interval(5); // use default protocol value @@ -67,7 +67,7 @@ SERVICE_DYNS::SERVICE_DYNS(const string& _protocol, const string& _hostname, con /** * Default destructor */ -SERVICE_DYNS::~SERVICE_DYNS() +ServiceDyns::~ServiceDyns() { } @@ -79,7 +79,7 @@ SERVICE_DYNS::~SERVICE_DYNS() * @param hostname The password to use. * @return The assembled update url without IP. */ -string SERVICE_DYNS::assemble_base_url(const string& fqhn, const string& username, const string& password) const +string ServiceDyns::assemble_base_url(const string& fqhn, const string& username, const string& password) const { string base_url; @@ -101,7 +101,7 @@ string SERVICE_DYNS::assemble_base_url(const string& fqhn, const string& usernam * @param ip IP Address to set. * @return 0 if all is fine, -1 otherwise. */ -int SERVICE_DYNS::perform_update(const std::string& ip) +int ServiceDyns::perform_update(const std::string& ip) { int ret_val = -1; @@ -138,7 +138,7 @@ int SERVICE_DYNS::perform_update(const std::string& ip) * @param data The returned http data. * @return The status code. */ -string SERVICE_DYNS::parse_status_code(const string& data) const +string ServiceDyns::parse_status_code(const string& data) const { list tokens; ba::split(tokens,data,boost::is_any_of(" ")); @@ -152,7 +152,7 @@ string SERVICE_DYNS::parse_status_code(const string& data) const * @param version Version */ template -void SERVICE_DYNS::serialize(Archive & ar, const unsigned int version) +void ServiceDyns::serialize(Archive & ar, const unsigned int version) { ar & boost::serialization::base_object(*this); } diff --git a/src/service_dyns.h b/src/service_dyns.h index 36a3783..aaa7b73 100644 --- a/src/service_dyns.h +++ b/src/service_dyns.h @@ -7,8 +7,8 @@ * @license GPLv2 */ -#ifndef SERVICE_DYNS_H -#define SERVICE_DYNS_H +#ifndef ServiceDyns_H +#define ServiceDyns_H #include @@ -19,7 +19,7 @@ #include #include -class SERVICE_DYNS : public Service +class ServiceDyns : public Service { private: @@ -38,13 +38,13 @@ private: public: - typedef boost::shared_ptr Ptr; + typedef boost::shared_ptr Ptr; - SERVICE_DYNS(); + ServiceDyns(); - SERVICE_DYNS(const std::string& _protocol, const std::string& _hostname, const std::string& _login, const std::string& _password, const Logger::Ptr& _logger, const int _update_interval, const int _max_updates_within_interval, const int dns_cache_ttl, const std::string& proxy, const int proxy_port); + ServiceDyns(const std::string& _protocol, const std::string& _hostname, const std::string& _login, const std::string& _password, const Logger::Ptr& _logger, const int _update_interval, const int _max_updates_within_interval, const int dns_cache_ttl, const std::string& proxy, const int proxy_port); - ~SERVICE_DYNS(); + ~ServiceDyns(); int perform_update(const std::string& ip); }; diff --git a/src/service_easydns.cpp b/src/service_easydns.cpp index ad33c85..daf0584 100644 --- a/src/service_easydns.cpp +++ b/src/service_easydns.cpp @@ -21,7 +21,7 @@ using namespace std; /** * Default Constructor, needed for object serialization. */ -SERVICE_EASYDNS::SERVICE_EASYDNS() +ServiceEasydns::ServiceEasydns() { } @@ -32,7 +32,7 @@ SERVICE_EASYDNS::SERVICE_EASYDNS() * @param _login The login name. * @param _password The corresponding password. */ -SERVICE_EASYDNS::SERVICE_EASYDNS(const string& _protocol, const string& _hostname, const string& _login, const string& _password, const Logger::Ptr& _logger, const int _update_interval, const int _max_updates_within_interval, const int _dns_cache_ttl, const string& _proxy, const int _proxy_port) +ServiceEasydns::ServiceEasydns(const string& _protocol, const string& _hostname, const string& _login, const string& _password, const Logger::Ptr& _logger, const int _update_interval, const int _max_updates_within_interval, const int _dns_cache_ttl, const string& _proxy, const int _proxy_port) { if ( _update_interval == -1 ) // If _update_interval is default po::option_desc (not specified via config) set_update_interval(10); // use default protocol value @@ -74,7 +74,7 @@ SERVICE_EASYDNS::SERVICE_EASYDNS(const string& _protocol, const string& _hostnam /** * Default destructor */ -SERVICE_EASYDNS::~SERVICE_EASYDNS() +ServiceEasydns::~ServiceEasydns() { } @@ -84,7 +84,7 @@ SERVICE_EASYDNS::~SERVICE_EASYDNS() * @param domain_part The complete domain part. * @return Two_level_domain part if there is one or "" if not so. */ -string SERVICE_EASYDNS::get_two_level_tld(const string& domain_part) const +string ServiceEasydns::get_two_level_tld(const string& domain_part) const { // TODO: There is a list with all two level TLD's, use it @@ -120,7 +120,7 @@ string SERVICE_EASYDNS::get_two_level_tld(const string& domain_part) const * @param domain_part The domain_part in which the hostname is located. * @return The assembled update url without IP. */ -string SERVICE_EASYDNS::assemble_base_url(const string& hostname, const string& two_level_tld) const +string ServiceEasydns::assemble_base_url(const string& hostname, const string& two_level_tld) const { string base_url; if ( !two_level_tld.empty() ) @@ -148,7 +148,7 @@ string SERVICE_EASYDNS::assemble_base_url(const string& hostname, const string& * @param fqdn Hostname with domain part. * @return A list with 2 elements (first element is the hostname, second element the domain part), or a list with 1 element if the domain part couldn't be determined. */ -list SERVICE_EASYDNS::separate_domain_and_host_part(const string& fqdn) const +list ServiceEasydns::separate_domain_and_host_part(const string& fqdn) const { list splitted; ba::split(splitted,fqdn,boost::is_any_of(".")); @@ -181,7 +181,7 @@ list SERVICE_EASYDNS::separate_domain_and_host_part(const string& fqdn) * @param ip IP Address to set. * @return 0 if all is fine, -1 otherwise. */ -int SERVICE_EASYDNS::perform_update(const std::string& ip) +int ServiceEasydns::perform_update(const std::string& ip) { int ret_val = -1; @@ -218,7 +218,7 @@ int SERVICE_EASYDNS::perform_update(const std::string& ip) * @param version Version */ template -void SERVICE_EASYDNS::serialize(Archive & ar, const unsigned int version) +void ServiceEasydns::serialize(Archive & ar, const unsigned int version) { ar & boost::serialization::base_object(*this); } diff --git a/src/service_easydns.h b/src/service_easydns.h index dffb5b1..777a942 100644 --- a/src/service_easydns.h +++ b/src/service_easydns.h @@ -7,8 +7,8 @@ * @license GPLv2 */ -#ifndef SERVICE_EASYDNS_H -#define SERVICE_EASYDNS_H +#ifndef ServiceEasydns_H +#define ServiceEasydns_H #include @@ -19,7 +19,7 @@ #include #include -class SERVICE_EASYDNS : public Service +class ServiceEasydns : public Service { private: @@ -40,13 +40,13 @@ private: public: - typedef boost::shared_ptr Ptr; + typedef boost::shared_ptr Ptr; - SERVICE_EASYDNS(); + ServiceEasydns(); - SERVICE_EASYDNS(const std::string& _protocol, const std::string& _hostname, const std::string& _login, const std::string& _password, const Logger::Ptr& _logger, const int _update_interval, const int _max_updates_within_interval, const int dns_cache_ttl, const std::string& proxy, const int proxy_port); + ServiceEasydns(const std::string& _protocol, const std::string& _hostname, const std::string& _login, const std::string& _password, const Logger::Ptr& _logger, const int _update_interval, const int _max_updates_within_interval, const int dns_cache_ttl, const std::string& proxy, const int proxy_port); - ~SERVICE_EASYDNS(); + ~ServiceEasydns(); int perform_update(const std::string& ip); diff --git a/src/service_ods.cpp b/src/service_ods.cpp index 6d33566..8ecffd7 100644 --- a/src/service_ods.cpp +++ b/src/service_ods.cpp @@ -17,7 +17,7 @@ using namespace std; /** * Default Constructor, needed for object serialization. */ -SERVICE_ODS::SERVICE_ODS() +ServiceOds::ServiceOds() { } @@ -28,7 +28,7 @@ SERVICE_ODS::SERVICE_ODS() * @param _login The login name. * @param _password The corresponding password. */ -SERVICE_ODS::SERVICE_ODS(const string& _protocol, const string& _hostname, const string& _login, const string& _password, const Logger::Ptr& _logger, const int _update_interval, const int _max_updates_within_interval, const int _dns_cache_ttl) +ServiceOds::ServiceOds(const string& _protocol, const string& _hostname, const string& _login, const string& _password, const Logger::Ptr& _logger, const int _update_interval, const int _max_updates_within_interval, const int _dns_cache_ttl) { if ( _update_interval == -1 ) // If _update_interval is default po::option_desc (not specified via config) set_update_interval(15); // use default protocol value @@ -56,7 +56,7 @@ SERVICE_ODS::SERVICE_ODS(const string& _protocol, const string& _hostname, const /** * Default destructor. */ -SERVICE_ODS::~SERVICE_ODS() +ServiceOds::~ServiceOds() { } @@ -66,7 +66,7 @@ SERVICE_ODS::~SERVICE_ODS() * @param ip IP Address to set. * @return 0 if all is fine, -1 otherwise. */ -int SERVICE_ODS::perform_update(const std::string& ip) +int ServiceOds::perform_update(const std::string& ip) { return 0; } @@ -78,7 +78,7 @@ int SERVICE_ODS::perform_update(const std::string& ip) * @param version Version */ template -void SERVICE_ODS::serialize(Archive & ar, const unsigned int version) +void ServiceOds::serialize(Archive & ar, const unsigned int version) { ar & boost::serialization::base_object(*this); } diff --git a/src/service_ods.h b/src/service_ods.h index 4eb55e1..ba830c4 100644 --- a/src/service_ods.h +++ b/src/service_ods.h @@ -7,8 +7,8 @@ * @license GPLv2 */ -#ifndef SERVICE_ODS_H -#define SERVICE_ODS_H +#ifndef ServiceOds_H +#define ServiceOds_H #include @@ -19,7 +19,7 @@ #include -class SERVICE_ODS : public Service +class ServiceOds : public Service { private: @@ -30,13 +30,13 @@ private: public: - typedef boost::shared_ptr Ptr; + typedef boost::shared_ptr Ptr; - SERVICE_ODS(); + ServiceOds(); - SERVICE_ODS(const std::string& _protocol, const std::string& _hostname, const std::string& _login, const std::string& _password, const Logger::Ptr& _logger, const int _update_interval, const int _max_updates_within_interval, const int dns_cache_ttl); + ServiceOds(const std::string& _protocol, const std::string& _hostname, const std::string& _login, const std::string& _password, const Logger::Ptr& _logger, const int _update_interval, const int _max_updates_within_interval, const int dns_cache_ttl); - ~SERVICE_ODS(); + ~ServiceOds(); int perform_update(const std::string& ip); }; diff --git a/src/service_tzo.cpp b/src/service_tzo.cpp index 5282d0b..9bd0e6a 100644 --- a/src/service_tzo.cpp +++ b/src/service_tzo.cpp @@ -21,7 +21,7 @@ using namespace std; /** * Default Constructor, needed for object serialization. */ -SERVICE_TZO::SERVICE_TZO() +ServiceTzo::ServiceTzo() { } @@ -32,7 +32,7 @@ SERVICE_TZO::SERVICE_TZO() * @param _login The login name. * @param _password The corresponding password. */ -SERVICE_TZO::SERVICE_TZO(const string& _protocol, const string& _hostname, const string& _login, const string& _password, const Logger::Ptr& _logger, const int _update_interval, const int _max_updates_within_interval, const int _dns_cache_ttl, const string& _proxy, const int _proxy_port) +ServiceTzo::ServiceTzo(const string& _protocol, const string& _hostname, const string& _login, const string& _password, const Logger::Ptr& _logger, const int _update_interval, const int _max_updates_within_interval, const int _dns_cache_ttl, const string& _proxy, const int _proxy_port) { if ( _update_interval == -1 ) // If _update_interval is default po::option_desc (not specified via config) set_update_interval(0); // use default protocol value @@ -67,7 +67,7 @@ SERVICE_TZO::SERVICE_TZO(const string& _protocol, const string& _hostname, const /** * Default destructor */ -SERVICE_TZO::~SERVICE_TZO() +ServiceTzo::~ServiceTzo() { } @@ -79,7 +79,7 @@ SERVICE_TZO::~SERVICE_TZO() * @param hostname The password to use. * @return The assembled update url without IP. */ -string SERVICE_TZO::assemble_base_url(const string& fqhn, const string& username, const string& password) const +string ServiceTzo::assemble_base_url(const string& fqhn, const string& username, const string& password) const { string base_url; @@ -101,7 +101,7 @@ string SERVICE_TZO::assemble_base_url(const string& fqhn, const string& username * @param ip IP Address to set. * @return 0 if all is fine, -1 otherwise. */ -int SERVICE_TZO::perform_update(const std::string& ip) +int ServiceTzo::perform_update(const std::string& ip) { int ret_val = -1; @@ -138,7 +138,7 @@ int SERVICE_TZO::perform_update(const std::string& ip) * @param data The returned http data. * @return The status code. */ -string SERVICE_TZO::parse_status_code(const string& data) const +string ServiceTzo::parse_status_code(const string& data) const { list tokens; ba::split(tokens,data,boost::is_any_of(" ")); @@ -152,7 +152,7 @@ string SERVICE_TZO::parse_status_code(const string& data) const * @param version Version */ template -void SERVICE_TZO::serialize(Archive & ar, const unsigned int version) +void ServiceTzo::serialize(Archive & ar, const unsigned int version) { ar & boost::serialization::base_object(*this); } diff --git a/src/service_tzo.h b/src/service_tzo.h index 6a0fb9f..cfb6f2c 100644 --- a/src/service_tzo.h +++ b/src/service_tzo.h @@ -7,8 +7,8 @@ * @license GPLv2 */ -#ifndef SERVICE_TZO_H -#define SERVICE_TZO_H +#ifndef ServiceTzo_H +#define ServiceTzo_H #include @@ -19,7 +19,7 @@ #include #include -class SERVICE_TZO : public Service +class ServiceTzo : public Service { private: @@ -38,13 +38,13 @@ private: public: - typedef boost::shared_ptr Ptr; + typedef boost::shared_ptr Ptr; - SERVICE_TZO(); + ServiceTzo(); - SERVICE_TZO(const std::string& _protocol, const std::string& _hostname, const std::string& _login, const std::string& _password, const Logger::Ptr& _logger, const int _update_interval, const int _max_updates_within_interval, const int dns_cache_ttl, const std::string& proxy, const int proxy_port); + ServiceTzo(const std::string& _protocol, const std::string& _hostname, const std::string& _login, const std::string& _password, const Logger::Ptr& _logger, const int _update_interval, const int _max_updates_within_interval, const int dns_cache_ttl, const std::string& proxy, const int proxy_port); - ~SERVICE_TZO(); + ~ServiceTzo(); int perform_update(const std::string& ip); }; diff --git a/src/service_zoneedit.cpp b/src/service_zoneedit.cpp index 0e3afd7..c407526 100644 --- a/src/service_zoneedit.cpp +++ b/src/service_zoneedit.cpp @@ -21,7 +21,7 @@ using namespace std; /** * Default Constructor, needed for object serialization. */ -SERVICE_ZONEEDIT::SERVICE_ZONEEDIT() +ServiceZoneedit::ServiceZoneedit() { } @@ -32,7 +32,7 @@ SERVICE_ZONEEDIT::SERVICE_ZONEEDIT() * @param _login The login name. * @param _password The corresponding password. */ -SERVICE_ZONEEDIT::SERVICE_ZONEEDIT(const string& _protocol, const string& _hostname, const string& _login, const string& _password, const Logger::Ptr& _logger, const int _update_interval, const int _max_updates_within_interval, const int _dns_cache_ttl, const string& _proxy, const int _proxy_port) +ServiceZoneedit::ServiceZoneedit(const string& _protocol, const string& _hostname, const string& _login, const string& _password, const Logger::Ptr& _logger, const int _update_interval, const int _max_updates_within_interval, const int _dns_cache_ttl, const string& _proxy, const int _proxy_port) { if ( _update_interval == -1 ) // If _update_interval is default po::option_desc (not specified via config) set_update_interval(0); // use default protocol value @@ -67,7 +67,7 @@ SERVICE_ZONEEDIT::SERVICE_ZONEEDIT(const string& _protocol, const string& _hostn /** * Default destructor */ -SERVICE_ZONEEDIT::~SERVICE_ZONEEDIT() +ServiceZoneedit::~ServiceZoneedit() { } @@ -77,7 +77,7 @@ SERVICE_ZONEEDIT::~SERVICE_ZONEEDIT() * @param hostname The fqhn hostname to update IP for. * @return The assembled update url without IP. */ -string SERVICE_ZONEEDIT::assemble_base_url(const string& fqhn) const +string ServiceZoneedit::assemble_base_url(const string& fqhn) const { string base_url; @@ -95,7 +95,7 @@ string SERVICE_ZONEEDIT::assemble_base_url(const string& fqhn) const * @param ip IP Address to set. * @return 0 if all is fine, -1 otherwise. */ -int SERVICE_ZONEEDIT::perform_update(const std::string& ip) +int ServiceZoneedit::perform_update(const std::string& ip) { int ret_val = -1; @@ -134,7 +134,7 @@ int SERVICE_ZONEEDIT::perform_update(const std::string& ip) * @param data The returned http data. * @return The status code. */ -string SERVICE_ZONEEDIT::parse_status_code(const string& data) const +string ServiceZoneedit::parse_status_code(const string& data) const { list tokens; ba::split(tokens,data,boost::is_any_of(" ")); @@ -148,7 +148,7 @@ string SERVICE_ZONEEDIT::parse_status_code(const string& data) const * @param version Version */ template -void SERVICE_ZONEEDIT::serialize(Archive & ar, const unsigned int version) +void ServiceZoneedit::serialize(Archive & ar, const unsigned int version) { ar & boost::serialization::base_object(*this); } diff --git a/src/service_zoneedit.h b/src/service_zoneedit.h index 3899e37..98dfc3d 100644 --- a/src/service_zoneedit.h +++ b/src/service_zoneedit.h @@ -7,8 +7,8 @@ * @license GPLv2 */ -#ifndef SERVICE_ZONEEDIT_H -#define SERVICE_ZONEEDIT_H +#ifndef ServiceZoneedit_H +#define ServiceZoneedit_H #include @@ -19,7 +19,7 @@ #include #include -class SERVICE_ZONEEDIT : public Service +class ServiceZoneedit : public Service { private: @@ -38,13 +38,13 @@ private: public: - typedef boost::shared_ptr Ptr; + typedef boost::shared_ptr Ptr; - SERVICE_ZONEEDIT(); + ServiceZoneedit(); - SERVICE_ZONEEDIT(const std::string& _protocol, const std::string& _hostname, const std::string& _login, const std::string& _password, const Logger::Ptr& _logger, const int _update_interval, const int _max_updates_within_interval, const int dns_cache_ttl, const std::string& proxy, const int proxy_port); + ServiceZoneedit(const std::string& _protocol, const std::string& _hostname, const std::string& _login, const std::string& _password, const Logger::Ptr& _logger, const int _update_interval, const int _max_updates_within_interval, const int dns_cache_ttl, const std::string& proxy, const int proxy_port); - ~SERVICE_ZONEEDIT(); + ~ServiceZoneedit(); int perform_update(const std::string& ip); }; diff --git a/src/updater.cpp b/src/updater.cpp index 46ad502..54b3793 100644 --- a/src/updater.cpp +++ b/src/updater.cpp @@ -22,13 +22,13 @@ // Following boost macros are needed for serialization of derived classes through a base class pointer (Service *). -BOOST_CLASS_EXPORT_GUID(SERVICE_ODS, "SERVICE_ODS") -BOOST_CLASS_EXPORT_GUID(SERVICE_DHS, "SERVICE_DHS") -BOOST_CLASS_EXPORT_GUID(SERVICE_DYNS, "SERVICE_DYNS") -BOOST_CLASS_EXPORT_GUID(SERVICE_DYNDNS, "SERVICE_DYNDNS") -BOOST_CLASS_EXPORT_GUID(SERVICE_EASYDNS, "SERVICE_EASYDNS") -BOOST_CLASS_EXPORT_GUID(SERVICE_TZO, "SERVICE_TZO") -BOOST_CLASS_EXPORT_GUID(SERVICE_ZONEEDIT, "SERVICE_ZONEEDIT") +BOOST_CLASS_EXPORT_GUID(ServiceOds, "ServiceOds") +BOOST_CLASS_EXPORT_GUID(ServiceDhs, "ServiceDhs") +BOOST_CLASS_EXPORT_GUID(ServiceDyns, "ServiceDyns") +BOOST_CLASS_EXPORT_GUID(ServiceDyndns, "ServiceDyndns") +BOOST_CLASS_EXPORT_GUID(ServiceEasydns, "ServiceEasydns") +BOOST_CLASS_EXPORT_GUID(ServiceTzo, "ServiceTzo") +BOOST_CLASS_EXPORT_GUID(ServiceZoneedit, "ServiceZoneedit") namespace fs = boost::filesystem;