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 Connect(int32 sink_id, int32 auth_method, string auth_data); | 13 Connect(int32 sink_id, int32 auth_method, string auth_data); |
14 | 14 |
15 // Drops the established connection to the connected sink. | 15 // Drops the established connection to the connected sink. |
16 Disconnect(); | 16 Disconnect(); |
17 | 17 |
18 // Sends a controlling mesage to the connected sink. | 18 // Sends a controlling mesage to the connected sink. |
19 SendMessage(string message); | 19 SendMessage(string message); |
20 }; | 20 }; |
21 | 21 |
22 interface WiFiDisplaySessionServiceClient { | 22 interface WiFiDisplaySessionServiceClient { |
23 // Notification of a successfull connection to a sink. | 23 // Notification of a successfull connection to a sink. |
24 OnConnected(int32 sink_id, string ip_address); | 24 OnEstablished(string ip_address); |
25 | 25 |
26 // Notification of a connection termination. | 26 // Notification of a session termination. |
27 OnDisconnected(int32 sink_id); | 27 OnTerminated(); |
28 | 28 |
29 // Notification of an error occurred during the session. | 29 // Notification of an error occurred during the session. |
30 OnError(int32 sink_id, int32 type, string description); | 30 OnError(int32 type, string description); |
31 | 31 |
32 // Invoked to transmit a controlling message from | 32 // Invoked to transmit a controlling message from |
33 // the connected sink. | 33 // the connected sink. |
34 OnMessage(string data); | 34 OnMessage(string data); |
35 }; | 35 }; |
OLD | NEW |