summaryrefslogtreecommitdiffstats
path: root/src/imports/wifi/qwifimanager.h
diff options
context:
space:
mode:
authorKalle Viironen <kalle.viironen@digia.com>2014-04-16 09:38:20 +0300
committerKalle Viironen <kalle.viironen@digia.com>2014-04-16 09:38:20 +0300
commit83efd639f995fae2d0614a8f98205069eb5a58ee (patch)
tree298111e0c7846e08d48cf50f3533696d7330d4f7 /src/imports/wifi/qwifimanager.h
parent4c6c06470f4998506d59de0a6488f40d50ca4154 (diff)
parentcef8834b27a7588886c0439d145004ae9ad33a13 (diff)
Merge branch 'stable' into dev
* stable: (22 commits) Add note about headphones on eAndroid Doc: Relocate unmount instructions Doc: Add ChangeLog for Qt Enterprise Embedded 2.1.0 Doc: Disable code highlighting for command-line instructions doc: update version number to 2.1.0 [Wifi] Add new enums and make some API changes Doc: Add documentation on custom build & deploy steps Doc: Create QML Type reference page Doc: Add information about licenses in embedded Linux images Doc: Improve instructions for deploying existing projects Doc: Separate Building Your Own Linux Image into its own page doc: use same directory for yocto and qt doc: config.<MACHINE> needed only once doc: guide for imx53 and how to setup QtCreator Doc: Be more precise on screen content for Nexus7 Add documentation to QtWifi library Doc: Add note for users to not use root for installation doc: describe how to use network connection for adb Rename misleading class name Remove unnecessary roles from QWifiNetworkList ... Conflicts: src/imports/wifi/qwifimanager.cpp Change-Id: Ie7efa2ec91ac154f1e984600f569d9c7f8383627
Diffstat (limited to 'src/imports/wifi/qwifimanager.h')
-rw-r--r--src/imports/wifi/qwifimanager.h20
1 files changed, 13 insertions, 7 deletions
diff --git a/src/imports/wifi/qwifimanager.h b/src/imports/wifi/qwifimanager.h
index 432f411..162190e 100644
--- a/src/imports/wifi/qwifimanager.h
+++ b/src/imports/wifi/qwifimanager.h
@@ -25,7 +25,7 @@
#include <cutils/properties.h>
-#include "qwifinetworklist.h"
+#include "qwifinetworklistmodel.h"
class QWifiManagerEventThread;
@@ -37,11 +37,13 @@ class QWifiManager : public QObject
Q_PROPERTY(bool backendReady READ isbackendReady NOTIFY backendReadyChanged)
Q_PROPERTY(bool scanning READ scanning WRITE setScanning NOTIFY scanningChanged)
Q_PROPERTY(QString connectedSSID READ connectedSSID NOTIFY connectedSSIDChanged)
- Q_PROPERTY(QWifiNetworkList *networks READ networks CONSTANT)
+ Q_PROPERTY(QWifiNetworkListModel *networks READ networks CONSTANT)
public:
enum NetworkState {
Disconnected,
+ Authenticating,
+ HandshakeFailed,
ObtainingIPAddress,
DhcpRequestFailed,
Connected
@@ -50,7 +52,7 @@ public:
QWifiManager();
~QWifiManager();
- QWifiNetworkList *networks() { return &m_networks; }
+ QWifiNetworkListModel *networks() { return &m_networkListModel; }
QString connectedSSID() const { return m_connectedSSID; }
bool scanning() const { return m_scanning; }
void setScanning(bool scanning);
@@ -65,10 +67,10 @@ public slots:
void disconnect();
signals:
- void scanningChanged(bool arg);
- void networkStateChanged();
+ void scanningChanged(bool scanning);
+ void networkStateChanged(QWifiNetwork *network);
void backendReadyChanged();
- void connectedSSIDChanged(const QString &);
+ void connectedSSIDChanged(const QString &ssid);
protected:
bool event(QEvent *);
@@ -76,8 +78,10 @@ protected:
void handleConnected();
void connectToBackend();
void disconnectFromBackend();
+ void exitEventThread();
QByteArray call(const char *command) const;
bool checkedCall(const char *command) const;
+ void updateNetworkState(NetworkState state);
protected slots:
void connectedToDaemon();
@@ -87,7 +91,7 @@ private:
friend class QWifiManagerEventThread;
QString m_connectedSSID;
- QWifiNetworkList m_networks;
+ QWifiNetworkListModel m_networkListModel;
QWifiManagerEventThread *m_eventThread;
int m_scanTimer;
@@ -99,6 +103,8 @@ private:
QLocalSocket *m_daemonClientSocket;
QByteArray m_request;
bool m_exitingEventThread;
+ bool m_startingUp;
+ QWifiNetwork *m_network;
};
#endif // QWIFIMANAGER_H