mirror of
https://github.com/kidfromjupiter/nearby.git
synced 2026-09-16 15:36:12 -04:00
@@ -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) == '+') {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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(); }
|
||||
|
||||
Reference in New Issue
Block a user