Commit Graph

237 Commits

Author SHA1 Message Date
Alex Blasche 2f596f9b80 Btchat example should be fullscreen on mobile
Change-Id: Ib311037a4ccf147dcd083ff13c327e29e0dc08f4
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2017-06-29 09:57:04 +00:00
Alex Blasche cb1403c242 Adjust btchat example to Android UUID SDP discovery bug
Task-number: QTBUG-61392
Change-Id: Ia7d680a40b0fe359dfb5fe69ad9f3e83fe9ccb7d
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2017-06-28 13:30:06 +00:00
Alex Blasche 9fcdb6bc25 Improve pingpong example
The following adjustments were done:

- Use new Qt connect syntax
- Add QLoggingCatergory enablers (easy to enable by uncommenting)
- Makes the UI more robust to High vs Low DPI issues

Change-Id: Iad99a67ac375de828883b4add99d440f7a6994c6
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2017-06-28 07:05:44 +00:00
Alex Blasche 2aa2a2c7e8 Adjust pingpong example to Android UUID SDP discovery bug
Task-number: QTBUG-61392
Change-Id: Ie2173b57093db9285e8fc90dbec66f81b002f7c6
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2017-06-23 19:48:43 +00:00
Alex Blasche aae4768483 Adjust qml chat example to workaround required to Android SDP bug
Task-number: QTBUG-61542
Task-number: QTBUG-61392
Change-Id: Iff5c827d7ebb96dd29bc80f444d03804eddf405b
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2017-06-22 12:49:36 +00:00
Alex Blasche 71f22ac56c Properly handle disconnect socket event in QML chat example
Prior to this change the state transtion of the BluetoothSocket instance
was not distinguishing between the varios state types. It always assumes
any state transtion was a transition to "Connected".

Change-Id: I584b6c467dc77ac0602562d6792c16bf357d831c
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2017-06-20 06:06:00 +00:00
Alex Blasche deea474efc Fix minor documentation issues in QML chat example
Change-Id: Iec4214e7f6d1aab9ea88e3d2fc5025a06b54b8e3
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2017-06-20 06:05:50 +00:00
Milla Pohjanheimo 60d27ebd29 Fix failing heart-rate example on macOS
Add the missing 'defined' to deviceinfo.cpp to make the example to
build on macOS.

Change-Id: Ic632dcb1d3c47eb4af2c05324083143c9289f8f9
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
2017-04-13 13:47:32 +00:00
Alex Blasche 8f09b31d98 Remove heartlistener example
The heartrate game is the replacement example.

Change-Id: Ib51be2467c49075d34e6bea003e69453f0801dfc
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2017-04-07 06:58:54 +00:00
Alex Blasche e83df9ffb9 Use heartrate-game example for snippets in BTLE overview
heartlistener example will be removed.

Change-Id: Iaa5c5f629cf351b97c18f61b4fab2cbbd8d0744c
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
2017-04-07 06:58:49 +00:00
Alex Blasche 2274719da5 Add Logging category provisioning to heartrate-server example
Change-Id: Id0d50632e27742ff3f0abaf752d109eeba72ad98
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2017-04-07 06:58:21 +00:00
Alex Blasche 26293d827f Update heartrate-game against latest heartlistener example
This patch incorporates the following two heartlistener patch:

1750983d3f
b01389be13

The above two patches were applied to the heartlistener example after
the fork for the new heartrate-game example was done. This patch applies
the missing two patches.

The first patch restricts the communication to Low Energy devices
The second patch ensures that the device properly disables the
heartrate notifications on disconnect events.

Change-Id: Ia2904f2ae3d5cef22abcc9815c5e0c342370e83c
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2017-04-06 08:27:29 +00:00
Alex Blasche cda661e144 Remove not needed includes from heartrate-game
Change-Id: Ia52e491a26a621f8586c5c708ef5d7ef2191c345
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2017-04-05 14:42:42 +00:00
Alex Blasche 6520f8af71 Permit BlueZ platforms to set the address type in heartrate-game
BlueZ is the only platform that requires to set the BTLE address type.
The patch introduces a new UI button which allows the user to toggle
the address type.

The UI element is disabled on all platforms but Linux/BlueZ systems.

The number of devices returned in simulator mode is reduced to
four devices. This was done purely for esthetical reasons as the
additional address type button takes screen real estate away and
five simulator devices require more screen real estate than the
remaining space for device list. This avoid the need for scrolling.

Change-Id: I14cf26b3c821db7768b9d018c2d09441cd97679a
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-04-05 08:41:58 +00:00
Alex Blasche 4aafc6c88f Add documentation for the HeartRate game example
Change-Id: I0f0a82be359fc49becd1eccc67697d5177d73bb1
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2017-04-04 10:07:26 +00:00
Alex Blasche 462954b302 Add means to enable simulator build with one easy define
Otherwise it is only enabled on Win32 builds

Change-Id: I23ce25411294ebe2dae2272c16789da897b43e82
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2017-04-04 09:02:31 +00:00
Alex Blasche 283870e39b Add new heartrate example
The example is a redesign by Lasse Räihä based in the
heartrate-listener example.

Change-Id: Iec0f48603408b37c7054839d520368eb1e436895
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2017-04-03 06:26:30 +00:00
Oliver Wolff 97977bc5f2 Remove wrong attribute assignment from btchat example
Change-Id: If6695194644fa0eceec80808115fd09af895a220
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
2017-01-30 13:06:42 +00:00
Alex Blasche 1750983d3f Restrict the BTLE examples to Low Energy use cases
This change vastely descreases the search time. There is no need to
perform a traditional SDP scan too.

