summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralex <alex.blasche@nokia.com>2012-02-27 16:36:39 +0100
committerQt by Nokia <qt-info@nokia.com>2012-02-28 14:34:55 +0100
commit6ecd5faa4a30bd457d3497c5c2a8fcce93d1589d (patch)
tree687ac7fabda79e0fc2efc3417163b73de1f8f726
parent876a8c28b9e1f35fcca7d65ad10cc855dfdf2500 (diff)
downloadqtconnectivity-6ecd5faa4a30bd457d3497c5c2a8fcce93d1589d.tar.gz
Remove obsolete doc snippet example.
Change-Id: I49ca14829a05df6043f13927f44a9c435e27c2fe Reviewed-by: Michael Zanetti <michael.zanetti@nokia.com> Reviewed-by: Alex <alex.blasche@nokia.com>
-rw-r--r--doc/src/snippets/connectivity.pro21
-rw-r--r--doc/src/snippets/devicediscovery.cpp77
-rw-r--r--doc/src/snippets/foorecord.cpp115
-rw-r--r--doc/src/snippets/foorecord.h69
-rw-r--r--doc/src/snippets/main.cpp46
-rw-r--r--doc/src/snippets/nfc.cpp74
-rw-r--r--doc/src/snippets/servicediscovery.cpp78
7 files changed, 0 insertions, 480 deletions
diff --git a/doc/src/snippets/connectivity.pro b/doc/src/snippets/connectivity.pro
deleted file mode 100644
index c0c0bfc6..00000000
--- a/doc/src/snippets/connectivity.pro
+++ /dev/null
@@ -1,21 +0,0 @@
-TARGET = connectivity
-TEMPLATE=app
-
-QT += bluetooth nfc
-
-INCLUDEPATH += ../../src/connectivity/nfc
-DEPENDPATH += ../../src/connectivity/nfc
-
-INCLUDEPATH += ../../src/connectivity/bluetooth
-DEPENDPATH += ../../src/connectivity/bluetooth
-
-SOURCES = main.cpp \
- nfc.cpp \
- devicediscovery.cpp \
- servicediscovery.cpp \
- foorecord.cpp
-
-HEADERS = \
- foorecord.h
-
-CONFIG += strict_flags
diff --git a/doc/src/snippets/devicediscovery.cpp b/doc/src/snippets/devicediscovery.cpp
deleted file mode 100644
index 4b250490..00000000
--- a/doc/src/snippets/devicediscovery.cpp
+++ /dev/null
@@ -1,77 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/
-**
-** This file is part of the QtBluetooth module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** 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, Nokia gives you certain additional
-** rights. These rights are described in the Nokia 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.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include <qbluetoothdevicediscoveryagent.h>
-
-#include <QtCore/QObject>
-
-QTBLUETOOTH_USE_NAMESPACE
-
-class Discoverer : public QObject
-{
- Q_OBJECT
-
-public:
- void deviceDiscovery();
-
-private slots:
- void deviceDiscovered(const QBluetoothDeviceInfo &info);
-};
-
-void Discoverer::deviceDiscovery()
-{
-//! [Device discovery]
- QBluetoothDeviceDiscoveryAgent *discoveryAgent = new QBluetoothDeviceDiscoveryAgent(this);
-
- connect(discoveryAgent, SIGNAL(deviceDiscovered(const QBluetoothDeviceInfo&)),
- this, SLOT(deviceDiscovered(const QBluetoothDeviceInfo&)));
-
- // Automatically delete agent when device discovery finishes.
- connect(discoveryAgent, SIGNAL(finished()), this, SLOT(deleteLater()));
-
- discoveryAgent->start();
-//! [Device discovery]
-}
-
-void Discoverer::deviceDiscovered(const QBluetoothDeviceInfo &info)
-{
- Q_UNUSED(info);
-}
diff --git a/doc/src/snippets/foorecord.cpp b/doc/src/snippets/foorecord.cpp
deleted file mode 100644
index 9ac2e3d4..00000000
--- a/doc/src/snippets/foorecord.cpp
+++ /dev/null
@@ -1,115 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/
-**
-** This file is part of the QtBluetooth module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** 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, Nokia gives you certain additional
-** rights. These rights are described in the Nokia 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.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "foorecord.h"
-#include <qndefrecord.h>
-
-//! [Declare foo record]
-Q_DECLARE_NDEFRECORD(QDeclarativeNdefFooRecord, QNdefRecord::ExternalRtd, "com.example:f")
-//! [Declare foo record]
-
-//! [createFooRecord]
-static inline QNdefRecord createFooRecord()
-{
- QNdefRecord foo;
- foo.setTypeNameFormat(QNdefRecord::ExternalRtd);
- foo.setType("com.example:f");
- foo.setPayload(QByteArray(sizeof(int), char(0)));
- return foo;
-}
-//! [createFooRecord]
-
-//! [copyFooRecord]
-static inline QNdefRecord copyFooRecord(const QNdefRecord &record)
-{
- if (record.typeNameFormat() != QNdefRecord::ExternalRtd)
- return createFooRecord();
- if (record.type() != "com.example:f")
- return createFooRecord();
-
- return record;
-}
-//! [copyFooRecord]
-
-//! [Constructors]
-QDeclarativeNdefFooRecord::QDeclarativeNdefFooRecord(QObject *parent)
-: QDeclarativeNdefRecord(createFooRecord(), parent)
-{
-}
-
-QDeclarativeNdefFooRecord::QDeclarativeNdefFooRecord(const QNdefRecord &record, QObject *parent)
-: QDeclarativeNdefRecord(copyFooRecord(record), parent)
-{
-}
-//! [Constructors]
-
-QDeclarativeNdefFooRecord::~QDeclarativeNdefFooRecord()
-{
-}
-
-int QDeclarativeNdefFooRecord::foo() const
-{
- QByteArray payload = record().payload();
-
- int value = payload.at(0) << 24 |
- payload.at(1) << 16 |
- payload.at(2) << 8 |
- payload.at(3) << 0;
-
- return value;
-}
-
-void QDeclarativeNdefFooRecord::setFoo(int value)
-{
- if (foo() == value)
- return;
-
- QByteArray payload;
- payload[0] = (value >> 24) & 0xff;
- payload[1] = (value >> 16) & 0xff;
- payload[2] = (value >> 8) & 0xff;
- payload[3] = (value >> 0) & 0xff;
-
- QNdefRecord r = record();
- r.setPayload(payload);
- setRecord(r);
- emit fooChanged();
-}
diff --git a/doc/src/snippets/foorecord.h b/doc/src/snippets/foorecord.h
deleted file mode 100644
index 8a6db1b7..00000000
--- a/doc/src/snippets/foorecord.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/
-**
-** This file is part of the QtBluetooth module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** 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, Nokia gives you certain additional
-** rights. These rights are described in the Nokia 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.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef FOORECORD_H
-#define FOORECORD_H
-
-#include <qdeclarativendefrecord.h>
-
-QTNFC_USE_NAMESPACE
-
-//! [Foo declaration]
-class QDeclarativeNdefFooRecord : public QDeclarativeNdefRecord
-{
- Q_OBJECT
-
- Q_PROPERTY(int foo READ foo WRITE setFoo NOTIFY fooChanged)
-
-public:
- explicit QDeclarativeNdefFooRecord(QObject *parent = 0);
- Q_INVOKABLE QDeclarativeNdefFooRecord(const QNdefRecord &record, QObject *parent = 0);
- ~QDeclarativeNdefFooRecord();
-
- int foo() const;
- void setFoo(int value);
-
-signals:
- void fooChanged();
-};
-//! [Foo declaration]
-
-#endif // FOORECORD_H
diff --git a/doc/src/snippets/main.cpp b/doc/src/snippets/main.cpp
deleted file mode 100644
index 25c30f6c..00000000
--- a/doc/src/snippets/main.cpp
+++ /dev/null
@@ -1,46 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/
-**
-** This file is part of the QtBluetooth module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** 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, Nokia gives you certain additional
-** rights. These rights are described in the Nokia 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.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-int main(int /*argc*/, char ** /*argv*/)
-{
- return 0;
-}
-
diff --git a/doc/src/snippets/nfc.cpp b/doc/src/snippets/nfc.cpp
deleted file mode 100644
index bc78bfa0..00000000
--- a/doc/src/snippets/nfc.cpp
+++ /dev/null
@@ -1,74 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/
-**
-** This file is part of the QtBluetooth module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** 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, Nokia gives you certain additional
-** rights. These rights are described in the Nokia 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.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include <qndefrecord.h>
-#include <qndefnfctextrecord.h>
-
-#include <QtCore/QDebug>
-
-QTNFC_USE_NAMESPACE
-
-void snippet_recordConversion()
-{
- QNdefRecord record;
-
- //! [Record conversion]
- if (record.isRecordType<QNdefNfcTextRecord>()) {
- QNdefNfcTextRecord textRecord(record);
-
- qDebug() << textRecord.text();
- }
- //! [Record conversion]
-}
-
-//! [Specialized class definition]
-class ExampleComF : public QNdefRecord
-{
-public:
- Q_DECLARE_NDEF_RECORD(ExampleComF, QNdefRecord::ExternalRtd, "example.com:f",
- QByteArray(sizeof(int), char(0)))
-
- int foo() const;
- void setFoo(int v);
-};
-
-Q_DECLARE_ISRECORDTYPE_FOR_NDEF_RECORD(ExampleComF, QNdefRecord::ExternalRtd, "example.com:f")
-//! [Specialized class definition]
diff --git a/doc/src/snippets/servicediscovery.cpp b/doc/src/snippets/servicediscovery.cpp
deleted file mode 100644
index edbbaf08..00000000
--- a/doc/src/snippets/servicediscovery.cpp
+++ /dev/null
@@ -1,78 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/
-**
-** This file is part of the QtBluetooth module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** 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, Nokia gives you certain additional
-** rights. These rights are described in the Nokia 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.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include <qbluetoothservicediscoveryagent.h>
-
-#include <QtCore/QObject>
-
-QTBLUETOOTH_USE_NAMESPACE
-
-class Discoverer : public QObject
-{
- Q_OBJECT
-
-public:
- void serviceDiscovery();
-
-private slots:
- void serviceDiscovered(const QBluetoothServiceInfo &info);
-};
-
-void Discoverer::serviceDiscovery()
-{
-//! [Service discovery]
- QBluetoothServiceDiscoveryAgent *discoveryAgent = new QBluetoothServiceDiscoveryAgent(this);
-
- connect(discoveryAgent, SIGNAL(serviceDiscovered(const QBluetoothServiceInfo&)),
- this, SLOT(serviceDiscovered(const QBluetoothServiceInfo&)));
-
- // Automatically delete agent when service discovery finishes.
- connect(discoveryAgent, SIGNAL(finished()), this, SLOT(deleteLater()));
-
- discoveryAgent->start();
-//! [Service discovery]
-}
-
-void Discoverer::serviceDiscovered(const QBluetoothServiceInfo &info)
-{
- Q_UNUSED(info);
-}
-