QXmpp Version: 1.5.6
|
The QXmppServer class represents an XMPP server. More...
#include <QXmppServer.h>
Public Slots | |
void | handleElement (const QDomElement &element) |
Handle an incoming XML element. | |
Signals | |
void | clientConnected (const QString &jid) |
This signal is emitted when a client has connected. | |
void | clientDisconnected (const QString &jid) |
This signal is emitted when a client has disconnected. | |
void | loggerChanged (QXmppLogger *logger) |
This signal is emitted when the logger changes. | |
Signals inherited from QXmppLoggable | |
void | setGauge (const QString &gauge, double value) |
Sets the given gauge to value. | |
void | logMessage (QXmppLogger::MessageType type, const QString &msg) |
This signal is emitted to send logging messages. | |
void | updateCounter (const QString &counter, qint64 amount=1) |
Updates the given counter by amount. | |
Public Member Functions | |
QXmppServer (QObject *parent=nullptr) | |
~QXmppServer () override | |
void | addExtension (QXmppServerExtension *extension) |
QList< QXmppServerExtension * > | extensions () |
QString | domain () const |
void | setDomain (const QString &domain) |
QXmppLogger * | logger () |
Returns the QXmppLogger associated with the server. | |
void | setLogger (QXmppLogger *logger) |
QXmppPasswordChecker * | passwordChecker () |
void | setPasswordChecker (QXmppPasswordChecker *checker) |
QVariantMap | statistics () const |
Returns the statistics for the server. | |
void | addCaCertificates (const QString &caCertificates) |
void | setLocalCertificate (const QString &path) |
void | setLocalCertificate (const QSslCertificate &certificate) |
void | setPrivateKey (const QString &path) |
void | setPrivateKey (const QSslKey &key) |
void | close () |
bool | listenForClients (const QHostAddress &address=QHostAddress::Any, quint16 port=5222) |
bool | listenForServers (const QHostAddress &address=QHostAddress::Any, quint16 port=5269) |
bool | sendElement (const QDomElement &element) |
bool | sendPacket (const QXmppStanza &stanza) |
void | addIncomingClient (QXmppIncomingClient *stream) |
Public Member Functions inherited from QXmppLoggable | |
QXmppLoggable (QObject *parent=nullptr) | |
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) |
void | info (const QString &message) |
void | warning (const QString &message) |
void | logReceived (const QString &message) |
void | logSent (const QString &message) |
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.
QXmppServer::QXmppServer | ( | QObject * | parent = nullptr | ) |
Constructs a new XMPP server instance.
parent |
|
override |
Destroys an XMPP server instance.
void QXmppServer::addCaCertificates | ( | const QString & | path | ) |
Sets the path for additional SSL CA certificates.
path |
void QXmppServer::addExtension | ( | QXmppServerExtension * | extension | ) |
Registers a new extension with the server.
extension |
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::close | ( | ) |
Closes the server.
QString QXmppServer::domain | ( | ) | const |
Returns the server's domain.
QList< QXmppServerExtension * > QXmppServer::extensions | ( | ) |
Returns the list of loaded extensions.
bool QXmppServer::listenForClients | ( | const QHostAddress & | address = QHostAddress::Any , |
quint16 | port = 5222 |
||
) |
Listen for incoming XMPP client connections.
address | |
port |
bool QXmppServer::listenForServers | ( | const QHostAddress & | address = QHostAddress::Any , |
quint16 | port = 5269 |
||
) |
Listen for incoming XMPP server connections.
address | |
port |
QXmppPasswordChecker * QXmppServer::passwordChecker | ( | ) |
Returns the password checker used to verify client credentials.
bool QXmppServer::sendElement | ( | const QDomElement & | element | ) |
Route an XMPP stanza.
element |
bool QXmppServer::sendPacket | ( | const QXmppStanza & | packet | ) |
Route an XMPP packet.
packet |
void QXmppServer::setDomain | ( | const QString & | domain | ) |
Sets the server's domain.
domain |
void QXmppServer::setLocalCertificate | ( | const QSslCertificate & | certificate | ) |
void QXmppServer::setLocalCertificate | ( | const QString & | path | ) |
Sets the path for the local SSL certificate.
path |
void QXmppServer::setLogger | ( | QXmppLogger * | logger | ) |
Sets the QXmppLogger associated with the server.
logger |
void QXmppServer::setPasswordChecker | ( | QXmppPasswordChecker * | checker | ) |
Sets the password checker used to verify client credentials.
checker |
void QXmppServer::setPrivateKey | ( | const QSslKey & | key | ) |
void QXmppServer::setPrivateKey | ( | const QString & | path | ) |
Sets the path for the local SSL private key.
path |