/** WebRTC signaling messages. * * @file * @author Steffen Vogel * @copyright 2014-2022, Institute for Automation of Complex Power Systems, EONERC * @license Apache 2.0 *********************************************************************************/ #pragma once #include #include #include #include #include #include namespace villas { namespace node { namespace webrtc { struct Connection { int id; std::string remote; std::string userAgent; std::chrono::time_point created; Connection(json_t *j); json_t * toJSON() const; }; struct RelayMessage { std::vector servers; RelayMessage(json_t *j); }; struct ControlMessage { int connectionID; std::vector connections; ControlMessage(json_t *j); json_t * toJSON() const; }; struct SignalingMessage { std::variant message; static SignalingMessage fromJSON(json_t *j); json_t * toJSON() const; std::string toString() const; }; } /* namespace webrtc */ } /* namespace node */ } /* namespace villas */