-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathmainwindow.h
65 lines (53 loc) · 1.75 KB
/
mainwindow.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <QMessageBox>
#include "directrtcclient.h"
#include "peerconnectionclient.h"
namespace Ui {
class MainWindow;
}
class MainWindow : public QMainWindow,
public AppRTCClient::SignalingEvents,
public PeerConnectionEvents
{
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();
void InitUI();
void Msgbox(QString* log);
//
// SignalingEvetns
//
void OnConnectedToRoom(AppRTCClient::SignalingParameters* params);
void OnRemoteDescription(SessionDescription *sdp);
void OnRemoteIceCandidate(IceCandidate* candidate);
void OnRemoteIceCandidatesRemoved(const std::vector<IceCandidate*>& candidates);
void OnChannelClose();
void OnChannelError(const QString & description);
//
// PeerConnectionEvents
//
void OnLocalDescription(SessionDescription *sdp);
void OnIceCandidate(const IceCandidate* candidate);
void OnIceCandidatesRemoved(std::vector<IceCandidate*> candidates);
void OnIceConnected();
void OnIceDisConnected();
void OnPeerConnectionClosed();
void OnPeerConnectionError(QString description);
void OnStartRenderer(VideoWindow* render);
private:
void OnConnectedToRoomInternal(AppRTCClient::SignalingParameters *params);
void Disconnect();
private:
Ui::MainWindow *ui;
DirectRTCClient* direct_rtc_client_;
AppRTCClient::RoomConnectionParameters* room_connection_parameters_;
AppRTCClient::SignalingParameters* signaling_parameters_;
PeerConnectionClient::PeerConnectionParamters* peer_connection_parameters_;
PeerConnectionClient* peer_connection_client_;
private slots:
void OnConnect();
};
#endif // MAINWINDOW_H