1*4d7e907cSAndroid Build Coastguard Worker /* 2*4d7e907cSAndroid Build Coastguard Worker * Copyright (C) 2023 The Android Open Source Project 3*4d7e907cSAndroid Build Coastguard Worker * 4*4d7e907cSAndroid Build Coastguard Worker * Licensed under the Apache License, Version 2.0 (the "License"); 5*4d7e907cSAndroid Build Coastguard Worker * you may not use this file except in compliance with the License. 6*4d7e907cSAndroid Build Coastguard Worker * You may obtain a copy of the License at 7*4d7e907cSAndroid Build Coastguard Worker * 8*4d7e907cSAndroid Build Coastguard Worker * http://www.apache.org/licenses/LICENSE-2.0 9*4d7e907cSAndroid Build Coastguard Worker * 10*4d7e907cSAndroid Build Coastguard Worker * Unless required by applicable law or agreed to in writing, software 11*4d7e907cSAndroid Build Coastguard Worker * distributed under the License is distributed on an "AS IS" BASIS, 12*4d7e907cSAndroid Build Coastguard Worker * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13*4d7e907cSAndroid Build Coastguard Worker * See the License for the specific language governing permissions and 14*4d7e907cSAndroid Build Coastguard Worker * limitations under the License. 15*4d7e907cSAndroid Build Coastguard Worker */ 16*4d7e907cSAndroid Build Coastguard Worker 17*4d7e907cSAndroid Build Coastguard Worker #include <aidl/android/hardware/bluetooth/ranging/BnBluetoothChannelSoundingSession.h> 18*4d7e907cSAndroid Build Coastguard Worker #include <aidl/android/hardware/bluetooth/ranging/IBluetoothChannelSoundingSessionCallback.h> 19*4d7e907cSAndroid Build Coastguard Worker 20*4d7e907cSAndroid Build Coastguard Worker #include <vector> 21*4d7e907cSAndroid Build Coastguard Worker 22*4d7e907cSAndroid Build Coastguard Worker namespace aidl::android::hardware::bluetooth::ranging::impl { 23*4d7e907cSAndroid Build Coastguard Worker 24*4d7e907cSAndroid Build Coastguard Worker using ::aidl::android::hardware::bluetooth::ranging::ChannelSoudingRawData; 25*4d7e907cSAndroid Build Coastguard Worker using ::aidl::android::hardware::bluetooth::ranging:: 26*4d7e907cSAndroid Build Coastguard Worker ChannelSoundingProcedureData; 27*4d7e907cSAndroid Build Coastguard Worker using ::aidl::android::hardware::bluetooth::ranging::Config; 28*4d7e907cSAndroid Build Coastguard Worker using ::aidl::android::hardware::bluetooth::ranging::ProcedureEnableConfig; 29*4d7e907cSAndroid Build Coastguard Worker using ::aidl::android::hardware::bluetooth::ranging::Reason; 30*4d7e907cSAndroid Build Coastguard Worker using ::aidl::android::hardware::bluetooth::ranging::ResultType; 31*4d7e907cSAndroid Build Coastguard Worker using ::aidl::android::hardware::bluetooth::ranging::VendorSpecificData; 32*4d7e907cSAndroid Build Coastguard Worker 33*4d7e907cSAndroid Build Coastguard Worker class BluetoothChannelSoundingSession 34*4d7e907cSAndroid Build Coastguard Worker : public BnBluetoothChannelSoundingSession { 35*4d7e907cSAndroid Build Coastguard Worker public: 36*4d7e907cSAndroid Build Coastguard Worker BluetoothChannelSoundingSession( 37*4d7e907cSAndroid Build Coastguard Worker std::shared_ptr<IBluetoothChannelSoundingSessionCallback> callback, 38*4d7e907cSAndroid Build Coastguard Worker Reason reason); 39*4d7e907cSAndroid Build Coastguard Worker 40*4d7e907cSAndroid Build Coastguard Worker ndk::ScopedAStatus getVendorSpecificReplies( 41*4d7e907cSAndroid Build Coastguard Worker std::optional<std::vector<std::optional<VendorSpecificData>>>* 42*4d7e907cSAndroid Build Coastguard Worker _aidl_return) override; 43*4d7e907cSAndroid Build Coastguard Worker ndk::ScopedAStatus getSupportedResultTypes( 44*4d7e907cSAndroid Build Coastguard Worker std::vector<ResultType>* _aidl_return) override; 45*4d7e907cSAndroid Build Coastguard Worker ndk::ScopedAStatus isAbortedProcedureRequired(bool* _aidl_return) override; 46*4d7e907cSAndroid Build Coastguard Worker ndk::ScopedAStatus writeRawData( 47*4d7e907cSAndroid Build Coastguard Worker const ChannelSoudingRawData& in_rawData) override; 48*4d7e907cSAndroid Build Coastguard Worker ndk::ScopedAStatus close(Reason in_reason) override; 49*4d7e907cSAndroid Build Coastguard Worker ndk::ScopedAStatus writeProcedureData( 50*4d7e907cSAndroid Build Coastguard Worker const ChannelSoundingProcedureData& in_procedureData) override; 51*4d7e907cSAndroid Build Coastguard Worker ndk::ScopedAStatus updateChannelSoundingConfig( 52*4d7e907cSAndroid Build Coastguard Worker const Config& in_config) override; 53*4d7e907cSAndroid Build Coastguard Worker ndk::ScopedAStatus updateProcedureEnableConfig( 54*4d7e907cSAndroid Build Coastguard Worker const ProcedureEnableConfig& in_procedureEnableConfig) override; 55*4d7e907cSAndroid Build Coastguard Worker ndk::ScopedAStatus updateBleConnInterval(int in_bleConnInterval) override; 56*4d7e907cSAndroid Build Coastguard Worker 57*4d7e907cSAndroid Build Coastguard Worker private: 58*4d7e907cSAndroid Build Coastguard Worker std::shared_ptr<IBluetoothChannelSoundingSessionCallback> callback_; 59*4d7e907cSAndroid Build Coastguard Worker }; 60*4d7e907cSAndroid Build Coastguard Worker 61*4d7e907cSAndroid Build Coastguard Worker } // namespace aidl::android::hardware::bluetooth::ranging::impl 62