Viadeo Twitter Google Bookmarks ! Facebook Digg del.icio.us MySpace Yahoo MyWeb Blinklist Netvouz Reddit Simpy StumbleUpon Bookmarks Windows Live Favorites 
Logo Documentation Qt ·  Page d'accueil  ·  Toutes les classes  ·  Classes principales  ·  Annotées  ·  Classes groupées  ·  Modules  ·  Fonctions  · 

QBluetoothTransferReply Class

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

 #include <QBluetoothTransferReply>

Inherits: QObject.

Public Types

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

Public Functions

~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
  • 31 public functions inherited from QObject

Public Slots

void abort()
  • 1 public slot inherited from QObject

Signals

void downloadProgress(qint64 bytesReceived, qint64 bytesTotal)
void finished(QBluetoothTransferReply * reply)
void uploadProgress(qint64 bytesSent, qint64 bytesTotal)

Protected Functions

QBluetoothTransferReply(QObject * parent = 0)
void setAttribute(QBluetoothTransferRequest::Attribute code, const QVariant & value)
void setManager(QBluetoothTransferManager * manager)
void setOperation(QBluetoothTransferManager::Operation operation)
  • 9 protected functions inherited from QObject

Additional Inherited Members

  • 1 property inherited from QObject
  • 11 static public members 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.

QBluetoothTransferReply is a sequential-access QIODevice, which means that once data is read from the object, it is no longer kept by the device. It is 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 emits the uploadProgress() signal, which indicates the progress of the upload for operations that have such content.

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.

QVariant QBluetoothTransferReply::attribute(QBluetoothTransferRequest::Attribute code) const

Returns the attribute associated with code. If the attribute has not been set, it returns an invalid QVariant.

See also setAttribute().

void QBluetoothTransferReply::downloadProgress(qint64 bytesReceived, qint64 bytesTotal) [signal]

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.

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.

See also setManager().

QBluetoothTransferManager::Operation QBluetoothTransferReply::operation() const

Returns the type of operation that this reply is for.

See also setOperation().

void QBluetoothTransferReply::setAttribute(QBluetoothTransferRequest::Attribute code, const QVariant & value) [protected]

Set the attribute associated with the code to value.

See also attribute().

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

Set the reply's manager to the manager.

See also manager().

void QBluetoothTransferReply::setOperation(QBluetoothTransferManager::Operation operation) [protected]

Sets the operation of this QBluetoothTransferReply to operation.

See also operation().

void QBluetoothTransferReply::uploadProgress(qint64 bytesSent, qint64 bytesTotal) [signal]

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

Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. Qt 5.0-snapshot
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD.
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP !
 
 
 
 
Partenaires

Hébergement Web