startet compiling again
This commit is contained in:
parent
921ac4f8ef
commit
ea8f42c6ab
|
@ -53,7 +53,6 @@ public:
|
||||||
std::string const & get_json_path()const{return json_path;}
|
std::string const & get_json_path()const{return json_path;}
|
||||||
void set_json_path(std::string json_path);
|
void set_json_path(std::string json_path);
|
||||||
|
|
||||||
std::string const & get_persist_path() const { return perists_path;}
|
|
||||||
private:
|
private:
|
||||||
explicit Routerin();
|
explicit Routerin();
|
||||||
std::unique_ptr<StaticFileHandler> sfh;
|
std::unique_ptr<StaticFileHandler> sfh;
|
||||||
|
|
|
@ -119,12 +119,27 @@ int Routerin::event_request_route(struct mg_event *event){
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Routerin::set_baseurl(std::string baseurl){
|
void Routerin::set_baseurl(std::string baseurl)
|
||||||
_baseurl = baseurl;
|
{
|
||||||
|
this->baseurl = baseurl;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
void Routerin::set_file_path(std::string file_path)
|
||||||
|
{
|
||||||
|
this->file_path = file_path;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
int Routerin::rq_render_mainpage(struct mg_event * event){
|
void Routerin::set_json_path(std::string json_path)
|
||||||
|
{
|
||||||
|
this->json_path = json_path;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
int Routerin::rq_render_mainpage(struct mg_event * event)
|
||||||
|
{
|
||||||
std::cerr << "rendering main page!" << endl;
|
std::cerr << "rendering main page!" << endl;
|
||||||
const std::string fubb =
|
const std::string fubb =
|
||||||
std_html_header +
|
std_html_header +
|
||||||
|
|
|
@ -13,7 +13,7 @@ Sicccobject::Sicccobject(const json_t *j)
|
||||||
val = json_object_get(j, "filetype");
|
val = json_object_get(j, "filetype");
|
||||||
filetype = SicccPersister::get_string_from_json(val);
|
filetype = SicccPersister::get_string_from_json(val);
|
||||||
val = json_object_get(j, "path");
|
val = json_object_get(j, "path");
|
||||||
path = SicccPersister::get_string_from_json(val);
|
filepath = SicccPersister::get_string_from_json(val);
|
||||||
val = json_object_get(j, "size");
|
val = json_object_get(j, "size");
|
||||||
size = SicccPersister::get_integer_from_json(val);
|
size = SicccPersister::get_integer_from_json(val);
|
||||||
val = json_object_get(j, "upload_time");
|
val = json_object_get(j, "upload_time");
|
||||||
|
@ -25,7 +25,7 @@ Sicccobject::Sicccobject(const Sicccobject& obj)
|
||||||
{
|
{
|
||||||
filename = obj.filename;
|
filename = obj.filename;
|
||||||
filetype = obj.filetype;
|
filetype = obj.filetype;
|
||||||
path = obj.path;
|
filepath = obj.filepath;
|
||||||
size = obj.size;
|
size = obj.size;
|
||||||
upload_date = obj.upload_date;
|
upload_date = obj.upload_date;
|
||||||
}
|
}
|
||||||
|
@ -38,7 +38,7 @@ Sicccobject::operator = (const Sicccobject& obj)
|
||||||
|
|
||||||
this->filename = obj.filename;
|
this->filename = obj.filename;
|
||||||
this->filetype = obj.filetype;
|
this->filetype = obj.filetype;
|
||||||
this->path = obj.path;
|
this->filepath = obj.filepath;
|
||||||
this->size = obj.size;
|
this->size = obj.size;
|
||||||
this->upload_date = obj.upload_date;
|
this->upload_date = obj.upload_date;
|
||||||
|
|
||||||
|
@ -52,7 +52,7 @@ operator << (std::ostream& out, const Sicccobject& obj)
|
||||||
std::chrono::system_clock::to_time_t(obj.get_uploadtime());
|
std::chrono::system_clock::to_time_t(obj.get_uploadtime());
|
||||||
out << "[Filename] " << obj.get_filename() << std::endl
|
out << "[Filename] " << obj.get_filename() << std::endl
|
||||||
<< "[Filetype] " << obj.get_filetype() << std::endl
|
<< "[Filetype] " << obj.get_filetype() << std::endl
|
||||||
<< "[Path] " << obj.get_path() << std::endl
|
<< "[Path] " << obj.get_filepath() << std::endl
|
||||||
<< "[Size] " << obj.get_size() << std::endl
|
<< "[Size] " << obj.get_size() << std::endl
|
||||||
<< "[Uploaded] " << std::ctime(&time) << std::endl;
|
<< "[Uploaded] " << std::ctime(&time) << std::endl;
|
||||||
return out;
|
return out;
|
||||||
|
|
|
@ -142,6 +142,12 @@ 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);
|
||||||
|
|
||||||
|
std::cerr << "baseurl: "<< merouterin->get_baseurl() << "\n";
|
||||||
|
std::cerr << "json_path: "<< merouterin->get_json_path() << "\n";
|
||||||
|
std::cerr << "file_path: "<< merouterin->get_file_path() << "\n";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
MongooseHandler *m = new MongooseHandler(args_info.port_arg);
|
MongooseHandler *m = new MongooseHandler(args_info.port_arg);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue