// 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");
// then load all service definition files in config path
// TODO: code to load service definition files in config path
+ return -1;
}
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;
//
#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;
}
using namespace std;
/**
- @author Bjoern Sikora <bjoern.sikora@intra2net.com>
+ @author Bjoern Sikora <bjoern.sikora@intra2net.com>
*/
-class ODS : public Service {
+class ODS : public Service
+{
private:
string hostname;
string login;
using namespace std;
/**
- @author Bjoern Sikora <bjoern.sikora@intra2net.com>
+ @author Bjoern Sikora <bjoern.sikora@intra2net.com>
*/
-class Service{
+class Service
+{
public:
Service();
- ~Service();
+ virtual ~Service();
virtual void update(string)=0;
Updater::Updater()
+ : conf(NULL)
{
}
Updater::~Updater()
{
+ conf = NULL;
}
#include "config.h"
-class Updater{
+class Updater
+{
private:
Config* conf;