PrivMX Endpoint v2.8.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 <memory>
16#include <string>
17#include <vector>
18
19#include "privmx/endpoint/core/Buffer.hpp"
20#include "privmx/endpoint/stream/Types.hpp"
21#include "privmx/endpoint/stream/WebRTCInterface.hpp"
22#include "privmx/endpoint/stream/cinterface/streamlow.h"
23
24namespace privmx {
25namespace endpoint {
26namespace stream {
27
28class ProxyWebRTC : public WebRTCInterface {
29public:
30 ProxyWebRTC(privmx_endpoint_stream_WebRTCInterface webRTCInterface);
31 ~ProxyWebRTC() override = default;
33 const std::string& streamRoomId,
34 const std::string& connectionType
35 ) override;
37 const std::string& streamRoomId,
38 const std::string& sdp,
39 const std::string& type,
40 const std::string& connectionType
41 ) override;
43 const std::string& streamRoomId,
44 const std::string& sdp,
45 const std::string& type,
46 const std::string& connectionType
47 ) override;
49 const std::string& streamRoomId,
50 const int64_t sessionId,
51 const std::string& connectionType
52 ) override;
53 void closeAll(const std::string& streamRoomId) override;
54 void close(const std::string& streamRoomId, const std::string& connectionType) override;
55 void updateKeys(const std::string& streamRoomId, const std::vector<Key>& keys) override;
56
57private:
58 std::shared_ptr<privmx_endpoint_stream_Key> mapKeys(const std::vector<Key>& keys);
59 privmx_endpoint_stream_KeyType mapKeyType(KeyType type);
60
61 privmx_endpoint_stream_WebRTCInterface _webRTCInterface;
62};
63
64} // namespace stream
65} // namespace endpoint
66} // namespace privmx
67
68#endif // _PRIVMXLIB_ENDPOINT_STREAM_PROXYWEBRTC_HPP_
void updateSessionId(const std::string &streamRoomId, const int64_t sessionId, const std::string &connectionType) override
void updateKeys(const std::string &streamRoomId, const std::vector< Key > &keys) override
std::string createAnswerAndSetDescriptions(const std::string &streamRoomId, const std::string &sdp, const std::string &type, const std::string &connectionType) override
void close(const std::string &streamRoomId, const std::string &connectionType) override
void setAnswerAndSetRemoteDescription(const std::string &streamRoomId, const std::string &sdp, const std::string &type, const std::string &connectionType) override
void closeAll(const std::string &streamRoomId) override
std::string createOfferAndSetLocalDescription(const std::string &streamRoomId, const std::string &connectionType) override
Definition WebRTCInterface.hpp:65