summaryrefslogtreecommitdiffstats
path: root/src/bluetooth/qbluetoothtransferreply.cpp
diff options
context:
space:
mode:
authorFabian Bumberger <fbumberger@rim.com>2013-07-30 17:44:28 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-08-01 11:27:52 +0200
commita7d01a4f0d5bdd56749e674e71d32caaa3a065b3 (patch)
treebdeda051d19bff1dc0d7e23d3930a490309e884b /src/bluetooth/qbluetoothtransferreply.cpp
parent7b1622fc3f00b64b608670c8d3691b0e3fbb71bc (diff)
Clean up for OPP
- Remove Operation enum, because we only support put requests - Add the request to the transfer reply - Move startOPP to the private area Task-number: QTBUG-32726 Change-Id: If7dae547326cb74dcdd6449c08dc0d91fb8a78b2 Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
Diffstat (limited to 'src/bluetooth/qbluetoothtransferreply.cpp')
-rw-r--r--src/bluetooth/qbluetoothtransferreply.cpp73
1 files changed, 19 insertions, 54 deletions
diff --git a/src/bluetooth/qbluetoothtransferreply.cpp b/src/bluetooth/qbluetoothtransferreply.cpp
index 7f3a3e88..e2903dae 100644
--- a/src/bluetooth/qbluetoothtransferreply.cpp
+++ b/src/bluetooth/qbluetoothtransferreply.cpp
@@ -55,18 +55,8 @@ QT_BEGIN_NAMESPACE_BLUETOOTH
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.
+ After the file transfer has started, QBluetoothTransferReply emits the transferProgress() signal,
+ which indicates the progress of the file transfer.
*/
/*!
@@ -94,30 +84,23 @@ void QBluetoothTransferReply::abort()
}
/*!
- \fn void QBluetoothTransferReply::downloadProgress(qint64 bytesReceived, qint64 bytesTotal)
-
- This signal is emitted whenever data is received. The \a bytesReceived parameter contains the
- total number of bytes received so far out of \a bytesTotal expected for the entire transfer.
-*/
-
-/*!
\fn void QBluetoothTransferReply::finished(QBluetoothTransferReply *reply)
This signal is emitted when the transfer is complete for \a reply.
*/
/*!
- \fn void QBluetoothTransferReply::uploadProgress(qint64 bytesSent, qint64 bytesTotal)
+ \fn void QBluetoothTransferReply::transferProgress(qint64 bytesTransferred, qint64 bytesTotal)
- This signal is emitted whenever data is sent. The \a bytesSent parameter contains the total
- number of bytes sent so far out of \a bytesTotal.
+ This signal is emitted whenever data is transferred. The \a bytesTransferred parameter contains the total
+ number of bytes transferred so far out of \a bytesTotal.
*/
/*!
Constructs a new QBluetoothTransferReply with \a parent.
*/
QBluetoothTransferReply::QBluetoothTransferReply(QObject *parent)
-: QObject(parent), d_ptr(new QBluetoothTransferReplyPrivate)
+ : QObject(parent), d_ptr(new QBluetoothTransferReplyPrivate())
{
qRegisterMetaType<QBluetoothTransferReply*>("QBluetoothTransferReply");
}
@@ -131,16 +114,6 @@ QBluetoothTransferReply::~QBluetoothTransferReply()
}
/*!
- Returns the attribute associated with \a code. If the attribute has not been set, it
- returns an invalid QVariant.
-*/
-QVariant QBluetoothTransferReply::attribute(QBluetoothTransferRequest::Attribute code) const
-{
- Q_D(const QBluetoothTransferReply);
- return d->m_attributes[code];
-}
-
-/*!
\fn bool QBluetoothTransferReply::isFinished() const
Returns true if this reply has finished, otherwise false.
@@ -163,44 +136,36 @@ QBluetoothTransferManager *QBluetoothTransferReply::manager() const
}
/*!
- Returns the type of operation that this reply is for.
+ Returns the QBluetoothTransferRequest that was used to create this QBluetoothTransferReply
+ object.
*/
-QBluetoothTransferManager::Operation QBluetoothTransferReply::operation() const
+QBluetoothTransferRequest QBluetoothTransferReply::request() const
{
Q_D(const QBluetoothTransferReply);
- return d->m_operation;
+ return d->m_request;
}
/*!
- Sets the operation of this QBluetoothTransferReply to \a operation.
-*/
-void QBluetoothTransferReply::setOperation(QBluetoothTransferManager::Operation operation)
-{
- Q_D(QBluetoothTransferReply);
- d->m_operation = operation;
-}
-
-/*!
- \fn QBluetoothTransferReply::setAttribute(QBluetoothTransferRequest::Attribute code, const QVariant &value)
+ \fn QBluetoothTransferReply::setManager(QBluetoothTransferManager *manager)
- Set the attribute associated with the \a code to \a value.
+ Set the reply's manager to the \a manager.
*/
-void QBluetoothTransferReply::setAttribute(QBluetoothTransferRequest::Attribute code, const QVariant &value)
+
+void QBluetoothTransferReply::setManager(QBluetoothTransferManager *manager)
{
Q_D(QBluetoothTransferReply);
- d->m_attributes.insert(code, value);
+ d->m_manager = manager;
}
/*!
- \fn QBluetoothTransferReply::setManager(QBluetoothTransferManager *manager)
+ \fn QBluetoothTransferReply::setRequest(const QBluetoothTransferRequest &request)
- Set the reply's manager to the \a manager.
+ Set the reply's request to \a request.
*/
-
-void QBluetoothTransferReply::setManager(QBluetoothTransferManager *manager)
+void QBluetoothTransferReply::setRequest(const QBluetoothTransferRequest &request)
{
Q_D(QBluetoothTransferReply);
- d->m_manager = manager;
+ d->m_request = request;
}
/*!