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 OnEstablished(string ip_address); | 26 OnConnected(string ip_address); |
| 27 |
| 28 // Notification of a handled connection request. |
| 29 OnConnectRequestHandled(bool success, string error_message); |
27 | 30 |
28 // Notification of a session termination. | 31 // Notification of a session termination. |
29 OnTerminated(); | 32 OnTerminated(); |
30 | 33 |
| 34 // Notification of a handled termination request. |
| 35 OnDisconnectRequestHandled(bool success, string error_message); |
| 36 |
31 // Notification of an error occurred during the session. | 37 // Notification of an error occurred during the session. |
32 // Note: 'type' values must correspond to 'enum ErrorType' | 38 // Note: 'type' values must correspond to 'enum ErrorType' |
33 // from display_source.idl | 39 // from display_source.idl |
34 OnError(int32 type, string description); | 40 OnError(int32 type, string description); |
35 | 41 |
36 // Invoked to transmit a controlling message from | 42 // Invoked to transmit a controlling message from |
37 // the connected sink. | 43 // the connected sink. |
38 OnMessage(string data); | 44 OnMessage(string data); |
39 }; | 45 }; |
OLD | NEW |