Renamed all header to end with hpp instead of h.
authorBjoern Sikora <bjoern.sikora@intra2net.com>
Mon, 7 Jun 2010 15:31:09 +0000 (17:31 +0200)
committerBjoern Sikora <bjoern.sikora@intra2net.com>
Mon, 7 Jun 2010 15:31:09 +0000 (17:31 +0200)
41 files changed:
src/CMakeLists.txt
src/config.cpp
src/config.h [deleted file]
src/httphelper.cpp
src/httphelper.hpp [moved from src/httphelper.h with 98% similarity]
src/ip_addr_helper.cpp
src/ip_addr_helper.hpp [moved from src/ip_addr_helper.h with 98% similarity]
src/ip_service.hpp [moved from src/ip_service.h with 100% similarity]
src/logger.cpp
src/logger.hpp [moved from src/logger.h with 100% similarity]
src/main.cpp
src/net_helper.cpp
src/net_helper.hpp [moved from src/net_helper.h with 93% similarity]
src/serializeservicecontainer.cpp
src/serializeservicecontainer.hpp [moved from src/serializeservicecontainer.h with 78% similarity]
src/service.cpp
src/service.hpp [moved from src/service.h with 99% similarity]
src/service_dhs.cpp
src/service_dhs.hpp [moved from src/service_dhs.h with 94% similarity]
src/service_dyndns.cpp
src/service_dyndns.hpp [moved from src/service_dyndns.h with 93% similarity]
src/service_dyns.cpp
src/service_dyns.hpp [moved from src/service_dyns.h with 94% similarity]
src/service_easydns.cpp
src/service_easydns.hpp [moved from src/service_easydns.h with 94% similarity]
src/service_gnudip.cpp
src/service_gnudip.hpp [moved from src/service_gnudip.h with 95% similarity]
src/service_ods.cpp
src/service_ods.hpp [moved from src/service_ods.h with 95% similarity]
src/service_tzo.cpp
src/service_tzo.hpp [moved from src/service_tzo.h with 94% similarity]
src/service_zoneedit.cpp
src/service_zoneedit.hpp [moved from src/service_zoneedit.h with 94% similarity]
src/serviceholder.cpp
src/serviceholder.hpp [moved from src/serviceholder.h with 89% similarity]
src/tcp_service.cpp
src/tcp_service.hpp [moved from src/tcp_service.h with 95% similarity]
src/updater.cpp
src/updater.hpp [moved from src/updater.h with 88% similarity]
src/util.cpp
src/util.hpp [moved from src/util.h with 100% similarity]

index 45cd5e6..195469e 100644 (file)
@@ -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})
index 440c75e..77d86dc 100644 (file)
@@ -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 <time.h>
 #include <iostream>
