OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 // API for communicating with a Google Cast device over an authenticated | 5 // API for communicating with a Google Cast device over an authenticated |
6 // channel. | 6 // channel. |
7 namespace cast.channel { | 7 [use_movable_types=true] namespace cast.channel { |
8 // The state of the channel. | 8 // The state of the channel. |
9 enum ReadyState { | 9 enum ReadyState { |
10 // The channel is connecting. | 10 // The channel is connecting. |
11 connecting, | 11 connecting, |
12 // The channel is open and available for messaging. | 12 // The channel is open and available for messaging. |
13 open, | 13 open, |
14 // The channel is closing. | 14 // The channel is closing. |
15 closing, | 15 closing, |
16 // The channel is closed. | 16 // The channel is closed. |
17 closed | 17 closed |
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
226 interface Events { | 226 interface Events { |
227 // Fired when a message is received on an open channel. | 227 // Fired when a message is received on an open channel. |
228 static void onMessage(ChannelInfo channel, | 228 static void onMessage(ChannelInfo channel, |
229 MessageInfo message); | 229 MessageInfo message); |
230 | 230 |
231 // Fired when an error occurs as a result of a channel operation or a | 231 // Fired when an error occurs as a result of a channel operation or a |
232 // network event. |error| contains details of the error. | 232 // network event. |error| contains details of the error. |
233 static void onError(ChannelInfo channel, ErrorInfo error); | 233 static void onError(ChannelInfo channel, ErrorInfo error); |
234 }; | 234 }; |
235 }; | 235 }; |
OLD | NEW |