// // Created by koncord on 13.05.17. // #ifndef NEWRESTAPI_RESTSERVER_HPP #define NEWRESTAPI_RESTSERVER_HPP #include #include #include "MasterServer.hpp" #include "SimpleWeb/http_server.hpp" typedef SimpleWeb::Server HttpServer; class RestServer { public: RestServer(unsigned short port, MasterServer::ServerMap *pMap); void start(); void stop(); void cacheUpdated(); private: HttpServer httpServer; MasterServer::ServerMap *serverMap; bool updatedCache = true; std::thread thr; }; #endif //NEWRESTAPI_RESTSERVER_HPP