summaryrefslogtreecommitdiffstats
path: root/src/network/kernel/qnetworkinformation.h
diff options
context:
space:
mode:
authorMårten Nordheim <marten.nordheim@qt.io>2021-05-21 16:36:57 +0200
committerMårten Nordheim <marten.nordheim@qt.io>2021-05-31 17:25:22 +0200
commitda955aadf5d5189b4f8de3eb2ed1b2f2f129cb28 (patch)
treeb18fa8e5b1ca49971b9e3e97be4d263cdea8a67d /src/network/kernel/qnetworkinformation.h
parent69982182a394618d4f121d2938d7d76196fe78f6 (diff)
QNetworkInformation: Behind captive portal
This patch adds the API, with no supporting backends Task-number: QTBUG-93848 Change-Id: I50454717f928819e1b990df91872675e842f9987 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Diffstat (limited to 'src/network/kernel/qnetworkinformation.h')
-rw-r--r--src/network/kernel/qnetworkinformation.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/network/kernel/qnetworkinformation.h b/src/network/kernel/qnetworkinformation.h
index 07f4fe873d..6e700747bb 100644
--- a/src/network/kernel/qnetworkinformation.h
+++ b/src/network/kernel/qnetworkinformation.h
@@ -55,6 +55,7 @@ class Q_NETWORK_EXPORT QNetworkInformation : public QObject
Q_OBJECT
Q_DECLARE_PRIVATE(QNetworkInformation)
Q_PROPERTY(Reachability reachability READ reachability NOTIFY reachabilityChanged)
+ Q_PROPERTY(TriState behindCaptivePortal READ behindCaptivePortal NOTIFY behindCaptivePortalChanged)
public:
enum class Reachability {
Unknown,
@@ -65,14 +66,24 @@ public:
};
Q_ENUM(Reachability)
+ enum class TriState {
+ False,
+ True,
+ Unknown,
+ };
+ Q_ENUM(TriState)
+
enum class Feature {
Reachability = 0x1,
+ CaptivePortal = 0x2,
};
Q_DECLARE_FLAGS(Features, Feature)
Q_FLAG(Features)
Reachability reachability() const;
+ TriState behindCaptivePortal() const;
+
QString backendName() const;
bool supports(Features features) const;
@@ -84,6 +95,7 @@ public:
Q_SIGNALS:
void reachabilityChanged(Reachability newReachability);
+ void behindCaptivePortalChanged(TriState state);
private:
friend struct QNetworkInformationDeleter;