aboutsummaryrefslogtreecommitdiff
path: root/src/client/QXmppTransferManager_p.h
diff options
context:
space:
mode:
authorJeremy Lainé <jeremy.laine@m4x.org>2012-04-12 07:51:21 +0000
committerJeremy Lainé <jeremy.laine@m4x.org>2012-04-12 07:51:21 +0000
commitc6623e6a7e86fab1c973900ede0de1eb2e488230 (patch)
treed1f98598bf425df2173a0d5ef83e3024a7e4c59e /src/client/QXmppTransferManager_p.h
parentb93f06fbc497305180792f8b4a9029fa097d8a49 (diff)
downloadqxmpp-c6623e6a7e86fab1c973900ede0de1eb2e488230.tar.gz
remove last blocking code in QXmppTransferManager
Diffstat (limited to 'src/client/QXmppTransferManager_p.h')
-rw-r--r--src/client/QXmppTransferManager_p.h77
1 files changed, 77 insertions, 0 deletions
diff --git a/src/client/QXmppTransferManager_p.h b/src/client/QXmppTransferManager_p.h
new file mode 100644
index 00000000..d3b2d62a
--- /dev/null
+++ b/src/client/QXmppTransferManager_p.h
@@ -0,0 +1,77 @@
+/*
+ * Copyright (C) 2008-2011 The QXmpp developers
+ *
+ * Author:
+ * Jeremy Lainé
+ *
+ * Source:
+ * http://code.google.com/p/qxmpp
+ *
+ * This file is a part of QXmpp library.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ */
+
+#ifndef QXMPPTRANSFERMANAGER_P_H
+#define QXMPPTRANSFERMANAGER_P_H
+
+#include "QXmppTransferManager.h"
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the QXmpp API. It exists for the convenience
+// of the QXmppTransferManager class. This header file may change from
+// version to version without notice, or even be removed.
+//
+// We mean it.
+//
+
+class QXmppTransferIncomingJob : public QXmppTransferJob
+{
+ Q_OBJECT
+
+public:
+ QXmppTransferIncomingJob(const QString &jid, QXmppClient *client, QObject *parent);
+ void connectToHosts(const QXmppByteStreamIq &iq);
+
+private slots:
+ void _q_candidateDisconnected();
+ void _q_candidateReady();
+ void _q_receiveData();
+
+private:
+ void connectToNextHost();
+
+ QXmppByteStreamIq::StreamHost m_candidateHost;
+ QXmppSocksClient *m_candidateClient;
+ QList<QXmppByteStreamIq::StreamHost> m_streamCandidates;
+ QString m_streamOfferId;
+ QString m_streamOfferFrom;
+};
+
+class QXmppTransferOutgoingJob : public QXmppTransferJob
+{
+ Q_OBJECT
+
+public:
+ QXmppTransferOutgoingJob(const QString &jid, QXmppClient *client, QObject *parent);
+ void connectToProxy();
+ void startSending();
+
+private slots:
+ void _q_proxyReady();
+ void _q_sendData();
+};
+
+#endif