8#include "QXmppLogger.h"
14namespace QXmpp::Private {
16class SendDataInterface
19 virtual bool sendData(
const QByteArray &) = 0;
22class QXMPP_EXPORT XmppSocket :
public QXmppLoggable,
public SendDataInterface
26 XmppSocket(QObject *parent);
27 ~XmppSocket()
override =
default;
29 QSslSocket *socket()
const {
return m_socket; }
30 void setSocket(QSslSocket *socket);
32 bool isConnected()
const;
33 void disconnectFromHost();
34 bool sendData(
const QByteArray &)
override;
36 Q_SIGNAL
void started();
37 Q_SIGNAL
void stanzaReceived(
const QDomElement &);
38 Q_SIGNAL
void streamReceived(
const QDomElement &);
39 Q_SIGNAL
void streamClosed();
42 void processData(
const QString &data);
44 friend class ::TestStream;
47 QSslSocket *m_socket =
nullptr;
50 QString m_streamOpenElement;
The QXmppLoggable class represents a source of logging messages.
Definition QXmppLogger.h:110