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