1 /*
2  * Copyright (c) 2022 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 /**
17  * @addtogroup WLAN
18  * @{
19  *
20  * @brief Defines APIs for the upper-layer WLAN service.
21  *
22  * You can use the APIs to enable or disable a WLAN hotspot, scan for hotspots, connect to a WLAN hotspot,
23  * manage WLAN chips, network devices, and power, and apply for, release, and move network data buffers.
24  *
25  * @since 3.2
26  * @version 1.0
27  */
28 
29 /**
30  * @file IWlanCallback.idl
31  *
32  * @brief Provides callbacks to be invoked when the WLAN driver is restarted, the scan result is returned,
33  * and a Netlink message is received.
34  *
35  * @since 3.2
36  * @version 1.0
37  */
38 
39 /**
40  * @brief Defines the package path of the WLAN module interface.
41  *
42  * @since 3.2
43  * @version 1.0
44  */
45 package ohos.hdi.wlan.v1_0;
46 
47 import ohos.hdi.wlan.v1_0.WlanTypes;
48 
49 /**
50  * @brief Defines the callbacks of the WLAN module.
51  *
52  * The callback is invoked to continue the subsequent processing when the WLAN module restarts, hotspot scan ends,
53  * or a Netlink message is received.
54  *
55  * @since 3.2
56  * @version 1.0
57  */
58 [callback] interface IWlanCallback {
59     /**
60      * @brief Called to process the result returned when the WLAN driver restarts.
61      *
62      * @param event Indicates the ID of a driver restart event.
63      * @param code Indicates the result returned when the driver is restarted.
64      * @param ifName Indicates the network interface card (NIC) name.
65      *
66      * @since 3.2
67      * @version 1.0
68      */
69     ResetDriverResult([in] unsigned int event, [in] int code, [in] String ifName);
70 
71     /**
72      * @brief Called to process the scan result returned when a scan ends.
73      *
74      * @param event Indicates the ID of a scan result event.
75      * @param scanResult Indicates the scan result.
76      * @param ifName Indicates the NIC name.
77      *
78      * @since 3.2
79      * @version 1.0
80      */
81     ScanResult([in] unsigned int event, [in] struct HdfWifiScanResult scanResult, [in] String ifName);
82 
83     /**
84      * @brief Called to process the Netlink message received.
85      *
86      * @param recvMsg Indicates the Netlink message received.
87      *
88      * @since 3.2
89      * @version 1.0
90      */
91     WifiNetlinkMessage([in] unsigned char[] recvMsg);
92 }
93 /** @} */
94