36 lines
756 B
C++
36 lines
756 B
C++
/*
|
|
* Copyright (c)2019 ZeroTier, Inc.
|
|
*
|
|
* Use of this software is governed by the Business Source License included
|
|
* in the LICENSE.TXT file in the project's root directory.
|
|
*/
|
|
/****/
|
|
|
|
#ifndef ZT_COMMSCONTROLLER_HPP
|
|
#define ZT_COMMSCONTROLLER_HPP
|
|
|
|
#include <functional>
|
|
#include <string>
|
|
|
|
#include <cpp-httplib/httplib.h>
|
|
#include <nlohmann/json.hpp>
|
|
|
|
namespace ZeroTier {
|
|
|
|
/**
|
|
* Ephemeral in-memory WebRTC signaling fallback and webrtc-config API.
|
|
*/
|
|
class CommsController
|
|
{
|
|
public:
|
|
void configureRoutes(
|
|
httplib::Server &s,
|
|
httplib::Server &sv6,
|
|
const std::function<nlohmann::json()> &localConfigGetter,
|
|
const std::function<void(const httplib::Request&, httplib::Response&, std::string)> &setContent);
|
|
};
|
|
|
|
} // namespace ZeroTier
|
|
|
|
#endif
|