summaryrefslogtreecommitdiffstats
path: root/src/bluetooth/bluetooth.pro
diff options
context:
space:
mode:
authorTimur Pocheptsov <Timur.Pocheptsov@digia.com>2014-09-23 17:18:05 +0200
committerTimur Pocheptsov <Timur.Pocheptsov@digia.com>2014-09-26 18:19:54 +0200
commitd66c466a135e4bebc293256f6ca361b287fd9bdb (patch)
tree503ba3d58787adfcc6dca6b3cab16b47bd0c32ae /src/bluetooth/bluetooth.pro
parentd1d77c8210ecf7a89a81dad69d21b91e06bf129e (diff)
Port QBluetoothServer to OS X.
Implement QBluetoothServer using IOBluetooth framework. - Add empty (for now) implementation + modify .pro file. - Add a 'socket listener'. Actually, there are no sockets, no 'listen' but I still have to emulate this to make a server work. - Implement (to some degree) QBluetoothServer::listen member functions: on OS X QBluetoothServer::listen(address, port) does not really create a listening socket, it just checks that this port is not busy yet (IOBluetooth can either listen on a port you provide, or can listen on any port, but it can not select some port and listen on it. Only after service registered (with 'invalid' port first) - we have a real channelID or PSM. - Server port - either a "fake" port assigned by QBluetoothServer::listen, or a real port as registered by IOBluetooth. - Update a dependency. - Implement nextPendingConnection. - Implement fake server ports (something similar to Android version), but on OS X these fake ports can later be replaced with real ports. - Service info updates PSM/ChannelID with a real port and also starts a listener. - Unregister a server (dtor, close, etc.) - Do not update a 'fake' port with a real one: it can happen, that a real port is already taken by some 'fake' port and this will break the whole idea of fake ports. Let them be always fake, the real is required only when starting a 'listener'. - With 'fake' server ports '0' is not valid anymore (use serverPort() instead). Change-Id: I44537a35891c6806e58ec874a18bd938d4b41c53 Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
Diffstat (limited to 'src/bluetooth/bluetooth.pro')
-rw-r--r--src/bluetooth/bluetooth.pro8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/bluetooth/bluetooth.pro b/src/bluetooth/bluetooth.pro
index 428afa87..16ae481f 100644
--- a/src/bluetooth/bluetooth.pro
+++ b/src/bluetooth/bluetooth.pro
@@ -152,18 +152,20 @@ config_bluez:qtHaveModule(dbus) {
qbluetoothdevicediscoveryagent_osx.mm \
qbluetoothserviceinfo_osx.mm \
qbluetoothservicediscoveryagent_osx.mm \
- qbluetoothsocket_osx.mm
+ qbluetoothsocket_osx.mm \
+ qbluetoothserver_osx.mm
SOURCES += \
- qbluetoothserver_p.cpp \
qlowenergycontroller_p.cpp
- PRIVATE_HEADERS += qbluetoothsocket_osx_p.h
+ PRIVATE_HEADERS += qbluetoothsocket_osx_p.h \
+ qbluetoothserver_osx_p.h
SOURCES -= qbluetoothdevicediscoveryagent.cpp
SOURCES -= qbluetoothserviceinfo.cpp
SOURCES -= qbluetoothservicediscoveryagent.cpp
SOURCES -= qbluetoothsocket.cpp
+ SOURCES -= qbluetoothserver.cpp
} else {
message("Unsupported Bluetooth platform, will not build a working QtBluetooth library.")
message("Either no Qt D-Bus found or no BlueZ headers.")