1 /* 2 * Copyright (C) 2021-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 #ifndef OHOS_HARDWARE_BT_V1_0_IBTHCICALLBACKS_H 17 #define OHOS_HARDWARE_BT_V1_0_IBTHCICALLBACKS_H 18 19 #include <vector> 20 #include <string> 21 #include <cstdint> 22 #include <hdf_log.h> 23 #include <iservmgr_hdi.h> 24 #include "ohos/hardware/bt/v1_0/types.h" 25 26 namespace ohos { 27 namespace hardware { 28 namespace bt { 29 namespace v1_0 { 30 using namespace OHOS; 31 32 enum { 33 CMD_ON_INITED, 34 CMD_ON_RECEIVED_HCI_PACKET, 35 }; 36 37 class IBtHciCallbacks : public IRemoteBroker { 38 public: 39 DECLARE_INTERFACE_DESCRIPTOR(u"ohos.hardware.bt.v1_0.IBtHciCallbacks"); 40 41 virtual ~IBtHciCallbacks() = default; 42 43 virtual int32_t OnInited(BtStatus status) = 0; 44 45 virtual int32_t OnReceivedHciPacket(BtType type, const std::vector<uint8_t>& data) = 0; 46 }; 47 } // v1_0 48 } // bt 49 } // hardware 50 } // ohos 51 52 #endif // OHOS_HARDWARE_BT_V1_0_IBTHCICALLBACKS_H 53 54