2016-11-11 14:55:16 +00:00
|
|
|
/*
|
2020-08-17 10:48:10 +01:00
|
|
|
* SPDX-FileCopyrightText: 2016 Saikrishna Arcot <saiarcot895@gmail.com>
|
|
|
|
* SPDX-FileCopyrightText: 2018 Matthijs TIjink <matthijstijink@gmail.com>
|
2015-03-01 20:17:46 +00:00
|
|
|
*
|
2020-08-17 10:48:10 +01:00
|
|
|
* SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
|
2015-03-01 20:17:46 +00:00
|
|
|
*/
|
|
|
|
|
2016-11-11 14:55:16 +00:00
|
|
|
#ifndef BLUETOOTHUPLOADJOB_H
|
|
|
|
#define BLUETOOTHUPLOADJOB_H
|
2015-03-01 20:17:46 +00:00
|
|
|
|
2022-09-10 22:23:52 +01:00
|
|
|
#include <QBluetoothAddress>
|
|
|
|
#include <QBluetoothServer>
|
|
|
|
#include <QBluetoothUuid>
|
2016-11-11 14:55:16 +00:00
|
|
|
#include <QIODevice>
|
2022-09-10 22:23:52 +01:00
|
|
|
#include <QSharedPointer>
|
2016-11-11 14:55:16 +00:00
|
|
|
#include <QThread>
|
|
|
|
#include <QVariantMap>
|
2015-03-01 20:17:46 +00:00
|
|
|
|
2019-03-08 18:18:01 +00:00
|
|
|
class ConnectionMultiplexer;
|
|
|
|
class MultiplexChannel;
|
|
|
|
|
2022-09-10 22:23:52 +01:00
|
|
|
class BluetoothUploadJob : public QObject
|
2015-03-01 20:17:46 +00:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2024-09-09 12:29:16 +01:00
|
|
|
explicit BluetoothUploadJob(const QSharedPointer<QIODevice> &data, ConnectionMultiplexer *connection, QObject *parent = nullptr);
|
2015-03-01 20:17:46 +00:00
|
|
|
|
2016-11-11 14:55:16 +00:00
|
|
|
QVariantMap transferInfo() const;
|
|
|
|
void start();
|
2015-03-01 20:17:46 +00:00
|
|
|
|
|
|
|
private:
|
2016-11-11 14:55:16 +00:00
|
|
|
QSharedPointer<QIODevice> mData;
|
|
|
|
QBluetoothUuid mTransferUuid;
|
2019-03-08 18:18:01 +00:00
|
|
|
QSharedPointer<MultiplexChannel> mSocket;
|
2018-04-16 20:57:59 +01:00
|
|
|
|
|
|
|
void closeConnection();
|
2016-11-11 14:55:16 +00:00
|
|
|
|
|
|
|
private Q_SLOTS:
|
2018-04-16 20:57:59 +01:00
|
|
|
void writeSome();
|
2015-03-01 20:17:46 +00:00
|
|
|
};
|
|
|
|
|
2016-11-11 14:55:16 +00:00
|
|
|
#endif // BLUETOOTHUPLOADJOB_H
|