PrivMX Endpoint v2.7.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
25
26enum KeyType {
27 LOCAL,
28 REMOTE
29};
30
31struct Key {
32 std::string keyId;
33 core::Buffer key;
34 KeyType type;
35};
36
38{
39public:
40 virtual std::string createOfferAndSetLocalDescription(const std::string& streamRoomId) = 0;
41 virtual std::string createAnswerAndSetDescriptions(const std::string& streamRoomId, const std::string& sdp, const std::string& type) = 0;
42 virtual void setAnswerAndSetRemoteDescription(const std::string& streamRoomId, const std::string& sdp, const std::string& type) = 0;
43 virtual void updateSessionId(const std::string& streamRoomId, const int64_t sessionId, const std::string& connectionType) = 0;
44 virtual void close(const std::string& streamRoomId) = 0;
45 virtual void updateKeys(const std::string& streamRoomId, const std::vector<Key>& keys) = 0;
46
47protected:
48 virtual ~WebRTCInterface() = default;
49};
50
51} // namespace stream
52} // namespace endpoint
53} // namespace privmx
54
55#endif // _PRIVMXLIB_ENDPOINT_STREAM_WEBRTCINTERFACE_HPP_
Definition Buffer.hpp:13
Definition WebRTCInterface.hpp:38
Definition WebRTCInterface.hpp:31