From 4248e8ca2f83e33137e3dce90c939f7b21e355a4 Mon Sep 17 00:00:00 2001 From: Thomas Jarosch Date: Mon, 27 Jul 2009 10:05:04 +0200 Subject: [PATCH] Small cosmetic changes --- src/config.cpp | 4 ++++ src/config.h | 3 ++- src/dhs.cpp | 5 +++-- src/ods.h | 5 +++-- src/service.h | 7 ++++--- src/updater.cpp | 2 ++ src/updater.h | 3 ++- 7 files changed, 20 insertions(+), 9 deletions(-) diff --git a/src/config.cpp b/src/config.cpp index 7727464..c259be0 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -14,6 +14,9 @@ // Define allowed command line and config file options Config::Config() + : daemon_mode(true) + , loglevel(0) + , syslog(true) { // Define valid command line parameters opt_desc_cmd = new po::options_description("Command line options"); @@ -147,6 +150,7 @@ int Config::load_config_from_files(string config_path) // then load all service definition files in config path // TODO: code to load service definition files in config path + return -1; } diff --git a/src/config.h b/src/config.h index 190ac34..e6cd76f 100644 --- a/src/config.h +++ b/src/config.h @@ -26,7 +26,8 @@ namespace po = boost::program_options; using namespace std; -class Config{ +class Config +{ private: po::options_description *opt_desc_cmd; po::options_description *opt_desc_conf_main; diff --git a/src/dhs.cpp b/src/dhs.cpp index b526cbd..f7fb417 100644 --- a/src/dhs.cpp +++ b/src/dhs.cpp @@ -11,9 +11,10 @@ // #include "dhs.h" -DHS::DHS(string hostname, string login, string password) +DHS::DHS(string _hostname, string login, string password) { - this->hostname = hostname; + // Vielleicht: Hostname = _hostname; + this->hostname = _hostname; this->login = login; this->password = password; } diff --git a/src/ods.h b/src/ods.h index d4f54db..70e8607 100644 --- a/src/ods.h +++ b/src/ods.h @@ -18,9 +18,10 @@ using namespace std; /** - @author Bjoern Sikora + @author Bjoern Sikora */ -class ODS : public Service { +class ODS : public Service +{ private: string hostname; string login; diff --git a/src/service.h b/src/service.h index c3374a7..b000c1b 100644 --- a/src/service.h +++ b/src/service.h @@ -17,13 +17,14 @@ using namespace std; /** - @author Bjoern Sikora + @author Bjoern Sikora */ -class Service{ +class Service +{ public: Service(); - ~Service(); + virtual ~Service(); virtual void update(string)=0; diff --git a/src/updater.cpp b/src/updater.cpp index 97b84a5..d3d0c81 100644 --- a/src/updater.cpp +++ b/src/updater.cpp @@ -15,6 +15,7 @@ Updater::Updater() + : conf(NULL) { } @@ -27,6 +28,7 @@ Updater::Updater(Config* conf) Updater::~Updater() { + conf = NULL; } diff --git a/src/updater.h b/src/updater.h index 6d3bd41..550cf35 100644 --- a/src/updater.h +++ b/src/updater.h @@ -14,7 +14,8 @@ #include "config.h" -class Updater{ +class Updater +{ private: Config* conf; -- 1.7.1