This commit is contained in:
john stone 2014-05-02 01:15:14 +02:00
parent ea8f42c6ab
commit 696239e29d
3 changed files with 17 additions and 2 deletions

View File

@ -24,6 +24,10 @@ public:
return me; return me;
} }
//after configuration:
void start(void);
static int event_route(struct mg_event *event) static int event_route(struct mg_event *event)

View File

@ -58,10 +58,19 @@ Routerin::Routerin():
sfh( new StaticFileHandler()) sfh( new StaticFileHandler())
{ {
_dyn_obs = new DynamicObjects(this);
cout << "Konstr Routering" << endl; cout << "Konstr Routering" << endl;
} }
Routerin::~Routerin()
{
delete _dyn_obs;
}
void Routerin::start()
{
_dyn_obs = new DynamicObjects(this);
}
int Routerin::event_request_route(struct mg_event *event){ int Routerin::event_request_route(struct mg_event *event){
const RouterOp *blub=0; const RouterOp *blub=0;
Foohash fh; Foohash fh;

View File

@ -142,7 +142,9 @@ int main(int argc, char **argv)
merouterin->set_baseurl(args_info.baseurl_arg); merouterin->set_baseurl(args_info.baseurl_arg);
merouterin->set_json_path(args_info.janssons_arg); merouterin->set_json_path(args_info.janssons_arg);
merouterin->set_file_path(args_info.filedir_arg); merouterin->set_file_path(args_info.filedir_arg);
merouterin->start();
std::cerr << "baseurl: "<< merouterin->get_baseurl() << "\n"; std::cerr << "baseurl: "<< merouterin->get_baseurl() << "\n";
std::cerr << "json_path: "<< merouterin->get_json_path() << "\n"; std::cerr << "json_path: "<< merouterin->get_json_path() << "\n";
std::cerr << "file_path: "<< merouterin->get_file_path() << "\n"; std::cerr << "file_path: "<< merouterin->get_file_path() << "\n";