Change-Id: I63d7e16dca77fb1b1db42bb330f91e917a9dd054
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2016-12-07 08:03:48 +00:00
Liang Qi 60d1ebac9e Merge remote-tracking branch 'origin/5.6' into 5.7
Change-Id: I64352b6cc066255972874e2f9c28abff35f0d613
2016-08-01 09:14:42 +02:00
Alex Blasche b01389be13 Disable notifications before disconnecting heartlistener client
The logic for this existed already. However an unintentional name override
and proper QByteArray comparison prevented it from ever being activated.

Change-Id: I73ac6c03b82cfbc11f5d755381ae89a3e8a3d9e5
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
2016-07-19 09:34:06 +00:00
Liang Qi caded2edf6 Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	examples/nfc/corkboard/corkboard.pro

Change-Id: I5d1ea0a8e21a1b55dbf744c2f4b469bc51f05c7a
2016-05-06 09:16:02 +02:00
Oswald Buddenhagen aac156966a fix example installs
Change-Id: I8fb3a8f61a7007dec6935eee3bd5ff25cd756395
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
2016-04-28 18:48:25 +00:00
Liang Qi f8759f683c Merge remote-tracking branch 'origin/5.6' into 5.7
Change-Id: I77d7b5877ce36057c3882a0b397ff27d5c35ad53
2016-04-08 10:22:51 +02:00
Edward Welbourne cd151c723f Purge sRGB chunks from PNGs in documentation.
Subjects each *.png file that matched grep -law "sRGB" to:
pngcrush -ow -brute -rem allb -reduce -force

Change-Id: I621cb2437578c3f8a658e7c26a4de045825147ce
Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
2016-03-22 12:10:12 +00:00
Edward Welbourne 08d32d1819 Purge sRGB chunks from PNGs in examples.
Subjects each *.png file that matched grep -law "sRGB" to:
pngcrush -ow -brute -rem allb -reduce

Change-Id: I2b8810829f1b91033539229a6d4b3e505b8730ea
Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
2016-03-22 12:10:05 +00:00
Christian Kandeler 4b5d90106c Add example for Bluetooth Peripheral functionality.
Change-Id: I1b48bc0be6265fb033fa2c14c2b7a182966fe2a2
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
2016-01-26 11:39:16 +00:00
Christian Kandeler c3f9fdeb39 Bluetooth: Fix undefined behavior in example.
Change-Id: I85312373f8feca9f117faf8c4b0f0f517c33e9f3
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
2015-12-15 06:45:24 +00:00
Christian Kandeler caef6445a9 Bluetooth: Fix crash in btscanner example.
Task-number: QTBUG-47773
Change-Id: Ie76345ded1292c6c62eae5f3beddd48cd9e0ae22
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
2015-09-23 11:38:05 +00:00
Alex Blasche 193ed20a9d Reduce platform specific code lines
QLEController(QBluetoothAddress) ctor is not usable on iOS and OSX.
On those platforms we have to use QLECOntroller(QBluetoothDeviceInfo).

We mark the QBluetoothAddress based ctors of QLEController obsolete
and remove most uses of them. This cleans up some ifdefs throughout
the QtBluetooth code base.

Change-Id: Ibe1e3fa271a29461e39fc3c0eeba7a910a250077
Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
2015-05-12 09:00:45 +00:00
Alex Blasche ec82c463d3 Don't remain on Service list page if the BTLE controller disconnected
When a disconnect happened, this change ensures a more consistent
UI flow.

Change-Id: I0faafd79ac82b701a35d43d43c04bf211d8cd803
Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
2015-03-31 05:27:20 +00:00
Alex Blasche ade72484f3 Don't mix pixel and point size
The view is rather obscured because of this.

Every other font size in this example uses point size except for these
two elements. This mix of point and pizel size is not permitted. There
seems to be a warning and probably related change in Qt 5.5 as well.

Change-Id: I36a7e9f1648d23f5bc737393ae735bbc7d04b494
Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
2015-03-31 05:27:08 +00:00
Jani Heikkinen 7354c6d393 Update copyright headers
Qt copyrights are now in The Qt Company, so we could update the source
code headers accordingly. In the same go we should also fix the links to
point to qt.io.

Change-Id: I3822a6484e8f7a420330de1cb1aeb0c3d1cf41b7
Reviewed-by: Sergio Ahumada <sahumada@texla.cl>
2015-02-16 11:48:42 +00:00
Alex Blasche 3264db95f9 Merge remote-tracking branch 'gerrit/5.4' into dev
Change-Id: Ia70c3fe64e2ffcb27181bf912b06e6af59d2bc92
2015-02-11 07:44:46 +01:00
Alex Blasche 9cc6a9b3af Fix crashing btchat example when selecting remote device
The example immidiately destroys the QBluetoothServiceDiscoveryAgent
when the user selects a remote chat service from the remote selector
dialog. This may happen even when the scheduled QtConcurrent call
to runSdpScan() was still pending. The subsequent signal callback into
the deleted parent caused a crash.

Unfortunately QtConcurrent::run() returns a QFuture which does not
permit stopping the pending thread execution. Therefore the runSdpScan()
had to be rewritten using QProcess to properly destruct pending
calls.

Change-Id: I1ed5e147feb94a26240901a02d836056eddabbf6
Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
2015-01-29 09:32:08 +00:00
Timur Pocheptsov 769a597083 Bluetooth LE - hearlistener example (OS X, iOS)
Workaround for CoreBluetooth's limitation (no addresses, only 'uuids').

Change-Id: I9ab83a403d4643df11320185eb473818ef798d70
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
2015-01-23 09:58:13 +01:00
Alex Blasche 746f45b946 Register PublicBrowseGroup as sequence
Based on Bluetooth spec Vol3 PartB 5.1.7 the BrowseGroupList consists
of a data element sequence. The current approach was not correct.

