1 /*
2  * Copyright 2019 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef HIDL_GENERATED_android_hardware_bluetooth_V1_1_BluetoothHci_H_
18 #define HIDL_GENERATED_android_hardware_bluetooth_V1_1_BluetoothHci_H_
19 
20 #include <android/hardware/bluetooth/1.1/IBluetoothHci.h>
21 #include <android/hardware/bluetooth/1.1/IBluetoothHciCallbacks.h>
22 
23 #include <hidl/MQDescriptor.h>
24 
25 #include <functional>
26 
27 namespace android {
28 namespace hardware {
29 namespace bluetooth {
30 namespace V1_1 {
31 namespace implementation {
32 
33 using ::android::hardware::hidl_vec;
34 using ::android::hardware::Return;
35 
36 class BluetoothDeathRecipient;
37 
38 class BluetoothHci : public V1_1::IBluetoothHci {
39  public:
40   BluetoothHci();
41   Return<void> initialize(
42       const ::android::sp<V1_0::IBluetoothHciCallbacks>& cb) override;
43   Return<void> initialize_1_1(
44       const ::android::sp<V1_1::IBluetoothHciCallbacks>& cb) override;
45   Return<void> sendHciCommand(const hidl_vec<uint8_t>& packet) override;
46   Return<void> sendAclData(const hidl_vec<uint8_t>& data) override;
47   Return<void> sendScoData(const hidl_vec<uint8_t>& data) override;
48   Return<void> sendIsoData(const hidl_vec<uint8_t>& data) override;
49   Return<void> close() override;
50 
51  private:
52   void sendDataToController(const uint8_t type, const hidl_vec<uint8_t>& data);
53   ::android::sp<BluetoothDeathRecipient> death_recipient_;
54   std::function<void(sp<BluetoothDeathRecipient>&)> unlink_cb_;
55 };
56 
57 }  // namespace implementation
58 }  // namespace V1_1
59 }  // namespace bluetooth
60 }  // namespace hardware
61 }  // namespace android
62 
63 #endif  // HIDL_GENERATED_android_hardware_bluetooth_V1_1_BluetoothHci_H_
64