Akumuli
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends
httpserver.h
1 
17 #pragma once
18 #include <memory>
19 #include <string>
20 #include <tuple>
21 
22 #include <microhttpd.h>
23 
24 #include "akumuli.h"
25 #include "logger.h"
26 #include "server.h"
27 
28 namespace Akumuli {
29 namespace Http {
30 
31 struct AccessControlList {}; // TODO: implement ACL
32 
33 struct HttpServer : std::enable_shared_from_this<HttpServer>, Server {
34  AccessControlList acl_;
35  std::shared_ptr<ReadOperationBuilder> proc_;
36  unsigned short port_;
37  MHD_Daemon* daemon_;
38 
39  HttpServer(unsigned short port, std::shared_ptr<ReadOperationBuilder> qproc);
40  HttpServer(unsigned short port, std::shared_ptr<ReadOperationBuilder> qproc,
41  AccessControlList const& acl);
42 
43  virtual void start(SignalHandler* handler, int id);
44  void stop();
45 };
46 }
47 }
Definition: httpserver.h:33
Server interface.
Definition: server.h:64
Definition: signal_handler.h:12
Definition: httpserver.h:31