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
17package android.hardware.wifi.hostapd@1.3;
18
19import @1.1::IHostapdCallback;
20import @1.2::MacAddress;
21import Bandwidth;
22import Generation;
23
24/**
25 * Top-level callback object for managing SoftAPs.
26 */
27interface IHostapdCallback extends @1.1::IHostapdCallback {
28    /**
29     * Invoked when information changes for one of the AP instances.
30     *
31     * @param ifaceName Name of the interface which was added via
32     * |IHostapd.addAccessPoint|.
33     * @param apIfaceInstance The identity of the AP instance. The interface
34     * will have two instances (e.q. 2.4 Ghz AP and 5 GHz AP) in dual AP mode.
35     * The apIfaceInstance can be used to identify which instance the callback
36     * is from.
37     * Note: The apIfaceInstance must be same as ifaceName in single AP mode.
38     * @param freqMhz The operational frequency of the AP in Mhz.
39     * @param bandwidth The operational bandwidth of the AP.
40     * @param generation The operational mode of the AP (e.g. 11ac, 11ax).
41     * @param apIfaceInstanceMacAddress MAC Address of the apIfaceInstance.
42     */
43    oneway onApInstanceInfoChanged(string ifaceName, string apIfaceInstance, uint32_t freqMhz,
44        Bandwidth bandwidth, Generation generation, MacAddress apIfaceInstanceMacAddress);
45
46    /**
47     * Invoked when a client connects/disconnects from the hotspot.
48     *
49     * @param ifaceName Name of the interface which was added via
50     * |IHostapd.addAccessPoint|.
51     * @param apIfaceInstance The identity of the AP instance. The interface
52     * will have two instances in dual AP mode. The apIfaceInstance can be used
53     * to identify which instance the callback is from.
54     * Note: The apIfaceInstance must be same as ifaceName in single AP mode.
55     * @param clientAddress MAC Address of hotspot client.
56     * @param isConnected true when client connected, false when client
57     * disconnected.
58     */
59    oneway onConnectedClientsChanged(string ifaceName, string apIfaceInstance,
60        MacAddress clientAddress, bool isConnected);
61};
62