blob: 0309f3b63fe0159bd64888de75c6eddf8ca7711b [file] [log] [blame]
lesldf75bc12020-08-04 17:04:57 +08001/*
2 * Copyright 2020 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.hostapd@1.3;
18
lesldf75bc12020-08-04 17:04:57 +080019import @1.2::HostapdStatus;
leslc9d109f2020-09-16 22:45:00 +080020import @1.2::IHostapd.IfaceParams;
21import @1.2::IHostapd.NetworkParams;
22import @1.2::IHostapd;
lesldf75bc12020-08-04 17:04:57 +080023import IHostapdCallback;
lesld91c5402020-08-10 13:23:29 +080024
lesldf75bc12020-08-04 17:04:57 +080025/**
26 * Top-level object for managing SoftAPs.
27 */
28interface IHostapd extends @1.2::IHostapd {
29 /**
leslc9d109f2020-09-16 22:45:00 +080030 * Parameters to use for setting up the access point network.
31 */
32 struct NetworkParams {
33 /**
34 * Baseline information as defined in HAL 1.2.
35 */
36 @1.2::IHostapd.NetworkParams V1_2;
37
38 /**
39 * Enable the interworking service and set access network type to
40 * CHARGEABLE_PUBLIC_NETWORK when set to true.
41 */
42 bool isMetered;
43 };
44
45 /**
46 * Adds a new access point for hostapd to control.
47 *
48 * This should trigger the setup of an access point with the specified
49 * interface and network params.
50 *
51 * @param ifaceParams AccessPoint Params for the access point.
52 * @param nwParams Network Params for the access point.
53 * @return status Status of the operation.
54 * Possible status codes:
55 * |HostapdStatusCode.SUCCESS|,
56 * |HostapdStatusCode.FAILURE_ARGS_INVALID|,
57 * |HostapdStatusCode.FAILURE_UNKNOWN|,
58 * |HostapdStatusCode.FAILURE_IFACE_EXISTS|
59 */
60 addAccessPoint_1_3(@1.2::IHostapd.IfaceParams ifaceParams, NetworkParams nwParams)
61 generates (HostapdStatus status);
62
63 /**
lesldf75bc12020-08-04 17:04:57 +080064 * Register for callbacks from the hostapd service.
65 *
66 * These callbacks are invoked for global events that are not specific
67 * to any interface or network. Registration of multiple callback
68 * objects is supported. These objects must be deleted when the corresponding
69 * client process is dead.
70 *
71 * @param callback An instance of the |IHostapdCallback| HIDL interface
72 * object.
73 * @return status Status of the operation.
74 * Possible status codes:
75 * |HostapdStatusCode.SUCCESS|,
76 * |HostapdStatusCode.FAILURE_UNKNOWN|
77 */
lesld91c5402020-08-10 13:23:29 +080078 registerCallback_1_3(IHostapdCallback callback) generates (HostapdStatus status);
lesldf75bc12020-08-04 17:04:57 +080079};