blob: 600df3036648ce1a44a687a68d0d3773c6ff5c28 [file] [log] [blame]
Roshan Pius9a3a84f2016-09-15 13:02:25 -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
Roshan Pius22ab8b22016-09-28 13:35:42 -070017package android.hardware.wifi.supplicant@1.0;
Roshan Pius9a3a84f2016-09-15 13:02:25 -070018
Roshan Pius9a3a84f2016-09-15 13:02:25 -070019import ISupplicantNetwork;
20
21/**
Roshan Pius8c6a8772016-11-03 09:37:57 -070022 * Interface exposed by the supplicant for each network interface (e.g wlan0)
Roshan Pius9a3a84f2016-09-15 13:02:25 -070023 * it controls.
24 */
25interface ISupplicantIface {
26 /**
27 * Retrieves the name of the network interface.
28 *
29 * @return status Status of the operation.
30 * Possible status codes:
31 * |SupplicantStatusCode.SUCCESS|,
32 * |SupplicantStatusCode.FAILURE_IFACE_INVALID|
33 * @return name Name of the network interface, e.g., wlan0
34 */
35 getName() generates (SupplicantStatus status, string name);
36
37 /**
Roshan Pius39f588f2016-10-31 14:51:27 -070038 * Retrieves the type of the network interface.
39 *
40 * @return status Status of the operation.
41 * Possible status codes:
42 * |SupplicantStatusCode.SUCCESS|,
43 * |SupplicantStatusCode.FAILURE_IFACE_INVALID|
44 * @return type Type of the network interface, e.g., STA.
45 */
46 getType() generates (SupplicantStatus status, IfaceType type);
47
48 /**
Roshan Pius9a3a84f2016-09-15 13:02:25 -070049 * Add a new network to the interface.
50 *
51 * @return status Status of the operation.
52 * Possible status codes:
53 * |SupplicantStatusCode.SUCCESS|,
54 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
55 * |SupplicantStatusCode.FAILURE_IFACE_INVALID|
56 * @return network HIDL interface object representing the new network if
57 * successful, null otherwise.
58 */
59 addNetwork()
60 generates (SupplicantStatus status, ISupplicantNetwork network);
61
62 /**
63 * Remove a network from the interface.
64 *
65 * Use |ISupplicantNetwork.getId()| on the corresponding network HIDL
66 * interface object to retrieve the ID.
67 *
68 * @param id Network ID allocated to the corresponding network.
69 * @return status Status of the operation.
70 * Possible status codes:
71 * |SupplicantStatusCode.SUCCESS|,
72 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
73 * |SupplicantStatusCode.FAILURE_IFACE_INVALID|,
74 * |SupplicantStatusCode.FAILURE_NETWORK_UNKNOWN|
75 */
76 removeNetwork(SupplicantNetworkId id)
77 generates (SupplicantStatus status);
78
79 /**
80 * Gets a HIDL interface object for the network corresponding to the
81 * |SupplicantNetworkId|.
82 *
83 * Use |ISupplicantNetwork.getId()| on the corresponding network HIDL
84 * interface object to retrieve the ID.
85 *
86 * @param id Network ID allocated to the corresponding network.
87 * @return status Status of the operation.
88 * Possible status codes:
89 * |SupplicantStatusCode.SUCCESS|,
90 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
91 * |SupplicantStatusCode.FAILURE_IFACE_INVALID|,
92 * |SupplicantStatusCode.FAILURE_NETWORK_UNKNOWN|
93 * @return network HIDL interface object representing the new network if
94 * successful, null otherwise.
95 */
96 getNetwork(SupplicantNetworkId id)
97 generates (SupplicantStatus status, ISupplicantNetwork network);
98
99 /**
Roshan Pius8c6a8772016-11-03 09:37:57 -0700100 * Retrieve a list of all the network Id's controlled by the supplicant.
Roshan Pius9a3a84f2016-09-15 13:02:25 -0700101 *
102 * The corresponding |ISupplicantNetwork| object for any network can be
103 * retrieved using |getNetwork| method.
104 *
105 * @return status Status of the operation.
106 * Possible status codes:
107 * |SupplicantStatusCode.SUCCESS|,
108 * |SupplicantStatusCode.FAILURE_UNKNOWN|
Roshan Pius8c6a8772016-11-03 09:37:57 -0700109 * @return networkIds List of all network Id's controlled by the supplicant.
Roshan Pius9a3a84f2016-09-15 13:02:25 -0700110 */
111 listNetworks()
112 generates (SupplicantStatus status, vec<SupplicantNetworkId> networkIds);
Roshan Pius9a3a84f2016-09-15 13:02:25 -0700113};