mirror of
https://github.com/kidfromjupiter/nearby.git
synced 2026-09-14 14:46:12 -04:00
Remove members shadowing the base class.
PiperOrigin-RevId: 756337436
This commit is contained in:
committed by
Copybara-Service
parent
7ea0e00333
commit
605f96a2d2
@@ -45,19 +45,11 @@ class BlePeripheral : public api::ble_v2::BlePeripheral {
|
||||
explicit BlePeripheral(id<GNCPeripheral> peripheral);
|
||||
~BlePeripheral() override = default;
|
||||
|
||||
// Returns an empty string.
|
||||
std::string GetAddress() const override;
|
||||
|
||||
// Returns an immutable unique identifier. The identifier does not change when
|
||||
// the peripheral's address is rotated.
|
||||
api::ble_v2::BlePeripheral::UniqueId GetUniqueId() const override;
|
||||
|
||||
// Returns the CoreBluetooth peripheral object.
|
||||
id<GNCPeripheral> GetPeripheral() const;
|
||||
|
||||
private:
|
||||
id<GNCPeripheral> peripheral_;
|
||||
api::ble_v2::BlePeripheral::UniqueId unique_id_;
|
||||
};
|
||||
|
||||
} // namespace apple
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace apple {
|
||||
#pragma mark - BlePeripheral
|
||||
|
||||
BlePeripheral::BlePeripheral(id<GNCPeripheral> peripheral)
|
||||
: peripheral_(peripheral), unique_id_(peripheral.identifier.hash) {}
|
||||
: api::ble_v2::BlePeripheral(peripheral.identifier.hash), peripheral_(peripheral) {}
|
||||
|
||||
api::ble_v2::BlePeripheral& BlePeripheral::DefaultBlePeripheral() {
|
||||
static api::ble_v2::BlePeripheral* default_peripheral =
|
||||
@@ -37,10 +37,6 @@ api::ble_v2::BlePeripheral& BlePeripheral::DefaultBlePeripheral() {
|
||||
return *default_peripheral;
|
||||
}
|
||||
|
||||
std::string BlePeripheral::GetAddress() const { return ""; }
|
||||
|
||||
api::ble_v2::BlePeripheral::UniqueId BlePeripheral::GetUniqueId() const { return unique_id_; }
|
||||
|
||||
id<GNCPeripheral> BlePeripheral::GetPeripheral() const { return peripheral_; }
|
||||
|
||||
} // namespace apple
|
||||
|
||||
Reference in New Issue
Block a user