mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-15 14:49:56 +00:00
26 lines
536 B
C++
26 lines
536 B
C++
#ifndef NEWRESTAPI_RESTSERVER_HPP
|
|
#define NEWRESTAPI_RESTSERVER_HPP
|
|
|
|
#include <string>
|
|
#include <unordered_map>
|
|
#include "MasterServer.hpp"
|
|
#include "SimpleWeb/http_server.hpp"
|
|
|
|
typedef SimpleWeb::Server<SimpleWeb::HTTP> 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;
|
|
};
|
|
|
|
|
|
#endif //NEWRESTAPI_RESTSERVER_HPP
|