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

44 lines
1,018 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
2016-11-11 14:55:16 +00:00
#include <QIODevice>
#include <QThread>
#include <QVariantMap>
#include <QSharedPointer>
#include <QBluetoothAddress>
#include <QBluetoothUuid>
#include <QBluetoothServer>
class ConnectionMultiplexer;
class MultiplexChannel;
2016-11-11 14:55:16 +00:00
class BluetoothUploadJob
: public QObject
{
Q_OBJECT
public:
explicit BluetoothUploadJob(const QSharedPointer<QIODevice>& data, ConnectionMultiplexer *connection, QObject* parent = 0);
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