2014-01-17 23:47:14 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <mongoose.h>
|
|
|
|
#include "StaticFileHandler.H"
|
|
|
|
|
|
|
|
class Routerin
|
|
|
|
{
|
|
|
|
public:
|
2014-01-18 14:48:52 +01:00
|
|
|
Routerin();
|
|
|
|
//Routerin(StaticFileHandler &sfh);
|
2014-01-17 23:47:14 +01:00
|
|
|
|
|
|
|
int event_route(struct mg_event *event);
|
|
|
|
|
|
|
|
private:
|
|
|
|
StaticFileHandler sfh;
|
|
|
|
|
|
|
|
|
|
|
|
int event_request_route ( struct mg_event *event);
|
|
|
|
int event_newthread_route ( struct mg_event *event);
|
|
|
|
int event_fallback_route ( struct mg_event *event);
|
|
|
|
int event_requend_route ( struct mg_event *event);
|
|
|
|
|
|
|
|
int rq_static(char const * const restrstr , struct mg_event *event);
|
|
|
|
int rq_file(char const * const reststr , struct mg_event *event);
|
|
|
|
int rq_date(char const * const reststr , struct mg_event *event);
|
|
|
|
int rq_upload(char const * const reststr , struct mg_event *event);
|
|
|
|
|
|
|
|
};
|