blob: 5130c87ba6e1127a12fdbc4bb74bb29671f57f1f [file] [log] [blame]
Andre Eisenbach89ba5282016-10-13 15:45:02 -07001//
2// Copyright 2016 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_0_BluetoothHci_H_
18#define HIDL_GENERATED_android_hardware_bluetooth_V1_0_BluetoothHci_H_
19
20#include <android/hardware/bluetooth/1.0/IBluetoothHci.h>
21
22#include <hidl/MQDescriptor.h>
23
Bailey Forrestba204042017-06-12 16:49:18 -070024#include <functional>
25
Andre Eisenbach89ba5282016-10-13 15:45:02 -070026namespace android {
27namespace hardware {
28namespace bluetooth {
29namespace V1_0 {
30namespace implementation {
31
Andre Eisenbach89ba5282016-10-13 15:45:02 -070032using ::android::hardware::hidl_vec;
Jack Hecaeab052018-10-23 18:13:51 -070033using ::android::hardware::Return;
Andre Eisenbach89ba5282016-10-13 15:45:02 -070034
Andre Eisenbach9f8931c2017-03-16 22:19:19 -070035class BluetoothDeathRecipient;
Martijn Coenen678af7f2017-02-23 17:25:18 +010036
Andre Eisenbach89ba5282016-10-13 15:45:02 -070037class BluetoothHci : public IBluetoothHci {
38 public:
Martijn Coenen678af7f2017-02-23 17:25:18 +010039 BluetoothHci();
Andre Eisenbach9041d972017-01-17 18:23:12 -080040 Return<void> initialize(
Andre Eisenbach89ba5282016-10-13 15:45:02 -070041 const ::android::sp<IBluetoothHciCallbacks>& cb) override;
42 Return<void> sendHciCommand(const hidl_vec<uint8_t>& packet) override;
43 Return<void> sendAclData(const hidl_vec<uint8_t>& data) override;
44 Return<void> sendScoData(const hidl_vec<uint8_t>& data) override;
45 Return<void> close() override;
46
47 private:
48 void sendDataToController(const uint8_t type, const hidl_vec<uint8_t>& data);
Myles Watson9cec0e32017-03-16 16:23:23 -070049 ::android::sp<BluetoothDeathRecipient> death_recipient_;
50 std::function<void(sp<BluetoothDeathRecipient>&)> unlink_cb_;
xiaoshun.xu1adfae92022-09-14 20:39:16 +080051 int bt_enabled;
Andre Eisenbach89ba5282016-10-13 15:45:02 -070052};
53
54extern "C" IBluetoothHci* HIDL_FETCH_IBluetoothHci(const char* name);
55
56} // namespace implementation
57} // namespace V1_0
58} // namespace bluetooth
59} // namespace hardware
60} // namespace android
61
62#endif // HIDL_GENERATED_android_hardware_bluetooth_V1_0_BluetoothHci_H_