From: Bjoern Sikora Date: Mon, 7 Jun 2010 15:31:09 +0000 (+0200) Subject: Renamed all header to end with hpp instead of h. X-Git-Tag: v1.1~102 X-Git-Url: http://developer.intra2net.com/git/?a=commitdiff_plain;h=4de6a9b800e14c0612a283ac3b4823136a0220a8;p=bpdyndnsd Renamed all header to end with hpp instead of h. --- diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 45cd5e6..195469e 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -39,26 +39,26 @@ set(cpp_sources # C++ headers set(cpp_headers - config.h - httphelper.h - ip_addr_helper.h - ip_service.h - logger.h - net_helper.h - serializeservicecontainer.h - service_dhs.h - service_dyndns.h - service_dyns.h - service_easydns.h - service_gnudip.h - service.h - serviceholder.h - service_ods.h - service_tzo.h - service_zoneedit.h - tcp_service.h - updater.h - util.h + config.hpp + httphelper.hpp + ip_addr_helper.hpp + ip_service.hpp + logger.hpp + net_helper.hpp + serializeservicecontainer.hpp + service_dhs.hpp + service_dyndns.hpp + service_dyns.hpp + service_easydns.hpp + service_gnudip.hpp + service.hpp + serviceholder.hpp + service_ods.hpp + service_tzo.hpp + service_zoneedit.hpp + tcp_service.hpp + updater.hpp + util.hpp ) add_executable(bpdyndnsd ${cpp_sources} ${cpp_headers}) diff --git a/src/config.cpp b/src/config.cpp index 440c75e..77d86dc 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -7,16 +7,16 @@ * @license GPLv2 */ -#include "config.h" - -#include "service_dhs.h" -#include "service_ods.h" -#include "service_dyndns.h" -#include "service_dyns.h" -#include "service_easydns.h" -#include "service_tzo.h" -#include "service_zoneedit.h" -#include "service_gnudip.h" +#include "config.hpp" + +#include "service_dhs.hpp" +#include "service_ods.hpp" +#include "service_dyndns.hpp" +#include "service_dyns.hpp" +#include "service_easydns.hpp" +#include "service_tzo.hpp" +#include "service_zoneedit.hpp" +#include "service_gnudip.hpp" #include #include diff --git a/src/config.h b/src/config.h deleted file mode 100644 index 3b90b84..0000000 --- a/src/config.h +++ /dev/null @@ -1,111 +0,0 @@ -/** @file - * @brief Config class header. This class represents the actual configuration. - * - * - * - * @copyright Intra2net AG - * @license GPLv2 -*/ - -#ifndef CONFIG_H -#define CONFIG_H - -#include - -#include "logger.h" -#include "serviceholder.h" -#include "httphelper.h" -#include "service.h" - -#include -#include - - -class Config -{ - -private: - - boost::shared_ptr OptDescCmd; - boost::shared_ptr OptDescConfMain; - boost::shared_ptr OptDescConfService; - boost::program_options::variables_map VariablesMap; - - Logger::Ptr Log; - Serviceholder::Ptr ServiceHolder; - - bool DaemonMode; - bool Syslog; - bool EnableIPv6; - int Loglevel; - std::string ConfigPath; - std::string WebcheckIpUrl; - std::string WebcheckIpUrlAlt; - int WebcheckInterval; - std::string Proxy; - int ProxyPort; - std::string ExternalWarningLog; - int ExternalWarningLevel; - bool StartOffline; - bool WebcheckEnabled; - bool ExternalLogOnlyOnce; - - 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 load_service_config_file(const std::string& full_filename); - -public: - - typedef boost::shared_ptr Ptr; - - Config(); - - Config(Logger::Ptr _log, Serviceholder::Ptr _serviceholder); - - ~Config(); - - int parse_cmd_line(int argc, char *argv[]); - - int load_config_from_files(); - - boost::shared_ptr get_opt_desc_cmd() const; - - boost::shared_ptr get_opt_desc_conf_main() const; - - boost::shared_ptr get_opt_desc_conf_service() const; - - bool get_daemon_mode() const; - - int get_loglevel() const; - - bool get_syslog() const; - - bool get_enable_ipv6() const; - - std::string get_proxy() const; - - 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; - - int get_webcheck_interval() const; - - void delete_variables_map(); - - int get_external_warning_level() const; - - std::string get_external_warning_log() const; - - bool get_start_offline() const; - - bool get_external_log_only_once() const; - -}; - -#endif diff --git a/src/httphelper.cpp b/src/httphelper.cpp index 5e0c998..59e16e1 100644 --- a/src/httphelper.cpp +++ b/src/httphelper.cpp @@ -7,7 +7,7 @@ * @license GPLv2 */ -#include "httphelper.h" +#include "httphelper.hpp" using namespace std; @@ -26,7 +26,7 @@ HTTPHelper::HTTPHelper() /** * Constructor. Use this constructor if HTTP AUTH should be used. Username and password will then be set as HTTP auth options. - * @param _log Logger Object + * @param _log Logger Object * @param _proxy Proxy to use * @param _proxy_port Proxy Port * @param _username Username @@ -52,7 +52,7 @@ HTTPHelper::HTTPHelper(Logger::Ptr _log, const string& _proxy, const int _proxy_ /** * Constructor. Use this constructor if you have to encode the username and password into the url - * @param _log Logger Object + * @param _log Logger Object * @param _proxy Proxy to use * @param _proxy_port Proxy Port */ diff --git a/src/httphelper.h b/src/httphelper.hpp similarity index 98% rename from src/httphelper.h rename to src/httphelper.hpp index 026cfec..bbf3daa 100644 --- a/src/httphelper.h +++ b/src/httphelper.hpp @@ -10,7 +10,7 @@ #ifndef HTTPHELPER_H #define HTTPHELPER_H -#include "logger.h" +#include "logger.hpp" #include #include diff --git a/src/ip_addr_helper.cpp b/src/ip_addr_helper.cpp index cdfc164..1d88a57 100644 --- a/src/ip_addr_helper.cpp +++ b/src/ip_addr_helper.cpp @@ -7,7 +7,7 @@ * @license GPLv2 */ -#include "ip_addr_helper.h" +#include "ip_addr_helper.hpp" #include #include #include diff --git a/src/ip_addr_helper.h b/src/ip_addr_helper.hpp similarity index 98% rename from src/ip_addr_helper.h rename to src/ip_addr_helper.hpp index 72eb1fe..d1439a6 100644 --- a/src/ip_addr_helper.h +++ b/src/ip_addr_helper.hpp @@ -10,7 +10,7 @@ #ifndef IPADDRHELPER_H #define IPADDRHELPER_H -#include "logger.h" +#include "logger.hpp" #include #include diff --git a/src/ip_service.h b/src/ip_service.hpp similarity index 100% rename from src/ip_service.h rename to src/ip_service.hpp diff --git a/src/logger.cpp b/src/logger.cpp index 1c8e6fe..7b4fd58 100644 --- a/src/logger.cpp +++ b/src/logger.cpp @@ -8,7 +8,7 @@ */ -#include "logger.h" +#include "logger.hpp" #include #include diff --git a/src/logger.h b/src/logger.hpp similarity index 100% rename from src/logger.h rename to src/logger.hpp diff --git a/src/main.cpp b/src/main.cpp index 03a2554..8b038e0 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -21,7 +21,7 @@ #include #include -#include "updater.h" +#include "updater.hpp" using namespace std; diff --git a/src/net_helper.cpp b/src/net_helper.cpp index 0063ca4..75e823e 100644 --- a/src/net_helper.cpp +++ b/src/net_helper.cpp @@ -7,8 +7,8 @@ * @license GPLv2 */ -#include "net_helper.h" -#include "tcp_service.h" +#include "net_helper.hpp" +#include "tcp_service.hpp" using namespace std; diff --git a/src/net_helper.h b/src/net_helper.hpp similarity index 93% rename from src/net_helper.h rename to src/net_helper.hpp index 5d62439..4c9ae9b 100644 --- a/src/net_helper.h +++ b/src/net_helper.hpp @@ -10,8 +10,8 @@ #ifndef NETHELPER_H #define NETHELPER_H -#include "logger.h" -#include "ip_service.h" +#include "logger.hpp" +#include "ip_service.hpp" #include diff --git a/src/serializeservicecontainer.cpp b/src/serializeservicecontainer.cpp index 7547d08..6291c0a 100644 --- a/src/serializeservicecontainer.cpp +++ b/src/serializeservicecontainer.cpp @@ -7,7 +7,7 @@ * @license GPLv2 */ -#include "serializeservicecontainer.h" +#include "serializeservicecontainer.hpp" // Following boost macros are needed for serialization of derived classes through a base class pointer (Service *). BOOST_CLASS_EXPORT_GUID(ServiceOds, "ServiceOds") diff --git a/src/serializeservicecontainer.h b/src/serializeservicecontainer.hpp similarity index 78% rename from src/serializeservicecontainer.h rename to src/serializeservicecontainer.hpp index f5a4984..a80eb08 100644 --- a/src/serializeservicecontainer.h +++ b/src/serializeservicecontainer.hpp @@ -10,8 +10,8 @@ #ifndef SERIALIZESERVICECONTAINER_H #define SERIALIZESERVICECONTAINER_H -#include "service.h" -#include "logger.h" +#include "service.hpp" +#include "logger.hpp" #include #include @@ -21,14 +21,14 @@ #include #include -#include "service_dhs.h" -#include "service_ods.h" -#include "service_dyndns.h" -#include "service_dyns.h" -#include "service_easydns.h" -#include "service_tzo.h" -#include "service_zoneedit.h" -#include "service_gnudip.h" +#include "service_dhs.hpp" +#include "service_ods.hpp" +#include "service_dyndns.hpp" +#include "service_dyns.hpp" +#include "service_easydns.hpp" +#include "service_tzo.hpp" +#include "service_zoneedit.hpp" +#include "service_gnudip.hpp" class SerializeServiceContainer diff --git a/src/service.cpp b/src/service.cpp index 0d0c590..0a6a29e 100644 --- a/src/service.cpp +++ b/src/service.cpp @@ -7,7 +7,7 @@ * @license GPLv2 */ -#include "service.h" +#include "service.hpp" #include using namespace std; diff --git a/src/service.h b/src/service.hpp similarity index 99% rename from src/service.h rename to src/service.hpp index 850ddb9..dcec4b9 100644 --- a/src/service.h +++ b/src/service.hpp @@ -10,7 +10,7 @@ #ifndef SERVICE_H #define SERVICE_H -#include "logger.h" +#include "logger.hpp" #include #include diff --git a/src/service_dhs.cpp b/src/service_dhs.cpp index 39c2295..314d987 100644 --- a/src/service_dhs.cpp +++ b/src/service_dhs.cpp @@ -7,7 +7,7 @@ * @license GPLv2 */ -#include "service_dhs.h" +#include "service_dhs.hpp" #include #include diff --git a/src/service_dhs.h b/src/service_dhs.hpp similarity index 94% rename from src/service_dhs.h rename to src/service_dhs.hpp index 283c8af..1cb8ec5 100644 --- a/src/service_dhs.h +++ b/src/service_dhs.hpp @@ -10,9 +10,9 @@ #ifndef ServiceDhs_H #define ServiceDhs_H -#include "service.h" -#include "logger.h" -#include "httphelper.h" +#include "service.hpp" +#include "logger.hpp" +#include "httphelper.hpp" #include #include diff --git a/src/service_dyndns.cpp b/src/service_dyndns.cpp index abd1d4a..0d15974 100644 --- a/src/service_dyndns.cpp +++ b/src/service_dyndns.cpp @@ -7,7 +7,7 @@ * @license GPLv2 */ -#include "service_dyndns.h" +#include "service_dyndns.hpp" #include diff --git a/src/service_dyndns.h b/src/service_dyndns.hpp similarity index 93% rename from src/service_dyndns.h rename to src/service_dyndns.hpp index 1e18db7..4be4e12 100644 --- a/src/service_dyndns.h +++ b/src/service_dyndns.hpp @@ -10,9 +10,9 @@ #ifndef ServiceDyndns_H #define ServiceDyndns_H -#include "service.h" -#include "logger.h" -#include "httphelper.h" +#include "service.hpp" +#include "logger.hpp" +#include "httphelper.hpp" #include #include diff --git a/src/service_dyns.cpp b/src/service_dyns.cpp index 10d4398..3855271 100644 --- a/src/service_dyns.cpp +++ b/src/service_dyns.cpp @@ -7,8 +7,8 @@ * @license GPLv2 */ -#include "service_dyns.h" -#include "util.h" +#include "service_dyns.hpp" +#include "util.hpp" #include #include diff --git a/src/service_dyns.h b/src/service_dyns.hpp similarity index 94% rename from src/service_dyns.h rename to src/service_dyns.hpp index 14caf3d..2b57139 100644 --- a/src/service_dyns.h +++ b/src/service_dyns.hpp @@ -10,9 +10,9 @@ #ifndef ServiceDyns_H #define ServiceDyns_H -#include "service.h" -#include "logger.h" -#include "httphelper.h" +#include "service.hpp" +#include "logger.hpp" +#include "httphelper.hpp" #include #include diff --git a/src/service_easydns.cpp b/src/service_easydns.cpp index b90894e..ad6bcfb 100644 --- a/src/service_easydns.cpp +++ b/src/service_easydns.cpp @@ -7,8 +7,8 @@ * @license GPLv2 */ -#include "service_easydns.h" -#include "util.h" +#include "service_easydns.hpp" +#include "util.hpp" #include #include diff --git a/src/service_easydns.h b/src/service_easydns.hpp similarity index 94% rename from src/service_easydns.h rename to src/service_easydns.hpp index b018665..e3460f6 100644 --- a/src/service_easydns.h +++ b/src/service_easydns.hpp @@ -10,9 +10,9 @@ #ifndef ServiceEasydns_H #define ServiceEasydns_H -#include "service.h" -#include "logger.h" -#include "httphelper.h" +#include "service.hpp" +#include "logger.hpp" +#include "httphelper.hpp" #include #include diff --git a/src/service_gnudip.cpp b/src/service_gnudip.cpp index 2149509..a8f9bd6 100644 --- a/src/service_gnudip.cpp +++ b/src/service_gnudip.cpp @@ -7,8 +7,8 @@ * @license GPLv2 */ -#include "service_gnudip.h" -#include "util.h" +#include "service_gnudip.hpp" +#include "util.hpp" #include #include diff --git a/src/service_gnudip.h b/src/service_gnudip.hpp similarity index 95% rename from src/service_gnudip.h rename to src/service_gnudip.hpp index 5852d58..3c61aaf 100644 --- a/src/service_gnudip.h +++ b/src/service_gnudip.hpp @@ -10,9 +10,9 @@ #ifndef ServiceGnudip_H #define ServiceGnudip_H -#include "service.h" -#include "logger.h" -#include "httphelper.h" +#include "service.hpp" +#include "logger.hpp" +#include "httphelper.hpp" #include #include diff --git a/src/service_ods.cpp b/src/service_ods.cpp index ea86f5f..8f69f8c 100644 --- a/src/service_ods.cpp +++ b/src/service_ods.cpp @@ -7,9 +7,9 @@ * @license GPLv2 */ -#include "service_ods.h" -#include "net_helper.h" -#include "util.h" +#include "service_ods.hpp" +#include "net_helper.hpp" +#include "util.hpp" using namespace std; diff --git a/src/service_ods.h b/src/service_ods.hpp similarity index 95% rename from src/service_ods.h rename to src/service_ods.hpp index 5e9ffff..9ac6bf3 100644 --- a/src/service_ods.h +++ b/src/service_ods.hpp @@ -10,8 +10,8 @@ #ifndef ServiceOds_H #define ServiceOds_H -#include "service.h" -#include "logger.h" +#include "service.hpp" +#include "logger.hpp" #include #include diff --git a/src/service_tzo.cpp b/src/service_tzo.cpp index 01fa6b0..7a1fa61 100644 --- a/src/service_tzo.cpp +++ b/src/service_tzo.cpp @@ -7,8 +7,8 @@ * @license GPLv2 */ -#include "service_tzo.h" -#include "util.h" +#include "service_tzo.hpp" +#include "util.hpp" #include #include diff --git a/src/service_tzo.h b/src/service_tzo.hpp similarity index 94% rename from src/service_tzo.h rename to src/service_tzo.hpp index 0e8da5a..8daf390 100644 --- a/src/service_tzo.h +++ b/src/service_tzo.hpp @@ -10,9 +10,9 @@ #ifndef ServiceTzo_H #define ServiceTzo_H -#include "service.h" -#include "logger.h" -#include "httphelper.h" +#include "service.hpp" +#include "logger.hpp" +#include "httphelper.hpp" #include #include diff --git a/src/service_zoneedit.cpp b/src/service_zoneedit.cpp index f7c069e..db1e941 100644 --- a/src/service_zoneedit.cpp +++ b/src/service_zoneedit.cpp @@ -7,8 +7,8 @@ * @license GPLv2 */ -#include "service_zoneedit.h" -#include "util.h" +#include "service_zoneedit.hpp" +#include "util.hpp" #include #include diff --git a/src/service_zoneedit.h b/src/service_zoneedit.hpp similarity index 94% rename from src/service_zoneedit.h rename to src/service_zoneedit.hpp index bd58161..61c58b7 100644 --- a/src/service_zoneedit.h +++ b/src/service_zoneedit.hpp @@ -10,9 +10,9 @@ #ifndef ServiceZoneedit_H #define ServiceZoneedit_H -#include "service.h" -#include "logger.h" -#include "httphelper.h" +#include "service.hpp" +#include "logger.hpp" +#include "httphelper.hpp" #include #include diff --git a/src/serviceholder.cpp b/src/serviceholder.cpp index 7eb64c6..ed4efe0 100644 --- a/src/serviceholder.cpp +++ b/src/serviceholder.cpp @@ -7,7 +7,7 @@ * @license GPLv2 */ -#include "serviceholder.h" +#include "serviceholder.hpp" #include diff --git a/src/serviceholder.h b/src/serviceholder.hpp similarity index 89% rename from src/serviceholder.h rename to src/serviceholder.hpp index 5b3c5b7..044e7a3 100644 --- a/src/serviceholder.h +++ b/src/serviceholder.hpp @@ -10,10 +10,10 @@ #ifndef SERVICEHOLDER_H #define SERVICEHOLDER_H -#include "service.h" -#include "serializeservicecontainer.h" -#include "logger.h" -#include "ip_addr_helper.h" +#include "service.hpp" +#include "serializeservicecontainer.hpp" +#include "logger.hpp" +#include "ip_addr_helper.hpp" #include #include diff --git a/src/tcp_service.cpp b/src/tcp_service.cpp index f1b8ca1..96846b0 100644 --- a/src/tcp_service.cpp +++ b/src/tcp_service.cpp @@ -7,7 +7,7 @@ * @license GPLv2 */ -#include "tcp_service.h" +#include "tcp_service.hpp" typedef boost::shared_ptr SocketPtr; diff --git a/src/tcp_service.h b/src/tcp_service.hpp similarity index 95% rename from src/tcp_service.h rename to src/tcp_service.hpp index 70360d6..811181d 100644 --- a/src/tcp_service.h +++ b/src/tcp_service.hpp @@ -10,8 +10,8 @@ #ifndef TCPSERVICE_H #define TCPSERVICE_H -#include "logger.h" -#include "ip_service.h" +#include "logger.hpp" +#include "ip_service.hpp" #include #include diff --git a/src/updater.cpp b/src/updater.cpp index b474264..758bf66 100644 --- a/src/updater.cpp +++ b/src/updater.cpp @@ -7,9 +7,9 @@ * @license GPLv2 */ -#include "updater.h" +#include "updater.hpp" -#include "serviceholder.h" +#include "serviceholder.hpp" #include @@ -121,7 +121,7 @@ int Updater::init_config_from_cmd(int argc, char *argv[]) const /** * Load the main config and the service definition files in config path. - * @return 0 if all is fine, + * @return 0 if all is fine, */ int Updater::init_config_from_files() const { @@ -145,7 +145,7 @@ int Updater::init_config_from_files() const /** * Init all Helper classes - * @return + * @return */ int Updater::init_helper_classes() { diff --git a/src/updater.h b/src/updater.hpp similarity index 88% rename from src/updater.h rename to src/updater.hpp index ad2dd99..7d1da06 100644 --- a/src/updater.h +++ b/src/updater.hpp @@ -10,11 +10,11 @@ #ifndef UPDATER_H #define UPDATER_H -#include "config.h" -#include "ip_addr_helper.h" -#include "httphelper.h" -#include "logger.h" -#include "serviceholder.h" +#include "config.hpp" +#include "ip_addr_helper.hpp" +#include "httphelper.hpp" +#include "logger.hpp" +#include "serviceholder.hpp" #include diff --git a/src/util.cpp b/src/util.cpp index 8b795fc..3d5dd39 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -7,7 +7,7 @@ * @license GPLv2 */ -#include "util.h" +#include "util.hpp" #include #include diff --git a/src/util.h b/src/util.hpp similarity index 100% rename from src/util.h rename to src/util.hpp