aboutsummaryrefslogtreecommitdiff
path: root/source/QXmppTransferManager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/QXmppTransferManager.cpp')
-rw-r--r--source/QXmppTransferManager.cpp29
1 files changed, 19 insertions, 10 deletions
diff --git a/source/QXmppTransferManager.cpp b/source/QXmppTransferManager.cpp
index dc498607..829aac65 100644
--- a/source/QXmppTransferManager.cpp
+++ b/source/QXmppTransferManager.cpp
@@ -83,29 +83,38 @@ void QXmppTransferJob::checkData()
terminate(QXmppTransferJob::NoError);
}
-QXmppTransferJob::Direction QXmppTransferJob::direction() const
+/// Returns the job's data for a given role.
+///
+/// You can associate arbitrary data with the role using setData.
+
+QVariant QXmppTransferJob::data(int role) const
{
- return m_direction;
+ return m_data.value(role);
}
-QXmppTransferJob::Error QXmppTransferJob::error() const
+/// Sets the data for a given role to the given value.
+///
+/// You can set any data you want for use in your application, this
+/// data will not be used internally by QXmppTransferManager.
+
+void QXmppTransferJob::setData(int role, const QVariant &value)
{
- return m_error;
+ m_data.insert(role, value);
}
-QString QXmppTransferJob::jid() const
+QXmppTransferJob::Direction QXmppTransferJob::direction() const
{
- return m_jid;
+ return m_direction;
}
-QString QXmppTransferJob::localFilePath() const
+QXmppTransferJob::Error QXmppTransferJob::error() const
{
- return m_localFilePath;
+ return m_error;
}
-void QXmppTransferJob::setLocalFilePath(const QString &path)
+QString QXmppTransferJob::jid() const
{
- m_localFilePath = path;
+ return m_jid;
}
QDateTime QXmppTransferJob::fileDate() const