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| via the media route |media_route_id|. |
98 // |media_route_id|. | 98 // If the operation was successful, |sent| is true; otherwise it is false. |
99 PostMessage(string media_route_id, string message); | 99 SendRouteMessage(string media_route_id, string message) => (bool sent); |
100 | 100 |
101 // Starts querying for sinks capable of displaying |media_source|. | 101 // Starts querying for sinks capable of displaying |media_source|. |
102 StartObservingMediaSinks(string media_source); | 102 StartObservingMediaSinks(string media_source); |
103 | 103 |
104 // Stops querying sinks for |media_source|. | 104 // Stops querying sinks for |media_source|. |
105 StopObservingMediaSinks(string media_source); | 105 StopObservingMediaSinks(string media_source); |
106 | 106 |
107 // Starts reporting the state of active media routes via | 107 // Starts reporting the state of active media routes via |
108 // OnRoutesUpdated(). Querying will continue until | 108 // OnRoutesUpdated(). Querying will continue until |
109 // StopObservingMediaRoutes() is called. | 109 // StopObservingMediaRoutes() is called. |
(...skipping 22 matching lines...) Expand all Loading... |
132 // Called when the Media Route Manager receives a route message. | 132 // Called when the Media Route Manager receives a route message. |
133 OnMessage(string media_source, string message); | 133 OnMessage(string media_source, string message); |
134 | 134 |
135 // Called when issues are reported for media routes. | 135 // Called when issues are reported for media routes. |
136 OnIssue(Issue issue); | 136 OnIssue(Issue issue); |
137 | 137 |
138 // Called when list of routes has been updated. | 138 // Called when list of routes has been updated. |
139 OnRoutesUpdated(array<MediaRoute> routes); | 139 OnRoutesUpdated(array<MediaRoute> routes); |
140 }; | 140 }; |
141 | 141 |
OLD | NEW |