23#include "YHttpMount.h"
24#include "YHttpHandler.h"
25#include "YHttpServerSockets.h"
26#include "YHttpWidgetsActionHandler.h"
29#define YUITest_HTTP_REMOTE "YUI_HTTP_REMOTE"
30#define YUITest_HTTP_PORT "YUI_HTTP_PORT"
31#define YUI_AUTH_USER "YUI_AUTH_USER"
32#define YUI_AUTH_PASSWD "YUI_AUTH_PASSWD"
33#define YUI_REUSE_PORT "YUI_REUSE_PORT"
35#define YUI_API_VERSION "v1"
46 static bool enabled = port_num() != 0;
55 static int port_num();
91 void mount(std::string path,
const std::string &method, YHttpHandler *handler,
bool has_api_version =
true);
93 MHD_RESULT handle(
struct MHD_Connection* connection,
94 const char* url,
const char* method,
const char* upload_data,
95 size_t* upload_data_size);
98 std::string user()
const {
return auth_user;}
99 std::string passwd()
const {
return auth_passwd;}
104 struct MHD_Daemon *server_v4, *server_v6;
105 std::vector<YHttpMount> _mounts;
108 static YHttpWidgetsActionHandler * _widget_action_handler;
110 std::string auth_user;
111 std::string auth_passwd;
113 static YHttpWidgetsActionHandler * get_widget_action_handler() {
return _widget_action_handler; }
Definition YHttpServer.h:40
bool process_data()
Definition YHttpServer.cc:351
void start()
Definition YHttpServer.cc:261
static YHttpServer * yserver()
Definition YHttpServer.h:53
void stop()
Definition YHttpServer.cc:334
YHttpServerSockets sockets()
Definition YHttpServer.cc:155
YHttpServer(YHttpWidgetsActionHandler *widgets_action_handler)
Definition YHttpServer.cc:96