mirror of
https://github.com/kidfromjupiter/nearby.git
synced 2026-09-14 14:46:12 -04:00
Remove unused methods.
PiperOrigin-RevId: 823958211
This commit is contained in:
committed by
Copybara-Service
parent
452e9f546c
commit
be3e658d75
@@ -50,16 +50,6 @@ class Wifi {
|
||||
return medium_.GetInformation();
|
||||
}
|
||||
|
||||
bool VerifyInternetConnectivity() {
|
||||
MutexLock lock(&mutex_);
|
||||
return medium_.VerifyInternetConnectivity();
|
||||
}
|
||||
|
||||
std::string GetIpAddress() const {
|
||||
MutexLock lock(&mutex_);
|
||||
return medium_.GetIpAddress();
|
||||
}
|
||||
|
||||
private:
|
||||
mutable Mutex mutex_;
|
||||
WifiMedium medium_ ABSL_GUARDED_BY(mutex_);
|
||||
|
||||
@@ -84,17 +84,6 @@ class WifiMedium : public api::WifiMedium {
|
||||
return api::WifiConnectionStatus::kUnknown;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Verifies if the device has internet connectivity through the WiFi
|
||||
* network.
|
||||
*/
|
||||
bool VerifyInternetConnectivity() override { return false; }
|
||||
|
||||
/**
|
||||
* @brief Returns the IP address of the device on the WiFi network.
|
||||
*/
|
||||
std::string GetIpAddress() override { return ""; }
|
||||
|
||||
private:
|
||||
api::WifiCapability capability_ = {};
|
||||
api::WifiInformation information_ = {};
|
||||
|
||||
@@ -64,11 +64,6 @@ class WifiMedium : public api::WifiMedium {
|
||||
absl::MutexLock lock(&mutex_);
|
||||
return wifi_information_;
|
||||
}
|
||||
std::string GetIpAddress() override {
|
||||
absl::MutexLock lock(&mutex_);
|
||||
return wifi_information_.ip_address_dot_decimal;
|
||||
}
|
||||
|
||||
class ScanResultCallback : public api::WifiMedium::ScanResultCallback {
|
||||
public:
|
||||
// TODO(b/184975123): replace with real implementation.
|
||||
@@ -97,15 +92,6 @@ class WifiMedium : public api::WifiMedium {
|
||||
return api::WifiConnectionStatus::kUnknown;
|
||||
}
|
||||
|
||||
// Blocks until it's certain of there being a connection to the internet, or
|
||||
// returns false if it fails to do so.
|
||||
//
|
||||
// How this method wants to verify said connection is totally up to it (so it
|
||||
// can feel free to ping whatever server, download whatever resource, etc.
|
||||
// that it needs to gain confidence that the internet is reachable hereon in).
|
||||
// TODO(b/184975123): replace with real implementation.
|
||||
bool VerifyInternetConnectivity() override { return false; }
|
||||
|
||||
private:
|
||||
absl::Mutex mutex_;
|
||||
api::WifiCapability wifi_capability_ ABSL_GUARDED_BY(mutex_);
|
||||
|
||||
@@ -123,17 +123,6 @@ class WifiMedium {
|
||||
virtual WifiConnectionStatus ConnectToNetwork(absl::string_view ssid,
|
||||
absl::string_view password,
|
||||
WifiAuthType auth_type) = 0;
|
||||
|
||||
// Blocks until it's certain of there being a connection to the internet, or
|
||||
// returns false if it fails to do so.
|
||||
//
|
||||
// How this method wants to verify said connection is totally up to it (so it
|
||||
// can feel free to ping whatever server, download whatever resource, etc.
|
||||
// that it needs to gain confidence that the internet is reachable hereon in).
|
||||
virtual bool VerifyInternetConnectivity() = 0;
|
||||
|
||||
// Returns the local device's IP address in the IPv4 dotted-quad format.
|
||||
virtual std::string GetIpAddress() = 0;
|
||||
};
|
||||
|
||||
} // namespace api
|
||||
|
||||
@@ -99,19 +99,6 @@ class WifiMedium : public api::WifiMedium {
|
||||
return api::WifiConnectionStatus::kUnknown;
|
||||
}
|
||||
|
||||
// Blocks until it's certain of there being a connection to the internet, or
|
||||
// returns false if it fails to do so.
|
||||
//
|
||||
// How this method wants to verify said connection is totally up to it (so it
|
||||
// can feel free to ping whatever server, download whatever resource, etc.
|
||||
// that it needs to gain confidence that the internet is reachable hereon in).
|
||||
// TODO(b/184975123): replace with real implementation.
|
||||
bool VerifyInternetConnectivity() override { return false; }
|
||||
|
||||
// Returns the local device's IP address in the IPv4 dotted-quad format.
|
||||
// TODO(b/184975123): replace with real implementation.
|
||||
std::string GetIpAddress() override;
|
||||
|
||||
private:
|
||||
// Since the WiFi interface capability won't change in the connection session,
|
||||
// we only need to query it once at the beginning
|
||||
|
||||
@@ -235,11 +235,6 @@ api::WifiInformation& WifiMedium::GetInformation() {
|
||||
return wifi_information_;
|
||||
}
|
||||
|
||||
std::string WifiMedium::GetIpAddress() {
|
||||
GetInformation();
|
||||
return wifi_information_.ip_address_dot_decimal;
|
||||
}
|
||||
|
||||
std::string WifiMedium::InternalGetWifiIpAddress() {
|
||||
try {
|
||||
auto host_names = NetworkInformation::GetHostNames();
|
||||
|
||||
@@ -45,16 +45,6 @@ class WifiMedium {
|
||||
return impl_->IsInterfaceValid();
|
||||
}
|
||||
|
||||
bool VerifyInternetConnectivity() {
|
||||
CHECK(impl_);
|
||||
return impl_->VerifyInternetConnectivity();
|
||||
}
|
||||
|
||||
std::string GetIpAddress() const {
|
||||
CHECK(impl_);
|
||||
return impl_->GetIpAddress();
|
||||
}
|
||||
|
||||
bool IsValid() const { return impl_ != nullptr; }
|
||||
|
||||
api::WifiMedium& GetImpl() {
|
||||
|
||||
Reference in New Issue
Block a user