QXmppIncomingClient Class
The QXmppIncomingClient class represents an incoming XMPP stream from an XMPP client. More...
| Header: | #include <QXmppIncomingClient.h> |
| Inherits: | QXmppLoggable |
Public Functions
| QXmppIncomingClient(QSslSocket *socket, const QString &domain, QObject *parent = nullptr) | |
| void | disconnectFromHost() |
| bool | isConnected() const |
| QString | jid() const |
| bool | sendPacket(const QXmppNonza &packet) |
| void | setInactivityTimeout(int secs) |
| void | setPasswordChecker(QXmppPasswordChecker *checker) |
Public Slots
| bool | sendData(const QByteArray &data) |
Signals
| void | connected() |
| void | disconnected() |
| void | elementReceived(const QDomElement &element) |
Detailed Description
Member Function Documentation
QXmppIncomingClient::QXmppIncomingClient(QSslSocket *socket, const QString &domain, QObject *parent = nullptr)
Constructs a new incoming client stream.
socket is the socket for the XMPP stream, domain is the local domain and parent is the optional parent QObject for the stream.
[signal] void QXmppIncomingClient::connected()
This signal is emitted when the stream is connected.
void QXmppIncomingClient::disconnectFromHost()
Disconnects from the remote host.
[signal] void QXmppIncomingClient::disconnected()
This signal is emitted when the stream is disconnected.
[signal] void QXmppIncomingClient::elementReceived(const QDomElement &element)
This signal is emitted when an element is received.
bool QXmppIncomingClient::isConnected() const
Returns true if the socket is connected, the client is authenticated and a resource is bound.
QString QXmppIncomingClient::jid() const
Returns the client's JID. Sends an XMPP packet to the peer.
[slot] bool QXmppIncomingClient::sendData(const QByteArray &data)
Sends raw data to the peer; returns true on success.
bool QXmppIncomingClient::sendPacket(const QXmppNonza &packet)
Sends an XMPP packet to the peer; returns true on success.
void QXmppIncomingClient::setInactivityTimeout(int secs)
Sets the number of seconds after which a client will be disconnected for inactivity.
secs.
void QXmppIncomingClient::setPasswordChecker(QXmppPasswordChecker *checker)
Sets the password checker used to verify client credentials.