+ GetProfile & GetState members.

This commit is contained in:
Miroslav Šedivý 2020-12-08 15:37:48 +01:00
parent 209971cb8a
commit 7fb40c0384
5 changed files with 57 additions and 89 deletions

View file

@ -31,6 +31,7 @@ type MembersDatabase interface {
type Session interface {
ID() string
// profile
VerifySecret(secret string) bool
Name() string
IsAdmin() bool
@ -39,16 +40,21 @@ type Session interface {
CanWatch() bool
CanHost() bool
CanAccessClipboard() bool
GetProfile() MemberProfile
// state
IsHost() bool
IsConnected() bool
IsWatching() bool
Disconnect(reason string) error
GetState() MemberState
// websocket
SetWebSocketPeer(websocket_peer WebSocketPeer)
SetWebSocketConnected(connected bool)
Send(v interface{}) error
Disconnect(reason string) error
// webrtc
SetWebRTCPeer(webrtc_peer WebRTCPeer)
SetWebRTCConnected(connected bool)
SignalAnswer(sdp string) error