Andre Eisenbach | 89ba528 | 2016-10-13 15:45:02 -0700 | [diff] [blame] | 1 | // |
| 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 Forrest | ba20404 | 2017-06-12 16:49:18 -0700 | [diff] [blame] | 24 | #include <functional> |
| 25 | |
Andre Eisenbach | 89ba528 | 2016-10-13 15:45:02 -0700 | [diff] [blame] | 26 | namespace android { |
| 27 | namespace hardware { |
| 28 | namespace bluetooth { |
| 29 | namespace V1_0 { |
| 30 | namespace implementation { |
| 31 | |
| 32 | using ::android::hardware::Return; |
| 33 | using ::android::hardware::hidl_vec; |
| 34 | |
Andre Eisenbach | 9f8931c | 2017-03-16 22:19:19 -0700 | [diff] [blame] | 35 | class BluetoothDeathRecipient; |
Martijn Coenen | 678af7f | 2017-02-23 17:25:18 +0100 | [diff] [blame] | 36 | |
Andre Eisenbach | 89ba528 | 2016-10-13 15:45:02 -0700 | [diff] [blame] | 37 | class BluetoothHci : public IBluetoothHci { |
| 38 | public: |
Martijn Coenen | 678af7f | 2017-02-23 17:25:18 +0100 | [diff] [blame] | 39 | BluetoothHci(); |
Andre Eisenbach | 9041d97 | 2017-01-17 18:23:12 -0800 | [diff] [blame] | 40 | Return<void> initialize( |
Andre Eisenbach | 89ba528 | 2016-10-13 15:45:02 -0700 | [diff] [blame] | 41 | 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 Watson | 9cec0e3 | 2017-03-16 16:23:23 -0700 | [diff] [blame] | 49 | ::android::sp<BluetoothDeathRecipient> death_recipient_; |
| 50 | std::function<void(sp<BluetoothDeathRecipient>&)> unlink_cb_; |
Andre Eisenbach | 89ba528 | 2016-10-13 15:45:02 -0700 | [diff] [blame] | 51 | }; |
| 52 | |
| 53 | extern "C" IBluetoothHci* HIDL_FETCH_IBluetoothHci(const char* name); |
| 54 | |
| 55 | } // namespace implementation |
| 56 | } // namespace V1_0 |
| 57 | } // namespace bluetooth |
| 58 | } // namespace hardware |
| 59 | } // namespace android |
| 60 | |
| 61 | #endif // HIDL_GENERATED_android_hardware_bluetooth_V1_0_BluetoothHci_H_ |