This was discovered because Bluez5 doesn't add a custom service to the
Extended Inquiry Response (EIR) unless it is in a sequence. If the
service is not part of the EIR other platforms such as Windows report
an error or won't simply see the service.

This was not a problem when using Bluez4 because it was more
tolerant towards such mistakes and added the custom service to the EIR
anyway.

Task-number: QTBUG-43806
Change-Id: Ib0ca59005c940249fb6aefd8ecafe5b2ceff3878
Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com>
2015-01-21 08:27:02 +01:00
Frederik Gladhorn 21cb8297c1 Merge remote-tracking branch 'origin/5.4' into dev
Conflicts:
	.qmake.conf

Change-Id: I7e707606f2caa18b6f4027aa5833b2d6d21511d4
2015-01-19 13:51:56 +01:00
Alex Blasche 6634ff0223 Make chat example more error tolerant
It becomes more obvious on platforms which do not support Bluetooth
that the example will not work.

Change-Id: Ia6d249a4a891f93abf29910500ba164662308889
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2014-12-22 14:20:04 +01:00
Frederik Gladhorn da39c8425b Merge remote-tracking branch 'origin/5.4' into dev
Conflicts:
	.qmake.conf
	src/bluetooth/qlowenergyservice.cpp

Change-Id: I4b0f68d35ea898819b7c8078b24d55ae90ee529c
2014-12-17 16:45:58 +01:00
Timur Pocheptsov 228b54c723 Bluetooth example - lowenergyscanner (OS X and iOS)
Core Bluetooth hides addresses and uses unique UUIDs instead.
This patch updates/adjusts lowenergyscanner example to work with UUIDs on iOS and OS X
instead of (empty on these platforms) device addresses.

Change-Id: Iad0b35250f434b736616fe60e356f2088e6dc279
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
2014-12-05 14:20:32 +01:00
Frederik Gladhorn 3964a4a29d Merge remote-tracking branch 'origin/5.4' into dev
Change-Id: I6c1eabeea1b3397803e285d13cef147220ff5aa4
2014-11-27 18:28:25 +01:00
Frederik Gladhorn ab485058d4 Merge remote-tracking branch 'origin/5.4.0' into 5.4
Change-Id: I3f85a68066352e0b163f47d2b8ada1d0b8d34f33
2014-11-27 18:04:50 +01:00
Timur Pocheptsov 101327b369 lowenergyscanned - update example (iOS and OS X)
With Core Bluetooth low energy controller must be created using
device info, not address (which is invalid on OS X and iOS).

Change-Id: I30cb3a061e2cd882981d7e65d636c63e57c36f8e
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
2014-11-25 10:48:02 +01:00
Alex Blasche 73563f571e Improve lowenergyscanner status reporting
Change-Id: If6fccce951c2f3c3787cde2fa593e65da26f4370
Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
2014-11-24 16:09:18 +01:00
Alex Blasche 839b05ba89 Add missing InvalidBluetoothAdapterError to QML discovery model
QBluetoothServiceDiscoveryAgent::InvalidBluetoothAdapter was introduced
by Qt 5.3 but never added to the QML BluetoothDiscoveryModel. This patch
fixes the problem.

This was noticed due to a crash on Android emulator.

Change-Id: I652576929659ca370216133154e36158e8425711
Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
2014-11-21 12:46:08 +01:00
Alex Blasche b299a75a1d More lowenergyscanner example fixes.
This fixes a UI display bug and a hanging UI when the service discovery
aborts with an error.

Change-Id: Ic84d7b885d777360c8f1396e3973623c1d2c550a
Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
2014-11-11 13:00:56 +01:00
Alex Blasche daba4737a9 Force lowenergyscanner to show empty list if we did not find services
Previously the UI was only updated when a new service was discovered
on a device. In the extremely rare event of no services being found
the UI was hanging in the "Searching for services" view.

Change-Id: I245216ac4e373a765dea2e182ab541e8830417d0
Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
2014-10-30 08:49:05 +01:00
Alex Blasche b9e6d2a484 Fix lowenergyscanner ui bugs when QLEController connection errors
1.) The QLEController may error out during connectToDevice() which does
not require the eventloop to run. At the same time the services view
is not yet loaded. Subsequently the services view never notices the
errors and loads as if the controller is still trying to connect.

2.) The services view can only be left when a disconnect() signal is
received. During a connection error the disconnect never happens
because the connect never happened. Artificially introduce a disconnect()
when the controller is not connected but disconnect was called by the UI.
This part should be cleaned up to properly allow tracking of the
controller's state in the future.

Change-Id: I2cbd90d55b5e70fb275a8f4563d9436419874e6d
Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
2014-10-29 15:22:37 +01:00
Alex Blasche 0b42f1e6f6 Fix lowenergyscanner when dealing with device scan errors
Previously the error was indicated but other UI elements were still
giving the impression that the scan was ongoing.

Change-Id: Iafab8f43bff3303eb6ad5e3385db2f81288d2e66
Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
2014-10-28 13:51:15 +01:00
Alex Blasche 794df27126 Improve QML Chat example UI
This makes the example more compliant with general UI color guidelines
and cuts out unnecessary code.

