QXmpp  Version:1.0.0
Public Member Functions | Protected Member Functions | Friends | List of all members
QXmppServerExtension Class Reference

The QXmppServerExtension class is the base class for QXmppServer extensions. More...

#include <QXmppServerExtension.h>

Inheritance diagram for QXmppServerExtension:
Inheritance graph
[legend]
Collaboration diagram for QXmppServerExtension:
Collaboration graph
[legend]

Public Member Functions

virtual QString extensionName () const
 
virtual int extensionPriority () const
 
virtual QStringList discoveryFeatures () const
 
virtual QStringList discoveryItems () const
 
virtual bool handleStanza (const QDomElement &stanza)
 
virtual QSet< QString > presenceSubscribers (const QString &jid)
 
virtual QSet< QString > presenceSubscriptions (const QString &jid)
 
virtual bool start ()
 
virtual void stop ()
 Stops the extension.
 
- Public Member Functions inherited from QXmppLoggable
 QXmppLoggable (QObject *parent=0)
 

Protected Member Functions

QXmppServerserver () const
 Returns the server which loaded this extension.
 
- 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)
 

Friends

class QXmppServer
 

Additional Inherited Members

- 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.
 

Detailed Description

The QXmppServerExtension class is the base class for QXmppServer extensions.

If you want to extend QXmppServer, for instance to support an IQ type which is not natively supported, you can subclass QXmppServerExtension and implement handleStanza(). You can then add your extension to the client instance using QXmppServer::addExtension().

Member Function Documentation

◆ discoveryFeatures()

QStringList QXmppServerExtension::discoveryFeatures ( ) const
virtual

Returns the discovery features to add to the server.

◆ discoveryItems()

QStringList QXmppServerExtension::discoveryItems ( ) const
virtual

Returns the discovery items to add to the server.

◆ extensionName()

QString QXmppServerExtension::extensionName ( ) const
virtual

Returns the extension's name.

◆ extensionPriority()

int QXmppServerExtension::extensionPriority ( ) const
virtual

Returns the extension's priority.

Higher priority extensions are called first when handling incoming stanzas.

The default implementation returns 0.

◆ handleStanza()

bool QXmppServerExtension::handleStanza ( const QDomElement &  stanza)
virtual

Handles an incoming XMPP stanza.

Return true if no further processing should occur, false otherwise.

Parameters
stanzaThe received stanza.

◆ presenceSubscribers()

QSet< QString > QXmppServerExtension::presenceSubscribers ( const QString &  jid)
virtual

Returns the list of subscribers for the given JID.

Parameters
jid

◆ presenceSubscriptions()

QSet< QString > QXmppServerExtension::presenceSubscriptions ( const QString &  jid)
virtual

Returns the list of subscriptions for the given JID.

Parameters
jid

◆ start()

bool QXmppServerExtension::start ( )
virtual

Starts the extension.

Return true if the extension was started, false otherwise.


The documentation for this class was generated from the following files: