8#include "QXmppLogger.h"
15namespace QXmpp::Private {
28class SendDataInterface
31 virtual bool sendData(
const QByteArray &) = 0;
34class QXMPP_EXPORT XmppSocket :
public QXmppLoggable,
public SendDataInterface
38 XmppSocket(QObject *parent);
39 ~XmppSocket()
override =
default;
41 QSslSocket *socket()
const {
return m_socket; }
42 void setSocket(QSslSocket *socket);
44 bool isConnected()
const;
45 void connectToHost(
const ServerAddress &);
46 void disconnectFromHost();
47 bool sendData(
const QByteArray &)
override;
49 Q_SIGNAL
void started();
50 Q_SIGNAL
void stanzaReceived(
const QDomElement &);
51 Q_SIGNAL
void streamReceived(
const QDomElement &);
52 Q_SIGNAL
void streamClosed();
55 void processData(
const QString &data);
57 friend class ::tst_QXmppStream;
60 bool m_directTls =
false;
61 QSslSocket *m_socket =
nullptr;
64 QString m_streamOpenElement;
The QXmppLoggable class represents a source of logging messages.
Definition: QXmppLogger.h:110