QBluetoothTransferReply Class
The QBluetoothTransferReply class stores the response for a data transfer request. More...
Header: | #include <QBluetoothTransferReply> |
qmake: | QT += bluetooth |
Since: | Qt 5.2 |
Inherits: | QObject |
Public Types
enum | TransferError { NoError, UnknownError, FileNotFoundError, HostNotFoundError, ..., SessionError } |
Public Functions
virtual | ~QBluetoothTransferReply() |
virtual QBluetoothTransferReply::TransferError | error() const = 0 |
virtual QString | errorString() const = 0 |
virtual bool | isFinished() const = 0 |
virtual bool | isRunning() const = 0 |
QBluetoothTransferManager * | manager() const |
QBluetoothTransferRequest | request() const |
- 31 public functions inherited from QObject
Public Slots
void | abort() |
- 1 public slot inherited from QObject
Signals
void | error(QBluetoothTransferReply::TransferError lastError) |
void | finished(QBluetoothTransferReply *) |
void | transferProgress(qint64 bytesTransferred, qint64 bytesTotal) |
- 2 signals inherited from QObject
Static Public Members
const QMetaObject | staticMetaObject |
- 9 static public members inherited from QObject
Protected Functions
QBluetoothTransferReply(QObject *parent = nullptr) | |
void | setManager(QBluetoothTransferManager *manager) |
void | setRequest(const QBluetoothTransferRequest &request) |
- 9 protected functions inherited from QObject
Protected Variables
QBluetoothTransferReplyPrivate * | d_ptr |
Additional Inherited Members
- 1 property inherited from QObject
Detailed Description
The QBluetoothTransferReply class stores the response for a data transfer request.
In additional to a copy of the QBluetoothTransferRequest object used to create the request, QBluetoothTransferReply contains the contents of the reply itself.
After the file transfer has started, QBluetoothTransferReply emits the transferProgress() signal, which indicates the progress of the file transfer.
Member Type Documentation
enum QBluetoothTransferReply::TransferError
This enum describes the type of error that occurred
Constant | Value | Description |
---|---|---|
QBluetoothTransferReply::NoError | 0 | No error. |
QBluetoothTransferReply::UnknownError | 1 | Unknown error, no better enum available. |
QBluetoothTransferReply::FileNotFoundError | 2 | Unable to open the file specified. |
QBluetoothTransferReply::HostNotFoundError | 3 | Unable to connect to the target host. |
QBluetoothTransferReply::UserCanceledTransferError | 4 | User terminated the transfer. |
QBluetoothTransferReply::IODeviceNotReadableError | 5 | File was not open before initiating the sending command. |
QBluetoothTransferReply::ResourceBusyError | 6 | Unable to access the resource.. |
QBluetoothTransferReply::SessionError | 7 | An error occurred during the handling of the session. This enum was introduced by Qt 5.4. |
Member Function Documentation
[protected]
QBluetoothTransferReply::QBluetoothTransferReply(QObject *parent = nullptr)
Constructs a new QBluetoothTransferReply with parent.
[virtual]
QBluetoothTransferReply::~QBluetoothTransferReply()
Destroys the QBluetoothTransferReply object.
[slot]
void QBluetoothTransferReply::abort()
[pure virtual]
QBluetoothTransferReply::TransferError QBluetoothTransferReply::error() const
[signal]
void QBluetoothTransferReply::error(QBluetoothTransferReply::TransferError lastError)
Note: Signal error is overloaded in this class. To connect to this signal by using the function pointer syntax, Qt provides a convenient helper for obtaining the function pointer as shown in this example:
connect(bluetoothTransferReply, QOverload<QBluetoothTransferReply::TransferError>::of(&QBluetoothTransferReply::error), [=](QBluetoothTransferReply::TransferError lastError){ /* ... */ });
[pure virtual]
QString QBluetoothTransferReply::errorString() const
[signal]
void QBluetoothTransferReply::finished(QBluetoothTransferReply *)
[pure virtual]
bool QBluetoothTransferReply::isFinished() const
[pure virtual]
bool QBluetoothTransferReply::isRunning() const
QBluetoothTransferManager *QBluetoothTransferReply::manager() const
Returns the QBluetoothTransferManager that was used to create this QBluetoothTransferReply object. Initially, it is also the parent object.
See also setManager().
QBluetoothTransferRequest QBluetoothTransferReply::request() const
Returns the QBluetoothTransferRequest that was used to create this QBluetoothTransferReply object.
See also setRequest().
[protected]
void QBluetoothTransferReply::setManager(QBluetoothTransferManager *manager)
See also manager().
[protected]
void QBluetoothTransferReply::setRequest(const QBluetoothTransferRequest &request)
See also request().