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 // The sink identifier, e.g. "rs71w7mFzYLFlabir_qO4NHl6SUc." | 9 // The sink identifier, e.g. "rs71w7mFzYLFlabir_qO4NHl6SUc." |
10 string sink_id; | 10 string sink_id; |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
87 // If the operation was successful, |route| will be defined and | 87 // If the operation was successful, |route| will be defined and |
88 // |error_text| will be null. | 88 // |error_text| will be null. |
89 // If the operation failed, |route| will be null and |error_text| | 89 // If the operation failed, |route| will be null and |error_text| |
90 // will be set. | 90 // will be set. |
91 CreateRoute(string media_source, string sink_id) => | 91 CreateRoute(string media_source, string sink_id) => |
92 (MediaRoute? route, string? error_text); | 92 (MediaRoute? route, string? error_text); |
93 | 93 |
94 // Closes the route specified by |route_id|. | 94 // Closes the route specified by |route_id|. |
95 CloseRoute(string route_id); | 95 CloseRoute(string route_id); |
96 | 96 |
97 // Sends |message| with optional |extra_info_json| via the media route | 97 // Sends |message| with optional |extra_info_json| via the media route |
Kevin M
2015/06/11 22:45:24
extra_info_json is no more.
haibinlu
2015/06/11 23:05:22
removed
| |
98 // |media_route_id|. | 98 // |media_route_id|. |
99 PostMessage(string media_route_id, string message); | 99 // If the operation was sucessfull, |sent| is true; otherwise it is false. |
Kevin M
2015/06/11 22:45:24
extra 'l' in successful
haibinlu
2015/06/11 23:05:22
Done.
| |
100 SendMessage(string media_route_id, string message) => (bool sent); | |
100 | 101 |
101 // Starts querying for sinks capable of displaying |media_source|. | 102 // Starts querying for sinks capable of displaying |media_source|. |
102 StartObservingMediaSinks(string media_source); | 103 StartObservingMediaSinks(string media_source); |
103 | 104 |
104 // Stops querying sinks for |media_source|. | 105 // Stops querying sinks for |media_source|. |
105 StopObservingMediaSinks(string media_source); | 106 StopObservingMediaSinks(string media_source); |
106 | 107 |
107 // Starts reporting the state of active media routes via | 108 // Starts reporting the state of active media routes via |
108 // OnRoutesUpdated(). Querying will continue until | 109 // OnRoutesUpdated(). Querying will continue until |
109 // StopObservingMediaRoutes() is called. | 110 // StopObservingMediaRoutes() is called. |
(...skipping 22 matching lines...) Expand all Loading... | |
132 // Called when the Media Route Manager receives a route message. | 133 // Called when the Media Route Manager receives a route message. |
133 OnMessage(string media_source, string message); | 134 OnMessage(string media_source, string message); |
134 | 135 |
135 // Called when issues are reported for media routes. | 136 // Called when issues are reported for media routes. |
136 OnIssue(Issue issue); | 137 OnIssue(Issue issue); |
137 | 138 |
138 // Called when list of routes has been updated. | 139 // Called when list of routes has been updated. |
139 OnRoutesUpdated(array<MediaRoute> routes); | 140 OnRoutesUpdated(array<MediaRoute> routes); |
140 }; | 141 }; |
141 | 142 |
OLD | NEW |