lesl | df75bc1 | 2020-08-04 17:04:57 +0800 | [diff] [blame] | 1 | /* |
| 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 | |
| 17 | package android.hardware.wifi.hostapd@1.3; |
| 18 | |
lesl | df75bc1 | 2020-08-04 17:04:57 +0800 | [diff] [blame] | 19 | import @1.2::HostapdStatus; |
lesl | c9d109f | 2020-09-16 22:45:00 +0800 | [diff] [blame^] | 20 | import @1.2::IHostapd.IfaceParams; |
| 21 | import @1.2::IHostapd.NetworkParams; |
| 22 | import @1.2::IHostapd; |
lesl | df75bc1 | 2020-08-04 17:04:57 +0800 | [diff] [blame] | 23 | import IHostapdCallback; |
lesl | d91c540 | 2020-08-10 13:23:29 +0800 | [diff] [blame] | 24 | |
lesl | df75bc1 | 2020-08-04 17:04:57 +0800 | [diff] [blame] | 25 | /** |
| 26 | * Top-level object for managing SoftAPs. |
| 27 | */ |
| 28 | interface IHostapd extends @1.2::IHostapd { |
| 29 | /** |
lesl | c9d109f | 2020-09-16 22:45:00 +0800 | [diff] [blame^] | 30 | * 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 | /** |
lesl | df75bc1 | 2020-08-04 17:04:57 +0800 | [diff] [blame] | 64 | * 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 | */ |
lesl | d91c540 | 2020-08-10 13:23:29 +0800 | [diff] [blame] | 78 | registerCallback_1_3(IHostapdCallback callback) generates (HostapdStatus status); |
lesl | df75bc1 | 2020-08-04 17:04:57 +0800 | [diff] [blame] | 79 | }; |