From 5c0dee93ac22860d5dab6f56019ce92313f9c594 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20=C5=A0ediv=C3=BD?= Date: Mon, 30 Nov 2020 21:06:37 +0100 Subject: [PATCH] messages highlight comments. --- internal/types/message/messages.go | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/internal/types/message/messages.go b/internal/types/message/messages.go index 549c5d1b..e6c74ebb 100644 --- a/internal/types/message/messages.go +++ b/internal/types/message/messages.go @@ -5,7 +5,10 @@ type Message struct { Payload interface{} `json:"payload"` // TODO: New. } +///////////////////////////// // System +///////////////////////////// + type SystemInit struct { Event string `json:"event,omitempty"` ControlHost ControlHost `json:"control_host"` @@ -25,7 +28,10 @@ type SystemDisconnect struct { Message string `json:"message"` } +///////////////////////////// // Signal +///////////////////////////// + type SignalProvide struct { Event string `json:"event,omitempty"` SDP string `json:"sdp"` @@ -38,8 +44,10 @@ type SignalAnswer struct { SDP string `json:"sdp"` } - +///////////////////////////// // Member +///////////////////////////// + // TODO: New. type MemberID struct { Event string `json:"event,omitempty"` @@ -54,7 +62,10 @@ type MemberData struct { IsAdmin bool `json:"is_admin"` } +///////////////////////////// // Control +///////////////////////////// + type ControlHost struct { Event string `json:"event,omitempty"` HasHost bool `json:"has_host"` @@ -81,7 +92,10 @@ type ControlKey struct { Key uint64 `json:"key"` } +///////////////////////////// // Screen +///////////////////////////// + type ScreenSize struct { Event string `json:"event,omitempty"` Width int `json:"width"` @@ -89,13 +103,19 @@ type ScreenSize struct { Rate int `json:"rate"` } +///////////////////////////// // Clipboard +///////////////////////////// + type ClipboardData struct { Event string `json:"event,omitempty"` Text string `json:"text"` } +///////////////////////////// // Keyboard +///////////////////////////// + type KeyboardModifiers struct { Event string `json:"event,omitempty"` CapsLock *bool `json:"caps_lock"` @@ -108,6 +128,10 @@ type KeyboardLayout struct { Layout string `json:"layout"` } +///////////////////////////// +// Broadcast +///////////////////////////// + type BroadcastStatus struct { Event string `json:"event,omitempty"` IsActive bool `json:"is_active"`