|
QXmpp Version: 1.13.0
|
The QXmppServer class represents an XMPP server. More...
#include <QXmppServer.h>


Public Member Functions | |
| QXmppServer (QObject *parent=nullptr) | |
| Constructs a new XMPP server instance. | |
| void | addExtension (QXmppServerExtension *extension) |
| Registers a new extension with the server. | |
| QList< QXmppServerExtension * > | extensions () |
| Returns the list of loaded extensions. | |
| QString | domain () const |
| Returns the server's domain. | |
| void | setDomain (const QString &domain) |
| Sets the server's domain. | |
| QXmppLogger * | logger () |
| Returns the QXmppLogger associated with the server. | |
| void | setLogger (QXmppLogger *logger) |
| Sets the QXmppLogger associated with the server. | |
| QXmppPasswordChecker * | passwordChecker () |
| Returns the password checker used to verify client credentials. | |
| void | setPasswordChecker (QXmppPasswordChecker *checker) |
| Sets the password checker used to verify client credentials. | |
| QVariantMap | statistics () const |
| Returns the statistics for the server. | |
| void | addCaCertificates (const QString &caCertificates) |
| Sets the path for additional SSL CA certificates. | |
| void | setLocalCertificate (const QString &path) |
| Sets the path for the local SSL certificate. | |
| void | setLocalCertificate (const QSslCertificate &certificate) |
| void | setPrivateKey (const QString &path) |
| Sets the path for the local SSL private key. | |
| void | setPrivateKey (const QSslKey &key) |
| void | close () |
| Closes the server. | |
| bool | listenForClients (const QHostAddress &address=QHostAddress::Any, quint16 port=5222) |
| Listen for incoming XMPP client connections. | |
| bool | listenForServers (const QHostAddress &address=QHostAddress::Any, quint16 port=5269) |
| Listen for incoming XMPP server connections. | |
| bool | sendElement (const QDomElement &element) |
| Route an XMPP stanza. | |
| bool | sendPacket (const QXmppStanza &stanza) |
| Route an XMPP packet. | |
| void | addIncomingClient (QXmppIncomingClient *stream) |
| Q_SIGNAL void | clientConnected (const QString &jid) |
| This signal is emitted when a client has connected. | |
| Q_SIGNAL void | clientDisconnected (const QString &jid) |
| This signal is emitted when a client has disconnected. | |
| Q_SIGNAL void | loggerChanged (QXmppLogger *logger) |
| This signal is emitted when the logger changes. | |
| Q_SLOT void | handleElement (const QDomElement &element) |
| Handle an incoming XML element. | |
| Public Member Functions inherited from QXmppLoggable | |
| QXmppLoggable (QObject *parent=nullptr) | |
| Q_SIGNAL void | setGauge (const QString &gauge, double value) |
| Sets the given gauge to value. | |
| Q_SIGNAL void | logMessage (QXmppLogger::MessageType type, const QString &msg) |
| This signal is emitted to send logging messages. | |
| Q_SIGNAL void | updateCounter (const QString &counter, qint64 amount=1) |
| Updates the given counter by amount. | |
Properties | |
| QXmppLogger * | logger |
| The QXmppLogger associated with the server. | |
Friends | |
| class | QXmppServerPrivate |
Additional Inherited Members | |
| Protected Member Functions inherited from QXmppLoggable | |
| void | debug (const QString &message) |
| Logs a debugging message. | |
| void | info (const QString &message) |
| Logs an informational message. | |
| void | warning (const QString &message) |
| Logs a warning message. | |
| void | logReceived (const QString &message) |
| Logs a received packet. | |
| void | logSent (const QString &message) |
| Logs a sent packet. | |
The QXmppServer class represents an XMPP server.
It provides support for both client-to-server and server-to-server communications, SSL encryption and logging facilities.
QXmppServer comes with a number of modules for service discovery, XMPP ping, statistics and file transfer proxy support. You can write your own extensions for QXmppServer by subclassing QXmppServerExtension.
| void QXmppServer::addIncomingClient | ( | QXmppIncomingClient * | stream | ) |
Add a new incoming client stream.
This method can be used for instance to implement BOSH support as a server extension.
| void QXmppServer::setLocalCertificate | ( | const QSslCertificate & | certificate | ) |
| void QXmppServer::setPrivateKey | ( | const QSslKey & | key | ) |