Change-Id: I1cf7df602e586a667ebd052ed45baef8eafb6955
Reviewed-by: Sami Makkonen <sami.makkonen@digia.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2014-10-05 11:23:56 +02:00
Alex Blasche 22042412de Provide example documentation for new chat example.
Change-Id: I073b0b4432d7e51516584aa1d23c681bb8544392
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2014-09-30 14:05:04 +02:00
Alex Blasche 8be9bf4cea New QML based Bt chat client
Change-Id: I235c54591dbbf04aa58c024093beca8c068b4aed
Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
2014-09-30 14:04:54 +02:00
Timur Pocheptsov f5a1cb81eb QtBluetooth : pingpong example on OS X
Re-order some declarations to make the example work on OS X.

Change-Id: I9e74ce7b19a3d749f6ba0f951c1ce013f42729f7
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
2014-09-26 15:41:00 +02:00
Alex Blasche b32a8ffc58 Fix pingpong example
1.) ElidedMiddle makes the text disappear on Debian and Ubuntu. Swapping
elide mode to wrap mode which serves the same purpose

2.) The server was started as rfcomm channel but the client used L2Cap
protocol. It may have worked anyway because rfcomm is based on l2cap.
In any case this shouldn't be relied upon especially since some
platforms don't support l2cap sockets as part of the public API offering.
This way the example becomes more widely usable.

Change-Id: Ibbcd7029d5843e86af0313037b6433017eb92c76
Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
2014-09-26 15:16:30 +02:00
Alex Blasche 5a69401899 Remove QLowEnergyServiceInfo
There is no need for this class anymore as QBluetoothServiceInfo
covers the same information.

Change-Id: I411a8abb68b34a3a4893a67ee9fac096f44bbd62
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-09-03 08:38:55 +02:00
Alex Blasche 2da622742a Rename descriptorChanged() to descriptorWritten()
This is the part of a change to be able to distinguish
characteristic write confirmations from characteristic
change notifications. Since descriptors
cannot receive notifications they won't have a
changed() signal and all existing
descriptorChanged() signals become descriptorWritten()
signals.

The changed() signal is emitted when a value notification
is received from the device. The written() signal is emitted
when a write request from the API user was successful.

Change-Id: Ief2491ead4723eaa1bca65a09a09c34458f33630
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-09-02 20:18:26 +02:00
Alex Blasche 6837d143b4 Add support for random vs public address selection to lowenergyscanner
Change-Id: I963f47f0089d072249b73bdfb0c715d43186b08d
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-09-02 13:58:14 +02:00
Alex Blasche 0a8327d422 Update and extend the lowenergyscanner example docs
Change-Id: I0be30191cbceb963c7e1bfd7e55a1f2f38772d5f
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
2014-08-25 14:03:25 +02:00
Alex Blasche 7a3a3f7664 First round of fixes for heartrate example docs
Remove old and obsolte code description. Later this will be readded
based on the Bluetooth-le-overview documentation which describes the
same thing.

Improve screenshot section of the example.

Change-Id: I499809fa0afdb27f09844678a52d0ce5a492b3c0
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
2014-08-25 14:03:19 +02:00
Alex Blasche 1da3df99c1 Provide a documentation overview for Bluetooth LE
Change-Id: I252c085f5b3ea6ccc2820a1f59d9228745ae2900
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
2014-08-25 14:03:12 +02:00
Alex Blasche 199bd83065 Detect secondary services and display service type in lowenergyscanner
QLowEnergyService::ServiceState was converted to a flag because a
primary and secondary service can be included by other services.

Change-Id: I425ce8e3f39ee07cccee2763b57a049a624f6178
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
2014-07-23 15:28:49 +02:00
Alex Blasche 58d1b5bdff Characteristic and descriptor value() are no longer hex encoded
There is no point converting the data to its hex representation. The
use case at hand will decide it in the current application context.
The returned QByteArray is the raw byte array as it comes from the
device.

This behavior was legacy (introduced by the previous API) and
subsequently it was simply adopted.

Change-Id: If662c02a5e3c3d37cccb374add02e75522352894
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
2014-07-23 15:28:47 +02:00
Alex Blasche 45536c645b Rename QLowEnergyControllerNew -> QLowEnergyController
Moves the new API into its place and completes the removal of the old
API.

Change-Id: I10a285e24e288aeb747cb1606574e27a4bf57308
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
2014-07-23 12:13:21 +02:00
Alex Blasche d5731113e9 Remove old GATT API
The subsequent patches will rename QLowEnergyControllerNew to
QLowEnergyController and fix up the documentation fragments which still
point to the old API.

Change-Id: I084e6b1a85a17f424702018f3ad7047bda35d46a
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
2014-07-23 11:01:47 +02:00
Alex Blasche ae61ed1764 Minor anchor optimization pointed out during code review
Change-Id: Ia83faca0a48174e1faf47491b22db636200f5ea8
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
2014-07-17 20:20:10 +02:00
Alex Blasche ba3c1f4f2a Various improvements to lowenergyscanner example
1.) Improves UI flow
2.) Improves error behavior (e.g. device disconnects)
3.) Adds missing signal/model updates whcih caused unexpected UI flow

Change-Id: Icc7edf4945df0e964b5c91b407ce5976a1585b81
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
2014-07-16 08:28:58 +02:00
Alex Blasche f399837b3a Add simpler API to retrieve descriptor/characteristic for certain uuid
This new API is mostly syntactic sugar and reduces the amount of code
to be written by API users.

Change-Id: I51ff1ea706ac97199646d211e39e79c8140ee74b
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
2014-07-16 08:28:46 +02:00
Alex Blasche 8bf7e9986e Port HeartRateListener Example to new API.
Change-Id: If3af869a8e5d380592d24b7482ff8eb34a11e6a0
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
2014-07-16 08:28:44 +02:00
Alex Blasche 74a4d1b1ab Improve qlowenergyscanner example UI
This patch improves the UI. The changes will be validated against a high
DPI device at a later stage.

