mirror of
https://github.com/kidfromjupiter/nearby.git
synced 2026-09-16 15:36:12 -04:00
Remove BLE V1 codes
PiperOrigin-RevId: 811369802
This commit is contained in:
committed by
Copybara-Service
parent
72088b7fe2
commit
5fbef9e11e
@@ -14,9 +14,14 @@
|
||||
|
||||
#include "internal/platform/implementation/g3/bluetooth_adapter.h"
|
||||
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
#include "absl/strings/string_view.h"
|
||||
#include "absl/synchronization/mutex.h"
|
||||
#include "internal/platform/implementation/ble_v2.h"
|
||||
#include "internal/platform/implementation/bluetooth_classic.h"
|
||||
#include "internal/platform/mac_address.h"
|
||||
#include "internal/platform/medium_environment.h"
|
||||
#include "internal/platform/prng.h"
|
||||
@@ -27,22 +32,6 @@ namespace {
|
||||
constexpr std::uint64_t kMacAddressMask = 0x0000FFFFFFFFFFFF;
|
||||
}
|
||||
|
||||
BlePeripheral::BlePeripheral(BluetoothAdapter* adapter) : adapter_(*adapter) {}
|
||||
|
||||
std::string BlePeripheral::GetName() const {
|
||||
return adapter_.GetAddress().ToString();
|
||||
}
|
||||
|
||||
ByteArray BlePeripheral::GetAdvertisementBytes(
|
||||
const std::string& service_id) const {
|
||||
return advertisement_bytes_;
|
||||
}
|
||||
|
||||
void BlePeripheral::SetAdvertisementBytes(
|
||||
const std::string& service_id, const ByteArray& advertisement_bytes) {
|
||||
advertisement_bytes_ = advertisement_bytes;
|
||||
}
|
||||
|
||||
BluetoothDevice::BluetoothDevice(BluetoothAdapter* adapter)
|
||||
: adapter_(*adapter) {}
|
||||
|
||||
@@ -52,9 +41,7 @@ std::string BluetoothDevice::GetMacAddress() const {
|
||||
return GetAddress().ToString();
|
||||
}
|
||||
|
||||
MacAddress BluetoothDevice::GetAddress() const {
|
||||
return adapter_.GetAddress();
|
||||
}
|
||||
MacAddress BluetoothDevice::GetAddress() const { return adapter_.GetAddress(); }
|
||||
|
||||
BluetoothAdapter::BluetoothAdapter() {
|
||||
std::uint64_t raw_mac_addr = Prng().NextInt64() & kMacAddressMask;
|
||||
@@ -73,10 +60,6 @@ void BluetoothAdapter::SetBluetoothClassicMedium(
|
||||
bluetooth_classic_medium_ = medium;
|
||||
}
|
||||
|
||||
void BluetoothAdapter::SetBleMedium(api::BleMedium* medium) {
|
||||
ble_medium_ = medium;
|
||||
}
|
||||
|
||||
void BluetoothAdapter::SetBleV2Medium(api::ble_v2::BleMedium* medium) {
|
||||
ble_v2_medium_ = medium;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user