22 #include <QAbstractListModel>
23 #include <QDBusConnection>
25 #include <QStringList>
29 #include <unity/util/DefinesPtrs.h>
48 static void registerMetaTypes();
76 Connectivity(
const QDBusConnection& sessionConnection = QDBusConnection::sessionBus(), QObject* parent = 0);
78 Connectivity(
const std::function<
void(QObject*)>& objectOwner,
79 const QDBusConnection& sessionConnection = QDBusConnection::sessionBus(),
84 Q_PROPERTY(
bool flightMode READ flightMode WRITE setFlightMode NOTIFY flightModeUpdated)
85 Q_PROPERTY(
bool FlightMode READ flightMode WRITE setFlightMode NOTIFY flightModeUpdated)
86 bool flightMode() const;
88 Q_PROPERTY(
bool online READ online NOTIFY onlineUpdated)
91 Q_PROPERTY(
bool limitedBandwith READ limitedBandwith NOTIFY limitedBandwithUpdated)
92 bool limitedBandwith() const;
100 Q_PROPERTY(
bool wifiEnabled READ wifiEnabled WRITE setwifiEnabled NOTIFY wifiEnabledUpdated)
101 Q_PROPERTY(
bool WifiEnabled READ wifiEnabled WRITE setwifiEnabled NOTIFY wifiEnabledUpdated)
102 bool wifiEnabled() const;
104 Q_PROPERTY(
bool UnstoppableOperationHappening READ unstoppableOperationHappening NOTIFY unstoppableOperationHappeningUpdated)
105 bool unstoppableOperationHappening() const;
107 Q_PROPERTY(
bool FlightModeSwitchEnabled READ flightModeSwitchEnabled NOTIFY flightModeSwitchEnabledUpdated)
108 Q_PROPERTY(
bool flightModeSwitchEnabled READ flightModeSwitchEnabled NOTIFY flightModeSwitchEnabledUpdated)
109 bool flightModeSwitchEnabled() const;
111 Q_PROPERTY(
bool WifiSwitchEnabled READ wifiSwitchEnabled NOTIFY wifiSwitchEnabledUpdated)
112 Q_PROPERTY(
bool wifiSwitchEnabled READ wifiSwitchEnabled NOTIFY wifiSwitchEnabledUpdated)
113 bool wifiSwitchEnabled() const;
115 Q_PROPERTY(
bool HotspotSwitchEnabled READ hotspotSwitchEnabled NOTIFY hotspotSwitchEnabledUpdated)
116 Q_PROPERTY(
bool hotspotSwitchEnabled READ hotspotSwitchEnabled NOTIFY hotspotSwitchEnabledUpdated)
117 bool hotspotSwitchEnabled() const;
119 Q_PROPERTY(
bool modemAvailable READ modemAvailable NOTIFY modemAvailableUpdated)
120 bool modemAvailable() const;
122 Q_PROPERTY(QByteArray hotspotSsid READ hotspotSsid WRITE setHotspotSsid NOTIFY hotspotSsidUpdated)
123 QByteArray hotspotSsid() const;
125 Q_PROPERTY(QString hotspotPassword READ hotspotPassword WRITE setHotspotPassword NOTIFY hotspotPasswordUpdated)
126 QString hotspotPassword() const;
128 Q_PROPERTY(
bool hotspotEnabled READ hotspotEnabled WRITE setHotspotEnabled NOTIFY hotspotEnabledUpdated)
129 bool hotspotEnabled() const;
131 Q_PROPERTY(QString hotspotMode READ hotspotMode WRITE setHotspotMode NOTIFY hotspotModeUpdated)
132 QString hotspotMode() const;
134 Q_PROPERTY(QString hotspotAuth READ hotspotAuth WRITE setHotspotAuth NOTIFY hotspotAuthUpdated)
135 QString hotspotAuth() const;
137 Q_PROPERTY(
bool hotspotStored READ hotspotStored NOTIFY hotspotStoredUpdated)
138 bool hotspotStored() const;
140 Q_PROPERTY(
bool Initialized READ isInitialized NOTIFY initialized)
141 bool isInitialized() const;
143 Q_PROPERTY(QAbstractItemModel* vpnConnections READ vpnConnections NOTIFY vpnConnectionsUpdated)
144 QAbstractItemModel* vpnConnections() const;
147 void setFlightMode(
bool enabled);
149 void setwifiEnabled(
bool enabled);
151 void setHotspotEnabled(
bool active);
153 void setHotspotSsid(const QByteArray& ssid);
155 void setHotspotPassword(const QString& password);
157 void setHotspotMode(const QString& mode);
159 void setHotspotAuth(const QString& auth);
162 void flightModeUpdated(
bool);
164 void onlineUpdated(
bool value);
166 void limitedBandwithUpdated(
bool value);
168 void limitationsUpdated(const QVector<
Limitations>&);
172 void wifiEnabledUpdated(
bool);
174 void unstoppableOperationHappeningUpdated(
bool);
176 void flightModeSwitchEnabledUpdated(
bool);
178 void wifiSwitchEnabledUpdated(
bool);
180 void hotspotSwitchEnabledUpdated(
bool);
182 void hotspotSsidUpdated(const QByteArray& name);
184 void hotspotPasswordUpdated(const QString& password);
186 void modemAvailableUpdated(
bool);
188 void hotspotEnabledUpdated(
bool);
190 void hotspotModeUpdated(const QString& mode);
192 void hotspotAuthUpdated(const QString& auth);
194 void hotspotStoredUpdated(
bool);
196 void reportError(
int reason);
200 void vpnConnectionsUpdated(QAbstractItemModel*);
204 std::shared_ptr<Priv> d;
Definition: connectivity.cpp:32
Definition: connectivity.h:36
Limitations
enum for networking limitations
Definition: connectivity.h:55
Status
enum for networking status
Definition: connectivity.h:69