Roll forward to cl/341113126

Signed-off-by: hai007 <hais@google.com>
This commit is contained in:
hai007
2020-11-06 13:55:36 -08:00
parent 3c698dabc5
commit 67f5942051
23 changed files with 1216 additions and 79 deletions
+2
View File
@@ -62,6 +62,8 @@ std::string Utils::UnwrapUpgradeServiceId(
LocationHint Utils::BuildLocationHint(const std::string& location) {
LocationHint location_hint;
location_hint.set_format(LocationStandard::UNKNOWN);
if (!location.empty()) {
location_hint.set_location(location);
if (location.at(0) == '+') {
+6
View File
@@ -243,6 +243,12 @@ WifiLanService WifiLan::GetRemoteWifiLanService(const std::string& ip_address,
return medium_.FindRemoteService(ip_address, port);
}
std::pair<std::string, int> WifiLan::GetServiceAddress(
const std::string& service_id) {
MutexLock lock(&mutex_);
return medium_.GetServiceAddress(service_id);
}
} // namespace connections
} // namespace nearby
} // namespace location
+3
View File
@@ -74,6 +74,9 @@ class WifiLan {
WifiLanService GetRemoteWifiLanService(const std::string& ip_address,
int port) ABSL_LOCKS_EXCLUDED(mutex_);
std::pair<std::string, int> GetServiceAddress(const std::string& service_id)
ABSL_LOCKS_EXCLUDED(mutex_);
private:
struct AdvertisingInfo {
bool Empty() const { return service_ids.empty(); }