mirror of
https://github.com/kidfromjupiter/nearby.git
synced 2026-09-16 15:36:12 -04:00
Merge branch 'master' into release to roll forward to cl/341113126.
This commit is contained in:
@@ -76,6 +76,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) == '+') {
|
||||
|
||||
@@ -257,6 +257,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
|
||||
|
||||
@@ -88,6 +88,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(); }
|
||||
|
||||
Reference in New Issue
Block a user