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(
bool modemAvailable READ modemAvailable NOTIFY modemAvailableUpdated)
112 bool modemAvailable() const;
114 Q_PROPERTY(QByteArray hotspotSsid READ hotspotSsid WRITE setHotspotSsid NOTIFY hotspotSsidUpdated)
115 QByteArray hotspotSsid() const;
117 Q_PROPERTY(QString hotspotPassword READ hotspotPassword WRITE setHotspotPassword NOTIFY hotspotPasswordUpdated)
118 QString hotspotPassword() const;
120 Q_PROPERTY(
bool hotspotEnabled READ hotspotEnabled WRITE setHotspotEnabled NOTIFY hotspotEnabledUpdated)
121 bool hotspotEnabled() const;
123 Q_PROPERTY(QString hotspotMode READ hotspotMode WRITE setHotspotMode NOTIFY hotspotModeUpdated)
124 QString hotspotMode() const;
126 Q_PROPERTY(QString hotspotAuth READ hotspotAuth WRITE setHotspotAuth NOTIFY hotspotAuthUpdated)
127 QString hotspotAuth() const;
129 Q_PROPERTY(
bool hotspotStored READ hotspotStored NOTIFY hotspotStoredUpdated)
130 bool hotspotStored() const;
132 Q_PROPERTY(
bool Initialized READ isInitialized NOTIFY initialized)
133 bool isInitialized() const;
136 void setFlightMode(
bool enabled);
138 void setwifiEnabled(
bool enabled);
140 void setHotspotEnabled(
bool active);
142 void setHotspotSsid(const QByteArray& ssid);
144 void setHotspotPassword(const QString& password);
146 void setHotspotMode(const QString& mode);
148 void setHotspotAuth(const QString& auth);
151 void flightModeUpdated(
bool);
153 void onlineUpdated(
bool value);
155 void limitedBandwithUpdated(
bool value);
157 void limitationsUpdated(const QVector<
Limitations>&);
161 void wifiEnabledUpdated(
bool);
163 void unstoppableOperationHappeningUpdated(
bool);
165 void flightModeSwitchEnabledUpdated(
bool);
167 void wifiSwitchEnabledUpdated(
bool);
169 void hotspotSwitchEnabledUpdated(
bool);
171 void hotspotSsidUpdated(const QByteArray& name);
173 void hotspotPasswordUpdated(const QString& password);
175 void modemAvailableUpdated(
bool);
177 void hotspotEnabledUpdated(
bool);
179 void hotspotModeUpdated(const QString& mode);
181 void hotspotAuthUpdated(const QString& auth);
183 void hotspotStoredUpdated(
bool);
185 void reportError(
int reason);
191 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