OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 module media_router.interfaces; | 5 module media_router.interfaces; |
6 | 6 |
7 // Represents an output sink to which media can be routed. | 7 // Represents an output sink to which media can be routed. |
8 struct MediaSink { | 8 struct MediaSink { |
9 enum IconType { | 9 enum IconType { |
10 CAST, | 10 CAST, |
11 CAST_AUDIO, | 11 CAST_AUDIO, |
12 GENERIC, | 12 GENERIC, |
13 HANGOUT | 13 HANGOUT |
14 }; | 14 }; |
15 | 15 |
16 // The sink identifier, e.g. "rs71w7mFzYLFlabir_qO4NHl6SUc." | 16 // The sink identifier, e.g. "rs71w7mFzYLFlabir_qO4NHl6SUc." |
17 string sink_id; | 17 string sink_id; |
18 // The human-readable name, e.g. "Janet's Chromecast". | 18 // The human-readable name, e.g. "Janet's Chromecast". |
19 string name; | 19 string name; |
20 // The type of icon to show in the UI for this media sink. | 20 // The type of icon to show in the UI for this media sink. |
21 IconType icon_type; | 21 IconType icon_type; |
22 // True if a route is being created to this sink. | |
23 bool is_launching; | |
24 }; | 22 }; |
25 | 23 |
26 // Should be kept in sync with media_route.h. | 24 // Should be kept in sync with media_route.h. |
27 struct MediaRoute { | 25 struct MediaRoute { |
28 // The ID of this media route, e.g. "r_PR1O_blkC9dsKp-tb1ti8qurOo". | 26 // The ID of this media route, e.g. "r_PR1O_blkC9dsKp-tb1ti8qurOo". |
29 string media_route_id; | 27 string media_route_id; |
30 // The ID of the media source being sent through this media route. | 28 // The ID of the media source being sent through this media route. |
31 // May be missing if route is not local. | 29 // May be missing if route is not local. |
32 string? media_source; | 30 string? media_source; |
33 // The ID of sink that is rendering the media content. | 31 // The ID of sink that is rendering the media content. |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 // Called when the Media Route Manager receives a new list of sinks. | 197 // Called when the Media Route Manager receives a new list of sinks. |
200 OnSinksReceived(string media_source, array<MediaSink> sinks); | 198 OnSinksReceived(string media_source, array<MediaSink> sinks); |
201 | 199 |
202 // Called when issues are reported for media routes. | 200 // Called when issues are reported for media routes. |
203 OnIssue(Issue issue); | 201 OnIssue(Issue issue); |
204 | 202 |
205 // Called when list of routes has been updated. | 203 // Called when list of routes has been updated. |
206 OnRoutesUpdated(array<MediaRoute> routes); | 204 OnRoutesUpdated(array<MediaRoute> routes); |
207 }; | 205 }; |
208 | 206 |
OLD | NEW |