Change-Id: Iac15941dd983fb65cc5f3ccf6803c2e95d43c3b4
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
2014-07-15 20:39:46 +02:00
Alex Blasche c39189a922 Port lowenergyscanner example to new API
Some minor improvements have been incorporated too but the focus is on
the port. More code and UI cleanups are required.

Change-Id: I56f226b8418b78190d498df04d67686220a3644e
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
2014-07-15 20:39:40 +02:00
Alex Blasche f78b5f54d8 Merge branch 'dev' into btle
Conflicts:
	src/bluetooth/qbluetoothservicediscoveryagent_bluez.cpp

Change-Id: Ib960b9e8d8800af84d2094bdf26c2652d4c81dba
2014-07-03 09:23:25 +02:00
Alex Blasche e31df00987 Merge branch '5.3' into dev
Conflicts:
	.qmake.conf
	src/bluetooth/qbluetoothlocaldevice_bluez.cpp
	src/bluetooth/qbluetoothlocaldevice_p.h
	src/bluetooth/qbluetoothservicediscoveryagent_bluez.cpp

Change-Id: Ifb0c01eb8bffbffcd2416ea8d7bf1d36eb1c70f2
2014-06-27 11:47:22 +02:00
Alex Blasche ad0df0de1b Properly deal with pairing errors in btfiletransfer example
Pairing error signals were ignored which lead to a situation in which
the UI remained in the "attempting to pair" state.

Change-Id: I66f8855cf5ab72d608650b36a844c53e27624452
Reviewed-by: Oleg Shparber <trollixx@gmail.com>
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
2014-06-16 08:38:53 +02:00
Alex Blasche 8b6881d13f Make lowenergyscanner example compile after recent API changes
The handle of a characteristic is not longer a string but a number.

Change-Id: Ic580ec8e365076704192a466cca9a6bf06786f58
Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com>
2014-06-11 12:03:32 +02:00
Alex Blasche b37dcff2f4 QBluetoothDeviceInfo::coreConfiguration() should return the QFlag
Function name was slightly adjusted to reflect the fact that it's a
flag.

Change-Id: I9c1a2fe64b93c7ae7bd826d856f8b87f985d7473
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
2014-06-04 13:42:15 +02:00
Alex Blasche 7abb1f0464 Rename permission related API in QLowEnergyCharacteristicInfo
1.) Rename QLowEnergyCharacteristicInfo::Property to
QLowEnergyCharacteristicInfo::PropertyType

2.) Rename permissions() to properties()

3.) Return PropertyTypes as return value for
permissions()/properties()

Change-Id: I5c4037876047354fd691cadc54d3ac6098db4522
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
2014-06-04 13:42:03 +02:00
Alex Blasche f334ea4b19 Merge branch 'dev' into btle
Conflicts:
	examples/bluetooth/bluetooth.pro
	src/bluetooth/bluez/bluez.pri
	src/bluetooth/doc/src/bluetooth-index.qdoc
	src/bluetooth/qbluetoothdevicediscoveryagent_bluez.cpp
	src/bluetooth/qbluetoothdeviceinfo.cpp
	src/bluetooth/qbluetoothservicediscoveryagent_bluez.cpp
	src/bluetooth/qbluetoothservicediscoveryagent_p.h
	src/bluetooth/qbluetoothservicediscoveryagent_qnx.cpp

Change-Id: I88b22c51a4ee95b067ef8d2b2fddb5cbff4566f8
2014-05-26 14:56:49 +02:00
Alex Blasche 10cd7743aa Utilize QStringLiteral where possible
The only exception are generated files and cases where
QLatin1String based overloads are used (e.g. during QString comparisons)

Change-Id: I6f36789fb8acb3b30c1dc1f8a920b118a979d74f
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-05-15 10:10:05 +02:00
Alex Blasche 94445dd4b9 Merge branch 'stable' into dev
Conflicts:
	.qmake.conf
	src/bluetooth/qbluetoothlocaldevice_bluez.cpp
	src/bluetooth/qbluetoothserver_p.h
	src/bluetooth/qbluetoothsocket_qnx.cpp

Change-Id: I08792f10155f9b4e6af30066b70e24b48985ddd6
2014-05-08 09:51:40 +02:00
Oleg Shparber 19a8f2f275 Replace all occurrences of Q_EMIT with emit
Change-Id: Ieec72048837abe70b0187086b265bcde96c7d6cd
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
2014-04-29 12:22:45 +02:00
Jani Heikkinen f665f9d8c5 Merge remote-tracking branch 'origin/release' into stable
Change-Id: Ic86710cdf2550f5cf70c81af3f351d6712cd1b0e
2014-04-23 12:44:00 +03:00
Jerome Pasion d6f4ada86a Doc: Improved example documentation
-include a section about running the example (from qtbase/doc/global)
-added links to Qt Bluetooth or Qt NFC
-updated copyright year
-added markup to a string and other small corrections
-added \brief

Task-number: QTBUG-33597
Change-Id: Ia65821549a0e2e3fbf164188982114b4741be233
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2014-04-14 12:54:45 +02:00
Alex Blasche 1399fc2c3e Use extended SDP discovery in btchat example.
Android's minimal service discovery is very limited and more often than
not fails entirely. Using FulklDiscovery dramatically increases the
chance to find the remote SPP chat server.

Task-number: QTBUG-38140
Change-Id: I1df55f74a6896312236ef06485c4063c9e893e6c
Reviewed-by: Nedim Hadzic <nhadzic@blackberry.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
2014-04-14 12:28:33 +02:00
Alex Blasche 1b25616737 Remove old Bluetooth tennis example
And update the documentation around the removal. The new
ping pong game example is written in QML and much easier to maintain.

