The QBluetoothTransferReply class contains the data and headers for a request sent with QBluetoothTranferManager. More...
#include <QBluetoothTransferReply>
Inherits: QObject.
This class was introduced in Qt Mobility 1.2.
enum | TransferError { NoError, UnknownError, FileNotFoundError, HostNotFoundError, UserCanceledTransferError } |
~QBluetoothTransferReply () | |
QVariant | attribute ( QBluetoothTransferRequest::Attribute code ) const |
virtual TransferError | error () const = 0 |
virtual QString | errorString () const = 0 |
virtual bool | isFinished () const = 0 |
virtual bool | isRunning () const = 0 |
QBluetoothTransferManager * | manager () const |
QBluetoothTransferManager::Operation | operation () const |
void | abort () |
void | downloadProgress ( qint64 bytesReceived, qint64 bytesTotal ) |
void | finished ( QBluetoothTransferReply * reply ) |
void | uploadProgress ( qint64 bytesSent, qint64 bytesTotal ) |
QBluetoothTransferReply ( QObject * parent = 0 ) | |
void | setAttribute ( QBluetoothTransferRequest::Attribute code, const QVariant & value ) |
void | setManager ( QBluetoothTransferManager * manager ) |
void | setOperation ( QBluetoothTransferManager::Operation operation ) |
The QBluetoothTransferReply class contains the data and headers for a request sent with QBluetoothTranferManager.
In additional to a copy of the QBluetoothTransferRequest object used to create the request, QBluetoothTransferReply contains the contents of the reply itself.
QBluetoothTransferReply is a sequential-access QIODevice, which means that once data is read from the object, it no longer kept by the device. It is therefore the application's responsibility to keep this data if it needs to. Whenever more data is received and processed, the readyRead() signal is emitted.
The downloadProgress() signal is also emitted when data is received, but the number of bytes contained in it may not represent the actual bytes received, if any transformation is done to the contents (for example, decompressing and removing the protocol overhead).
Even though QBluetoothTransferReply is a QIODevice connected to the contents of the reply, it also emits the uploadProgress() signal, which indicates the progress of the upload for operations that have such content.
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 |
Constructs a new QBluetoothTransferReply with parent parent.
Destroys the QBluetoothTransferReply object.
Aborts this reply.
Returns the attribute associated with the code code. If the attribute has not been set, it returns an invalid QVariant.
See also setAttribute().
This signal is emitted whenever data is received. The bytesReceived parameter contains the total number of bytes received so far out of bytesTotal expected for the entire transfer.
String describing the error. Can be displayed to the user.
This signal is emitted when the transfer is complete for reply.
Returns true if this reply has finished; otherwise returns false.
Returns true if this reply is running; otherwise returns false.
Returns the QBluetoothTransferManager that was used to create this QBluetoothTransferReply object.
See also setManager().
Returns the type of operation that this reply is for.
See also setOperation().
Set the attribute associated with the code code to the value value.
See also attribute().
Set the reply's manager to manager manager.
See also manager().
Sets the operation of this QBluetoothTransferReply to operation.
See also operation().
This signal is emitted whenever data is sent. The bytesSent parameter contains the total number of bytes sent so far out of bytesTotal.
© 2008-2011 Nokia Corporation and/or its subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation in Finland and/or other countries worldwide.
All other trademarks are property of their respective owners. Privacy Policy
Licensees holding valid Qt Commercial licenses may use this document in accordance with the Qt Commercial License Agreement provided with the Software or, alternatively, in accordance with the terms contained in a written agreement between you and Nokia.
Alternatively, this document may be used under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation.