-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathWebRTCPeer.h
More file actions
35 lines (27 loc) · 968 Bytes
/
WebRTCPeer.h
File metadata and controls
35 lines (27 loc) · 968 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#pragma once
#include <string>
#include <functional>
#include <deque>
#include <memory>
#include "WebRTCConfig.h"
struct WebRTCPeer
{
virtual ~WebRTCPeer() {}
typedef std::function<void ()> PreparedCallback;
typedef std::function<
void (unsigned mlineIndex, const std::string& candidate)> IceCandidateCallback;
typedef std::function<void ()> EosCallback;
virtual void prepare(
const WebRTCConfigPtr&, // FIXME? is it too expensive to use std::shared_ptr here?
const PreparedCallback&,
const IceCandidateCallback&,
const EosCallback&,
const std::string& logContext) noexcept = 0;
virtual const std::string& sdp() noexcept = 0;
virtual void setRemoteSdp(const std::string& sdp) noexcept = 0;
virtual void addIceCandidate(
unsigned mlineIndex,
const std::string& candidate) noexcept = 0;
virtual void play() noexcept = 0;
virtual void stop() noexcept = 0;
};