24 lines
411 B
C++
24 lines
411 B
C++
#pragma once
|
|
|
|
#include "http_server.hpp"
|
|
|
|
#include <mutex>
|
|
#include <string>
|
|
|
|
namespace connector {
|
|
|
|
class ConnectorService {
|
|
public:
|
|
bool start(std::string& error);
|
|
void stop();
|
|
bool running() const { return server_.running(); }
|
|
|
|
private:
|
|
HttpResponse handle(const HttpRequest& request);
|
|
HttpServer server_;
|
|
std::mutex config_mutex_;
|
|
std::mutex conversion_mutex_;
|
|
};
|
|
|
|
} // namespace connector
|