diff options
author | Gatis Paeglis <gatis.paeglis@digia.com> | 2014-09-18 17:50:36 +0200 |
---|---|---|
committer | Gatis Paeglis <gatis.paeglis@digia.com> | 2014-09-19 12:46:31 +0300 |
commit | 6b1c6cb2f84f5824d765da1d7a54ea81eb0389f8 (patch) | |
tree | e97aad11b960332215ee854a00c33b52794f0dc1 /src/imports/wifi/qwifiinterface.h | |
parent | 2671db076e6b27f4267c488a50aef24285738a61 (diff) |
Fix timing issues in wifi library
There is a timing issue on a device startup if the
default application calls Wifi.Interface.wifiSupported()
before qconnectivity service has finished initialize wifi
firmware/driver. This results in wifiSupported() returing
false on nexus 2013, even if this device supports wifi.
The solution is to move firmware/driver initialization
to Qt Wifi library.
Change-Id: If5b4650181f8b7237bd19f3fc3afbd2c75f759e8
Task-number: QTEE-770
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@digia.com>
Diffstat (limited to 'src/imports/wifi/qwifiinterface.h')
-rw-r--r-- | src/imports/wifi/qwifiinterface.h | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/src/imports/wifi/qwifiinterface.h b/src/imports/wifi/qwifiinterface.h new file mode 100644 index 0000000..da7750e --- /dev/null +++ b/src/imports/wifi/qwifiinterface.h @@ -0,0 +1,40 @@ +/**************************************************************************** +** +** Copyright (C) 2014 Digia Plc +** All rights reserved. +** For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of Qt Enterprise Embedded. +** +** Licensees holding valid Qt Enterprise licenses may use this file in +** accordance with the Qt Enterprise License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. +** +** If you have questions regarding the use of this file, please use +** the contact form at http://qt.digia.com/ +** +****************************************************************************/ +#ifndef QWIFIINTERFACE_H +#define QWIFIINTERFACE_H + +#include <QtCore/QDir> +#include <QtCore/QDebug> +#ifdef Q_OS_ANDROID +#include <hardware_legacy/wifi.h> +#include <cutils/properties.h> +#endif + +class QWifiInterface : public QObject +{ + Q_OBJECT +public: + explicit QWifiInterface(QObject *parent = 0) + : QObject(parent) {} + ~QWifiInterface() {} + + Q_INVOKABLE bool wifiSupported() const; +}; + +#endif // QWIFIHELPERS_H |