blob: 6703f7fe9bc7989236e66f18212818fac23d8f08 [file] [log] [blame]
Chienyuan Huanga9a27172023-11-27 09:32:09 +00001/*
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/BnBluetoothChannelSoundingSession.h>
18#include <aidl/android/hardware/bluetooth/ranging/IBluetoothChannelSoundingSessionCallback.h>
19
20#include <vector>
21
22namespace aidl::android::hardware::bluetooth::ranging::impl {
23
24using ::aidl::android::hardware::bluetooth::ranging::ChannelSoudingRawData;
25using ::aidl::android::hardware::bluetooth::ranging::Reason;
26using ::aidl::android::hardware::bluetooth::ranging::ResultType;
27using ::aidl::android::hardware::bluetooth::ranging::VendorSpecificData;
28
29class BluetoothChannelSoundingSession
30 : public BnBluetoothChannelSoundingSession {
31 public:
32 BluetoothChannelSoundingSession(
33 std::shared_ptr<IBluetoothChannelSoundingSessionCallback> callback,
34 Reason reason);
35
36 ndk::ScopedAStatus getVendorSpecificReplies(
37 std::optional<std::vector<std::optional<VendorSpecificData>>>*
38 _aidl_return) override;
39 ndk::ScopedAStatus getSupportedResultTypes(
40 std::vector<ResultType>* _aidl_return) override;
41 ndk::ScopedAStatus isAbortedProcedureRequired(bool* _aidl_return) override;
42 ndk::ScopedAStatus writeRawData(
43 const ChannelSoudingRawData& in_rawData) override;
44 ndk::ScopedAStatus close(Reason in_reason) override;
45
46 private:
47 std::shared_ptr<IBluetoothChannelSoundingSessionCallback> callback_;
48};
49
50} // namespace aidl::android::hardware::bluetooth::ranging::impl