OpenTera WebRTC API (C++) 1.2.5
WebrtcConfiguration.h
1 #ifndef OPENTERA_WEBRTC_NATIVE_CLIENT_CONFIGURATIONS_WEBRTC_CONFIGURATION_H
2 #define OPENTERA_WEBRTC_NATIVE_CLIENT_CONFIGURATIONS_WEBRTC_CONFIGURATION_H
3 
4 #include <OpenteraWebrtcNativeClient/Utils/IceServer.h>
5 
6 #include <vector>
7 
8 namespace opentera
9 {
14  {
15  std::vector<IceServer> m_iceServers;
16 
17  explicit WebrtcConfiguration(std::vector<IceServer>&& iceServers);
18 
19  public:
20  WebrtcConfiguration(const WebrtcConfiguration& other) = default;
21  WebrtcConfiguration(WebrtcConfiguration&& other) = default;
22  virtual ~WebrtcConfiguration() = default;
23 
24  static WebrtcConfiguration create();
25  static WebrtcConfiguration create(std::vector<IceServer> iceServers);
26 
27  [[nodiscard]] const std::vector<IceServer>& iceServers() const;
28 
29  explicit operator webrtc::PeerConnectionInterface::RTCConfiguration() const;
30 
31  WebrtcConfiguration& operator=(const WebrtcConfiguration& other) = default;
32  WebrtcConfiguration& operator=(WebrtcConfiguration&& other) = default;
33  };
34 
40 
46  inline WebrtcConfiguration WebrtcConfiguration::create(std::vector<IceServer> iceServers)
47  {
48  return WebrtcConfiguration(std::move(iceServers));
49  }
50 
55  inline const std::vector<IceServer>& WebrtcConfiguration::iceServers() const { return m_iceServers; }
56 }
57 
58 #endif
Represents a WebRTC peer connection configuration.
Definition: WebrtcConfiguration.h:14
const std::vector< IceServer > & iceServers() const
Definition: WebrtcConfiguration.h:55
static WebrtcConfiguration create()
Creates a WebRTC peer connection configuration with default values.
Definition: WebrtcConfiguration.h:39