blob: d32b47e85ce6057eed57533b6ca8a035d7d95fb2 [file] [log] [blame]
Roshan Pius39f588f2016-10-31 14:51:27 -07001/*
2 * Copyright 2016 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package android.hardware.wifi.supplicant@1.0;
18
19import ISupplicantNetwork;
20import ISupplicantP2pNetworkCallback;
21
22/**
Roshan Pius8c6a8772016-11-03 09:37:57 -070023 * Interface exposed by the supplicant for each P2P mode network
Roshan Pius39f588f2016-10-31 14:51:27 -070024 * configuration it controls.
25 */
26interface ISupplicantP2pNetwork extends ISupplicantNetwork {
27 /**
28 * Register for callbacks from this network.
29 *
30 * These callbacks are invoked for events that are specific to this network.
31 * Registration of multiple callback objects is supported. These objects must
32 * be automatically deleted when the corresponding client process is dead or
33 * if this network is removed.
34 *
35 * @param callback An instance of the |ISupplicantP2pNetworkCallback| HIDL
36 * interface object.
37 * @return status P2ptus of the operation.
38 * Possible status codes:
39 * |SupplicantP2ptusCode.SUCCESS|,
40 * |SupplicantP2ptusCode.FAILURE_UNKNOWN|,
41 * |SupplicantP2ptusCode.FAILURE_NETWORK_INVALID|
42 */
43 registerCallback(ISupplicantP2pNetworkCallback callback)
44 generates (SupplicantStatus status);
Roshan Pius09f2ce32017-01-11 14:05:17 -080045
46 /**
47 * Getters for the various network params.
48 */
49 /**
50 * Get SSID for this network.
51 *
52 * @return status Status of the operation.
53 * Possible status codes:
54 * |SupplicantStatusCode.SUCCESS|,
55 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
56 * @return ssid value set.
57 */
58 getSsid() generates (SupplicantStatus status, Ssid ssid);
59
60 /**
61 * Get the BSSID set for this network.
62 *
63 * @return status Status of the operation.
64 * Possible status codes:
65 * |SupplicantStatusCode.SUCCESS|,
66 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
67 * @return bssid value set.
68 */
69 getBssid() generates (SupplicantStatus status, Bssid bssid);
70
71 /**
72 * Check if the network is currently active one.
73 *
74 * @return status Status of the operation.
75 * Possible status codes:
76 * |SupplicantStatusCode.SUCCESS|,
77 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
78 * @return isCurrent true if current, false otherwise.
79 */
80 isCurrent() generates (SupplicantStatus status, bool isCurrent);
81
82 /**
83 * Check if the network is marked persistent.
84 *
85 * @return status Status of the operation.
86 * Possible status codes:
87 * |SupplicantStatusCode.SUCCESS|,
88 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
89 * @return isPersistent true if persistent, false otherwise.
90 */
91 isPersistent() generates (SupplicantStatus status, bool isPersistent);
92
93 /**
94 * Check if the device is the group owner of the network.
95 *
96 * @return status Status of the operation.
97 * Possible status codes:
98 * |SupplicantStatusCode.SUCCESS|,
99 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
100 * @return isGo true if group owner, false otherwise.
101 */
102 isGo() generates (SupplicantStatus status, bool isGo);
Roshan Pius39f588f2016-10-31 14:51:27 -0700103};