Change-Id: I885d0c82b8f6eb8935c8f030ebb0adef9c1afc85
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
2014-04-02 16:00:26 +02:00
Nedim Hadzic 3909595e89 QML PingPong example added
Example presents the socket communication between two Bluetooth
devices. The basic concept is the ping pong game, where coordinate
updates of the ball and pedals are sent via socket.

Change-Id: I61d8eb0baaa11c1485a923bb0a6ae6b89cd0e6a9
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
2014-04-02 14:06:19 +02:00
Nedim Hadzic ec4aa0bcb5 Added and improved error handling in controller class
Error enums added and implemented together with examples.

Change-Id: I912c396080ee9a6b87f41104eb7e41f8c62abf8b
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
2014-03-25 11:46:14 +01:00
Alex Blasche 8ba83c809f Cleanup of BtLE code
1.) Remove dead pieces of code
2.) Fix warnings
3.) Optimize some code lines

Change-Id: I952fe34e8966a501a54c9ef42e9624c1fc46a2a1
Reviewed-by: Nedim Hadzic <nhadzic@blackberry.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
2014-03-15 20:59:25 +01:00
Alex Blasche 83cd348bde Merge branch 'dev' into btle
Conflicts:
	src/bluetooth/qbluetoothuuid.cpp
	tests/bttestui/btlocaldevice.cpp

Change-Id: Id16ab93ec61361950669da7eb232769c5dc4644f
2014-03-14 11:16:27 +01:00
Alex Blasche 2802eac9bc Ensure examples behave on default backend and/or with no local Bt device
This patch fixes crashes and ensures that examples give some form of
indication why they are not working.

Change-Id: Id99951e8729c0715505e5fff7448a475979a6406
Reviewed-by: Nedim Hadzic <nhadzic@blackberry.com>
Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
2014-03-14 08:39:50 +01:00
Alex Blasche 3300671a9c 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>
2014-03-10 11:24:51 +01:00
Alex Blasche 92b8a0bb37 Add screenshots and description to the QML scanner example.
Change-Id: I06c42105a8a64f41fc841958f7cd33b544b1fcae
Reviewed-by: Nedim Hadzic <nhadzic@blackberry.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
2014-03-10 10:40:00 +01:00
Nedim Hadzic 10126f30e5 BLE scanner search bar fix
During device scan, search bar was gone after device is added
and device scan was not yet done.

Change-Id: I39bd7fc1c3f8c22a93921313d818ba1cd00363a0
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
2014-03-10 09:31:41 +01:00
Alex Blasche 9e1fa32246 Fix 16 bit mode for heart rate measurement
At the same time the code has been streamlined to enhace its visual
clarity (the section is directly used in the documentation)

Change-Id: I9a126c6f7b412fc0918d45d308540651cb105f0e
Reviewed-by: Nedim Hadzic <nedimhadzija@gmail.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
2014-03-06 08:38:27 +01:00
Sergio Ahumada 5ac9aebf83 Prefer to use normalised signal/slot signatures
Change-Id: Idd8127e577be7381e170dab296d8f0564c478020
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
2014-03-03 09:50:50 +01:00
Nedim Hadzic eb632012c2 Lowenergyscanner example improved
Error handling improved, code styling improved.

Change-Id: I1f35c6a6ef9641cb445fdbe55e0127b554e50ebc
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
2014-02-27 14:56:08 +01:00
Nedim Hadzic cdc3ee8b00 Renaming QLowEnergyServiceInfo methods
Ensures that QLowEnergyServiceInfo and QBluetoothServiceInfo are more alike.

Tests and examples updated as well.

Change-Id: I0f6a97900891a9673f99578bdc8d156a8c403513
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
2014-02-21 22:57:03 +01:00
Nedim Hadzic eea868ab5f Heart Listener example added
Bluetooth Low Energy example for connecting and receiving measurements from the heart belt.

Documentation added too.

[ChangeLog][QtBluetooth] Heart Listener Bluetooth Low Energy heart belt example has been added

Change-Id: I1b690827af85411c962eb09aa87936f1fb7d9246
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
2014-02-21 21:40:30 +01:00
Alex Blasche dc75ca260e Show characteristic values with proper encoding in LEscanner example
Change-Id: I7f5fceae5d47e62d9b26fbced0cf73abe8d18d23
Reviewed-by: Nedim Hadzic <nedimhadzija@gmail.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
2014-02-20 21:37:53 +01:00
Alex Blasche cb51442e0c Fix incorrect license header.
Change-Id: If58d69ea4afb6418d60b3e0b6e9fef10ae09c055
Reviewed-by: Nedim Hadzic <nhadzic@blackberry.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
2014-02-20 16:34:51 +01:00
Alex Blasche 8fe7fbe6b5 Merge branch 'dev' into btle
Conflicts:
	examples/bluetooth/bluetooth.pro
	src/bluetooth/doc/src/examples.qdoc
	src/bluetooth/qbluetoothdevicediscoveryagent_qnx.cpp
	src/bluetooth/qbluetoothservicediscoveryagent_bluez.cpp
	src/bluetooth/qbluetoothservicediscoveryagent_p.h
	src/bluetooth/qbluetoothservicediscoveryagent_qnx.cpp

Change-Id: Ie1577e4b0f469cd5a6b05a61cbe94f180a64448d
2014-02-17 10:38:48 +01:00
Alex Blasche 0f700c166e Adjust qml scanner example to high dpi display
[ChangeLog][QtBluetooth][General] QML scanner example
has been optimized for high DPI displays. This ensures a better
user interface for Android and Blackberry devices.

