mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
Async readState and added tokens for lifetime management of async operations. This should prevent crashes when the service is destroyed while async operations are still pending.
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -114,7 +114,7 @@ private:
|
||||
void rebindActiveDevice(const std::string& devicePath);
|
||||
void rebindActiveAccessPoint(const std::string& apPath);
|
||||
void ensureWifiDeviceSubscribed(const std::string& devicePath);
|
||||
[[nodiscard]] NetworkState readState();
|
||||
void readStateAsync(std::function<void(NetworkState)> onComplete);
|
||||
[[nodiscard]] NetworkChangeOrigin consumeWirelessEnabledChangeOrigin(bool enabled);
|
||||
void emitChangedIfNeeded(NetworkState next);
|
||||
|
||||
@@ -131,6 +131,7 @@ private:
|
||||
std::vector<AccessPointInfo> m_accessPoints;
|
||||
std::vector<VpnConnectionInfo> m_vpnConnections;
|
||||
std::vector<std::string> m_savedSsids;
|
||||
std::shared_ptr<int> m_lifetimeToken;
|
||||
bool m_refreshInFlight = false;
|
||||
bool m_refreshQueued = false;
|
||||
bool m_scanning = false;
|
||||
|
||||
Reference in New Issue
Block a user