QBluetoothTransferReply Class

The QBluetoothTransferReply class stores the response for a data transfer request. More...

Header: #include <QBluetoothTransferReply>
qmake: QT += bluetooth
Inherits: QObject.

Public Types

enum TransferError { NoError, UnknownError, FileNotFoundError, HostNotFoundError, UserCanceledTransferError }

Public Functions

~QBluetoothTransferReply()
virtual 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 finished(QBluetoothTransferReply * reply)
void transferProgress(qint64 bytesTransferred, qint64 bytesTotal)

Protected Functions

QBluetoothTransferReply(QObject * parent = 0)
void setManager(QBluetoothTransferManager * manager)
void setRequest(const QBluetoothTransferRequest & request)
  • 9 protected functions inherited from QObject

Additional Inherited Members

  • 1 property inherited from QObject
  • 1 public variable inherited from QObject
  • 10 static public members inherited from QObject
  • 2 protected variables 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

ConstantValueDescription
QBluetoothTransferReply::NoError0No error.
QBluetoothTransferReply::UnknownError1Unknown error, no better enum available
QBluetoothTransferReply::FileNotFoundError2Unable to open the file specified
QBluetoothTransferReply::HostNotFoundError3Unable to connect to the target host
QBluetoothTransferReply::UserCanceledTransferError4User terminated the transfer

Member Function Documentation

QBluetoothTransferReply::QBluetoothTransferReply(QObject * parent = 0) [protected]

Constructs a new QBluetoothTransferReply with parent.

QBluetoothTransferReply::~QBluetoothTransferReply()

Destroys the QBluetoothTransferReply object.

void QBluetoothTransferReply::abort() [slot]

Aborts this reply.

TransferError QBluetoothTransferReply::error() const [pure virtual]

The error code of the error that occurred.

QString QBluetoothTransferReply::errorString() const [pure virtual]

String describing the error. Can be displayed to the user.

void QBluetoothTransferReply::finished(QBluetoothTransferReply * reply) [signal]

This signal is emitted when the transfer is complete for reply.

bool QBluetoothTransferReply::isFinished() const [pure virtual]

Returns true if this reply has finished, otherwise false.

bool QBluetoothTransferReply::isRunning() const [pure virtual]

Returns true if this reply is running, otherwise false.

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().

void QBluetoothTransferReply::setManager(QBluetoothTransferManager * manager) [protected]

Set the reply's manager to the manager.

See also manager().

void QBluetoothTransferReply::setRequest(const QBluetoothTransferRequest & request) [protected]

Set the reply's request to request.

See also request().

void QBluetoothTransferReply::transferProgress(qint64 bytesTransferred, qint64 bytesTotal) [signal]

This signal is emitted whenever data is transferred. The bytesTransferred parameter contains the total number of bytes transferred so far out of bytesTotal.