-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathWebRTCPeer.h
34 lines (26 loc) · 929 Bytes
/
WebRTCPeer.h
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
#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&) 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;
};