/* * Copyright (c) 2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /** * @file IWpaInterface.idl * * @brief Provides APIs to enable or disable a WLAN hotspot, scan for hotspots, connect to or disconnect from a WLAN hotspot, * set the country code, and manage network devices. * * @since 5.0 * @version 1.1 */ package ohos.hdi.wlan.wpa.v1_1; import ohos.hdi.wlan.wpa.v1_0.IWpaInterface; import ohos.hdi.wlan.wpa.v1_1.IWpaCallback; interface IWpaInterface extends ohos.hdi.wlan.wpa.v1_0.IWpaInterface { /** * @brief send p2p data to wpa. * * @param ifName Indicates the NIC name. * @param cmdType. * @param dataType. * @param carryData. * * @return Returns 0 if the operation is successful. * @return Returns a negative value if the operation fails. * * @since 5.0 * @version 1.1 */ DeliverP2pData([in] String ifName, [in] int cmdType, [in] int dataType, [in] String carryData); /** * @brief Registers a callback to listen for asynchronous events. * * @param cbFunc Indicates the callback to register. * @param ifName Indicates the NIC name. * * @return Returns 0 if the operation is successful. * @return Returns a negative value if the operation fails. * * @since 5.0 * @version 1.0 */ RegisterWpaEventCallback([in] IWpaCallback cbFunc, [in] String ifName); /** * @brief Unregisters a callback. * * @param cbFunc Indicates the callback to unregister. * @param ifName Indicates the NIC name. * * @return Returns 0 if the operation is successful. * @return Returns a negative value if the operation fails. * * @since 5.0 * @version 1.0 */ UnregisterWpaEventCallback([in] IWpaCallback cbFunc, [in] String ifName); }