diff options
author | Michael Zanetti <michael.zanetti@nokia.com> | 2012-05-14 15:01:39 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-05-29 11:18:10 +0200 |
commit | c6e8086b5119f2bc33b6ce3790942bb0ea701cc2 (patch) | |
tree | 78f04e1e40db8e0771dd577fdb417786689099f5 /src | |
parent | 28469c0508423fa1c32aa28d4a298ffe6fcb4593 (diff) |
improve BluetoothSocket docs
Point out what's the main purpose of the BluetoothSocket and one should use C++ to have binary protocols
Change-Id: Ic50608c12f2ffc1fbb415d485b3fb4cc418f6f43
Reviewed-by: Christian Fetzer <christian.fetzer@nokia.com>
Reviewed-by: Alex <alex.blasche@nokia.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/imports/bluetooth/qdeclarativebluetoothsocket.cpp | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/imports/bluetooth/qdeclarativebluetoothsocket.cpp b/src/imports/bluetooth/qdeclarativebluetoothsocket.cpp index 43f9ec9b..4c7b971a 100644 --- a/src/imports/bluetooth/qdeclarativebluetoothsocket.cpp +++ b/src/imports/bluetooth/qdeclarativebluetoothsocket.cpp @@ -67,12 +67,15 @@ The BluetoothSocket type was introduced in \b{QtBluetooth 5.0}. - It allows a QML class connect to another bluetooth device and send - and receive QString from the device. Data is sent and received using a - QDataStream object allowing type safe transfer of string data. QDataStream - is a well known format and can be decoded by non-Qt applications. - - Connections to remote devices can be over rfcomm or l2cap. Either the remote port + It allows a QML class connect to another Bluetooth device and exchange strings + with it. Data is sent and received using a QDataStream object allowing type + safe transfers of QStrings. QDataStream is a well known format and can be + decoded by non-Qt applications. Note that for the ease of use, BluetoothSocket + is only well suited for use with strings. If you want to + use a binary protocol for your application's communication you should + consider using its C++ counterpart QBluetoothSocket. + + Connections to remote devices can be over RFCOMM or L2CAP. Either the remote port or service UUID is required. This is specified by creating a BluetoothService, or passing in the service return from BluetoothDiscoveryModel. */ @@ -318,7 +321,7 @@ void QDeclarativeBluetoothSocket::socket_readyRead() /*! \qmlproperty string BluetoothSocket::stringData - This property receives or sends data to remote bluetooth device. Arrival of + This property receives or sends data to remote Bluetooth device. Arrival of data is signaled by the dataAvailable signal and can be read by stringData. Calling sendStringData will transmit the string. If excessive amounts of data are sent, the function may block sending. Reading will |