Use DBUS to detect presence of Wi-Fi devices.

This commit is contained in:
Robin E. R. Davies
2024-11-20 14:50:05 -05:00
parent ca87658f90
commit 0dfe7b8080
8 changed files with 316 additions and 313 deletions
+11
View File
@@ -1080,6 +1080,11 @@ public:
UpdateStatus updateStatus = model.GetUpdateStatus();
this->Reply(replyTo, "getUpdateStatus", updateStatus);
}
else if (message == "getHasWifi")
{
bool result = model.GetHasWifi();
this->Reply(replyTo, "getHasWifi",result);
}
else if (message == "updateNow")
{
std::string updateUrl;
@@ -1727,6 +1732,12 @@ private:
Send("onLv2PluginsChanging", true);
Flush();
}
virtual void OnHasWifiChanged(bool hasWifi){
Send("onHasWifiChanged", hasWifi);
Flush();
}
virtual void OnNetworkChanging(bool hotspotConnected) override
{
try