OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 // | 4 // |
5 // Protocol for communication between chromoting client and host. | 5 // Protocol for communication between chromoting client and host. |
6 | 6 |
7 syntax = "proto2"; | 7 syntax = "proto2"; |
8 | 8 |
9 option optimize_for = LITE_RUNTIME; | 9 option optimize_for = LITE_RUNTIME; |
10 | 10 |
11 package remoting; | 11 package remoting; |
12 | 12 |
13 // A message that gets sent to the client after the client is connected to the | 13 // A message that gets sent to the client after the client is connected to the |
14 // host. It contains information that the client needs to know about the host. | 14 // host. It contains information that the client needs to know about the host. |
15 // NEXT ID: 3 | 15 // NEXT ID: 3 |
16 message InitClientMessage { | 16 message InitClientMessage { |
17 required int32 width = 1; | 17 required int32 width = 1; |
18 required int32 height = 2; | 18 required int32 height = 2; |
19 } | 19 } |
20 | 20 |
21 // A message to denote the beginning of an update stream. It will be followed | 21 // A message to denote the beginning of an update stream. It will be followed |
22 // by 0 or more PartialUpdateStream messages and then a EndUpdateStream message. | 22 // by 0 or more UpdateStreamPacketMessages and then a EndUpdateStreamMessage. |
23 // NEXT ID: 1 | 23 // NEXT ID: 1 |
24 message BeginUpdateStreamMessage { | 24 message BeginUpdateStreamMessage { |
25 } | 25 } |
26 | 26 |
27 // A message to denote the end of an update stream. | 27 // A message to denote the end of an update stream. |
28 // NEXT ID: 1 | 28 // NEXT ID: 1 |
29 message EndUpdateStreamMessage { | 29 message EndUpdateStreamMessage { |
30 } | 30 } |
31 | 31 |
32 // Identifies how the image was encoded. | 32 // Identifies how the image was encoded. |
33 enum UpdateStreamEncoding { | 33 enum UpdateStreamEncoding { |
| 34 EncodingInvalid = -1; |
34 EncodingNone = 0; | 35 EncodingNone = 0; |
35 EncodingZlib = 1; | 36 EncodingZlib = 1; |
36 } | 37 } |
37 | 38 |
38 // Identifies the pixel format. | 39 // Identifies the pixel format. |
39 // Note that this list should match exactly the same as | 40 // Note that this list should match exactly the same as |
40 // media::VideoFrame::Format in media/base/video_frame.h. | 41 // media::VideoFrame::Format in media/base/video_frame.h. |
41 enum PixelFormat { | 42 enum PixelFormat { |
42 PixelFormatInvalid = 0; | 43 PixelFormatInvalid = 0; |
43 PixelFormatRgb555 = 1; | 44 PixelFormatRgb555 = 1; |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 message MouseUpEvent { | 153 message MouseUpEvent { |
153 enum Button { | 154 enum Button { |
154 LEFT = 0; | 155 LEFT = 0; |
155 MIDDLE = 1; | 156 MIDDLE = 1; |
156 RIGHT = 2; | 157 RIGHT = 2; |
157 } | 158 } |
158 required Button button = 1; | 159 required Button button = 1; |
159 } | 160 } |
160 | 161 |
161 // Defines the message that is sent from the client to the host. | 162 // Defines the message that is sent from the client to the host. |
162 // Only one of these messages should be present. | 163 // Only one of the optional messages should be present. |
163 // NEXT ID: 7 | 164 // NEXT ID: 7 |
164 message ClientMessage { | 165 message ClientMessage { |
165 optional KeyEvent key_event = 1; | 166 optional KeyEvent key_event = 1; |
166 optional MouseSetPositionEvent mouse_set_position_event = 2; | 167 optional MouseSetPositionEvent mouse_set_position_event = 2; |
167 optional MouseMoveEvent mouse_move_event = 3; | 168 optional MouseMoveEvent mouse_move_event = 3; |
168 optional MouseWheelEvent mouse_wheel_event = 4; | 169 optional MouseWheelEvent mouse_wheel_event = 4; |
169 optional MouseDownEvent mouse_down_event = 5; | 170 optional MouseDownEvent mouse_down_event = 5; |
170 optional MouseUpEvent mouse_up_event = 6; | 171 optional MouseUpEvent mouse_up_event = 6; |
171 } | 172 } |
OLD | NEW |