Change-Id: If757cd9faddc155cbb4bb034885662abc84fc7a6
Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
2014-01-29 09:51:44 +01:00
Alex Blasche 6d08ef8b9a Add documentation for picture transfer example and minor QML fixes
Change-Id: I8ef9e19de9f48797034fd186dff4b0e096748b1d
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
2014-01-28 16:06:22 +01:00
Fabian Bumberger eae113bb1c Adding a qml OPP example for sending pictures
[ChangeLog][QtBluetooth][General] Added a new
Object-Push example.

Change-Id: I78988771259dd9c7b65080bb7fb9828f6f55ece4
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
2014-01-28 16:06:11 +01:00
Frederik Gladhorn a58f38f1c1 Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
	.qmake.conf

Change-Id: I7295292bb7d9b5fc7eba8f099f4592b70de80d11
2014-01-17 17:11:22 +01:00
Alex Blasche 81be87c88f Print error message in Bluetooth QML scanner example.
It required 15 min debugging the not working application till it was
discovered that the Bluetooth device was not turned on.

Change-Id: I05318c78dd4f19780d0b6343a4ae781703c18d91
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
2014-01-15 16:30:58 +01:00
Alex Blasche 1454664752 Don't build scanner example without QtQuick
Task-number: QTBUG-35711
Change-Id: I0406fb5edd8fb2a90046308853485eaaa4311a26
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
2014-01-15 12:20:35 +01:00
Nedim Hadzic 5cb7cd7cb5 Implemented Bluetooth Low Energy: examples documentation
Added documentation for lowenergyscanner example together with two screenshots.

Change-Id: I3615ffee26edd5b2ce75e93adc940ba9d272f072
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
2014-01-14 17:15:25 +01:00
Nedim Hadzic 316a17406b Implemented Bluetooth Low Energy: examples
Examples which illustrate how to use BLE API are implemented. First example
is an application for discovering LE devices, services and characteristics.

Change-Id: Ic144c78499b74934541837df9a53183b4e7e32f7
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
2014-01-09 17:48:29 +01:00
Alex Blasche 94f862e278 Use QLoggingCategory to categorize the various debug output streams
Task-number: QTBUG-32253
Change-Id: I193162407d0fc7eca83689e31f03e1641a494ab0
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
2013-12-20 09:06:10 +01:00
Alex Blasche 6a07037765 Fix make install rules to all examples in QtConnectivity repo
This was highlighted during the testing of the Qt 5.2.0 package.

Change-Id: I94b27f02a6621bccb9f0ce0d0cc184a449014573
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
2013-11-28 15:09:08 +01:00
Nedim Hadzic ec61d7b9e8 Implemented Bluetooth Low Energy gatt service and characteristics discovery
Bluez v4.x does not have total support for LE devices, a new approach, using gatttool command was implemented.

Auto-tests and documentation will be in other commits.

Change-Id: Iee711cc111199e15956052eebb7593bd3a5e27c8
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
2013-11-04 09:35:01 +01:00
Nico Vertriest f674d4a5ad Doc: language and style review doc qtconnectivity
Reviewed doc Bluetooth and NFC

Task-number: QTBUG-32173
Change-Id: I80f81c2123c3ee4fc269f471123f332dc39ee958
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-10-14 12:44:21 +02:00
Alex Blasche f50cf1de80 QtBluetooth QML API starts with 5.2.
5.0 remains as silent import though.

Change-Id: I06c839a1224dc0d8b019bd99e354245f829ae750
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
2013-10-14 09:30:17 +02:00
Alex Blasche aa5f17bda3 BluetoothDiscoveryModel API fixes
- rename signal: newServiceDiscovered -> serviceDiscovered
- rename signal: newDeviceDiscovered -> deviceDisovered
- add parameter to deviceDiscovered signal
- improve documentation for above signals
- minor example fixes

Task-number: QTBUG-33678
Change-Id: I2f9223250ef844564c3e76a85adc25322867fd6e
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
2013-10-11 15:57:06 +02:00
Fabian Bumberger eefe516bd0 Change the service properties in btchat example
And adding some links to the documentation.

Change-Id: I7f9baf6a648547ef028f9521b0d88b88267fa301
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
2013-10-01 15:53:59 +02:00
Alex Blasche 176d5208a3 Emit service discovery error during internal device discovery
This was discovered when starting a service discovery while no
Bluetooth device is connected.

Change-Id: Ibb970ee6cb95ff50bca635813cce23c4d7f8e3c6
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
2013-09-25 11:26:46 +02:00
Alex Blasche 85de7d64e8 Fix peer to peer communication using two local adapters.
The code assumed to use the default adapter in a variety of places
which caused wrong SDP registrations, device searches and peer names.

The btchat examples was extended to cope with two local adapters. If there are
more than two local adapters they will be ignored.

Change-Id: I27d8bce65d943773e4e6cbd86982446fa79664a4
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
2013-09-25 10:37:27 +02:00
Fabian Bumberger ec83763323 Unify QBluetoothSoket, QBluetoothServer and QBluetoothServiceInfo protocol enum
Change-Id: I6e66196a599e2cceabc7d93d728ba97361d8999f
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
2013-09-20 10:09:12 +02:00
Fabian Bumberger 8e86bc19f4 Refactor QBluetoothDiscoveryModel
- Add the option to discover devices
- Clear the model when a new discovery is started. In the previous implementation the model was only cleared if new data was available.
This can lead to some funny results.
- Change some property types to enums
- Enhance the qmlscanner example

