blob: 1843b320c79ce8ac1de50479197c9c1f07b82ad6 [file] [log] [blame]
[email protected]f2b9cf32012-04-27 00:13:431// Copyright (c) 2012 The Chromium Authors. All rights reserved.
[email protected]e976a1712010-10-18 20:09:502// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4//
5// Protocol for control messages.
6
7syntax = "proto2";
8
[email protected]93115b52012-11-12 21:36:209option optimize_for = LITE_RUNTIME;
10
[email protected]5e240672010-11-02 21:42:2511package remoting.protocol;
[email protected]e976a1712010-10-18 20:09:5012
Erik Jensene3433312019-11-09 00:31:1613import "layout_key_function.proto";
14
Jamie Walch56f354dd2018-05-22 21:59:5715// Set the host resolution to match the client. If none of the fields are
16// present, restore the host resolution instead.
[email protected]48a8ca32013-02-13 04:31:0117message ClientResolution {
Jamie Walch56f354dd2018-05-22 21:59:5718 // Width and height of the client in Density-Independent Pixels.
[email protected]48a8ca32013-02-13 04:31:0119 optional int32 dips_width = 1;
20 optional int32 dips_height = 2;
21
sergeyu54624e12016-06-01 10:54:3122 // Deprecated width and height of the client in device pixels.
23 optional int32 width_deprecated = 3;
24 optional int32 height_deprecated = 4;
[email protected]48a8ca32013-02-13 04:31:0125
26 // Horizontal and vertical DPI of the screen. If either of these is zero or
27 // unset, the corresponding DPI should be assumed to be 96 (Windows' default)
28 optional int32 x_dpi = 5;
29 optional int32 y_dpi = 6;
[email protected]f2b9cf32012-04-27 00:13:4330}
[email protected]50d71c72012-05-03 01:28:5531
32message VideoControl {
33 // Enables the video channel if true, pauses if false.
34 optional bool enable = 1;
[email protected]a516f1e2014-05-30 07:21:2035
36 // Controls whether lossless encode and color translation are requested.
37 optional bool lossless_encode = 2;
38 optional bool lossless_color = 3;
[email protected]50d71c72012-05-03 01:28:5539}
[email protected]d65e15bd2012-06-02 22:16:4140
[email protected]f458bed2012-10-18 03:27:5941message AudioControl {
42 // Enables the audio channel if true, pauses if false.
43 optional bool enable = 1;
44}
45
[email protected]d65e15bd2012-06-02 22:16:4146message CursorShapeInfo {
47 // Width, height (in screen pixels) of the cursor.
48 optional int32 width = 1;
49 optional int32 height = 2;
50
51 // X,Y coordinates (relative to upper-left corner) of the cursor hotspot.
52 optional int32 hotspot_x = 3;
53 optional int32 hotspot_y = 4;
54
55 // Cursor pixmap data in 32-bit BGRA format.
56 optional bytes data = 5;
57}
[email protected]a5d181f2013-04-19 14:55:3758
59message Capabilities {
60 // List of capabilities supported by the sender (case sensitive, capabilities
61 // are separated by spaces).
62 optional string capabilities = 1;
63}
[email protected]9ffa78a22013-05-10 04:35:1064
65message PairingRequest {
66 // Human-readable name of the client.
67 optional string client_name = 1;
68}
69
70message PairingResponse {
71 // Unique identifier for this client.
72 optional string client_id = 1;
73
74 // Shared secret for this client.
75 optional string shared_secret = 2;
76}
[email protected]09eabd65c2013-08-13 00:13:4877
78message ExtensionMessage {
79 // The message type. This is used to dispatch the message to the correct
80 // recipient.
81 optional string type = 1;
82
83 // String-encoded message data. The client and host must agree on the encoding
84 // for each message type; different message types need not shared the same
85 // encoding.
86 optional string data = 2;
sergeyu00a67b12016-04-01 00:07:0087}
88
89message VideoTrackLayout {
Gary Kacmarcika7e33e42019-02-22 19:23:2890 // Unique display identifier.
91 optional int32 id = 8;
92
sergeyu00a67b12016-04-01 00:07:0093 // Name of the video track.
94 optional string track_name = 1;
95
96 // Position of the top left corner of the rectangle covered by the video
97 // track in DIPs (device independent pixels).
98 optional int32 position_x = 2;
99 optional int32 position_y = 3;
100
101 // Size of the area covered by the video track in DIPs.
102 optional int32 width = 4;
103 optional int32 height = 5;
104
105 // DPI of the screen.
106 optional int32 x_dpi = 6;
107 optional int32 y_dpi = 7;
108}
109
110message VideoLayout {
111 // Layout for each video track.
112 repeated VideoTrackLayout video_track = 1;
Gary Kacmarcik5dac99c2020-03-05 22:55:40113
114 // True if this display configuration supports capturing the entire desktop.
115 optional bool supports_full_desktop_capture = 2;
sergeyu00a67b12016-04-01 00:07:00116}
Gary Kacmarcik0c56fda2019-01-17 03:10:12117
118message SelectDesktopDisplayRequest {
119 // Identifier for display to select. Valid strings are "0", "1", ...
120 // The "all" string is used to select the entire desktop.
121 optional string id = 1;
122}
Gary Kacmarcikebe85a812019-01-23 20:11:54123
124message DesktopDisplayInfo {
125 // Unique display identifier.
126 optional int32 id = 1;
127
128 // Position of the top left corner of this display (in pixels).
129 optional int32 x = 2;
130 optional int32 y = 3;
131
132 // Size of the display (in pixels).
133 optional int32 width = 4;
134 optional int32 height = 5;
135
136 // DPI of the screen.
137 optional int32 dpi = 6;
138
139 // Bits per pixel.
140 optional int32 bpp = 7;
141
142 // True if this is the default display.
143 optional bool is_default = 8;
144}
Erik Jensene3433312019-11-09 00:31:16145
146// Next ID: 2
147message KeyboardLayout {
148 // Next ID: 3
149 message KeyAction {
150 oneof action {
151 LayoutKeyFunction function = 1;
152 string character = 2;
153 }
154 }
155
156 // Next ID: 2
157 message KeyBehavior {
Erik Jensenb8876672019-12-03 04:30:05158 // Maps 0-based shift level to key action. (Note: because this is zero-
159 // based, it will be one less than the corresponding ISO shift level.)
160 map<uint32, KeyAction> actions = 1;
Erik Jensene3433312019-11-09 00:31:16161 }
162
163 // Map USB code to key behavior.
164 map<uint32, KeyBehavior> keys = 1;
165}
Yuwei Huangcf7fdff2020-05-04 19:46:43166
167// Next ID: 2
168message TransportInfo {
169 // Transport layer protocol the message sender uses to connect to the relay
170 // server or the peer (if connection not relayed).
171 // Possible values are those defined in the protocol and relayProtocol fields
172 // in the RTCIceCandidateStats dictionary.
173 // If the host failed to get protocol using WebRTC API, this field will be set
174 // to "api-error".
175 optional string protocol = 1;
176}
Yuwei Huangef530072020-06-19 02:33:44177
Lambros Lambrouf8452082020-08-05 18:18:16178// Next ID: 5
Yuwei Huangef530072020-06-19 02:33:44179message PeerConnectionParameters {
180 // Sets preferred minimum and maximum bitrates. Unset fields means no
181 // preference on the bitrate. Clients might need to keep track of existing
182 // parameters if they need to do incremental changes.
183 optional int32 preferred_min_bitrate_bps = 1;
184 optional int32 preferred_max_bitrate_bps = 2;
Lambros Lambrou4c46dcb02020-07-22 18:14:54185
186 // Requests an ICE restart. This causes the host to initiate a new SDP
187 // offer/answer exchange, and restarts the ICE gathering/connection sequence.
Lambros Lambrouf8452082020-08-05 18:18:16188 // This can be used to re-establish a connection, without needing to
189 // re-authenticate the user.
Lambros Lambrou4c46dcb02020-07-22 18:14:54190 optional bool request_ice_restart = 3;
Lambros Lambrouf8452082020-08-05 18:18:16191
192 // Requests the host to initiate a new SDP offer/answer exchange, without
193 // restarting ICE. This can be used to change SDP configuration (for example,
194 // switching to a different codec), without needing a full reconnection.
195 optional bool request_sdp_restart = 4;
Yuwei Huangef530072020-06-19 02:33:44196}