WS added session events.

This commit is contained in:
Miroslav Šedivý
2020-12-02 18:59:54 +01:00
parent 1f5c0a3547
commit f361d0c681
5 changed files with 149 additions and 18 deletions

View File

@ -13,9 +13,13 @@ const (
)
const (
MEMBER_CONNECTED = "member/connected"
MEMBER_UPDATED = "member/updated" // TODO: New.
MEMBER_DISCONNECTED = "member/disconnected"
MEMBER_CREATED = "member/created"
MEMBER_DELETED = "member/deleted"
MEMBER_CONNECTED = "member/connected"
MEMBER_DISCONNECTED = "member/disconnected"
MEMBER_RECEIVING_STARTED = "member/receiving/started"
MEMBER_RECEIVING_STOPPED = "member/receiving/stopped"
MEMBER_PROFILE_UPDATED = "member/profile/updated"
)
const (

View File

@ -54,11 +54,23 @@ type MemberID struct {
ID string `json:"id"`
}
type MemberProfile struct {
Event string `json:"event,omitempty"`
Name string `json:"name"`
IsAdmin bool `json:"is_admin"`
CanLogin bool `json:"can_login"`
CanConnect bool `json:"can_connect"`
CanWatch bool `json:"can_watch"`
CanHost bool `json:"can_host"`
CanAccessClipboard bool `json:"can_access_clipboard"`
}
type MemberData struct {
Event string `json:"event,omitempty"`
ID string `json:"id"`
Name string `json:"name"`
IsAdmin bool `json:"is_admin"`
Event string `json:"event,omitempty"`
ID string `json:"id"`
Profile MemberProfile `json:"profile"`
IsConnected bool `json:"is_connected"`
IsReceiving bool `json:"is_receiving"`
}
/////////////////////////////