Change-Id: I94f33e3eabd7440b5c0c6c83f3e8158009bd2dbd
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
2013-09-18 17:24:18 +02:00
Alex Blasche 2d8378e498 Cleanup Bluetooth project dependencies
This removes unnecessary Qt dependencies.

Change-Id: I0ae1fe711808f8e40aed5cc8b535bb5e1da58bff
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-09-17 08:54:51 +02:00
Fabian Bumberger b358f7d991 Remove qdeclarativebluetoothimageprovider
This class in unfinished and does not work properly plus it introduces a dependency to the svg module.
I also refactored the example where the icon was used.

Change-Id: If3bd5e2eb6b05e090255f1bae0015d69c2a83065
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
2013-09-16 11:48:33 +02:00
Alex Blasche 1047f9e838 Fix compiler warnings
Change-Id: I5d5eca4af0faa392defcec8ac50c7026eaeba2b1
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com>
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
2013-09-10 09:52:49 +02:00
Alex Blasche e21b666856 Remove QtBluetooth and QtNfc namespace.
This is based on namespace discussions on the Qt project dev mailing list.
We continue to use the Qt namespace.

Change-Id: I6119d06662f7682c11f42d759f3218be1f5a7d6c
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-09-09 12:44:29 +02:00
Nedim Hadzic ecb93e0f63 Make Bluetooth adapter choosable for device and service search
In case there are more Bluetooth adapter, device and service search
might give different results.

Addition to Change-Id: Ideddb39460985c18547baec986b15e43946c85de - added option
for setting the device adapter for service search. QBluetoothLocalDevice was used
in both classes (device and service search) for passing an argument for setting
adapter. The reason for this to keep the same approach, because in
QBluetoothServiceDiscoveryAgent class there is already a constructor
with QBluetoothAddress argument.

Auto tests and examples updated.

Change-Id: Ib5d7ff23e4846d9d42dae68d8d424031748811e5
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
2013-09-05 10:23:47 +02:00
Fabian Bumberger d8d903826d Merge QRfcommServer and QL2capServer to QBluetoothServer
Task-number: QTBUG-32722

Change-Id: Ia75ad5af2f81b737a8cca09dba919a7dc0fa0f8a
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
2013-08-29 14:06:54 +02:00
Alex Blasche 40158b4277 Improve QBluetoothTransferManager unit test
and fix some minor issues during the process.

Task-number: QTBUG-22017

Change-Id: Iff1adde28ba818c3ed0511cb5d45404f05d7c36f
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
2013-08-09 14:57:14 +02:00
Alex Blasche eacbe014db Improve btfiletransfer application
This improves the general error response while doing OPP.

Change-Id: I28fd68bfb5d6eae83ec6422c723acf98abc3abdd
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com>
2013-08-06 11:44:38 +02:00
Fabian Bumberger a7d01a4f0d Clean up for OPP
- Remove Operation enum, because we only support put requests
- Add the request to the transfer reply
- Move startOPP to the private area

Task-number: QTBUG-32726

Change-Id: If7dae547326cb74dcdd6449c08dc0d91fb8a78b2
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
2013-08-01 11:27:52 +02:00
Alex Blasche b0cca9bdd0 Remove code related to dead or currently unsupported platforms
- Removes the Meego/Maemo backend for QtNfc
- Remove Simulator, WinCE and S60 remnants from the examples

If any of these platforms becomes relevant they can be added back
of course.

Change-Id: I84712ea07f01794b622560ce77e08cee347406e3
Reviewed-by: Michael Zanetti <michael.zanetti@canonical.com>
Reviewed-by: Laszlo Papp <lpapp@kde.org>
Reviewed-by: Alex <alexander.blasche@digia.com>
2013-07-25 14:30:14 +02:00
Alex Blasche 1f0771e278 Fix BluetoothDiscoveryModel API and related fixes in example
This addresses a few bugs in the QML UI and makes the behavior
of the BluetoothDiscoveryModel more sane.

Change-Id: Ifae0848a70b8fa31a2582a5db91b4bed927926aa
Reviewed-by: Alex <alexander.blasche@digia.com>
2013-07-12 10:07:01 +02:00
Alex Blasche 8dad4698d9 Update Copyright headers
- Update Digia's copyright year
- Add copyright to files without it
- Convert old BSD to new LGPL license for auto test code

Change-Id: I47f5c871c436f9c2731b235026434448719cc671
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
2013-06-25 10:08:54 +02:00
Oswald Buddenhagen b2e4fbd2c8 fix examples regarding namespace macro use
Change-Id: I0c06adad47f206c796e242ea265809ca7882807d
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
2013-03-13 14:16:20 +01:00
Aaron McCarthy 1002efbb0c Rename NFC and Bluetooth namespace macros.
Renamed to the namespace macros to follow what syncqt expects.  This
fixes missing namespace macro warnings printed by syncqt.

Change-Id: I7be5a700e8435a559cb4c2e74938851233095887
Reviewed-by: Lorn Potter <lorn.potter@jollamobile.com>
2013-02-14 13:26:02 +01:00
Aaron McCarthy a9609faf44 Modularise documentation.
Qt Bluetooth documentation had been modularised but it was still
building using the old version. Use the qtbluetooth.qdocconf instead.

Modularise the Qt NFC Documentation.

Change-Id: Idea1631645bf21750254eddc1c41a4f819ac5156
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-01-30 12:23:50 +01:00
Oswald Buddenhagen 318e889fd4 make use of qtHaveModule()
Change-Id: I810dc7b5863c1674390a7e471845f1779cbba98c
Reviewed-by: Tasuku Suzuki <stasuku@gmail.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-01-04 09:37:58 +01:00
Jerome Pasion d8a179128c 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>
2012-09-27 14:43:52 +02:00