#ifndef PARKINGSTATUSHTTPSERVER_H #define PARKINGSTATUSHTTPSERVER_H #include #include #include #include "IVrConfig.h" namespace Poco { namespace Net { class HTTPServer; } } class ParkingStatusHttpServer { public: using StatusProvider = std::function; ParkingStatusHttpServer(); ~ParkingStatusHttpServer(); ParkingStatusHttpServer(const ParkingStatusHttpServer&) = delete; ParkingStatusHttpServer& operator=(const ParkingStatusHttpServer&) = delete; int Start(const HttpServerConfig& config, StatusProvider statusProvider); void Stop(); bool IsRunning() const; std::string LastError() const; private: std::unique_ptr m_server; bool m_running = false; std::string m_lastError; }; #endif // PARKINGSTATUSHTTPSERVER_H