Debian Codegraph @

mtxclient/include/mtx/responses/turn_server.hpp

raw symbols SCIP
1 #pragma once
2
3 /// @file
4 /// @brief Responses for the turn server used for calls.
5
6 #include <string>
7 #include <vector>
8
9 #if __has_include(<nlohmann/json_fwd.hpp>)
10 #include <nlohmann/json_fwd.hpp>
11 #else
12 #include <nlohmann/json.hpp>
13 #endif
14
15 namespace mtx {
16 namespace responses {
17
18 //! Response of the `GET /_matrix/client/r0/voip/turnServer` endpoint.
19 //
20 //! This API provides credentials for the client to use when initiating calls.
21 struct TurnServer
22 {
23 //! The username to use.
24 std::string username;
25
26 //! The password to use.
27 std::string password;
28
29 //! A list of TURN URIs.
30 std::vector<std::string> uris;
31
32 //! The time-to-live in seconds.
33 uint32_t ttl;
34
35 friend void from_json(const nlohmann::json &obj, TurnServer &turnServer);
36 };
37 }
38 }