diff --git a/src/config.h b/src/config.h
deleted file mode 100644 (file)
index 3b90b84..0000000
+++ /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 <string>
-
-#include "logger.h"
-#include "serviceholder.h"
-#include "httphelper.h"
-#include "service.h"
-
-#include <boost/program_options.hpp>
-#include <boost/shared_ptr.hpp>
-
-
-class Config
-{
-
-private:
-
-    boost::shared_ptr<boost::program_options::options_description> OptDescCmd;
-    boost::shared_ptr<boost::program_options::options_description> OptDescConfMain;
-    boost::shared_ptr<boost::program_options::options_description> 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<Config> 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<boost::program_options::options_description> get_opt_desc_cmd() const;
-
-    boost::shared_ptr<boost::program_options::options_description> get_opt_desc_conf_main() const;
-
-    boost::shared_ptr<boost::program_options::options_description> 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
index 5e0c998..59e16e1 100644 (file)
@@ -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
  */
similarity index 98%
rename from src/httphelper.h
rename to src/httphelper.hpp
index 026cfec..bbf3daa 100644 (file)
@@ -10,7 +10,7 @@
 #ifndef HTTPHELPER_H
 #define HTTPHELPER_H
 
-#include "logger.h"
+#include "logger.hpp"
 
 #include <boost/shared_ptr.hpp>
 #include <curl/curl.h>
index cdfc164..1d88a57 100644 (file)
@@ -7,7 +7,7 @@
  * @license GPLv2
 */
 
-#include "ip_addr_helper.h"
+#include "ip_addr_helper.hpp"
 #include <boost/asio.hpp>
 #include <boost/regex.hpp>
 #include <arpa/inet.h>
similarity index 98%
rename from src/ip_addr_helper.h
rename to src/ip_addr_helper.hpp
index 72eb1fe..d1439a6 100644 (file)
@@ -10,7 +10,7 @@
 #ifndef IPADDRHELPER_H
 #define IPADDRHELPER_H
 
-#include "logger.h"
+#include "logger.hpp"
 
 #include <boost/shared_ptr.hpp>
 #include <curl/curl.h>
similarity index 100%
rename from src/ip_service.h
rename to src/ip_service.hpp
index 1c8e6fe..7b4fd58 100644 (file)
@@ -8,7 +8,7 @@
 */
 
 
-#include "logger.h"
+#include "logger.hpp"
 
 #include <iostream>
 #include <syslog.h>
similarity index 100%
rename from src/logger.h
rename to src/logger.hpp
index 03a2554..8b038e0 100644 (file)
@@ -21,7 +21,7 @@
 #include <sys/types.h>
 #include <signal.h>
 
-#include "updater.h"
+#include "updater.hpp"
 
 using namespace std;
 
index 0063ca4..75e823e 100644 (file)
@@ -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;
similarity index 93%
rename from src/net_helper.h
rename to src/net_helper.hpp
index 5d62439..4c9ae9b 100644 (file)
@@ -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 <boost/shared_ptr.hpp>
 
index 7547d08..6291c0a 100644 (file)
@@ -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")
similarity index 78%
rename from src/serializeservicecontainer.h
rename to src/serializeservicecontainer.hpp
index f5a4984..a80eb08 100644 (file)
@@ -10,8 +10,8 @@
 #ifndef SERIALIZESERVICECONTAINER_H
 #define SERIALIZESERVICECONTAINER_H
 
-#include "service.h"
-#include "logger.h"
+#include "service.hpp"
+#include "logger.hpp"
 
 #include <boost/serialization/list.hpp>
 #include <boost/serialization/vector.hpp>
 #include <boost/shared_ptr.hpp>
 #include <list>
 
-#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
index 0d0c590..0a6a29e 100644 (file)
@@ -7,7 +7,7 @@
  * @license GPLv2
 */
 
-#include "service.h"
+#include "service.hpp"
 #include <boost/foreach.hpp>
 
 using namespace std;
similarity index 99%
rename from src/service.h
rename to src/service.hpp
index 850ddb9..dcec4b9 100644 (file)
@@ -10,7 +10,7 @@
 #ifndef SERVICE_H
 #define SERVICE_H
 
-#include "logger.h"
+#include "logger.hpp"
 
 #include <boost/archive/text_oarchive.hpp>
 #include <boost/archive/text_iarchive.hpp>
index 39c2295..314d987 100644 (file)
@@ -7,7 +7,7 @@
  * @license GPLv2
 */
 
-#include "service_dhs.h"
+#include "service_dhs.hpp"
 
 #include <time.h>
 #include <boost/foreach.hpp>
similarity index 94%
rename from src/service_dhs.h
rename to src/service_dhs.hpp
index 283c8af..1cb8ec5 100644 (file)
@@ -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 <boost/shared_ptr.hpp>
 #include <string>
index abd1d4a..0d15974 100644 (file)
@@ -7,7 +7,7 @@
  * @license GPLv2
 */
 
-#include "service_dyndns.h"
+#include "service_dyndns.hpp"
 
 #include <boost/foreach.hpp>
 
similarity index 93%
rename from src/service_dyndns.h
rename to src/service_dyndns.hpp
index 1e18db7..4be4e12 100644 (file)
@@ -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 <boost/shared_ptr.hpp>
 #include <string>
index 10d4398..3855271 100644 (file)
@@ -7,8 +7,8 @@
  * @license GPLv2
 */
 
-#include "service_dyns.h"
-#include "util.h"
+#include "service_dyns.hpp"
+#include "util.hpp"
 
 #include <time.h>
 #include <boost/foreach.hpp>
similarity index 94%
rename from src/service_dyns.h
rename to src/service_dyns.hpp
index 14caf3d..2b57139 100644 (file)
@@ -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 <boost/shared_ptr.hpp>
 #include <string>
index b90894e..ad6bcfb 100644 (file)
@@ -7,8 +7,8 @@
  * @license GPLv2
 */
 
-#include "service_easydns.h"
-#include "util.h"
+#include "service_easydns.hpp"
+#include "util.hpp"
 
 #include <time.h>
 #include <boost/foreach.hpp>
similarity index 94%
rename from src/service_easydns.h
rename to src/service_easydns.hpp
index b018665..e3460f6 100644 (file)
@@ -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 <boost/shared_ptr.hpp>
 #include <string>
index 2149509..a8f9bd6 100644 (file)
@@ -7,8 +7,8 @@
  * @license GPLv2
 */
 
-#include "service_gnudip.h"
-#include "util.h"
+#include "service_gnudip.hpp"
+#include "util.hpp"
 
 #include <time.h>
 #include <boost/foreach.hpp>
similarity index 95%
rename from src/service_gnudip.h
rename to src/service_gnudip.hpp
index 5852d58..3c61aaf 100644 (file)
@@ -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 <boost/shared_ptr.hpp>
 #include <map>
index ea86f5f..8f69f8c 100644 (file)
@@ -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;
 
similarity index 95%
rename from src/service_ods.h
rename to src/service_ods.hpp
index 5e9ffff..9ac6bf3 100644 (file)
@@ -10,8 +10,8 @@
 #ifndef ServiceOds_H
 #define ServiceOds_H
 
-#include "service.h"
-#include "logger.h"
+#include "service.hpp"
+#include "logger.hpp"
 
 #include <boost/shared_ptr.hpp>
 #include <string>
index 01fa6b0..7a1fa61 100644 (file)
@@ -7,8 +7,8 @@
  * @license GPLv2
 */
 
-#include "service_tzo.h"
-#include "util.h"
+#include "service_tzo.hpp"
+#include "util.hpp"
 
 #include <time.h>
 #include <boost/foreach.hpp>
similarity index 94%
rename from src/service_tzo.h
rename to src/service_tzo.hpp
index 0e8da5a..8daf390 100644 (file)
@@ -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 <boost/shared_ptr.hpp>
 #include <string>
index f7c069e..db1e941 100644 (file)
@@ -7,8 +7,8 @@
  * @license GPLv2
 */
 
-#include "service_zoneedit.h"
-#include "util.h"
+#include "service_zoneedit.hpp"
+#include "util.hpp"
 
 #include <time.h>
 #include <boost/foreach.hpp>
similarity index 94%
rename from src/service_zoneedit.h
rename to src/service_zoneedit.hpp
index bd58161..61c58b7 100644 (file)
@@ -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 <boost/shared_ptr.hpp>
 #include <string>
index 7eb64c6..ed4efe0 100644 (file)
@@ -7,7 +7,7 @@
  * @license GPLv2
 */
 
-#include "serviceholder.h"
+#include "serviceholder.hpp"
 
 #include <fstream>
 
similarity index 89%
rename from src/serviceholder.h
rename to src/serviceholder.hpp
index 5b3c5b7..044e7a3 100644 (file)
 #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 <boost/shared_ptr.hpp>
 #include <list>
index f1b8ca1..96846b0 100644 (file)
@@ -7,7 +7,7 @@
  * @license GPLv2
 */
 
-#include "tcp_service.h"
+#include "tcp_service.hpp"
 
 typedef boost::shared_ptr<SSLStream> SocketPtr;
 
similarity index 95%
rename from src/tcp_service.h
rename to src/tcp_service.hpp
index 70360d6..811181d 100644 (file)
@@ -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 <boost/shared_ptr.hpp>
 #include <boost/asio.hpp>
index b474264..758bf66 100644 (file)
@@ -7,9 +7,9 @@
  * @license GPLv2
 */
 
-#include "updater.h"
+#include "updater.hpp"
 
-#include "serviceholder.h"
+#include "serviceholder.hpp"
 
 
 #include <boost/foreach.hpp>
@@ -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()
 {
similarity index 88%
rename from src/updater.h
rename to src/updater.hpp
index ad2dd99..7d1da06 100644 (file)
 #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 <boost/shared_ptr.hpp>
 
index 8b795fc..3d5dd39 100644 (file)
@@ -7,7 +7,7 @@
  * @license GPLv2
 */
 
-#include "util.h"
+#include "util.hpp"
 
 #include <sstream>
 #include <openssl/evp.h>
similarity index 100%
rename from src/util.h
rename to src/util.hpp