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 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
274 | 274 |
275 // Called when there are no more listeners for messages for |route_id|. | 275 // Called when there are no more listeners for messages for |route_id|. |
276 // Calling this will resolve the pending |ListenForRouteMessages| callback | 276 // Calling this will resolve the pending |ListenForRouteMessages| callback |
277 // with an empty list. | 277 // with an empty list. |
278 StopListeningForRouteMessages(string route_id); | 278 StopListeningForRouteMessages(string route_id); |
279 | 279 |
280 // Indicates that a PresentationConnection that was connected to route | 280 // Indicates that a PresentationConnection that was connected to route |
281 // |route_id| has been closed (via .close(), garbage collection or | 281 // |route_id| has been closed (via .close(), garbage collection or |
282 // navigation). | 282 // navigation). |
283 DetachRoute(string route_id); | 283 DetachRoute(string route_id); |
| 284 |
| 285 // Enables mDNS discovery. No-op if mDNS discovery is already enabled. |
| 286 // Calling this will trigger a firewall prompt on Windows if there is not |
| 287 // already a firewall rule for mDNS. |
| 288 EnableMdnsDiscovery(); |
284 }; | 289 }; |
285 | 290 |
286 // Interface for a service which observes state changes across media | 291 // Interface for a service which observes state changes across media |
287 // sources, sinks, and issues. | 292 // sources, sinks, and issues. |
288 interface MediaRouter { | 293 interface MediaRouter { |
289 | 294 |
290 // Represents overall media sink availability states. | 295 // Represents overall media sink availability states. |
291 // UNAVAILABLE - No sinks are available. | 296 // UNAVAILABLE - No sinks are available. |
292 // PER_SOURCE - Sinks are available, but are only compatible with specific | 297 // PER_SOURCE - Sinks are available, but are only compatible with specific |
293 // media sources. | 298 // media sources. |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
341 // changed to |state|. | 346 // changed to |state|. |
342 OnPresentationConnectionStateChanged( | 347 OnPresentationConnectionStateChanged( |
343 string route_id, PresentationConnectionState state); | 348 string route_id, PresentationConnectionState state); |
344 | 349 |
345 // Called when the presentation connected to route |route_id| has closed. | 350 // Called when the presentation connected to route |route_id| has closed. |
346 OnPresentationConnectionClosed( | 351 OnPresentationConnectionClosed( |
347 string route_id, PresentationConnectionCloseReason reason, | 352 string route_id, PresentationConnectionCloseReason reason, |
348 string message); | 353 string message); |
349 }; | 354 }; |
350 | 355 |
OLD | NEW |