File indexing completed on 2024-05-12 04:58:51
0001 /* 0002 * SPDX-FileCopyrightText: 2016 Saikrishna Arcot <saiarcot895@gmail.com> 0003 * SPDX-FileCopyrightText: 2018 Matthijs TIjink <matthijstijink@gmail.com> 0004 * 0005 * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL 0006 */ 0007 0008 #ifndef BLUETOOTHUPLOADJOB_H 0009 #define BLUETOOTHUPLOADJOB_H 0010 0011 #include <QBluetoothAddress> 0012 #include <QBluetoothServer> 0013 #include <QBluetoothUuid> 0014 #include <QIODevice> 0015 #include <QSharedPointer> 0016 #include <QThread> 0017 #include <QVariantMap> 0018 0019 class ConnectionMultiplexer; 0020 class MultiplexChannel; 0021 0022 class BluetoothUploadJob : public QObject 0023 { 0024 Q_OBJECT 0025 public: 0026 explicit BluetoothUploadJob(const QSharedPointer<QIODevice> &data, ConnectionMultiplexer *connection, QObject *parent = 0); 0027 0028 QVariantMap transferInfo() const; 0029 void start(); 0030 0031 private: 0032 QSharedPointer<QIODevice> mData; 0033 QBluetoothUuid mTransferUuid; 0034 QSharedPointer<MultiplexChannel> mSocket; 0035 0036 void closeConnection(); 0037 0038 private Q_SLOTS: 0039 void writeSome(); 0040 }; 0041 0042 #endif // BLUETOOTHUPLOADJOB_H