PrivMX Endpoint v2.7.0
Loading...
Searching...
No Matches
ProxyWebRTC.hpp
1/*
2PrivMX Endpoint.
3Copyright © 2024 Simplito sp. z o.o.
4
5This file is part of the PrivMX Platform (https://privmx.dev).
6This software is Licensed under the PrivMX Free License.
7
8See the License for the specific language governing permissions and
9limitations under the License.
10*/
11
12#ifndef _PRIVMXLIB_ENDPOINT_STREAM_PROXYWEBRTC_HPP_
13#define _PRIVMXLIB_ENDPOINT_STREAM_PROXYWEBRTC_HPP_
14
15#include <string>
16#include <vector>
17
18#include "privmx/endpoint/core/Buffer.hpp"
19#include "privmx/endpoint/stream/Types.hpp"
20#include "privmx/endpoint/stream/WebRTCInterface.hpp"
21#include "privmx/endpoint/stream/cinterface/streamlow.h"
22
23namespace privmx {
24namespace endpoint {
25namespace stream {
26
27class ProxyWebRTC : public WebRTCInterface
28{
29public:
30 ProxyWebRTC(
31 privmx_endpoint_stream_WebRTCInterface webRTCInterface
32 );
33 ~ProxyWebRTC() override = default;
34 std::string createOfferAndSetLocalDescription(const std::string& streamRoomId) override;
35 std::string createAnswerAndSetDescriptions(const std::string& streamRoomId, const std::string& sdp, const std::string& type) override;
36 void setAnswerAndSetRemoteDescription(const std::string& streamRoomId, const std::string& sdp, const std::string& type) override;
37 void updateSessionId(const std::string& streamRoomId, const int64_t sessionId, const std::string& connectionType) override;
38 void close(const std::string& streamRoomId) override;
39 void updateKeys(const std::string& streamRoomId, const std::vector<Key>& keys) override;
40
41private:
42 std::shared_ptr<privmx_endpoint_stream_Key> mapKeys(const std::vector<Key>& keys);
43 privmx_endpoint_stream_KeyType mapKeyType(KeyType type);
44
45 privmx_endpoint_stream_WebRTCInterface _webRTCInterface;
46};
47
48} // namespace stream
49} // namespace endpoint
50} // namespace privmx
51
52#endif // _PRIVMXLIB_ENDPOINT_STREAM_PROXYWEBRTC_HPP_
Definition WebRTCInterface.hpp:38