OSDN Git Service

Expose shim acl remote address accessors
authorChris Manton <cmanton@google.com>
Mon, 23 Nov 2020 05:30:59 +0000 (21:30 -0800)
committerChris Manton <cmanton@google.com>
Tue, 24 Nov 2020 06:19:54 +0000 (22:19 -0800)
Bug: 166280067
Test: gd/cert/run --host
Tag: #refactor

Change-Id: Icb1d16d5982f065faf88edd19c8b6e1880546d48

main/shim/acl.cc

index 3d4b5ea..09efc58 100644 (file)
@@ -324,6 +324,8 @@ class ClassicShimAclConnection
       connection_->ReadRemoteExtendedFeatures(page_number + 1);
   }
 
+  hci::Address GetRemoteAddress() const { return connection_->GetAddress(); }
+
  private:
   OnDisconnect on_disconnect_;
   const shim::legacy::acl_classic_link_interface_t interface_;
@@ -380,6 +382,10 @@ class LeShimAclConnection
     on_disconnect_(handle_, reason);
   }
 
+  hci::AddressWithType GetRemoteAddressWithType() const {
+    return connection_->GetRemoteAddress();
+  }
+
  private:
   OnDisconnect on_disconnect_;
   const shim::legacy::acl_le_link_interface_t interface_;