summaryrefslogtreecommitdiffstats
path: root/src/bluetooth/doc
diff options
context:
space:
mode:
authorJerome Pasion <jerome.pasion@digia.com>2012-09-25 15:20:41 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-09-27 14:43:52 +0200
commitd8a179128c0fa8e9cc482df58b9334c696602be6 (patch)
treedd5032440aa87dfd63c973265adc9947db0918f6 /src/bluetooth/doc
parent9d89c661395347bdda9362a77d38c86ad60f486b (diff)
Qt Bluetooth: Modularized documentation
-moved documentation to src/bluetooth/doc -added a qdocconf file for Qt Bluetooth -fixed relative paths for snippets -moved examples to examples/bluetooth Change-Id: Id41bac50dca628400568d191f1c3ccfbaac790a1 Reviewed-by: Alex <ablasche@gmail.com>
Diffstat (limited to 'src/bluetooth/doc')
-rw-r--r--src/bluetooth/doc/qtbluetooth.qdocconf45
-rw-r--r--src/bluetooth/doc/snippets/doc_src_qtbluetooth.cpp99
-rw-r--r--src/bluetooth/doc/snippets/doc_src_qtbluetooth.pro43
-rw-r--r--src/bluetooth/doc/snippets/doc_src_qtbluetooth.qml68
-rw-r--r--src/bluetooth/doc/src/bluetooth-cpp.qdoc51
-rw-r--r--src/bluetooth/doc/src/bluetooth-index.qdoc95
-rw-r--r--src/bluetooth/doc/src/bluetooth-overview.qdoc104
-rw-r--r--src/bluetooth/doc/src/bluetooth-qml.qdoc54
-rw-r--r--src/bluetooth/doc/src/examples.qdoc71
9 files changed, 630 insertions, 0 deletions
diff --git a/src/bluetooth/doc/qtbluetooth.qdocconf b/src/bluetooth/doc/qtbluetooth.qdocconf
new file mode 100644
index 00000000..3ee3ffcc
--- /dev/null
+++ b/src/bluetooth/doc/qtbluetooth.qdocconf
@@ -0,0 +1,45 @@
+include(../../../doc/global/qt-html-templates-offline.qdocconf)
+include(../../../doc/global/qt-module-defaults.qdocconf)
+
+project = QtBluetooth
+description = Qt Bluetooth Reference Documentation
+url = http://qt-project.org/doc/qt-5.0/qtbluetooth-index.html
+version = 5.0.0
+
+qhp.projects = QtBluetooth
+
+qhp.QtBluetooth.file = qtbluetooth.qhp
+qhp.QtBluetooth.namespace = org.qt-project.qtbluetooth.500
+qhp.QtBluetooth.virtualFolder = qdoc
+qhp.QtBluetooth.indexTitle = Qt Bluetooth Reference Documentation
+qhp.QtBluetooth.indexRoot =
+
+qhp.QtBluetooth.filterAttributes = qtbluetooth 5.0.0 qtrefdoc
+qhp.QtBluetooth.customFilters.Qt.name = QtBluetooth 5.0.0
+qhp.QtBluetooth.customFilters.Qt.filterAttributes = qtbluetooth 5.0.0
+qhp.QtBluetooth.subprojects = classes overviews examples
+qhp.QtBluetooth.subprojects.classes.title = Classes
+qhp.QtBluetooth.subprojects.classes.indexTitle = Qt Bluetooth's Classes
+qhp.QtBluetooth.subprojects.classes.selectors = class fake:headerfile
+qhp.QtBluetooth.subprojects.classes.sortPages = true
+qhp.QtBluetooth.subprojects.overviews.title = Overviews
+qhp.QtBluetooth.subprojects.overviews.indexTitle = All Overviews and HOWTOs
+qhp.QtBluetooth.subprojects.overviews.selectors = fake:page,group,module
+qhp.QtBluetooth.subprojects.examples.title = Qt Bluetooth Examples
+qhp.QtBluetooth.subprojects.examples.indexTitle = Qt Bluetooth Examples
+qhp.QtBluetooth.subprojects.examples.selectors = fake:example
+
+outputdir = ../../../doc/qtbluetooth
+tagfile = ../../../doc/qtbluetooth/qtbluetooth.tags
+
+headerdirs += .. \
+ ../../imports/bluetooth
+
+sourcedirs += .. \
+ ../../imports/bluetooth \
+
+exampledirs += ../../../examples/bluetooth \
+ snippets/
+
+
+imagedirs += images
diff --git a/src/bluetooth/doc/snippets/doc_src_qtbluetooth.cpp b/src/bluetooth/doc/snippets/doc_src_qtbluetooth.cpp
new file mode 100644
index 00000000..c06bc4b4
--- /dev/null
+++ b/src/bluetooth/doc/snippets/doc_src_qtbluetooth.cpp
@@ -0,0 +1,99 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
+** of its contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [include]
+#include <qbluetoothlocaldevice.h>
+//! [include]
+
+//! [namespace]
+QTBLUETOOTH_USE_NAMESPACE
+//! [namespace]
+
+//! [turningon]
+QBluetoothLocalDevice localDevice;
+QString localDeviceName;
+
+// Check if Bluetooth is available on this device
+if (localDevice.isValid()) {
+
+ // Turn Bluetooth on
+ localDevice.powerOn();
+
+ // Read local device name
+ localDeviceName = localDevice.name();
+
+ // Make it visible to others
+ localDevice.setHostMode(QBluetoothLocalDevice::HostDiscoverable)
+}
+//! [turningon]
+
+//! [discovery]
+// Create a discovery agent and connect to its signals
+QBluetoothDiscoveryAgent *discoveryAgent = new QBluetoothDiscoveryAgent(this);
+connect(discoveryAgent, SIGNAL(deviceDiscovered(const QBluetoothDeviceInfo&)),
+ this, SLOT(deviceDiscovered(const QBluetoothDeviceInfo&)));
+
+// Start a discovery
+discoveryAgent->start();
+
+...
+
+// In your local slot, read information about the found devices
+void MyClass::deviceDiscovered(const QBluetoothDeviceInfo &device)
+{
+ qDebug() << "Found new device:" << device.name() << '(' << device.address().toString() << ')';
+}
+//! [discovery]
+
+//! [sendfile]
+// Create a transfer manager
+QBluetoothTransferManager *transferManager = new QBluetoothTransferManager(this);
+
+// Create the transfer request and file to be sent
+QBluetoothTransferRequest request(device.address());
+QFile *file = new QFile("testfile.txt");
+
+// Ask the transfer manager to send it
+QBluetoothTransferReply *reply = transferManager->put(request, file);
+
+// Connect to the reply's signals to be informed about the status and do cleanups when done
+connect(reply, SIGNAL(finished(QBluetoothTransferReply*)),
+ this, SLOT(transferFinished(QBluetoothTransferReply*)));
+//! [sendfile]
diff --git a/src/bluetooth/doc/snippets/doc_src_qtbluetooth.pro b/src/bluetooth/doc/snippets/doc_src_qtbluetooth.pro
new file mode 100644
index 00000000..175830ea
--- /dev/null
+++ b/src/bluetooth/doc/snippets/doc_src_qtbluetooth.pro
@@ -0,0 +1,43 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
+** of its contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#! [contacts project modification]
+QT += bluetooth
+#! [contacts project modification]
diff --git a/src/bluetooth/doc/snippets/doc_src_qtbluetooth.qml b/src/bluetooth/doc/snippets/doc_src_qtbluetooth.qml
new file mode 100644
index 00000000..dd295d49
--- /dev/null
+++ b/src/bluetooth/doc/snippets/doc_src_qtbluetooth.qml
@@ -0,0 +1,68 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
+** of its contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [import]
+import QtBluetooth 5.0
+//! [import]
+
+//! [service]
+ // The socket via which communication to remote host happens
+ BluetoothSocket {
+ id: bluetoothSocket
+
+ onConnectedChanged: {
+ console.log("bluetoothSocket status: " + connected)
+ if (connected) {
+ titleRow.title = "Connected";
+
+ // Send some data to the remote device
+ stringData = "Hello there!";
+
+ } else {
+ titleRow.title = "Disconnected";
+ }
+ }
+
+ // read incoming data from the remote device
+ onDataAvailable: {
+ print("received data:", stringData);
+ }
+ }
+//! [service]
diff --git a/src/bluetooth/doc/src/bluetooth-cpp.qdoc b/src/bluetooth/doc/src/bluetooth-cpp.qdoc
new file mode 100644
index 00000000..4dcb6021
--- /dev/null
+++ b/src/bluetooth/doc/src/bluetooth-cpp.qdoc
@@ -0,0 +1,51 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the documentation of the Qt local connectivty modules.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** 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 Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: http://www.gnu.org/copyleft/fdl.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+
+
+/*!
+
+\page bluetooth-cpp.html
+
+\title Qt Bluetooth C++ API
+\brief An API enabling basic Bluetooth operations like scanning for devices
+and connecting them.
+
+\ingroup qtconnectivity
+\ingroup qtconnectivity-c++
+
+The Qt Bluetooth C++ API enables an application to scan for devices and connect and
+interact with them in a more flexible way than the \l{Qt Bluetooth QML API}.
+
+\section1 Classes
+
+\list
+\annotatedlist connectivity-bluetooth
+\endlist
+
+*/
+
diff --git a/src/bluetooth/doc/src/bluetooth-index.qdoc b/src/bluetooth/doc/src/bluetooth-index.qdoc
new file mode 100644
index 00000000..371de05c
--- /dev/null
+++ b/src/bluetooth/doc/src/bluetooth-index.qdoc
@@ -0,0 +1,95 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** 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 Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: http://www.gnu.org/copyleft/fdl.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page qtbluetooth-index.html
+ \title Qt Bluetooth
+ \brief Qt Bluetooth enables connectivity between Bluetooth enabled devices.
+
+ Bluetooth is a short-range (less than 100 meters) wireless technology. It
+ has a reasonably high data transfer rate of 2.1 Mbit/s, which makes it ideal
+ for transfering data between devices.
+
+ Bluetooth connectivity is based on basic device management, such as scanning
+ for devices, gathering information about them, and exchaning data between
+ them.
+
+ \section1 Getting Started
+
+ To use the C++ library in your application, add the following configuration
+ option to your \c .pro file:
+
+ \snippet doc_src_qtbluetooth.pro contacts project modification
+
+ To use the classes of the module in your application you need the following
+ import statement in your \c .qml file:
+
+ \snippet doc_src_qtbluetooth.qml import
+
+ \section1 References
+
+ \table
+ \header
+ \li {1,4} Reference
+ \li {1,4} Guides
+ \li {4,1} Examples
+ \header
+ \li QML API examples
+ \li C++ API examples
+ \row
+ \li \l{Qt Bluetooth QML API}
+ \li \l{Qt Bluetooth Overview}
+ \li \l{btscanner}{QML Bluetooth Scanner}
+
+ A QML implementation of the Bluetooth device scanner.
+ \li \l{btscanner}{Bluetooth Scanner}
+
+ Scan for Bluetooth devices.
+ \row
+ \li \l{Qt Bluetooth C++ API}
+ \li \l{btchat}{Qt Bluetooth Tutorial}
+
+ A chat server and client using bluetooth.
+ \li \l{bttennis}{QML Bluetooth Tennis}
+
+ The tennis game using a QML interface to the Qt Bluetooth QML API.
+ It must connect to an instance of the C++ tennis game to play.
+ \li \l{bttennis}{Bluetooth Tennis}
+
+ The classic game of \l{http://en.wikipedia.org/wiki/Pong}{Pong}.
+ Supports multiplayer over Bluetooth and touch-to-play
+ functionality on devices that support NFC.
+ \row
+ \li
+ \li
+ \li
+ \li \l{btfiletransfer}{Bluetooth File Transfer}
+
+ Transfer files between Bluetooth devices.
+ \endtable
+
+*/
diff --git a/src/bluetooth/doc/src/bluetooth-overview.qdoc b/src/bluetooth/doc/src/bluetooth-overview.qdoc
new file mode 100644
index 00000000..d62321f7
--- /dev/null
+++ b/src/bluetooth/doc/src/bluetooth-overview.qdoc
@@ -0,0 +1,104 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the documentation of the Qt local connectivty modules.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** 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 Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: http://www.gnu.org/copyleft/fdl.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+\ingroup technology-apis
+\title Qt Bluetooth Overview
+\page qtbluetooth-overview.html
+\brief The Qt Bluetooth API enables connectivity with other Bluetooth enabled devices.
+
+\tableofcontents
+
+ With the Qt Bluetooth API typical use cases are:
+
+ \list
+ \li Retrieve information about the local Bluetooth device.
+ \li Scan for other Bluetooth devices in range and retrieve information about them.
+ \li Push files to remote devices using the OBEX Object Push Profile (OPP).
+ \li Connect to remote devices through a RFCOMM channel using the Serial Port Profile (SPP).
+ \li Create a RFCOMM server that allows incoming connections using SPP.
+ \endlist
+
+ The following sections describe how to use the Qt Bluetooth C++ API classes
+ for the above use cases.
+
+ \section1 Retrieving Local Device Information
+
+ The Qt Bluetooth API has three main purposes. The first one is to
+ obtain local and remote device information. The first steps in retrieving device information is
+ to check if Bluetooth is available on the device and read the local device address and name. The
+ QBluetoothLocalDevice is the one to provide all of this information. Additionally you can use it
+ to turn Bluetooth on and off and set the visibility on the device.
+
+ \snippet doc_src_qtbluetooth.cpp turningon
+
+ \section1 Scanning for Bluetooth Devices
+
+ Similar to the QBluetoothLocalDevice, the API offers QBluetoothDeviceInfo which provides
+ that information for remote devices. While you can just create QBluetoothDeviceInfo objects on
+ your own and fill them with data, the easier way is to use the QBluetoothDeviceDiscoveryAgent to
+ start an automated search for visible Bluetooth devices within the connectable range.
+
+ \snippet doc_src_qtbluetooth.cpp discovery
+
+ \section1 Pushing Files to Remote Devices
+
+ Once the desired device is found, there are two main use cases provided by Qt Bluetooth. The
+ simpler is to send files via the Obex Object Push Profile (OPP). As the name describes, this
+ profile can only push files from one device to another but not pull files or browse the remote
+ file system. Because of this limitation, this profile does not require the two devices to be
+ paired before exchanging data. To push files to remote devices, create a
+ QBluetoothTransferRequest and ask the QBluetoothTransferManager to push the file contained in
+ the request by calling the put() function.
+
+ \snippet doc_src_qtbluetooth.cpp sendfile
+
+ \section1 Exchanging Data Between Devices
+
+ The more flexible approach to do communication between two Bluetooth enabled devices, is to
+ create a virtual serial port connection and freely exchange data over that connection. This can
+ be done by the Serial Port Profile (SPP). The Serial Port Profile emulates a serial connection
+ over the Bluetooth transport protocol RFCOMM.
+
+ To be able to create SPP connections, you need to register a Server one one device by using
+ QRfcommServer.
+
+ \snippet chatserver.cpp Create the server
+
+ Connect to this server from another device playing the client role by using a
+ QBluetoothSocket.
+
+ \snippet chatclient.cpp startClient
+
+ Using such a connection allows to exchange any form of data in both directions.
+ It is perfectly suited for use cases like gaming or syncing the state between two instances of
+ an application on two devices. For more detailed descriptions on how to configure the server
+ and client, please refer to the detailed description sections in the QRfcommServer and
+ QBluetoothSocket classes. A good example to start with SPP is the \l{btchat}{Bluetooth Chat}
+ example.
+
+*/
diff --git a/src/bluetooth/doc/src/bluetooth-qml.qdoc b/src/bluetooth/doc/src/bluetooth-qml.qdoc
new file mode 100644
index 00000000..36c4d4fd
--- /dev/null
+++ b/src/bluetooth/doc/src/bluetooth-qml.qdoc
@@ -0,0 +1,54 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the documentation of the Qt local connectivty modules.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** 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 Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: http://www.gnu.org/copyleft/fdl.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+
+/*!
+
+\page bluetooth-qml.html
+
+\title Qt Bluetooth QML API
+\brief A QML API enabling basic Bluetooth operations like scanning for devices
+and connecting them.
+
+\ingroup qtconnectivity
+\ingroup qtconnectivity-qml
+
+The Qt Bluetooth QML API enables an application to scan for devices and connect and
+interact with them in an easier way than the C++ Classes. However, it is a bit
+more limited than the C++ API. You can always use the C++ API to create QML
+plugins with the flexibility you need.
+
+\tableofcontents
+
+\section1 QML Types
+
+\list
+\annotatedlist bluetooth-qml
+\endlist
+
+*/
+
diff --git a/src/bluetooth/doc/src/examples.qdoc b/src/bluetooth/doc/src/examples.qdoc
new file mode 100644
index 00000000..da6503c9
--- /dev/null
+++ b/src/bluetooth/doc/src/examples.qdoc
@@ -0,0 +1,71 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the documentation of the Qt local connectivty modules.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** 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 Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: http://www.gnu.org/copyleft/fdl.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \ingroup all-examples
+ \page bluetooth-examples.html
+ \title Qt Bluetooth Examples
+ \brief Examples for the QtBluetooth module
+
+ This is a variety of examples that cover the entire range of the the Qt Bluetooth API. You will find them in their own documentation but are also accessible from here.
+
+ \section2 C++ Tutorial
+ The \l{btchat}{Bluetooth Chat} example contains a tutorial on how to use the C++ API to create a RFCOMM server and client and exchange data between them.
+
+ \section2 C++ Examples
+ \table 80%
+ \header
+ \li Example
+ \li Description
+ \row
+ \li \l{bttennis}{Bluetooth Tennis}
+ \li The classic game of \l {http://en.wikipedia.org/wiki/Pong}{Pong}. Supports multiplayer
+ over Bluetooth and touch-to-play functionality on devices that support NFC.
+ \row
+ \li \l{btfiletransfer}{Bluetooth File Transfer}
+ \li Transfer files between Bluetooth devices.
+ \row
+ \li \l{btscanner}{Bluetooth Scanner}
+ \li Scan for Bluetooth devices.
+ \endtable
+
+ \section2 QML Examples
+ \table 80%
+ \header
+ \li Example
+ \li Description
+ \row
+ \li \l{bttennis}{QML Bluetooth Tennis}
+ \li The tennis game using a QML interface to the Bluetooth API. It must connect to an
+ instance of the C++ \l{bttennis}{Bluetooth Tennis} game to play.
+ \row
+ \li \l{btscanner}{QML Bluetooth Scanner}
+ \li A QML implementation of the Bluetooth device scanner.
+ \endtable
+
+*/
+