QXmpp Version: 1.5.6
Loading...
Searching...
No Matches
QXmppOutgoingServer.h
1// SPDX-FileCopyrightText: 2010 Jeremy Lainé <jeremy.laine@m4x.org>
2//
3// SPDX-License-Identifier: LGPL-2.1-or-later
4
5#ifndef QXMPPOUTGOINGSERVER_H
6#define QXMPPOUTGOINGSERVER_H
7
8#include "QXmppStream.h"
9
10#include <QAbstractSocket>
11
12class QSslError;
13class QXmppDialback;
15class QXmppOutgoingServerPrivate;
16
20
21class QXMPP_EXPORT QXmppOutgoingServer : public QXmppStream
22{
23 Q_OBJECT
24
25public:
26 QXmppOutgoingServer(const QString &domain, QObject *parent);
27 ~QXmppOutgoingServer() override;
28
29 bool isConnected() const override;
30
31 QString localStreamKey() const;
32 void setLocalStreamKey(const QString &key);
33 void setVerify(const QString &id, const QString &key);
34
35 QString remoteDomain() const;
36
37Q_SIGNALS:
40
41protected:
43 void handleStart() override;
44 void handleStream(const QDomElement &streamElement) override;
45 void handleStanza(const QDomElement &stanzaElement) override;
47
48public Q_SLOTS:
49 void connectToHost(const QString &domain);
50 void queueData(const QByteArray &data);
51
52private Q_SLOTS:
53 void _q_dnsLookupFinished();
54 void _q_socketDisconnected();
55 void sendDialback();
56 void slotSslErrors(const QList<QSslError> &errors);
57 void socketError(QAbstractSocket::SocketError error);
58
59private:
60 Q_DISABLE_COPY(QXmppOutgoingServer)
61 QXmppOutgoingServerPrivate *const d;
62};
63
64#endif
The QXmppDialback class represents a stanza used for the Server Dialback protocol as specified by XEP...
Definition QXmppDialback.h:16
The QXmppOutgoingServer class represents an outgoing XMPP stream to another XMPP server.
Definition QXmppOutgoingServer.h:22
void dialbackResponseReceived(const QXmppDialback &response)
This signal is emitted when a dialback verify response is received.
The QXmppStream class is the base class for all XMPP streams.
Definition QXmppStream.h:36
virtual void handleStart()
Definition QXmppStream.cpp:135
virtual bool isConnected() const
Definition QXmppStream.cpp:145
virtual void handleStream(const QDomElement &element)=0
virtual void handleStanza(const QDomElement &element)=0