/*
* Copyright (c) 2022 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.
*/
/**
* @addtogroup HdiHci
* @{
*
* @brief Provides unified APIs for the HCI service.
*
* The Host can use the interface provided by the module to initialize the HCI(Host Controller Interface),
* and exchange data with the Controller through the service.
*
* @since 3.2
*/
/**
* @file IHciCallback.idl
*
* @brief Defines the HCI callback function, including the initialization result and data received from the controller.
*
* @since 3.2
* @version 1.0
*/
package ohos.hdi.bluetooth.hci.v1_0;
import ohos.hdi.bluetooth.hci.v1_0.HciTypes;
/**
* @brief Defines the HCI callback function, including the initialization result and data received from the controller.
*
* @since 3.2
*/
[callback] interface IHciCallback {
/**
* @brief HCI initialization callback function.
*
* @param status Indicates the HCI initialization result. For details, see {@link BtStatus}.
* @return Returns 0 if the initialization result is returned successfully; returns a negative value otherwise.
*
* @since 3.2
* @version 1.0
*/
OnInited([in] enum BtStatus status);
/**
* @brief Receives data packets sent by the controller..
*
* @param type Indicates the HCI packet type. For details, see {@link BtType}.
* @param data Indicates the HCI data packets received from the Controller.
* @return Returns 0 if the data is received successfully; returns a negative value otherwise.
*
* @since 3.2
* @version 1.0
*/
OnReceivedHciPacket([in] enum BtType type, [in] unsigned char[] data);
}