Chromium Code Reviews| 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 namespace cast.channel { |
| 8 | 8 |
| 9 // The state of the channel. | 9 // The state of the channel. |
| 10 enum ReadyState { | 10 enum ReadyState { |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 66 // The port number to connect to, 0-65535. | 66 // The port number to connect to, 0-65535. |
| 67 long port; | 67 long port; |
| 68 | 68 |
| 69 // The amount of time to wait in milliseconds before stopping the | 69 // The amount of time to wait in milliseconds before stopping the |
| 70 // connection process. Timeouts are disabled if the value is zero. | 70 // connection process. Timeouts are disabled if the value is zero. |
| 71 // The default timeout is 8000ms. | 71 // The default timeout is 8000ms. |
| 72 long? timeout; | 72 long? timeout; |
| 73 | 73 |
| 74 // The authentication method required for the channel. | 74 // The authentication method required for the channel. |
| 75 ChannelAuthType auth; | 75 ChannelAuthType auth; |
| 76 | |
| 77 // If set, a bit mask describing capability of the cast device. | |
|
mark a. foltz
2015/01/12 22:01:57
A more self documenting API would accept an array
vadimgo
2015/01/13 00:08:27
Now refer to the mask type in the comment.
| |
| 78 long? capabilities; | |
| 76 }; | 79 }; |
| 77 | 80 |
| 78 // Describes the state of a channel to a Cast receiver. | 81 // Describes the state of a channel to a Cast receiver. |
| 79 dictionary ChannelInfo { | 82 dictionary ChannelInfo { |
| 80 // Id for the channel. | 83 // Id for the channel. |
| 81 long channelId; | 84 long channelId; |
| 82 | 85 |
| 83 // DEPRECATED: The URL to the receiver. This field will be removed in a | 86 // DEPRECATED: The URL to the receiver. This field will be removed in a |
| 84 // future release. | 87 // future release. |
| 85 DOMString url; | 88 DOMString url; |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 210 interface Events { | 213 interface Events { |
| 211 // Fired when a message is received on an open channel. | 214 // Fired when a message is received on an open channel. |
| 212 static void onMessage(ChannelInfo channel, | 215 static void onMessage(ChannelInfo channel, |
| 213 MessageInfo message); | 216 MessageInfo message); |
| 214 | 217 |
| 215 // Fired when an error occurs as a result of a channel operation or a | 218 // Fired when an error occurs as a result of a channel operation or a |
| 216 // network event. |error| contains details of the error. | 219 // network event. |error| contains details of the error. |
| 217 static void onError(ChannelInfo channel, ErrorInfo error); | 220 static void onError(ChannelInfo channel, ErrorInfo error); |
| 218 }; | 221 }; |
| 219 }; | 222 }; |
| OLD | NEW |