| 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, |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 SendRouteBinaryMessage(string media_route_id, array<uint8> data) | 153 SendRouteBinaryMessage(string media_route_id, array<uint8> data) |
| 154 => (bool sent); | 154 => (bool sent); |
| 155 | 155 |
| 156 // Starts querying for sinks capable of displaying |media_source|. | 156 // Starts querying for sinks capable of displaying |media_source|. |
| 157 StartObservingMediaSinks(string media_source); | 157 StartObservingMediaSinks(string media_source); |
| 158 | 158 |
| 159 // Stops querying sinks for |media_source|. | 159 // Stops querying sinks for |media_source|. |
| 160 StopObservingMediaSinks(string media_source); | 160 StopObservingMediaSinks(string media_source); |
| 161 | 161 |
| 162 // Starts reporting the state of active media routes via | 162 // Starts reporting the state of active media routes via |
| 163 // OnRoutesUpdated(). Querying will continue until | 163 // OnRoutesUpdated() in the context of the |media_source|. |
| 164 // StopObservingMediaRoutes() is called. | 164 // The |media_source| should be considered when returning joinable |
| 165 StartObservingMediaRoutes(); | 165 // routes in the OnRoutesUpdated() call. |
| 166 // Querying will continue until StopObservingMediaRoutes() is called. |
| 167 StartObservingMediaRoutes(string media_source); |
| 166 | 168 |
| 167 // Stops querying the state of all media routes. | 169 // Stops querying the state of all media routes in the context of |
| 168 StopObservingMediaRoutes(); | 170 // the |media_source|. |
| 171 StopObservingMediaRoutes(string media_source); |
| 169 | 172 |
| 170 // Called when the MediaRouter is ready to get the next batch of messages | 173 // Called when the MediaRouter is ready to get the next batch of messages |
| 171 // associated with |route_id|. | 174 // associated with |route_id|. |
| 172 // |messages| returned will contain the batch of messages. | 175 // |messages| returned will contain the batch of messages. |
| 173 // |messages| will be empty if |StopListeningForRouteMessages| was invoked. | 176 // |messages| will be empty if |StopListeningForRouteMessages| was invoked. |
| 174 // |error| indicates if a permanent error occurred. If true, then subsequent | 177 // |error| indicates if a permanent error occurred. If true, then subsequent |
| 175 // calls will also return with |error| being true. | 178 // calls will also return with |error| being true. |
| 176 ListenForRouteMessages(string route_id) => | 179 ListenForRouteMessages(string route_id) => |
| 177 (array<RouteMessage> messages, bool error); | 180 (array<RouteMessage> messages, bool error); |
| 178 | 181 |
| (...skipping 27 matching lines...) Expand all Loading... |
| 206 // process. | 209 // process. |
| 207 RegisterMediaRouteProvider(MediaRouteProvider media_router_provider) => | 210 RegisterMediaRouteProvider(MediaRouteProvider media_router_provider) => |
| 208 (string instance_id); | 211 (string instance_id); |
| 209 | 212 |
| 210 // Called when the Media Route Manager receives a new list of sinks. | 213 // Called when the Media Route Manager receives a new list of sinks. |
| 211 OnSinksReceived(string media_source, array<MediaSink> sinks); | 214 OnSinksReceived(string media_source, array<MediaSink> sinks); |
| 212 | 215 |
| 213 // Called when issues are reported for media routes. | 216 // Called when issues are reported for media routes. |
| 214 OnIssue(Issue issue); | 217 OnIssue(Issue issue); |
| 215 | 218 |
| 216 // Called when list of routes has been updated. | 219 // Called when list of routes has been updated in the context of the |
| 217 OnRoutesUpdated(array<MediaRoute> routes); | 220 // calling |media_source|. The array |joinable_route_ids| should |
| 221 // contain route IDs of joinable routes found in the |routes| array. |
| 222 OnRoutesUpdated(string media_source, array<MediaRoute> routes, |
| 223 array<string> joinable_route_ids); |
| 218 | 224 |
| 219 // Called when the overall availability of media sinks has been updated. | 225 // Called when the overall availability of media sinks has been updated. |
| 220 OnSinkAvailabilityUpdated(SinkAvailability availability); | 226 OnSinkAvailabilityUpdated(SinkAvailability availability); |
| 221 }; | 227 }; |
| 222 | 228 |
| OLD | NEW |