From 0f677d485e83abd1e1d6f64b6220948fed421d94 Mon Sep 17 00:00:00 2001 From: Alex Blasche Date: Tue, 23 Jul 2013 13:31:35 +0200 Subject: Don't export QNearFieldTagType* classes. There is no implementation for them at this stage. Hence we remove them from the committed API. They remain enabled via auto tests to ensure that the code keeps working. Task-number: QTBUG-32306 Change-Id: I5312e8436a99be4e24311bea4c92718239178ef4 Reviewed-by: Fabian Bumberger Reviewed-by: Michael Zanetti Reviewed-by: Aaron McCarthy --- src/nfc/nfc.pro | 8 +- src/nfc/qnearfieldmanager_maemo6.cpp | 2 +- src/nfc/qnearfieldmanager_simulator.cpp | 2 +- src/nfc/qnearfieldtagtype1.cpp | 3 +- src/nfc/qnearfieldtagtype1.h | 98 ------------------ src/nfc/qnearfieldtagtype1_p.h | 109 +++++++++++++++++++++ src/nfc/qnearfieldtagtype2.cpp | 3 +- src/nfc/qnearfieldtagtype2.h | 85 ---------------- src/nfc/qnearfieldtagtype2_p.h | 96 ++++++++++++++++++ src/nfc/qnearfieldtagtype3.cpp | 3 +- src/nfc/qnearfieldtagtype3.h | 77 --------------- src/nfc/qnearfieldtagtype3_p.h | 88 +++++++++++++++++ src/nfc/qnearfieldtagtype4.cpp | 3 +- src/nfc/qnearfieldtagtype4.h | 73 -------------- src/nfc/qnearfieldtagtype4_p.h | 84 ++++++++++++++++ src/nfc/qnearfieldtarget_emulator_p.h | 4 +- src/nfc/qnearfieldtarget_maemo6_p.h | 8 +- src/nfc/qtlv.cpp | 2 +- .../qnearfieldtagtype1/tst_qnearfieldtagtype1.cpp | 2 +- .../qnearfieldtagtype2/tst_qnearfieldtagtype2.cpp | 2 +- 20 files changed, 400 insertions(+), 352 deletions(-) delete mode 100644 src/nfc/qnearfieldtagtype1.h create mode 100644 src/nfc/qnearfieldtagtype1_p.h delete mode 100644 src/nfc/qnearfieldtagtype2.h create mode 100644 src/nfc/qnearfieldtagtype2_p.h delete mode 100644 src/nfc/qnearfieldtagtype3.h create mode 100644 src/nfc/qnearfieldtagtype3_p.h delete mode 100644 src/nfc/qnearfieldtagtype4.h create mode 100644 src/nfc/qnearfieldtagtype4_p.h diff --git a/src/nfc/nfc.pro b/src/nfc/nfc.pro index 61c63a68..7313b327 100644 --- a/src/nfc/nfc.pro +++ b/src/nfc/nfc.pro @@ -15,11 +15,7 @@ PUBLIC_HEADERS += \ qndefmessage.h \ qndeffilter.h \ qndefnfcurirecord.h \ - qnearfieldtagtype1.h \ - qnearfieldtagtype2.h \ qllcpsocket.h \ - qnearfieldtagtype3.h \ - qnearfieldtagtype4.h \ qllcpserver.h \ qdeclarativendefrecord.h \ qndefnfcsmartposterrecord.h @@ -28,6 +24,10 @@ PRIVATE_HEADERS += \ qndefrecord_p.h \ qnearfieldtarget_p.h \ qnearfieldmanager_p.h \ + qnearfieldtagtype1_p.h \ + qnearfieldtagtype2_p.h \ + qnearfieldtagtype3_p.h \ + qnearfieldtagtype4_p.h \ qtlv_p.h \ checksum_p.h \ qndefnfcsmartposterrecord_p.h diff --git a/src/nfc/qnearfieldmanager_maemo6.cpp b/src/nfc/qnearfieldmanager_maemo6.cpp index 9e8b9445..81f1266c 100644 --- a/src/nfc/qnearfieldmanager_maemo6.cpp +++ b/src/nfc/qnearfieldmanager_maemo6.cpp @@ -48,7 +48,7 @@ #include "ndefhandler_adaptor.h" #include "accessrequestor_adaptor.h" -#include +#include #include diff --git a/src/nfc/qnearfieldmanager_simulator.cpp b/src/nfc/qnearfieldmanager_simulator.cpp index 64b7ce72..9a0d0576 100644 --- a/src/nfc/qnearfieldmanager_simulator.cpp +++ b/src/nfc/qnearfieldmanager_simulator.cpp @@ -42,7 +42,7 @@ #include "qnearfieldmanager_simulator_p.h" #include "qnearfieldmanager.h" #include "qnearfieldtarget_p.h" -#include "qnearfieldtagtype1.h" +#include "qnearfieldtagtype1_p.h" #include "qndefmessage.h" #include diff --git a/src/nfc/qnearfieldtagtype1.cpp b/src/nfc/qnearfieldtagtype1.cpp index 51a616a2..4d652b14 100644 --- a/src/nfc/qnearfieldtagtype1.cpp +++ b/src/nfc/qnearfieldtagtype1.cpp @@ -39,7 +39,7 @@ ** ****************************************************************************/ -#include "qnearfieldtagtype1.h" +#include "qnearfieldtagtype1_p.h" #include "qnearfieldtarget_p.h" #include "qndefmessage.h" #include "qtlv_p.h" @@ -58,6 +58,7 @@ QT_BEGIN_NAMESPACE_NFC \ingroup connectivity-nfc \inmodule QtNfc + \internal */ /*! diff --git a/src/nfc/qnearfieldtagtype1.h b/src/nfc/qnearfieldtagtype1.h deleted file mode 100644 index 03660b18..00000000 --- a/src/nfc/qnearfieldtagtype1.h +++ /dev/null @@ -1,98 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** 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 Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/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 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QNEARFIELDTAGTYPE1_H -#define QNEARFIELDTAGTYPE1_H - -#include - -QT_BEGIN_NAMESPACE_NFC - -class QNearFieldTagType1Private; - -class Q_NFC_EXPORT QNearFieldTagType1 : public QNearFieldTarget -{ - Q_OBJECT - - Q_DECLARE_PRIVATE(QNearFieldTagType1) - -public: - enum WriteMode { - EraseAndWrite, - WriteOnly - }; - - explicit QNearFieldTagType1(QObject *parent = 0); - ~QNearFieldTagType1(); - - Type type() const { return NfcTagType1; } - - bool hasNdefMessage(); - RequestId readNdefMessages(); - RequestId writeNdefMessages(const QList &messages); - - quint8 version(); - virtual int memorySize(); - - // DIGPROTO - virtual RequestId readIdentification(); - - // static memory functions - virtual RequestId readAll(); - virtual RequestId readByte(quint8 address); - virtual RequestId writeByte(quint8 address, quint8 data, WriteMode mode = EraseAndWrite); - - // dynamic memory functions - virtual RequestId readSegment(quint8 segmentAddress); - virtual RequestId readBlock(quint8 blockAddress); - virtual RequestId writeBlock(quint8 blockAddress, const QByteArray &data, - WriteMode mode = EraseAndWrite); - -protected: - bool handleResponse(const QNearFieldTarget::RequestId &id, const QByteArray &response); - -private: - QNearFieldTagType1Private *d_ptr; -}; - -QT_END_NAMESPACE_NFC - -#endif // QNEARFIELDTAGTYPE1_H diff --git a/src/nfc/qnearfieldtagtype1_p.h b/src/nfc/qnearfieldtagtype1_p.h new file mode 100644 index 00000000..41225227 --- /dev/null +++ b/src/nfc/qnearfieldtagtype1_p.h @@ -0,0 +1,109 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/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 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QNEARFIELDTAGTYPE1_H +#define QNEARFIELDTAGTYPE1_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 + +QT_BEGIN_NAMESPACE_NFC + +class QNearFieldTagType1Private; + +class Q_AUTOTEST_EXPORT QNearFieldTagType1 : public QNearFieldTarget +{ + Q_OBJECT + + Q_DECLARE_PRIVATE(QNearFieldTagType1) + +public: + enum WriteMode { + EraseAndWrite, + WriteOnly + }; + + explicit QNearFieldTagType1(QObject *parent = 0); + ~QNearFieldTagType1(); + + Type type() const { return NfcTagType1; } + + bool hasNdefMessage(); + RequestId readNdefMessages(); + RequestId writeNdefMessages(const QList &messages); + + quint8 version(); + virtual int memorySize(); + + // DIGPROTO + virtual RequestId readIdentification(); + + // static memory functions + virtual RequestId readAll(); + virtual RequestId readByte(quint8 address); + virtual RequestId writeByte(quint8 address, quint8 data, WriteMode mode = EraseAndWrite); + + // dynamic memory functions + virtual RequestId readSegment(quint8 segmentAddress); + virtual RequestId readBlock(quint8 blockAddress); + virtual RequestId writeBlock(quint8 blockAddress, const QByteArray &data, + WriteMode mode = EraseAndWrite); + +protected: + bool handleResponse(const QNearFieldTarget::RequestId &id, const QByteArray &response); + +private: + QNearFieldTagType1Private *d_ptr; +}; + +QT_END_NAMESPACE_NFC + +#endif // QNEARFIELDTAGTYPE1_H diff --git a/src/nfc/qnearfieldtagtype2.cpp b/src/nfc/qnearfieldtagtype2.cpp index 91ed9cca..dadf67f8 100644 --- a/src/nfc/qnearfieldtagtype2.cpp +++ b/src/nfc/qnearfieldtagtype2.cpp @@ -39,7 +39,7 @@ ** ****************************************************************************/ -#include "qnearfieldtagtype2.h" +#include "qnearfieldtagtype2_p.h" #include "qnearfieldtarget_p.h" #include @@ -57,6 +57,7 @@ QT_BEGIN_NAMESPACE_NFC \ingroup connectivity-nfc \inmodule QtNfc + \internal */ /*! diff --git a/src/nfc/qnearfieldtagtype2.h b/src/nfc/qnearfieldtagtype2.h deleted file mode 100644 index 6b8c2315..00000000 --- a/src/nfc/qnearfieldtagtype2.h +++ /dev/null @@ -1,85 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** 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 Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/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 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QNEARFIELDTAGTYPE2_H -#define QNEARFIELDTAGTYPE2_H - -#include - -QT_BEGIN_NAMESPACE_NFC - -class QNearFieldTagType2Private; - -class Q_NFC_EXPORT QNearFieldTagType2 : public QNearFieldTarget -{ - Q_OBJECT - - Q_DECLARE_PRIVATE(QNearFieldTagType2) - -public: - explicit QNearFieldTagType2(QObject *parent = 0); - ~QNearFieldTagType2(); - - Type type() const { return NfcTagType2; } - - bool hasNdefMessage(); - RequestId readNdefMessages(); - RequestId writeNdefMessages(const QList &messages); - - quint8 version(); - int memorySize(); - - virtual RequestId readBlock(quint8 blockAddress); - virtual RequestId writeBlock(quint8 blockAddress, const QByteArray &data); - virtual RequestId selectSector(quint8 sector); - - void timerEvent(QTimerEvent *event); - -protected: - bool handleResponse(const QNearFieldTarget::RequestId &id, const QByteArray &response); - -private: - QNearFieldTagType2Private *d_ptr; -}; - -QT_END_NAMESPACE_NFC - -#endif // QNEARFIELDTAGTYPE2_H diff --git a/src/nfc/qnearfieldtagtype2_p.h b/src/nfc/qnearfieldtagtype2_p.h new file mode 100644 index 00000000..6a429722 --- /dev/null +++ b/src/nfc/qnearfieldtagtype2_p.h @@ -0,0 +1,96 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/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 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QNEARFIELDTAGTYPE2_H +#define QNEARFIELDTAGTYPE2_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 + +QT_BEGIN_NAMESPACE_NFC + +class QNearFieldTagType2Private; + +class Q_AUTOTEST_EXPORT QNearFieldTagType2 : public QNearFieldTarget +{ + Q_OBJECT + + Q_DECLARE_PRIVATE(QNearFieldTagType2) + +public: + explicit QNearFieldTagType2(QObject *parent = 0); + ~QNearFieldTagType2(); + + Type type() const { return NfcTagType2; } + + bool hasNdefMessage(); + RequestId readNdefMessages(); + RequestId writeNdefMessages(const QList &messages); + + quint8 version(); + int memorySize(); + + virtual RequestId readBlock(quint8 blockAddress); + virtual RequestId writeBlock(quint8 blockAddress, const QByteArray &data); + virtual RequestId selectSector(quint8 sector); + + void timerEvent(QTimerEvent *event); + +protected: + bool handleResponse(const QNearFieldTarget::RequestId &id, const QByteArray &response); + +private: + QNearFieldTagType2Private *d_ptr; +}; + +QT_END_NAMESPACE_NFC + +#endif // QNEARFIELDTAGTYPE2_H diff --git a/src/nfc/qnearfieldtagtype3.cpp b/src/nfc/qnearfieldtagtype3.cpp index 15823328..e13cf5c4 100644 --- a/src/nfc/qnearfieldtagtype3.cpp +++ b/src/nfc/qnearfieldtagtype3.cpp @@ -39,7 +39,7 @@ ** ****************************************************************************/ -#include "qnearfieldtagtype3.h" +#include "qnearfieldtagtype3_p.h" QT_BEGIN_NAMESPACE_NFC @@ -50,6 +50,7 @@ QT_BEGIN_NAMESPACE_NFC \ingroup connectivity-nfc \inmodule QtNfc + \internal */ /*! diff --git a/src/nfc/qnearfieldtagtype3.h b/src/nfc/qnearfieldtagtype3.h deleted file mode 100644 index e2a44381..00000000 --- a/src/nfc/qnearfieldtagtype3.h +++ /dev/null @@ -1,77 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** 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 Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/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 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QNEARFIELDTAGTYPE3_H -#define QNEARFIELDTAGTYPE3_H - -#include -#include -#include - -QT_BEGIN_NAMESPACE_NFC - -class Q_NFC_EXPORT QNearFieldTagType3 : public QNearFieldTarget -{ - Q_OBJECT - -public: - explicit QNearFieldTagType3(QObject *parent = 0); - - Type type() const { return NfcTagType3; } - - quint16 systemCode(); - QList services(); - int serviceMemorySize(quint16 serviceCode); - - virtual RequestId serviceData(quint16 serviceCode); - virtual RequestId writeServiceData(quint16 serviceCode, const QByteArray &data); - - virtual RequestId check(const QMap > &serviceBlockList); - virtual RequestId update(const QMap > &serviceBlockList, - const QByteArray &data); - -protected: - bool handleResponse(const QNearFieldTarget::RequestId &id, const QByteArray &response); -}; - -QT_END_NAMESPACE_NFC - -#endif // QNEARFIELDTAGTYPE3_H diff --git a/src/nfc/qnearfieldtagtype3_p.h b/src/nfc/qnearfieldtagtype3_p.h new file mode 100644 index 00000000..1ee94f53 --- /dev/null +++ b/src/nfc/qnearfieldtagtype3_p.h @@ -0,0 +1,88 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/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 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QNEARFIELDTAGTYPE3_H +#define QNEARFIELDTAGTYPE3_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 +#include + +QT_BEGIN_NAMESPACE_NFC + +class Q_AUTOTEST_EXPORT QNearFieldTagType3 : public QNearFieldTarget +{ + Q_OBJECT + +public: + explicit QNearFieldTagType3(QObject *parent = 0); + + Type type() const { return NfcTagType3; } + + quint16 systemCode(); + QList services(); + int serviceMemorySize(quint16 serviceCode); + + virtual RequestId serviceData(quint16 serviceCode); + virtual RequestId writeServiceData(quint16 serviceCode, const QByteArray &data); + + virtual RequestId check(const QMap > &serviceBlockList); + virtual RequestId update(const QMap > &serviceBlockList, + const QByteArray &data); + +protected: + bool handleResponse(const QNearFieldTarget::RequestId &id, const QByteArray &response); +}; + +QT_END_NAMESPACE_NFC + +#endif // QNEARFIELDTAGTYPE3_H diff --git a/src/nfc/qnearfieldtagtype4.cpp b/src/nfc/qnearfieldtagtype4.cpp index 544b9bd6..12b02e10 100644 --- a/src/nfc/qnearfieldtagtype4.cpp +++ b/src/nfc/qnearfieldtagtype4.cpp @@ -39,7 +39,7 @@ ** ****************************************************************************/ -#include "qnearfieldtagtype4.h" +#include "qnearfieldtagtype4_p.h" QT_BEGIN_NAMESPACE_NFC @@ -50,6 +50,7 @@ QT_BEGIN_NAMESPACE_NFC \ingroup connectivity-nfc \inmodule QtNfc + \internal */ /*! diff --git a/src/nfc/qnearfieldtagtype4.h b/src/nfc/qnearfieldtagtype4.h deleted file mode 100644 index 8632b92b..00000000 --- a/src/nfc/qnearfieldtagtype4.h +++ /dev/null @@ -1,73 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** 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 Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/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 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QNEARFIELDTAGTYPE4_H -#define QNEARFIELDTAGTYPE4_H - -#include - -QT_BEGIN_NAMESPACE_NFC - -class Q_NFC_EXPORT QNearFieldTagType4 : public QNearFieldTarget -{ - Q_OBJECT - -public: - explicit QNearFieldTagType4(QObject *parent = 0); - ~QNearFieldTagType4(); - - Type type() const { return NfcTagType4; } - - quint8 version(); - - virtual RequestId select(const QByteArray &name); - virtual RequestId select(quint16 fileIdentifier); - - virtual RequestId read(quint16 length = 0, quint16 startOffset = 0); - virtual RequestId write(const QByteArray &data, quint16 startOffset = 0); - -protected: - bool handleResponse(const QNearFieldTarget::RequestId &id, const QByteArray &response); -}; - -QT_END_NAMESPACE_NFC - -#endif // QNEARFIELDTAGTYPE4_H diff --git a/src/nfc/qnearfieldtagtype4_p.h b/src/nfc/qnearfieldtagtype4_p.h new file mode 100644 index 00000000..66a25ef3 --- /dev/null +++ b/src/nfc/qnearfieldtagtype4_p.h @@ -0,0 +1,84 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/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 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QNEARFIELDTAGTYPE4_H +#define QNEARFIELDTAGTYPE4_H + +#include + +// +// 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. +// + +QT_BEGIN_NAMESPACE_NFC + +class Q_AUTOTEST_EXPORT QNearFieldTagType4 : public QNearFieldTarget +{ + Q_OBJECT + +public: + explicit QNearFieldTagType4(QObject *parent = 0); + ~QNearFieldTagType4(); + + Type type() const { return NfcTagType4; } + + quint8 version(); + + virtual RequestId select(const QByteArray &name); + virtual RequestId select(quint16 fileIdentifier); + + virtual RequestId read(quint16 length = 0, quint16 startOffset = 0); + virtual RequestId write(const QByteArray &data, quint16 startOffset = 0); + +protected: + bool handleResponse(const QNearFieldTarget::RequestId &id, const QByteArray &response); +}; + +QT_END_NAMESPACE_NFC + +#endif // QNEARFIELDTAGTYPE4_H diff --git a/src/nfc/qnearfieldtarget_emulator_p.h b/src/nfc/qnearfieldtarget_emulator_p.h index de8edd81..6ed86260 100644 --- a/src/nfc/qnearfieldtarget_emulator_p.h +++ b/src/nfc/qnearfieldtarget_emulator_p.h @@ -42,8 +42,8 @@ #ifndef QNEARFIELDTARGET_EMULATOR_P_H #define QNEARFIELDTARGET_EMULATOR_P_H -#include "qnearfieldtagtype1.h" -#include "qnearfieldtagtype2.h" +#include "qnearfieldtagtype1_p.h" +#include "qnearfieldtagtype2_p.h" #include "targetemulator_p.h" #include diff --git a/src/nfc/qnearfieldtarget_maemo6_p.h b/src/nfc/qnearfieldtarget_maemo6_p.h index 680066c8..793b75f5 100644 --- a/src/nfc/qnearfieldtarget_maemo6_p.h +++ b/src/nfc/qnearfieldtarget_maemo6_p.h @@ -48,10 +48,10 @@ #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include "maemo6/adapter_interface_p.h" diff --git a/src/nfc/qtlv.cpp b/src/nfc/qtlv.cpp index 2a83902e..efc11152 100644 --- a/src/nfc/qtlv.cpp +++ b/src/nfc/qtlv.cpp @@ -41,7 +41,7 @@ #include "qtlv_p.h" -#include "qnearfieldtagtype1.h" +#include "qnearfieldtagtype1_p.h" #include diff --git a/tests/auto/qnearfieldtagtype1/tst_qnearfieldtagtype1.cpp b/tests/auto/qnearfieldtagtype1/tst_qnearfieldtagtype1.cpp index 52c19912..9611698d 100644 --- a/tests/auto/qnearfieldtagtype1/tst_qnearfieldtagtype1.cpp +++ b/tests/auto/qnearfieldtagtype1/tst_qnearfieldtagtype1.cpp @@ -44,7 +44,7 @@ #include #include #include -#include +#include #include QT_USE_NAMESPACE_NFC diff --git a/tests/auto/qnearfieldtagtype2/tst_qnearfieldtagtype2.cpp b/tests/auto/qnearfieldtagtype2/tst_qnearfieldtagtype2.cpp index 9e98f44a..9b4fa6a7 100644 --- a/tests/auto/qnearfieldtagtype2/tst_qnearfieldtagtype2.cpp +++ b/tests/auto/qnearfieldtagtype2/tst_qnearfieldtagtype2.cpp @@ -44,7 +44,7 @@ #include #include #include -#include +#include #include QT_USE_NAMESPACE_NFC -- cgit v1.2.3