summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Blasche <alexander.blasche@digia.com>2014-03-07 16:32:40 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-03-10 11:24:51 +0100
commit3300671a9c4e545d8c68f029300cbc53f4712388 (patch)
treedaf1b7f05d355bbb13eb8b39ad450d4877e929da
parent76d5bc087cd80582af9b9a9c8b828bf9efb5cde5 (diff)
Update QtBluetooth docs for Qt 5.3
This fixes some spelling/grammar mistakes and updates information that has changed in Qt 5.3 Change-Id: I09d1ea1dc3edef08c3ee6a494968e13e91385c29 Reviewed-by: Nedim Hadzic <nhadzic@blackberry.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
-rw-r--r--examples/bluetooth/btfiletransfer/doc/src/btfiletransfer.qdoc3
-rw-r--r--examples/bluetooth/bttennis/doc/src/bttennis.qdoc5
-rw-r--r--examples/bluetooth/picturetransfer/doc/src/picturetransfer.qdoc7
-rw-r--r--src/bluetooth/doc/snippets/doc_src_qtbluetooth.cpp6
-rw-r--r--src/bluetooth/doc/src/bluetooth-index.qdoc5
-rw-r--r--src/bluetooth/doc/src/bluetooth-overview.qdoc28
-rw-r--r--src/bluetooth/qbluetoothserviceinfo.cpp3
7 files changed, 36 insertions, 21 deletions
diff --git a/examples/bluetooth/btfiletransfer/doc/src/btfiletransfer.qdoc b/examples/bluetooth/btfiletransfer/doc/src/btfiletransfer.qdoc
index b97fb4b7..aeeffffb 100644
--- a/examples/bluetooth/btfiletransfer/doc/src/btfiletransfer.qdoc
+++ b/examples/bluetooth/btfiletransfer/doc/src/btfiletransfer.qdoc
@@ -30,7 +30,8 @@
\title Bluetooth File Transfer Example
The Bluetooth File Transfer example is an application to transfer files
- via a bluetooth connection.
+ via a bluetooth connection. This example does not work on Android due to
+ missing Object Push support.
\image btfiletransfer-example.png
diff --git a/examples/bluetooth/bttennis/doc/src/bttennis.qdoc b/examples/bluetooth/bttennis/doc/src/bttennis.qdoc
index 1f511199..136b181d 100644
--- a/examples/bluetooth/bttennis/doc/src/bttennis.qdoc
+++ b/examples/bluetooth/bttennis/doc/src/bttennis.qdoc
@@ -30,7 +30,10 @@
\title Bluetooth Tennis Example
The Bluetooth Tennis example shows how to use the Qt Connectivity Bluetooth API
- to implement real-time data transfer for interactive applications.
+ to implement real-time data transfer for interactive applications. The example
+ establishes a \l {QBluetoothServiceInfo::L2capProtocol}{L2CP} socket connection.
+ Since this protocol type is not supported on Android and BlackBerry the example
+ does not work on those platforms.
\image bttennis-example.png
diff --git a/examples/bluetooth/picturetransfer/doc/src/picturetransfer.qdoc b/examples/bluetooth/picturetransfer/doc/src/picturetransfer.qdoc
index fc2ffa32..7a166121 100644
--- a/examples/bluetooth/picturetransfer/doc/src/picturetransfer.qdoc
+++ b/examples/bluetooth/picturetransfer/doc/src/picturetransfer.qdoc
@@ -1,4 +1,4 @@
-/****************************************************************************
+a/****************************************************************************
**
** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
@@ -30,7 +30,8 @@
\title QML Bluetooth Picture Push Example
The Bluetooth Picture Push example shows how to use the \l QBluetoothTransferManager
-API. The example transfers a local image to a remote device.
+API. The example transfers a local image to a remote device. Unfortunately this example cannot be used on
+Android as Qt does not support the Object Push Profile on this platform.
On the first user interface page the application scans for remote Bluetooth devices. The user must select
the appropriate device to continue:
@@ -38,7 +39,7 @@ the appropriate device to continue:
\image opp-example-1.png
The next page presents a list of image files on the device. The files must be located under
-\l QStandardPaths::PictureLocation}:
+\l QStandardPaths::PicturesLocation}:
\image opp-example-2.png
diff --git a/src/bluetooth/doc/snippets/doc_src_qtbluetooth.cpp b/src/bluetooth/doc/snippets/doc_src_qtbluetooth.cpp
index e6e787f3..88520c35 100644
--- a/src/bluetooth/doc/snippets/doc_src_qtbluetooth.cpp
+++ b/src/bluetooth/doc/snippets/doc_src_qtbluetooth.cpp
@@ -84,8 +84,14 @@ if (localDevice.isValid()) {
// Make it visible to others
localDevice.setHostMode(QBluetoothLocalDevice::HostDiscoverable);
+
+ // Get connected devices
+ QList<QBluetoothAddress> remotes;
+ remotes = localDevice.connectedDevices();
}
//! [turningon]
+
+
}
//! [discovery]
diff --git a/src/bluetooth/doc/src/bluetooth-index.qdoc b/src/bluetooth/doc/src/bluetooth-index.qdoc
index ecc9561c..cde64891 100644
--- a/src/bluetooth/doc/src/bluetooth-index.qdoc
+++ b/src/bluetooth/doc/src/bluetooth-index.qdoc
@@ -32,10 +32,11 @@
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 transferring data between devices.
+for transferring data between devices. Currently the API is supported on
+Linux (Bluez 4.x), Android and BlackBerry 10.
Bluetooth connectivity is based on basic device management, such as scanning
-for devices, gathering information about them, and exchaning data between
+for devices, gathering information about them, and exchanging data between
them.
\section1 Getting started
diff --git a/src/bluetooth/doc/src/bluetooth-overview.qdoc b/src/bluetooth/doc/src/bluetooth-overview.qdoc
index 347ab2cf..2afd2bd8 100644
--- a/src/bluetooth/doc/src/bluetooth-overview.qdoc
+++ b/src/bluetooth/doc/src/bluetooth-overview.qdoc
@@ -38,11 +38,13 @@
\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 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
+ Note that the Object Push Profile is not supported on Android.
+
The following sections describe how to use the Qt Bluetooth C++ API classes
for the above use cases.
@@ -50,16 +52,16 @@
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.
+ to check if Bluetooth is available on the device and read the local device address and name.
+ QBluetoothLocalDevice is the class that provides all of this information. Additionally you can use it
+ to turn Bluetooth on/off, set the visibility of the device and determine the current connections.
\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. Although you can just create QBluetoothDeviceInfo objects on
+ similar information for remote devices. Although 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.
@@ -67,13 +69,13 @@
\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
+ Once the desired device was found, there are two main use cases provided by Qt Bluetooth. The
+ simpler one 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.
+ the request by calling its \l {QBluetoothTransferManager::put()}{put()} function.
\snippet doc_src_qtbluetooth.cpp sendfile
@@ -84,21 +86,21 @@
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.
+ To be able to receive incoming SPP connections, you need to listen to incoming connections using
+ \l QBluetoothServer.
\snippet btchat/chatserver.cpp Create the server
Connect to this server from another device playing the client role by using a
- QBluetoothSocket.
+ QBluetoothSocket:
\snippet btchat/chatclient.cpp startClient
Using such a connection allows to exchange any form of data in both directions.
It is perfectly suited for gaming or for 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}
+ and client, please refer to the detailed description sections in the \l QBluetoothServer and
+ \l QBluetoothSocket classes. A good example to start with SPP is the \l{btchat}{Bluetooth Chat}
example.
*/
diff --git a/src/bluetooth/qbluetoothserviceinfo.cpp b/src/bluetooth/qbluetoothserviceinfo.cpp
index 84655b77..cfb2bbcb 100644
--- a/src/bluetooth/qbluetoothserviceinfo.cpp
+++ b/src/bluetooth/qbluetoothserviceinfo.cpp
@@ -137,7 +137,8 @@ QT_BEGIN_NAMESPACE
This enum describes the socket protocol used by the service.
\value UnknownProtocol The service uses an unknown socket protocol.
- \value L2capProtocol The service uses the L2CAP socket protocol.
+ \value L2capProtocol The service uses the L2CAP socket protocol. This protocol is not supported
+ for direct socket connections on Android and BlackBerry.
\value RfcommProtocol The service uses the RFCOMM socket protocol.
*/