summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
* Bluez5: Sanitize app name to be valid DBus object path nameAlex Blasche2015-12-234-2/+26
| | | | | | | | This may happen when the app name contains for example a dash ('-'). Task-number: QTBUG-49402 Change-Id: I04b289b0723e2979a67c93e335205556bf1eb30e Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
* Handle undefined QLowEnergyController error cases as Unknown errorAlex Blasche2015-12-231-0/+1
| | | | | | | | | This is important on Android as not all error conditions are exposed via QLowEnergyController::Error enum. Change-Id: I442ecffcadc01e1a2b60ae17dc6e63e08e5f4149 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Fix inconsistent use of 'override'.Erik Verbruggen2015-12-231-1/+1
| | | | | | Change-Id: I3addd4258e3bbb5aaa6eca21af338aab57b9cf33 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
* Remove deprecated 'register' storage class specifier.Erik Verbruggen2015-12-231-1/+1
| | | | | Change-Id: Iec9163b25f961a5f7371150aba17a892e5fac305 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Android: Invalidate services after a disconnect from the peripheral sideAlex Blasche2015-12-231-0/+8
| | | | | | | | | | So far, invalidation only took place when the local/central side disconnected the connection. Task-number: QTBUG-50125 Change-Id: Ic01725d1b83e49ad7df6971d980b480f839d550b Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Remove unused isConnecting member variable in QLECPrivateOSXAlex Blasche2015-12-232-19/+6
| | | | | | | | | Most likely it was used before some changes rendered it unused. At this point the variable was initialized to false and never ever set to true. Change-Id: I5b60cf83bc362ff53f8ce276c16392aada9efc69 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
* OSX/iOS: Invalide QTLE services when remote device disconnectsAlex Blasche2015-12-231-0/+1
| | | | | | | | So far, only a local disconnect triggered the invalidation process. Task-number: QTBUG-50125 Change-Id: I324e01c86eb0c7cc820e91a6f6d6d01fb23170ab Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
* Fix namespaced build on OSX.Erik Verbruggen2015-12-231-2/+2
| | | | | Change-Id: I0baa4bbbc5d398f388a1e0aff9ba88f82a23c1cc Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Properly initialize the m_manager pointer.Frank Meerkoetter2015-12-181-0/+1
| | | | | | | Fixes coverity CID22012. Change-Id: Ifdadf0330c277aeea6f87bacd986ec15d5a0c144 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Fix missing breakFrank Meerkoetter2015-12-181-0/+1
| | | | | | | Fixes coverity CID21692. Change-Id: I6c4d464c54caae826cef1af25334a03037971ef8 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Fix resource leak.Frank Meerkoetter2015-12-182-0/+6
| | | | | | | | Do not leak the private object. Fixes coverity CID21656. Change-Id: I19873364afeb4f8244c2f436129ad82d83491a2a Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Add "we mean it header statement" to osx private headerAlex Blasche2015-12-151-0/+11
| | | | | Change-Id: I4005833edebd10b778ac06ded49a88e633e5f435 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
* Bluetooth: Documentation fix.v5.6.0-beta1Christian Kandeler2015-12-141-4/+4
| | | | | Change-Id: I095fbdfff6ba753c5c9bfbf204b3ac70d8108376 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* qlowenergycontroller_osx - move delegate to the qt_LE_queueTimur Pocheptsov2015-12-107-376/+613
| | | | | | | | | | | | | | | | | | | | | | | | | ATM CBCentralManager's delegate does its work on the main queue. With CoreFoundation event dispatcher it's now possible to use QtBluetooth from non-gui thread (more generally - from a thread other than main). This makes main queue useless - and we have to move to a dedicated dispatch queue. Also, we have to make sure we do not have race conditioins/dead-locks. This patch: 1. decouples OSXBTLECentralManager and QLowEnergyController so that these two objects working (potentially) on different threads do not share any data and do not have to use locks, removes the explicit 'delegate' interface/inheritance and replaces them with LECentralNotifier class - to be able to use Qt's signal/slot mechanics for inter-thread communication. 2. all OSXBTLECentralManager's are now executed on qt_LE_queue queue to avoid any race-conditions (since they potentially update manager's internal state). 3. Results/errors are now reported using LECentralNotifier's object (QLowEnergyController has corresponding slots connected to the notifier) Task-number: QTBUG-49476 Change-Id: Ie07cdc13ad559c96a7d2ff010843fb7bcce07c99 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Fix assignment of wrong errors values in read operationsDenis Shienkov2015-12-081-2/+2
| | | | | Change-Id: I48acb0f4bcac1cc98d74b2793151e62f2051d7c9 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Fix trivial typosKonstantin Ritt2015-12-042-3/+3
| | | | | | | | | Braodcast -> Broadcast subsequemtly -> subsequently discovred -> discovered Change-Id: I1e9d83bb0b33ad15da1f05d8a7cdd8ba82232f42 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Merge remote-tracking branch 'gerrit/5.5' into 5.6Alex Blasche2015-12-0114-37/+64
|\ | | | | | | Change-Id: I4404df69bfdac335e9c1eb63e4ada3ba89b48b6c
| * Don't register meta types during static init time5.5Alex Blasche2015-11-3015-36/+63
| | | | | | | | | | | | | | | | | | | | The QMetaType register my not be up and running by the time we attempt these meta type registration. Change-Id: I1a857a936a24b4b00a49574fac311c08c09b3d5a Task-number: QTBUG-49455 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
| * Enforce unbuffered L2CAP socket for GATTAlex Blasche2015-11-271-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The GATT protocol does not enforce a length indicator on each GATT command. Usually this is not a problem because each request is followed by a response and therefore we can assume the entire packet content is a single response/request. However the GATT WRITE_COMMAND does not have a response. Multiple requests can be sent in quick follow-up. If buffering is utilized the consecutive commands may be merged and received as single data blob on the remote device. Since Write commands don't have a length indicator they cannot be distinguished and ultimately the write command will set the wrong value. Change-Id: I02f3cd3cfaedfeae6a40272f5d22d3d88c39aa55 Task-number: QTBUG-49650 Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
* | BT/BlueZ: Do not react to "Insufficient Authorization" error.Christian Kandeler2015-11-301-1/+1
| | | | | | | | | | | | | | | | | | Authorization in the context of ATT is purely a server-side feature that the client cannot influence, so increasing the security level will not help. The "Insufficient key size" error, however, should be handled. Change-Id: I14b24700f3ebc365215eefb78b0aa8487fcbfd4d Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | Bluetooth LE scan - move to its own dispatch queue (iOS/OS X)Timur Pocheptsov2015-11-277-393/+452
| | | | | | | | | | | | | | | | | | | | | | | | | | Move CBCentralManager's delegate to its own dispatch queue, not the main one, so that even if somebody _blocks_ the main thread somehow, waiting for discovery to finish, the discovery can, indeed, finish. Also, make DDA aware of the fact that now actual scan and 'this' are working on different threads, thus we must be thread-safe. Task-number: QTBUG-49476 Change-Id: I9bcc74131f51389c8a014577c65e0943bbc8da42 Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | Android: Build .jar filesEskil Abrahamsen Blomfeldt2015-11-231-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | The build of the .jar files depends on the bluetooth and nfc modules already being built, so we need to make sure the subdirs are visited in the order specified. Change-Id: I52617babd31608be5a51c069f74de30a9d2b6a15 Task-number: QTBUG-49367 Task-number: QTBUG-49512 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* | LE discovery - change a timer creation time (iOS/OS X)Timur Pocheptsov2015-11-201-10/+11
| | | | | | | | | | | | | | | | | | Create the LE scan timer when it's really needed, so that I do not have to later move it between threads if somebody scans from a different thread. Change-Id: I71669f4c1512432fc94f80446d400336d39def64 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | Improve QBluetoothDeviceInfo::address() documentationAlex Blasche2015-11-161-0/+6
| | | | | | | | | | | | | | | | | | The address is not exposed on OS X and iOS and deviceUuid() should be used instead. Task-number: QTBUG-48746 Change-Id: I07f837ae8a01303c7d1fe27b8a8c174f288829c9 Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
* | Standardize DST terminology.Edward Welbourne2015-11-121-1/+1
| | | | | | | | | | Change-Id: Id3fe0f89966a60f2f34ff971ad26319e95de6ae9 Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* | QLowEnergyController: Add missing error string for ConnectionError.Christian Kandeler2015-11-101-1/+5
| | | | | | | | | | | | | | | | Also remove the default case from the switch so the next such oversight causes a compiler warning. Change-Id: If332a9a00698debb834462f442dddb0dac40b83d Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | Add comment that QBluetoothSocket only supports asynch read/writeAlex Blasche2015-11-021-0/+3
| | | | | | | | | | | | Task-number: QTBUG-38916 Change-Id: Ibd425ca24a1a98433f7b9d8b1fa11a7c287de871 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
* | Doc: minor link issuesNico Vertriest2015-10-302-2/+2
| | | | | | | | | | | | Change-Id: Ibd0da6662aca93d9ddd9d0a71b6ec81d983e2900 Task-number: QTBUG-43810 Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* | CoreBluetooth - simplify osxbledeviceinquiry's code.Timur Pocheptsov2015-10-292-42/+43
| | | | | | | | | | | | | | | | Replace pendingStart and isActive + all places they have to be modified with scanPhase and enum {startingScan, activeScan, noActivity}. Change-Id: I29edff3b99fc877d0d52a5974aa64c9ff2faa584 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | Core Bluetooth - give a user the second chance to enable BluetoothTimur Pocheptsov2015-10-291-11/+52
| | | | | | | | | | | | | | | | | | | | | | On iOS when we receive centralManagerDidUpdateState with the state == PoweredOff, iOS also shows an alert on screen, asking to enable Bluetooth via the "Settings" app. If we do not report an error and a user indeed enables BT, we can continue to work. Change-Id: Ic1f63f205b56fc356bc7fa645359b583c00195a6 Task-number: QTBUG-48713 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | Bluetooth: Put some data types into the Qt namespace.Christian Kandeler2015-10-231-0/+4
| | | | | | | | | | | | | | There's no reason they should be outside. Change-Id: I597c7c07857c9af820fcdb93e1587f62a2064ab3 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | Doc: Update examplesinstallpath to include the repository nameTopi Reinio2015-10-212-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | The examplesinstallpath variable in .qdocconf files defines the path under QT_INSTALL_EXAMPLES where examples are found. To match the way examples are packaged in Qt 5.6, prefix the install path with the repository name. Task-number: QTBUG-48736 Change-Id: I3452cf1ec1b1f16301497eb5468bd746d99e5cbc Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
* | Bluetooth: Fix value of an ATT error type.Christian Kandeler2015-10-161-4/+10
| | | | | | | | | | Change-Id: I2239624dd411daf400e987ec092be48805b8fa57 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | Bluetooth socket: Simplify address conversion.Christian Kandeler2015-10-153-30/+17
| | | | | | | | | | | | | | | | In most cases, callers of convertAddress() feed the result into a QBluetoothAddress, so they have no need for the output parameter. Change-Id: I23b2e8d5d49ac300c35d141b75ffa8e398e22f19 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | Merge remote-tracking branch 'gerrit/5.5' into 5.6Alex Blasche2015-10-131-0/+2
|\| | | | | | | Change-Id: I9d78ba7ad02848e3166a29c9f2d4876dd1bc1e96
| * CoreBluetooth - update for iOS 9.0Timur Pocheptsov2015-10-122-10/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | New SDK removed deprecated properties/methods and we have a compilation error as a result. Use performSelector instead of direct calls to make sure: 1. it compiles 2. it calls an existing method. This is a backport of 371818e71839280abafae858e9bb53c4ee6b9e5e. Task-number:QTBUG-48518 Change-Id: I10a2d062f9e71229a1e218d9d167a4132b97b6ab Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
| * Bluetooth device discovery agent (bluez): Prevent null pointer access.Christian Kandeler2015-10-081-0/+2
| | | | | | | | | | | | | | | | | | We would potentially access a null adapter if stop() was called from a user slot connected to the deviceDiscovered() signal. Task-number: QTBUG-48481 Change-Id: I784120dcd7a9f71d9532fac9538ae98e1a329db2 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | Add missing "We mean it" comments to private headers.Friedemann Kleint2015-10-0932-0/+352
| | | | | | | | | | Change-Id: I4e78a2b263fb779253556201fd20fe47a2afc58e Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | CoreBluetooth - update for iOS 9.0Timur Pocheptsov2015-10-082-10/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | New SDK removed deprecated properties/methods and we have a compilation error as a result. Use performSelector instead of direct calls to make sure: 1. it compiles 2. it calls an existing method. Task-number:QTBUG-48518 Change-Id: I10a2d062f9e71229a1e218d9d167a4132b97b6ab Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.5' into 5.6Liang Qi2015-10-022-1/+6
|\| | | | | | | Change-Id: I0f261e312e052855a47a3985b62c40c2f0338119
| * Tweak documentation terminologyAlex Blasche2015-09-041-1/+1
| | | | | | | | | | | | | | | | "frozen" might be interpreted as "no further changes in the future" Change-Id: If99cabb0c352460bb9904cc277da5a8de8984bbc Reviewed-by: Martin Smith <martin.smith@digia.com> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
| * Improve QBluetoothDeviceInfo::deviceUuid() documentationAlex Blasche2015-09-031-0/+5
| | | | | | | | | | | | | | | | | | | | The device uuuid is only used on OS X and iOS. QBluetoothDeviceInfo::setDeviceUuid() already stated this limitation. The getter function was not. This patch fixes the oversight. Change-Id: I900b885c922b4248abe6f60fe38deea952605bf8 Task-number: QTBUG-48022 Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
* | Use the new way of disabling strict C++ supportThiago Macieira2015-09-211-9/+1
| | | | | | | | | | | | | | | | 4684c1afe5fdb3774d56d85a52b2feaab1b8de2c in qtbase added the feature to default_post.prf Change-Id: I42e7ef1a481840699a8dffff14051bf3b83c69c2 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | [Bluetooth] Optimize loopsKonstantin Ritt2015-09-1615-100/+196
| | | | | | | | | | | | | | | | | | | | | | | | Decrease complexity from O(N+N*logN) to just O(N) for cases like foreach (Key key, map.keys()) Value value = map.value(key); , by rewriting with use of iterators. Change-Id: I81f1334797f16b624293fcebdee885b2be3c89f1 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | A nano optimization to QLowEnergyServiceKonstantin Ritt2015-09-162-17/+8
| | | | | | | | | | | | | | Rearrange condition to fail earlier for an invalid service object. Change-Id: I3ee0c611bab5610352ea4a058edd4af810212aaf Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | bluez: SDP: find a device before creating it.Robin Burchell2015-09-153-13/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To enable service discovery for known devices even if org.bluez.Adapter.CreateDevice has security restrictions, call org.bluez.Adapter.FindDevice first and CreateDevice only if the device isn't already known. The change is needed due to runtime security checks on Jolla devices, but reordering the calls does no harm when used with upstream bluetoothd. Change-Id: I8ad09808cec648f5b5949044c60173ff1ad46332 Task-number: MER#1225 Done-by: Hannu Mallat <hannu.mallat@jollamobile.com> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | QBluetoothSocket's securityFlag exists since Qt 5.6 and not 5.5Alex Blasche2015-09-151-2/+2
| | | | | | | | | | Change-Id: I13c7ec6b588280f01ce13699199177c45040645e Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
* | Introduce QML Nfc 5.6 versionv5.6.0-alpha1Alex Blasche2015-08-252-3/+9
| | | | | | | | | | Change-Id: I99b6dc6c23dd94ff3bca413ba644018880d75eba Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* | Introduce QML Bluetooth 5.6 version.Alex Blasche2015-08-252-5/+5
| | | | | | | | | | Change-Id: I6acf0153ae92371183c181c9218f614670f0419c Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* | Stop device discovery session before retrieving service records.Robin Burchell2015-08-211-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | Each org.bluez.Adapter.StartDiscovery should be paired with a corresponding StopDiscovery; it is not enough to merely observe that an adapter's Discovering property momentarily changes from true to false. Change-Id: Iee4ea4119cb4b6cd78982385bf18970d5b48d2de Task-number: MER#1230 Done-by: Hannu Mallat <hannu.mallat@jollamobile.com> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>