IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)

QBluetoothTransferReply Class

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

This class was introduced in Qt 5.2.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

QBluetoothTransferReply Class

  • Header: QBluetoothTransferReply

  • Since: Qt 5.2

  • qmake: QT += bluetooth

  • Inherits: QObject

  • Inherited By:

Detailed Description

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

 

[explicit protected] QBluetoothTransferReply::QBluetoothTransferReply(QObject *parent = nullptr)

Constructs a new QBluetoothTransferReply with parent.

[virtual] QBluetoothTransferReply::~QBluetoothTransferReply()

Destroys the QBluetoothTransferReply object.

void QBluetoothTransferReply::abort()

Aborts this reply.

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

The error code of the error that occurred.

See Also

See also errorString()

[since 5.4] void QBluetoothTransferReply::error(QBluetoothTransferReply::TransferError errorType)

This signal is emitted whenever an error has occurred. The errorType parameter indicates the type of error.

To avoid the loss of signal emissions it is recommend to immidiately connect to this signal once a QBluetoothTransferReply instance has been created.

This function was introduced in Qt 5.4.

See Also

See also error(), errorString()

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

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

See Also

See also error()

void QBluetoothTransferReply::finished(QBluetoothTransferReply *reply)

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

To avoid the loss of signal emissions it is recommend to immidiately connect to this signal once a QBluetoothTransferReply instance has been created.

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

Returns true if this reply has finished, otherwise false.

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

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

See also setManager()

QBluetoothTransferRequest QBluetoothTransferReply::request() const

Returns the QBluetoothTransferRequest that was used to create this QBluetoothTransferReply object.

See Also

See also setRequest()

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

Set the reply's manager to the manager.

See Also

See also manager()

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

Set the reply's request to request.

See Also

See also request()

void QBluetoothTransferReply::transferProgress(qint64 bytesTransferred, qint64 bytesTotal)

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

To avoid the loss of signal emissions it is recommend to immidiately connect to this signal once a QBluetoothTransferReply instance has been created.

Vous avez aimé ce tutoriel ? Alors partagez-le en cliquant sur les boutons suivants : Viadeo Twitter Facebook Share on Google+