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 extensions; | 5 module extensions; |
6 | 6 |
7 // WiFiDisplaySessionService class provides access to the network for | 7 // WiFiDisplaySessionService class provides access to the network for |
8 // the render-hosted Wi-Fi Display session. | 8 // the render-hosted Wi-Fi Display session. |
9 interface WiFiDisplaySessionService { | 9 interface WiFiDisplaySessionService { |
10 SetClient(WiFiDisplaySessionServiceClient client); | 10 SetClient(WiFiDisplaySessionServiceClient client); |
11 | 11 |
12 // Requires connection to a sink using the given authentication information. | 12 // Requires connection to a sink using the given authentication information. |
13 // Note: 'auth_method' values must correspond to 'enum AuthenticationMethod' | 13 // Note: 'auth_method' values must correspond to 'enum AuthenticationMethod' |
14 // from display_source.idl | 14 // from display_source.idl |
15 Connect(int32 sink_id, int32 auth_method, string auth_data); | 15 Connect(int32 sink_id, int32 auth_method, string auth_data); |
16 | 16 |
17 // Drops the established connection to the connected sink. | 17 // Drops the established connection to the connected sink. |
18 Disconnect(); | 18 Disconnect(); |
19 | 19 |
20 // Sends a controlling mesage to the connected sink. | 20 // Sends a controlling mesage to the connected sink. |
21 SendMessage(string message); | 21 SendMessage(string message); |
22 }; | 22 }; |
23 | 23 |
24 interface WiFiDisplaySessionServiceClient { | 24 interface WiFiDisplaySessionServiceClient { |
25 // Notification of a successfull connection to a sink. | 25 // Notification of a successfull connection to a sink. |
26 OnConnected(string ip_address); | 26 OnConnected(string local_ip_address, string sink_ip_address); |
27 | 27 |
28 // Notification of a handled connection request. | 28 // Notification of a handled connection request. |
29 OnConnectRequestHandled(bool success, string error_message); | 29 OnConnectRequestHandled(bool success, string error_message); |
30 | 30 |
31 // Notification of a session termination. | 31 // Notification of a session termination. |
32 OnTerminated(); | 32 OnTerminated(); |
33 | 33 |
34 // Notification of a handled termination request. | 34 // Notification of a handled termination request. |
35 OnDisconnectRequestHandled(bool success, string error_message); | 35 OnDisconnectRequestHandled(bool success, string error_message); |
36 | 36 |
37 // Notification of an error occurred during the session. | 37 // Notification of an error occurred during the session. |
38 // Note: 'type' values must correspond to 'enum ErrorType' | 38 // Note: 'type' values must correspond to 'enum ErrorType' |
39 // from display_source.idl | 39 // from display_source.idl |
40 OnError(int32 type, string description); | 40 OnError(int32 type, string description); |
41 | 41 |
42 // Invoked to transmit a controlling message from | 42 // Invoked to transmit a controlling message from |
43 // the connected sink. | 43 // the connected sink. |
44 OnMessage(string data); | 44 OnMessage(string data); |
45 }; | 45 }; |
| 46 |
| 47 // This interface is used to send media stream to the |
| 48 // connected sink. |
| 49 interface WiFiDisplayMediaService { |
| 50 // Sets the destination point for sending media stream. |
| 51 SetDesinationPoint(string ip_address, int32 port) => (bool success); |
| 52 |
| 53 // Sends media packet to the destination point. |
| 54 SendMediaPacket(array<uint8> packet); |
| 55 }; |
OLD | NEW |