QXmpp Version: 1.4.0
Loading...
Searching...
No Matches
QXmppOutgoingServer.h
1/*
2 * Copyright (C) 2008-2021 The QXmpp developers
3 *
4 * Author:
5 * Jeremy Lainé
6 *
7 * Source:
8 * https://github.com/qxmpp-project/qxmpp
9 *
10 * This file is a part of QXmpp library.
11 *
12 * This library is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU Lesser General Public
14 * License as published by the Free Software Foundation; either
15 * version 2.1 of the License, or (at your option) any later version.
16 *
17 * This library is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * Lesser General Public License for more details.
21 *
22 */
23
24#ifndef QXMPPOUTGOINGSERVER_H
25#define QXMPPOUTGOINGSERVER_H
26
27#include "QXmppStream.h"
28
29#include <QAbstractSocket>
30
31class QSslError;
32class QXmppDialback;
34class QXmppOutgoingServerPrivate;
35
39
40class QXMPP_EXPORT QXmppOutgoingServer : public QXmppStream
41{
42 Q_OBJECT
43
44public:
45 QXmppOutgoingServer(const QString &domain, QObject *parent);
46 ~QXmppOutgoingServer() override;
47
48 bool isConnected() const override;
49
50 QString localStreamKey() const;
51 void setLocalStreamKey(const QString &key);
52 void setVerify(const QString &id, const QString &key);
53
54 QString remoteDomain() const;
55
56Q_SIGNALS:
59
60protected:
62 void handleStart() override;
63 void handleStream(const QDomElement &streamElement) override;
64 void handleStanza(const QDomElement &stanzaElement) override;
66
67public Q_SLOTS:
68 void connectToHost(const QString &domain);
69 void queueData(const QByteArray &data);
70
71private Q_SLOTS:
72 void _q_dnsLookupFinished();
73 void _q_socketDisconnected();
74 void sendDialback();
75 void slotSslErrors(const QList<QSslError> &errors);
76 void socketError(QAbstractSocket::SocketError error);
77
78private:
79 Q_DISABLE_COPY(QXmppOutgoingServer)
80 QXmppOutgoingServerPrivate *const d;
81};
82
83#endif
The QXmppDialback class represents a stanza used for the Server Dialback protocol as specified by XEP...
Definition: QXmppDialback.h:35
The QXmppOutgoingServer class represents an outgoing XMPP stream to another XMPP server.
Definition: QXmppOutgoingServer.h:41
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:42
virtual void handleStart()
Definition: QXmppStream.cpp:118
virtual bool isConnected() const
Definition: QXmppStream.cpp:128
virtual void handleStream(const QDomElement &element)=0
virtual void handleStanza(const QDomElement &element)=0