diff --git a/connections/implementation/mediums/wifi.h b/connections/implementation/mediums/wifi.h index b38027b2..863fca28 100644 --- a/connections/implementation/mediums/wifi.h +++ b/connections/implementation/mediums/wifi.h @@ -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_); diff --git a/internal/platform/implementation/apple/wifi.h b/internal/platform/implementation/apple/wifi.h index 2751d78c..4cc9474b 100644 --- a/internal/platform/implementation/apple/wifi.h +++ b/internal/platform/implementation/apple/wifi.h @@ -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_ = {}; diff --git a/internal/platform/implementation/g3/wifi.h b/internal/platform/implementation/g3/wifi.h index 0d8014af..91c670aa 100644 --- a/internal/platform/implementation/g3/wifi.h +++ b/internal/platform/implementation/g3/wifi.h @@ -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_); diff --git a/internal/platform/implementation/wifi.h b/internal/platform/implementation/wifi.h index 1659ec80..4b5162e0 100644 --- a/internal/platform/implementation/wifi.h +++ b/internal/platform/implementation/wifi.h @@ -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 diff --git a/internal/platform/implementation/windows/wifi.h b/internal/platform/implementation/windows/wifi.h index 7e63da5b..5c5a51b0 100644 --- a/internal/platform/implementation/windows/wifi.h +++ b/internal/platform/implementation/windows/wifi.h @@ -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 diff --git a/internal/platform/implementation/windows/wifi_medium.cc b/internal/platform/implementation/windows/wifi_medium.cc index 594662f4..dd9e9812 100644 --- a/internal/platform/implementation/windows/wifi_medium.cc +++ b/internal/platform/implementation/windows/wifi_medium.cc @@ -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(); diff --git a/internal/platform/wifi.h b/internal/platform/wifi.h index e0f27f65..e668dd92 100644 --- a/internal/platform/wifi.h +++ b/internal/platform/wifi.h @@ -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() {