kdeconnect-kde/core/backends/bluetooth/bluetoothuploadjob.h

43 lines
1,020 B
C
Raw Normal View History

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