summaryrefslogtreecommitdiffstats
path: root/src/bluetooth/qbluetoothtransfermanager.cpp
diff options
context:
space:
mode:
authorTimur Pocheptsov <Timur.Pocheptsov@digia.com>2014-10-03 17:05:00 +0200
committerAlex Blasche <alexander.blasche@digia.com>2014-10-16 16:59:15 +0200
commit038e0e38f96246848a6b7976690376cedb48140a (patch)
tree3f05f7bb2b506bffaea4b7214405ab08b27d53d4 /src/bluetooth/qbluetoothtransfermanager.cpp
parente417b7036e35744daa1978cd236798e3ee1693c0 (diff)
Port QBluetoothTransferReply to OS X.
Implement file transfer using IOBluetoothOBEXSession. - Add OBEX session class and session delegate. - Implement OBEX connect operation. - Aux. function to convert OBEX data into Qt's data types. - Start implementing OBEX put. - Extract a connection ID from response headers (if any?). - OBEX Put (without response/event handler yet). - OBEX Put completed - send the remaining chunks of data (if any). Change the unicode string encoding - byte order. - OBEX change error handling - there can be real errors (OBEX event type == error_type) but also response code can be not something good - handle them both. - Emit all signals and make Qt' btfiletransfer really working now. - Protect a service discovery against the early stop (can be a result of emit serviceDiscovered). - After a file transfer finished (either success or a failure) - disconnect (if connected) OBEX session - to make it possible to send more files. - Implement OBEXPutError + isFinished/isRunning and signals on error. - Add proper 'abort' and 'start' slots. Also emit finished on errors. - If we do not have a file, but just an input stream, generate a _really_ random and unique name, not 'XXXXX' template. Change-Id: Ib6fb35d8e0eb07d71ccd2d7b565bba226bef119c Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
Diffstat (limited to 'src/bluetooth/qbluetoothtransfermanager.cpp')
-rw-r--r--src/bluetooth/qbluetoothtransfermanager.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/bluetooth/qbluetoothtransfermanager.cpp b/src/bluetooth/qbluetoothtransfermanager.cpp
index 0754fb9a..0897465d 100644
--- a/src/bluetooth/qbluetoothtransfermanager.cpp
+++ b/src/bluetooth/qbluetoothtransfermanager.cpp
@@ -38,7 +38,8 @@
#include "qbluetoothtransferreply_bluez_p.h"
#elif QT_QNX_BLUETOOTH
#include "qbluetoothtransferreply_qnx_p.h"
-#else
+#elif QT_OSX_BLUETOOTH
+#include "qbluetoothtransferreply_osx_p.h"
#endif
QT_BEGIN_NAMESPACE
@@ -99,6 +100,10 @@ QBluetoothTransferReply *QBluetoothTransferManager::put(const QBluetoothTransfer
QBluetoothTransferReplyQnx *reply = new QBluetoothTransferReplyQnx(data, request, this);
connect(reply, SIGNAL(finished(QBluetoothTransferReply*)), this, SIGNAL(finished(QBluetoothTransferReply*)));
return reply;
+#elif QT_OSX_BLUETOOTH
+ QBluetoothTransferReply *reply = new QBluetoothTransferReplyOSX(data, request, this);
+ connect(reply, SIGNAL(finished(QBluetoothTransferReply*)), this, SIGNAL(finished(QBluetoothTransferReply*)));
+ return reply;
#else
Q_UNUSED(request);
Q_UNUSED(data);