1 /*
2  * Copyright 2024 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 // AIDL uses syslog.h, so these defines conflict with log/log.h
18 #undef LOG_DEBUG
19 #undef LOG_INFO
20 #undef LOG_WARNING
21 
22 #include "ranging_hal.h"
23 
24 namespace bluetooth {
25 namespace hal {
26 
27 class RangingHalHost : public RangingHal {
28 public:
IsBound()29   bool IsBound() override { return false; }
GetRangingHalVersion()30   RangingHalVersion GetRangingHalVersion() { return V_UNKNOWN; }
RegisterCallback(RangingHalCallback *)31   void RegisterCallback(RangingHalCallback* /* callback */) override {}
GetVendorSpecificCharacteristics()32   std::vector<VendorSpecificCharacteristic> GetVendorSpecificCharacteristics() override {
33     std::vector<VendorSpecificCharacteristic> vendor_specific_characteristics = {};
34     return vendor_specific_characteristics;
35   }
OpenSession(uint16_t,uint16_t,const std::vector<hal::VendorSpecificCharacteristic> &)36   void OpenSession(uint16_t /* connection_handle */, uint16_t /* att_handle */,
37                    const std::vector<hal::VendorSpecificCharacteristic>& /* vendor_specific_data */)
38           override {}
39 
HandleVendorSpecificReply(uint16_t,const std::vector<hal::VendorSpecificCharacteristic> &)40   void HandleVendorSpecificReply(
41           uint16_t /* connection_handle */,
42           const std::vector<hal::VendorSpecificCharacteristic>& /* vendor_specific_reply */)
43           override {}
44 
WriteRawData(uint16_t,const ChannelSoundingRawData &)45   void WriteRawData(uint16_t /* connection_handle */,
46                     const ChannelSoundingRawData& /* raw_data */) override {}
47 
UpdateChannelSoundingConfig(uint16_t,const hci::LeCsConfigCompleteView &,uint8_t,uint8_t,uint16_t)48   void UpdateChannelSoundingConfig(uint16_t /* connection_handle */,
49                                    const hci::LeCsConfigCompleteView& /* leCsConfigCompleteView */,
50                                    uint8_t /* local_supported_sw_time */,
51                                    uint8_t /* remote_supported_sw_time */,
52                                    uint16_t /* conn_interval */) override {}
53 
UpdateProcedureEnableConfig(uint16_t,const hci::LeCsProcedureEnableCompleteView &)54   void UpdateProcedureEnableConfig(
55           uint16_t /* connection_handle */,
56           const hci::LeCsProcedureEnableCompleteView& /* leCsProcedureEnableCompleteView */)
57           override {}
58 
WriteProcedureData(uint16_t,hci::CsRole,const ProcedureDataV2 &,uint16_t)59   void WriteProcedureData(uint16_t /* connection_handle */, hci::CsRole /* local_cs_role */,
60                           const ProcedureDataV2& /* procedure_data */,
61                           uint16_t /* procedure_counter */) {}
62 
UpdateConnInterval(uint16_t,uint16_t)63   void UpdateConnInterval(uint16_t /* connection_handle */, uint16_t /* conn_interval */) override {
64   }
65 
66 protected:
ListDependencies(ModuleList *) const67   void ListDependencies(ModuleList* /*list*/) const {}
68 
Start()69   void Start() override {}
70 
Stop()71   void Stop() override {}
72 
ToString() const73   std::string ToString() const override { return std::string("RangingHalHost"); }
74 };
75 
__anon7e5d6b6d0102() 76 const ModuleFactory RangingHal::Factory = ModuleFactory([]() { return new RangingHalHost(); });
77 
78 }  // namespace hal
79 }  // namespace bluetooth
80