Chienyuan Huang | a9a2717 | 2023-11-27 09:32:09 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2023 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 | #include <aidl/android/hardware/bluetooth/ranging/BnBluetoothChannelSounding.h> |
| 18 | |
| 19 | #include <vector> |
| 20 | |
| 21 | namespace aidl::android::hardware::bluetooth::ranging::impl { |
| 22 | |
| 23 | using ::aidl::android::hardware::bluetooth::ranging:: |
| 24 | BluetoothChannelSoundingParameters; |
| 25 | using ::aidl::android::hardware::bluetooth::ranging::BnBluetoothChannelSounding; |
| 26 | using ::aidl::android::hardware::bluetooth::ranging::CsSecurityLevel; |
| 27 | using ::aidl::android::hardware::bluetooth::ranging:: |
| 28 | IBluetoothChannelSoundingSession; |
| 29 | using ::aidl::android::hardware::bluetooth::ranging:: |
| 30 | IBluetoothChannelSoundingSessionCallback; |
| 31 | using ::aidl::android::hardware::bluetooth::ranging::SessionType; |
| 32 | using ::aidl::android::hardware::bluetooth::ranging::VendorSpecificData; |
| 33 | |
| 34 | class BluetoothChannelSounding : public BnBluetoothChannelSounding { |
| 35 | public: |
| 36 | BluetoothChannelSounding(); |
| 37 | ~BluetoothChannelSounding(); // Add the destructor declaration |
| 38 | ndk::ScopedAStatus getVendorSpecificData( |
| 39 | std::optional<std::vector<std::optional<VendorSpecificData>>>* |
| 40 | _aidl_return) override; |
| 41 | ndk::ScopedAStatus getSupportedSessionTypes( |
| 42 | std::optional<std::vector<SessionType>>* _aidl_return) override; |
| 43 | ndk::ScopedAStatus getMaxSupportedCsSecurityLevel( |
| 44 | CsSecurityLevel* _aidl_return) override; |
| 45 | ndk::ScopedAStatus openSession( |
| 46 | const BluetoothChannelSoundingParameters& in_params, |
| 47 | const std::shared_ptr<IBluetoothChannelSoundingSessionCallback>& |
| 48 | in_callback, |
| 49 | std::shared_ptr<IBluetoothChannelSoundingSession>* _aidl_return) override; |
| 50 | }; |
| 51 | |
| 52 | } // namespace aidl::android::hardware::bluetooth::ranging::impl |