22 #include <QDBusConnection>
24 #include <QStringList>
27 #include <unity/util/DefinesPtrs.h>
44 static void registerMetaTypes();
72 Connectivity(
const QDBusConnection& sessionConnection = QDBusConnection::sessionBus(), QObject* parent = 0);
76 Q_PROPERTY(
bool flightMode READ flightMode WRITE setFlightMode NOTIFY flightModeUpdated)
77 Q_PROPERTY(
bool FlightMode READ flightMode WRITE setFlightMode NOTIFY flightModeUpdated)
78 bool flightMode() const;
80 Q_PROPERTY(
bool online READ online NOTIFY onlineUpdated)
83 Q_PROPERTY(
bool limitedBandwith READ limitedBandwith NOTIFY limitedBandwithUpdated)
84 bool limitedBandwith() const;
92 Q_PROPERTY(
bool wifiEnabled READ wifiEnabled WRITE setwifiEnabled NOTIFY wifiEnabledUpdated)
93 Q_PROPERTY(
bool WifiEnabled READ wifiEnabled WRITE setwifiEnabled NOTIFY wifiEnabledUpdated)
94 bool wifiEnabled() const;
96 Q_PROPERTY(
bool UnstoppableOperationHappening READ unstoppableOperationHappening NOTIFY unstoppableOperationHappeningUpdated)
97 bool unstoppableOperationHappening() const;
99 Q_PROPERTY(
bool FlightModeSwitchEnabled READ flightModeSwitchEnabled NOTIFY flightModeSwitchEnabledUpdated)
100 Q_PROPERTY(
bool flightModeSwitchEnabled READ flightModeSwitchEnabled NOTIFY flightModeSwitchEnabledUpdated)
101 bool flightModeSwitchEnabled() const;
103 Q_PROPERTY(
bool WifiSwitchEnabled READ wifiSwitchEnabled NOTIFY wifiSwitchEnabledUpdated)
104 Q_PROPERTY(
bool wifiSwitchEnabled READ wifiSwitchEnabled NOTIFY wifiSwitchEnabledUpdated)
105 bool wifiSwitchEnabled() const;
107 Q_PROPERTY(
bool HotspotSwitchEnabled READ hotspotSwitchEnabled NOTIFY hotspotSwitchEnabledUpdated)
108 Q_PROPERTY(
bool hotspotSwitchEnabled READ hotspotSwitchEnabled NOTIFY hotspotSwitchEnabledUpdated)
109 bool hotspotSwitchEnabled() const;
111 Q_PROPERTY(QByteArray hotspotSsid READ hotspotSsid WRITE setHotspotSsid NOTIFY hotspotSsidUpdated)
112 QByteArray hotspotSsid() const;
114 Q_PROPERTY(QString hotspotPassword READ hotspotPassword WRITE setHotspotPassword NOTIFY hotspotPasswordUpdated)
115 QString hotspotPassword() const;
117 Q_PROPERTY(
bool hotspotEnabled READ hotspotEnabled WRITE setHotspotEnabled NOTIFY hotspotEnabledUpdated)
118 bool hotspotEnabled() const;
120 Q_PROPERTY(QString hotspotMode READ hotspotMode WRITE setHotspotMode NOTIFY hotspotModeUpdated)
121 QString hotspotMode() const;
123 Q_PROPERTY(QString hotspotAuth READ hotspotAuth WRITE setHotspotAuth NOTIFY hotspotAuthUpdated)
124 QString hotspotAuth() const;
126 Q_PROPERTY(
bool hotspotStored READ hotspotStored NOTIFY hotspotStoredUpdated)
127 bool hotspotStored() const;
129 Q_PROPERTY(
bool Initialized READ isInitialized NOTIFY initialized)
130 bool isInitialized() const;
133 void setFlightMode(
bool enabled);
135 void setwifiEnabled(
bool enabled);
137 void setHotspotEnabled(
bool active);
139 void setHotspotSsid(const QByteArray& ssid);
141 void setHotspotPassword(const QString& password);
143 void setHotspotMode(const QString& mode);
145 void setHotspotAuth(const QString& auth);
148 void flightModeUpdated(
bool);
150 void onlineUpdated(
bool value);
152 void limitedBandwithUpdated(
bool value);
154 void limitationsUpdated(const QVector<
Limitations>&);
158 void wifiEnabledUpdated(
bool);
160 void unstoppableOperationHappeningUpdated(
bool);
162 void flightModeSwitchEnabledUpdated(
bool);
164 void wifiSwitchEnabledUpdated(
bool);
166 void hotspotSwitchEnabledUpdated(
bool);
168 void hotspotSsidUpdated(const QByteArray& name);
170 void hotspotPasswordUpdated(const QString& password);
172 void hotspotEnabledUpdated(
bool);
174 void hotspotModeUpdated(const QString& mode);
176 void hotspotAuthUpdated(const QString& auth);
178 void hotspotStoredUpdated(
bool);
180 void reportError(
int reason);
186 std::shared_ptr<Priv> d;
Definition: connectivity.cpp:30
Definition: connectivity.h:32
Limitations
enum for networking limitations
Definition: connectivity.h:51
Status
enum for networking status
Definition: connectivity.h:65