aboutsummaryrefslogtreecommitdiff
path: root/source/QXmppTransferManager.h
diff options
context:
space:
mode:
authorJeremy Lainé <jeremy.laine@m4x.org>2010-03-05 16:01:13 +0000
committerJeremy Lainé <jeremy.laine@m4x.org>2010-03-05 16:01:13 +0000
commit946561deabadada49ab1733db3aae9a4be20c16a (patch)
treecb6323da8cf348bb6f9ea8c2305eda23164140e6 /source/QXmppTransferManager.h
parentbe9351b7e17e0f8b19386f74441c127c1b589d29 (diff)
downloadqxmpp-946561deabadada49ab1733db3aae9a4be20c16a.tar.gz
abort jobs cleanly and add some code documentation
Diffstat (limited to 'source/QXmppTransferManager.h')
-rw-r--r--source/QXmppTransferManager.h22
1 files changed, 17 insertions, 5 deletions
diff --git a/source/QXmppTransferManager.h b/source/QXmppTransferManager.h
index b5edf5a5..dab99221 100644
--- a/source/QXmppTransferManager.h
+++ b/source/QXmppTransferManager.h
@@ -97,9 +97,23 @@ public:
qint64 fileSize() const;
signals:
+ /// This signal is emitted when an error is encountered while
+ /// processing the transfer job.
void error(QXmppTransferJob::Error error);
+
+ /// This signal is emitted when the transfer job is finished.
+ ///
+ /// You can determine if the job completed successfully by testing whether
+ /// error() returns QXmppTransferJob::NoError.
+ ///
+ /// Note: Do not delete the job in the slot connected to this signal,
+ /// instead use deleteLater().
void finished();
+
+ /// This signal is emitted to indicate the progress of this transfer job.
void progress(qint64 done, qint64 total);
+
+ /// This signal is emitted when the transfer job changes state.
void stateChanged(QXmppTransferJob::State state);
private slots:
@@ -138,7 +152,6 @@ private:
int m_ibbSequence;
// for socks5 bytestreams
- QXmppSocksClient *m_socksClient;
QTcpSocket *m_socksSocket;
QXmppByteStreamIq::StreamHost m_socksProxy;
@@ -153,7 +166,7 @@ public:
QXmppTransferManager(QXmppClient* client);
QXmppTransferJob *sendFile(const QString &jid, const QString &fileName);
QString proxy() const;
- void setProxy(const QString &proxy);
+ void setProxy(const QString &proxyJid);
int supportedMethods() const;
void setSupportedMethods(int methods);
@@ -171,9 +184,9 @@ private slots:
void ibbDataIqReceived(const QXmppIbbDataIq&);
void ibbOpenIqReceived(const QXmppIbbOpenIq&);
void iqReceived(const QXmppIq&);
- void socksClientDataReceived();
- void socksClientDisconnected();
+ void jobError(QXmppTransferJob::Error error);
void socksServerConnected(QTcpSocket *socket, const QString &hostName, quint16 port);
+ void socksSocketDataReceived();
void socksSocketDataSent();
void socksSocketDisconnected();
void streamInitiationIqReceived(const QXmppStreamInitiationIq&);
@@ -181,7 +194,6 @@ private slots:
private:
QXmppTransferJob *getJobByRequestId(const QString &jid, const QString &id);
QXmppTransferJob *getJobBySid(const QString &jid, const QString &sid);
- QXmppTransferJob *getJobBySocksClient(QXmppSocksClient *socksClient);
QXmppTransferJob *getJobBySocksSocket(QTcpSocket *socksSocket);
void byteStreamResponseReceived(const QXmppIq&);
void byteStreamResultReceived(const QXmppByteStreamIq&);