1c5e268c6Sopenharmony_ci/* 2c5e268c6Sopenharmony_ci * Copyright (c) 2024 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 CHIP 18c5e268c6Sopenharmony_ci * @{ 19c5e268c6Sopenharmony_ci * 20c5e268c6Sopenharmony_ci * @brief Provides APIs for the upper-layer WLAN service. 21c5e268c6Sopenharmony_ci * 22c5e268c6Sopenharmony_ci * You can use the APIs to manager the wifi chip, init and release the wifi chip, create and remove iface, register callback 23c5e268c6Sopenharmony_ci * get the name and type of the iface, get the support frequencies and set the mode of chip. 24c5e268c6Sopenharmony_ci * 25c5e268c6Sopenharmony_ci * @since 5.0 26c5e268c6Sopenharmony_ci * @version 1.0 27c5e268c6Sopenharmony_ci */ 28c5e268c6Sopenharmony_ci 29c5e268c6Sopenharmony_ci/** 30c5e268c6Sopenharmony_ci * @file IChipController.idl 31c5e268c6Sopenharmony_ci * 32c5e268c6Sopenharmony_ci * @brief Provides APIs to controller the wifi chip, register wifi event callback, init or release wifi chip, get available chips 33c5e268c6Sopenharmony_ci * and get the wifi chip service. 34c5e268c6Sopenharmony_ci * 35c5e268c6Sopenharmony_ci * @since 5.0 36c5e268c6Sopenharmony_ci * @version 1.0 37c5e268c6Sopenharmony_ci */ 38c5e268c6Sopenharmony_ci 39c5e268c6Sopenharmony_ci/** 40c5e268c6Sopenharmony_ci * @brief Defines the package path of the chip module interface. 41c5e268c6Sopenharmony_ci * 42c5e268c6Sopenharmony_ci * @since 5.0 43c5e268c6Sopenharmony_ci * @version 1.0 44c5e268c6Sopenharmony_ci */ 45c5e268c6Sopenharmony_ci 46c5e268c6Sopenharmony_cipackage ohos.hdi.wlan.chip.v1_0; 47c5e268c6Sopenharmony_ci 48c5e268c6Sopenharmony_ciimport ohos.hdi.wlan.chip.v1_0.ChipTypes; 49c5e268c6Sopenharmony_ciimport ohos.hdi.wlan.chip.v1_0.IChipControllerCallback; 50c5e268c6Sopenharmony_ciimport ohos.hdi.wlan.chip.v1_0.IConcreteChip; 51c5e268c6Sopenharmony_ci 52c5e268c6Sopenharmony_ciinterface IChipController { 53c5e268c6Sopenharmony_ci /** 54c5e268c6Sopenharmony_ci * @brief Registers wifi event callback messages. 55c5e268c6Sopenharmony_ci * 56c5e268c6Sopenharmony_ci * @param eventCallback Indicates the register callback messages. 57c5e268c6Sopenharmony_ci * 58c5e268c6Sopenharmony_ci * @return Returns <b>0</b> if the operation is successful. 59c5e268c6Sopenharmony_ci * @return Returns a negative value if the operation fails. 60c5e268c6Sopenharmony_ci * 61c5e268c6Sopenharmony_ci * @since 5.0 62c5e268c6Sopenharmony_ci * @version 1.0 63c5e268c6Sopenharmony_ci */ 64c5e268c6Sopenharmony_ci RegisterWifiEventCallback([in] IChipControllerCallback eventCallback); 65c5e268c6Sopenharmony_ci 66c5e268c6Sopenharmony_ci /** 67c5e268c6Sopenharmony_ci * @brief Checkes if the hdi service is inited. 68c5e268c6Sopenharmony_ci * 69c5e268c6Sopenharmony_ci * @param started Indicates if the hdi service is inited. 70c5e268c6Sopenharmony_ci * 71c5e268c6Sopenharmony_ci * @return Returns <b>0</b> if the operation is successful. 72c5e268c6Sopenharmony_ci * @return Returns a negative value if the operation fails. 73c5e268c6Sopenharmony_ci * 74c5e268c6Sopenharmony_ci * @since 5.0 75c5e268c6Sopenharmony_ci * @version 1.0 76c5e268c6Sopenharmony_ci */ 77c5e268c6Sopenharmony_ci IsInit([out] boolean inited); 78c5e268c6Sopenharmony_ci 79c5e268c6Sopenharmony_ci /** 80c5e268c6Sopenharmony_ci * @brief Inites the wifi hdi service. 81c5e268c6Sopenharmony_ci * 82c5e268c6Sopenharmony_ci * @return Returns <b>0</b> if the operation is successful. 83c5e268c6Sopenharmony_ci * @return Returns a negative value if the operation fails. 84c5e268c6Sopenharmony_ci * 85c5e268c6Sopenharmony_ci * @since 5.0 86c5e268c6Sopenharmony_ci * @version 1.0 87c5e268c6Sopenharmony_ci */ 88c5e268c6Sopenharmony_ci Init(); 89c5e268c6Sopenharmony_ci 90c5e268c6Sopenharmony_ci /** 91c5e268c6Sopenharmony_ci * @brief Releases the wifi hdi service. 92c5e268c6Sopenharmony_ci * 93c5e268c6Sopenharmony_ci * @return Returns <b>0</b> if the operation is successful. 94c5e268c6Sopenharmony_ci * @return Returns a negative value if the operation fails. 95c5e268c6Sopenharmony_ci * 96c5e268c6Sopenharmony_ci * @since 5.0 97c5e268c6Sopenharmony_ci * @version 1.0 98c5e268c6Sopenharmony_ci */ 99c5e268c6Sopenharmony_ci Release(); 100c5e268c6Sopenharmony_ci 101c5e268c6Sopenharmony_ci /** 102c5e268c6Sopenharmony_ci * @brief Obtains the id of chips. 103c5e268c6Sopenharmony_ci * 104c5e268c6Sopenharmony_ci * @param chipIds Indicates the id of chips. 105c5e268c6Sopenharmony_ci * 106c5e268c6Sopenharmony_ci * @return Returns <b>0</b> if the operation is successful. 107c5e268c6Sopenharmony_ci * @return Returns a negative value if the operation fails. 108c5e268c6Sopenharmony_ci * 109c5e268c6Sopenharmony_ci * @since 5.0 110c5e268c6Sopenharmony_ci * @version 1.0 111c5e268c6Sopenharmony_ci */ 112c5e268c6Sopenharmony_ci GetAvailableChips([out] unsigned int[] chipIds); 113c5e268c6Sopenharmony_ci 114c5e268c6Sopenharmony_ci /** 115c5e268c6Sopenharmony_ci * @brief Obtains the chip service corresponding to the chip id. 116c5e268c6Sopenharmony_ci * 117c5e268c6Sopenharmony_ci * @param chipId Indicates the id of the chip. 118c5e268c6Sopenharmony_ci * @param chip Indicates the chip service object of the chip id. 119c5e268c6Sopenharmony_ci * 120c5e268c6Sopenharmony_ci * @return Returns <b>0</b> if the operation is successful. 121c5e268c6Sopenharmony_ci * @return Returns a negative value if the operation fails. 122c5e268c6Sopenharmony_ci * 123c5e268c6Sopenharmony_ci * @since 5.0 124c5e268c6Sopenharmony_ci * @version 1.0 125c5e268c6Sopenharmony_ci */ 126c5e268c6Sopenharmony_ci GetChipService([in] unsigned int chipId, [out] IConcreteChip chip); 127c5e268c6Sopenharmony_ci}; 128c5e268c6Sopenharmony_ci/** @} */