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_IBTHCI_SERVICE_H 17 #define OHOS_HARDWARE_BT_V1_0_IBTHCI_SERVICE_H 18 19 #include <string> 20 #include <cstdint> 21 #include <hdf_log.h> 22 #include <iservmgr_hdi.h> 23 #include "ohos/hardware/bt/v1_0/types.h" 24 #include "ibt_hci_callbacks.h" 25 26 namespace ohos { 27 namespace hardware { 28 namespace bt { 29 namespace v1_0 { 30 using namespace OHOS; 31 32 enum class HciCmd { 33 CMD_INIT, 34 CMD_SEND_HCI_PACKET, 35 CMD_CLOSE, 36 }; 37 38 class IBtHci { 39 public: ~IBtHci()40 virtual ~IBtHci() {} 41 42 virtual int32_t Init(const sptr<IBtHciCallbacks>& callbacks) = 0; 43 44 virtual int32_t SendHciPacket(BtType type, const std::vector<uint8_t>& data) = 0; 45 46 virtual int32_t Close() = 0; 47 }; 48 } // v1_0 49 } // bt 50 } // hardware 51 } // ohos 52 53 #endif // OHOS_HARDWARE_BT_V1_0_IBTHCI_SERVICE_H 54 55