From ffbcf72ce353d1fb0568dbc87f5da344e4ccc690 Mon Sep 17 00:00:00 2001 From: Rainer Keller Date: Tue, 5 Apr 2016 11:26:04 +0200 Subject: Remove simulator support for NFC Support was dropped from the Emulator in 2012. Change-Id: I8cf75c368f1197a49bdc242c13408d0a2e6eda3d Reviewed-by: Alex Blasche --- src/nfc/nfc.pro | 21 ---- src/nfc/qllcpserver_simulator_p.cpp | 90 -------------- src/nfc/qllcpserver_simulator_p.h | 84 ------------- src/nfc/qllcpsocket_simulator_p.cpp | 187 ----------------------------- src/nfc/qllcpsocket_simulator_p.h | 104 ---------------- src/nfc/qnearfieldmanager_simulator.cpp | 205 -------------------------------- src/nfc/qnearfieldmanager_simulator_p.h | 85 ------------- 7 files changed, 776 deletions(-) delete mode 100644 src/nfc/qllcpserver_simulator_p.cpp delete mode 100644 src/nfc/qllcpserver_simulator_p.h delete mode 100644 src/nfc/qllcpsocket_simulator_p.cpp delete mode 100644 src/nfc/qllcpsocket_simulator_p.h delete mode 100644 src/nfc/qnearfieldmanager_simulator.cpp delete mode 100644 src/nfc/qnearfieldmanager_simulator_p.h (limited to 'src/nfc') diff --git a/src/nfc/nfc.pro b/src/nfc/nfc.pro index a8621609..9d28eb81 100644 --- a/src/nfc/nfc.pro +++ b/src/nfc/nfc.pro @@ -78,27 +78,6 @@ linux:!android:qtHaveModule(dbus) { include(neard/neard.pri) -} else:false { # Build for simulator backend is entirely broken - NFC_BACKEND_AVAILABLE = yes - - QT_PRIVATE += gui - - PRIVATE_HEADERS += \ - qnearfieldmanagervirtualbase_p.h \ - qnearfieldmanager_simulator_p.h \ - qllcpsocket_simulator_p.h \ - qllcpserver_simulator_p.h \ - qnearfieldsharemanagerimpl_p.h \ - qnearfieldsharetargetimpl_p.h - - - SOURCES += \ - qnearfieldmanagervirtualbase.cpp \ - qnearfieldmanager_simulator.cpp \ - qllcpsocket_simulator_p.cpp \ - qllcpserver_simulator_p.cpp \ - qnearfieldsharemanagerimpl_p.cpp \ - qnearfieldsharetargetimpl_p.cpp } else:android:!android-no-sdk { NFC_BACKEND_AVAILABLE = yes ANDROID_PERMISSIONS = \ diff --git a/src/nfc/qllcpserver_simulator_p.cpp b/src/nfc/qllcpserver_simulator_p.cpp deleted file mode 100644 index b5b8285a..00000000 --- a/src/nfc/qllcpserver_simulator_p.cpp +++ /dev/null @@ -1,90 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtNfc module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qllcpserver_simulator_p.h" - -QT_BEGIN_NAMESPACE - -QLlcpServerPrivate::QLlcpServerPrivate(QLlcpServer *q) -: q_ptr(q) -{ -} - -bool QLlcpServerPrivate::listen(const QString &serviceUri) -{ - Q_UNUSED(serviceUri); - - return false; -} - -bool QLlcpServerPrivate::isListening() const -{ - return false; -} - -void QLlcpServerPrivate::close() -{ -} - -QString QLlcpServerPrivate::serviceUri() const -{ - return QString(); -} - -quint8 QLlcpServerPrivate::serverPort() const -{ - return 0; -} - -bool QLlcpServerPrivate::hasPendingConnections() const -{ - return false; -} - -QLlcpSocket *QLlcpServerPrivate::nextPendingConnection() -{ - return 0; -} - -QLlcpSocket::SocketError QLlcpServerPrivate::serverError() const -{ - return QLlcpSocket::UnknownSocketError; -} - -QT_END_NAMESPACE diff --git a/src/nfc/qllcpserver_simulator_p.h b/src/nfc/qllcpserver_simulator_p.h deleted file mode 100644 index 30563289..00000000 --- a/src/nfc/qllcpserver_simulator_p.h +++ /dev/null @@ -1,84 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtNfc module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QLLCPSERVER_P_H -#define QLLCPSERVER_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Qt API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include - -#include "qllcpserver_p.h" - -QT_BEGIN_NAMESPACE - -class QLlcpServerPrivate -{ -public: - QLlcpServerPrivate(QLlcpServer *q); - - bool listen(const QString &serviceUri); - bool isListening() const; - - void close(); - - QString serviceUri() const; - quint8 serverPort() const; - - bool hasPendingConnections() const; - QLlcpSocket *nextPendingConnection(); - - QLlcpSocket::SocketError serverError() const; - -private: - QLlcpServer *q_ptr; -}; - -QT_END_NAMESPACE - -#endif // QLLCPSERVER_P_H diff --git a/src/nfc/qllcpsocket_simulator_p.cpp b/src/nfc/qllcpsocket_simulator_p.cpp deleted file mode 100644 index de477fd6..00000000 --- a/src/nfc/qllcpsocket_simulator_p.cpp +++ /dev/null @@ -1,187 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtNfc module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qllcpsocket_simulator_p.h" - -QT_BEGIN_NAMESPACE - -QLlcpSocketPrivate::QLlcpSocketPrivate(QLlcpSocket *q) -: q_ptr(q) -{ -} - -void QLlcpSocketPrivate::connectToService(QNearFieldTarget *target, const QString &serviceUri) -{ - Q_UNUSED(target); - Q_UNUSED(serviceUri); -} - -void QLlcpSocketPrivate::disconnectFromService() -{ -} - -bool QLlcpSocketPrivate::bind(quint8 port) -{ - Q_UNUSED(port); - - return false; -} - -bool QLlcpSocketPrivate::hasPendingDatagrams() const -{ - return false; -} - -qint64 QLlcpSocketPrivate::pendingDatagramSize() const -{ - return -1; -} - -qint64 QLlcpSocketPrivate::writeDatagram(const char *data, qint64 size) -{ - Q_UNUSED(data); - Q_UNUSED(size); - - return -1; -} - -qint64 QLlcpSocketPrivate::writeDatagram(const QByteArray &datagram) -{ - Q_UNUSED(datagram); - - return -1; -} - -qint64 QLlcpSocketPrivate::readDatagram(char *data, qint64 maxSize, - QNearFieldTarget **target, quint8 *port) -{ - Q_UNUSED(data); - Q_UNUSED(maxSize); - Q_UNUSED(target); - Q_UNUSED(port); - - return -1; -} - -qint64 QLlcpSocketPrivate::writeDatagram(const char *data, qint64 size, - QNearFieldTarget *target, quint8 port) -{ - Q_UNUSED(data); - Q_UNUSED(size); - Q_UNUSED(target); - Q_UNUSED(port); - - return -1; -} - -qint64 QLlcpSocketPrivate::writeDatagram(const QByteArray &datagram, - QNearFieldTarget *target, quint8 port) -{ - Q_UNUSED(datagram); - Q_UNUSED(target); - Q_UNUSED(port); - - return -1; -} - -QLlcpSocket::SocketError QLlcpSocketPrivate::error() const -{ - return QLlcpSocket::UnknownSocketError; -} - -QLlcpSocket::SocketState QLlcpSocketPrivate::state() const -{ - return QLlcpSocket::UnconnectedState; -} - -qint64 QLlcpSocketPrivate::readData(char *data, qint64 maxlen) -{ - Q_UNUSED(data); - Q_UNUSED(maxlen); - - return -1; -} - -qint64 QLlcpSocketPrivate::writeData(const char *data, qint64 len) -{ - Q_UNUSED(data); - Q_UNUSED(len); - - return -1; -} - -qint64 QLlcpSocketPrivate::bytesAvailable() const -{ - return 0; -} - -bool QLlcpSocketPrivate::canReadLine() const -{ - return false; -} - -bool QLlcpSocketPrivate::waitForReadyRead(int msecs) -{ - Q_UNUSED(msecs); - - return false; -} - -bool QLlcpSocketPrivate::waitForBytesWritten(int msecs) -{ - Q_UNUSED(msecs); - - return false; -} - -bool QLlcpSocketPrivate::waitForConnected(int msecs) -{ - Q_UNUSED(msecs); - - return false; -} - -bool QLlcpSocketPrivate::waitForDisconnected(int msecs) -{ - Q_UNUSED(msecs); - - return false; -} - -QT_END_NAMESPACE diff --git a/src/nfc/qllcpsocket_simulator_p.h b/src/nfc/qllcpsocket_simulator_p.h deleted file mode 100644 index 397c45ed..00000000 --- a/src/nfc/qllcpsocket_simulator_p.h +++ /dev/null @@ -1,104 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtNfc module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QLLCPSOCKET_P_H -#define QLLCPSOCKET_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Qt API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include - -#include "qllcpsocket_p.h" - -QT_BEGIN_NAMESPACE - -class QLlcpSocketPrivate -{ - Q_DECLARE_PUBLIC(QLlcpSocket) - -public: - QLlcpSocketPrivate(QLlcpSocket *q); - - void connectToService(QNearFieldTarget *target, const QString &serviceUri); - void disconnectFromService(); - - bool bind(quint8 port); - - bool hasPendingDatagrams() const; - qint64 pendingDatagramSize() const; - - qint64 writeDatagram(const char *data, qint64 size); - qint64 writeDatagram(const QByteArray &datagram); - - qint64 readDatagram(char *data, qint64 maxSize, - QNearFieldTarget **target = 0, quint8 *port = 0); - qint64 writeDatagram(const char *data, qint64 size, - QNearFieldTarget *target, quint8 port); - qint64 writeDatagram(const QByteArray &datagram, QNearFieldTarget *target, quint8 port); - - QLlcpSocket::SocketError error() const; - QLlcpSocket::SocketState state() const; - - qint64 readData(char *data, qint64 maxlen); - qint64 writeData(const char *data, qint64 len); - - qint64 bytesAvailable() const; - bool canReadLine() const; - - bool waitForReadyRead(int msecs); - bool waitForBytesWritten(int msecs); - bool waitForConnected(int msecs); - bool waitForDisconnected(int msecs); - -private: - QLlcpSocket *q_ptr; -}; - -QT_END_NAMESPACE - -#endif // QLLCPSOCKET_P_H diff --git a/src/nfc/qnearfieldmanager_simulator.cpp b/src/nfc/qnearfieldmanager_simulator.cpp deleted file mode 100644 index f91858cd..00000000 --- a/src/nfc/qnearfieldmanager_simulator.cpp +++ /dev/null @@ -1,205 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtNfc module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qnearfieldmanager_simulator_p.h" -#include "qnearfieldmanager.h" -#include "qnearfieldtarget_p.h" -#include "qnearfieldtagtype1_p.h" -#include "qndefmessage.h" - -#include -#include - -#include - -QT_BEGIN_NAMESPACE - -using namespace QtSimulatorPrivate; - -namespace Simulator { - -class TagType1 : public QNearFieldTagType1 -{ -public: - TagType1(const QByteArray &uid, QObject *parent); - ~TagType1(); - - QByteArray uid() const; - - AccessMethods accessMethods() const; - - RequestId sendCommand(const QByteArray &command); - bool waitForRequestCompleted(const RequestId &id, int msecs = 5000); - -private: - QByteArray m_uid; -}; - -TagType1::TagType1(const QByteArray &uid, QObject *parent) -: QNearFieldTagType1(parent), m_uid(uid) -{ -} - -TagType1::~TagType1() -{ -} - -QByteArray TagType1::uid() const -{ - return m_uid; -} - -QNearFieldTarget::AccessMethods TagType1::accessMethods() const -{ - return NdefAccess | TagTypeSpecificAccess; -} - -QNearFieldTarget::RequestId TagType1::sendCommand(const QByteArray &command) -{ - quint16 crc = qNfcChecksum(command.constData(), command.length()); - - RequestId id(new RequestIdPrivate); - - MobilityConnection *connection = MobilityConnection::instance(); - QByteArray response = - RemoteMetacall::call(connection->sendSocket(), WaitSync, "nfcSendCommand", - command + char(crc & 0xff) + char(crc >> 8)); - - if (response.isEmpty()) { - QMetaObject::invokeMethod(this, "error", Qt::QueuedConnection, - Q_ARG(QNearFieldTarget::Error, NoResponseError), - Q_ARG(QNearFieldTarget::RequestId, id)); - return id; - } - - // check crc - if (qNfcChecksum(response.constData(), response.length()) != 0) { - QMetaObject::invokeMethod(this, "error", Qt::QueuedConnection, - Q_ARG(QNearFieldTarget::Error, ChecksumMismatchError), - Q_ARG(QNearFieldTarget::RequestId, id)); - return id; - } - - response.chop(2); - - QMetaObject::invokeMethod(this, "handleResponse", Qt::QueuedConnection, - Q_ARG(QNearFieldTarget::RequestId, id), Q_ARG(QByteArray, response)); - - return id; -} - -bool TagType1::waitForRequestCompleted(const RequestId &id, int msecs) -{ - QCoreApplication::sendPostedEvents(this, QEvent::MetaCall); - - return QNearFieldTagType1::waitForRequestCompleted(id, msecs); -} - -class NfcConnection : public QObject -{ - Q_OBJECT - -public: - NfcConnection(); - virtual ~NfcConnection(); - -signals: - void targetEnteringProximity(const QByteArray &uid); - void targetLeavingProximity(const QByteArray &uid); -}; - -NfcConnection::NfcConnection() -: QObject(MobilityConnection::instance()) -{ - MobilityConnection *connection = MobilityConnection::instance(); - connection->addMessageHandler(this); - - RemoteMetacall::call(connection->sendSocket(), NoSync, "setRequestsNfc"); -} - -NfcConnection::~NfcConnection() -{ -} - -} - -QNearFieldManagerPrivateImpl::QNearFieldManagerPrivateImpl() -: nfcConnection(new Simulator::NfcConnection) -{ - connect(nfcConnection, SIGNAL(targetEnteringProximity(QByteArray)), - this, SLOT(targetEnteringProximity(QByteArray))); - connect(nfcConnection, SIGNAL(targetLeavingProximity(QByteArray)), - this, SLOT(targetLeavingProximity(QByteArray))); -} - -QNearFieldManagerPrivateImpl::~QNearFieldManagerPrivateImpl() -{ - delete nfcConnection; -} - -bool QNearFieldManagerPrivateImpl::isAvailable() const -{ - return true; -} - -void QNearFieldManagerPrivateImpl::targetEnteringProximity(const QByteArray &uid) -{ - QNearFieldTarget *target = m_targets.value(uid).data(); - if (!target) { - target = new Simulator::TagType1(uid, this); - m_targets.insert(uid, target); - } - - targetActivated(target); -} - -void QNearFieldManagerPrivateImpl::targetLeavingProximity(const QByteArray &uid) -{ - QNearFieldTarget *target = m_targets.value(uid).data(); - if (!target) { - m_targets.remove(uid); - return; - } - - targetDeactivated(target); -} - -QT_END_NAMESPACE - -#include "qnearfieldmanager_simulator.moc" diff --git a/src/nfc/qnearfieldmanager_simulator_p.h b/src/nfc/qnearfieldmanager_simulator_p.h deleted file mode 100644 index 15abe06f..00000000 --- a/src/nfc/qnearfieldmanager_simulator_p.h +++ /dev/null @@ -1,85 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtNfc module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QNEARFIELDMANAGER_SIMULATOR_P_H -#define QNEARFIELDMANAGER_SIMULATOR_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Qt API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include "qnearfieldmanagervirtualbase_p.h" - -#include - -QT_BEGIN_NAMESPACE - -namespace Simulator { -class NfcConnection; -} - -class QNearFieldManagerPrivateImpl : public QNearFieldManagerPrivateVirtualBase -{ - Q_OBJECT - -public: - QNearFieldManagerPrivateImpl(); - ~QNearFieldManagerPrivateImpl(); - - bool isAvailable() const; - -private slots: - void targetEnteringProximity(const QByteArray &uid); - void targetLeavingProximity(const QByteArray &uid); - -private: - Simulator::NfcConnection *nfcConnection; - QMap > m_targets; -}; - -QT_END_NAMESPACE - -#endif // QNEARFIELDMANAGER_SIMULATOR_P_H -- cgit v1.2.3