PrivMX Endpoint v2.8.0
Loading...
Searching...
No Matches
WebRTCInterface.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_WEBRTCINTERFACE_HPP_
13#define _PRIVMXLIB_ENDPOINT_STREAM_WEBRTCINTERFACE_HPP_
14
15#include <string>
16#include <vector>
17
18#include "privmx/endpoint/core/Buffer.hpp"
19#include "privmx/endpoint/stream/Types.hpp"
20
21namespace privmx {
22namespace endpoint {
23namespace stream {
24
28enum KeyType {
32 LOCAL,
33
37 REMOTE
38};
39
43struct Key {
47 std::string keyId;
48
53
57 KeyType type;
58};
59
66public:
76 const std::string& streamRoomId,
77 const std::string& connectionType
78 ) = 0;
79
91 virtual std::string createAnswerAndSetDescriptions(
92 const std::string& streamRoomId,
93 const std::string& sdp,
94 const std::string& type,
95 const std::string& connectionType
96 ) = 0;
97
107 const std::string& streamRoomId,
108 const std::string& sdp,
109 const std::string& type,
110 const std::string& connectionType
111 ) = 0;
112
121 virtual void updateSessionId(
122 const std::string& streamRoomId,
123 const int64_t sessionId,
124 const std::string& connectionType
125 ) = 0;
126
132 virtual void closeAll(const std::string& streamRoomId) = 0;
133
140 virtual void close(const std::string& streamRoomId, const std::string& connectionType) = 0;
141
148 virtual void updateKeys(const std::string& streamRoomId, const std::vector<Key>& keys) = 0;
149
150protected:
154 virtual ~WebRTCInterface() = default;
155};
156
157} // namespace stream
158} // namespace endpoint
159} // namespace privmx
160
161#endif // _PRIVMXLIB_ENDPOINT_STREAM_WEBRTCINTERFACE_HPP_
Definition Buffer.hpp:13
Definition WebRTCInterface.hpp:65
virtual void closeAll(const std::string &streamRoomId)=0
virtual void setAnswerAndSetRemoteDescription(const std::string &streamRoomId, const std::string &sdp, const std::string &type, const std::string &connectionType)=0
virtual std::string createOfferAndSetLocalDescription(const std::string &streamRoomId, const std::string &connectionType)=0
virtual void updateKeys(const std::string &streamRoomId, const std::vector< Key > &keys)=0
virtual std::string createAnswerAndSetDescriptions(const std::string &streamRoomId, const std::string &sdp, const std::string &type, const std::string &connectionType)=0
virtual void updateSessionId(const std::string &streamRoomId, const int64_t sessionId, const std::string &connectionType)=0
virtual void close(const std::string &streamRoomId, const std::string &connectionType)=0
Definition WebRTCInterface.hpp:43
core::Buffer key
Definition WebRTCInterface.hpp:52
KeyType type
Definition WebRTCInterface.hpp:57
std::string keyId
Definition WebRTCInterface.hpp:47