QXmpp Version: 1.10.0
QXmppTransferManager_p.h
1// SPDX-FileCopyrightText: 2012 Jeremy Lainé <jeremy.laine@m4x.org>
2//
3// SPDX-License-Identifier: LGPL-2.1-or-later
4
5#ifndef QXMPPTRANSFERMANAGER_P_H
6#define QXMPPTRANSFERMANAGER_P_H
7
8#include "QXmppByteStreamIq.h"
9#include "QXmppTransferManager.h"
10
11//
12// W A R N I N G
13// -------------
14//
15// This file is not part of the QXmpp API. It exists for the convenience
16// of the QXmppTransferManager class. This header file may change from
17// version to version without notice, or even be removed.
18//
19// We mean it.
20//
21
22class QTimer;
23class QXmppSocksClient;
24
25class QXmppTransferIncomingJob : public QXmppTransferJob
26{
27 Q_OBJECT
28
29public:
30 QXmppTransferIncomingJob(const QString &jid, QXmppClient *client, QObject *parent);
31 void checkData();
32 void connectToHosts(const QXmppByteStreamIq &iq);
33 bool writeData(const QByteArray &data);
34
35private Q_SLOTS:
36 void _q_candidateDisconnected();
37 void _q_candidateReady();
38 void _q_disconnected();
39 void _q_receiveData();
40
41private:
42 void connectToNextHost();
43
44 QXmppByteStreamIq::StreamHost m_candidateHost;
45 QXmppSocksClient *m_candidateClient;
46 QTimer *m_candidateTimer;
47 QList<QXmppByteStreamIq::StreamHost> m_streamCandidates;
48 QString m_streamOfferId;
49 QString m_streamOfferFrom;
50};
51
52class QXmppTransferOutgoingJob : public QXmppTransferJob
53{
54 Q_OBJECT
55
56public:
57 QXmppTransferOutgoingJob(const QString &jid, QXmppClient *client, QObject *parent);
58 void connectToProxy();
59 void startSending();
60
61public Q_SLOTS:
62 void _q_disconnected();
63
64private Q_SLOTS:
65 void _q_proxyReady();
66 void _q_sendData();
67};
68
69#endif
Definition: QXmppByteStreamIq.h:22
Definition: QXmppByteStreamIq.h:13
Main class for starting and managing connections to XMPP servers.
Definition: QXmppClient.h:62
Definition: QXmppTransferManager.h:63