QXmpp  Version:1.3.0
Public Member Functions | Protected Member Functions | Friends | List of all members
QXmppClientExtension Class Referenceabstract

The QXmppClientExtension class is the base class for QXmppClient extensions. More...

#include <QXmppClientExtension.h>

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

Public Member Functions

 QXmppClientExtension ()
 
 ~QXmppClientExtension () override
 
virtual QStringList discoveryFeatures () const
 
virtual QList< QXmppDiscoveryIq::IdentitydiscoveryIdentities () const
 
virtual bool handleStanza (const QDomElement &stanza)=0
 You need to implement this method to process incoming XMPP stanzas. More...
 
- Public Member Functions inherited from QXmppLoggable
 QXmppLoggable (QObject *parent=nullptr)
 

Protected Member Functions

QXmppClientclient ()
 
virtual void setClient (QXmppClient *client)
 
- 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 QXmppClient
 

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 QXmppClientExtension class is the base class for QXmppClient extensions.

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

Constructor & Destructor Documentation

◆ QXmppClientExtension()

QXmppClientExtension::QXmppClientExtension ( )

Constructs a QXmppClient extension.

◆ ~QXmppClientExtension()

QXmppClientExtension::~QXmppClientExtension ( )
override

Destroys a QXmppClient extension.

Member Function Documentation

◆ client()

QXmppClient * QXmppClientExtension::client ( )
protected

Returns the client which loaded this extension.

◆ discoveryFeatures()

QStringList QXmppClientExtension::discoveryFeatures ( ) const
virtual

Returns the discovery features to add to the client.

Reimplemented in QXmppRegistrationManager.

◆ discoveryIdentities()

QList< QXmppDiscoveryIq::Identity > QXmppClientExtension::discoveryIdentities ( ) const
virtual

Returns the discovery identities to add to the client.

◆ handleStanza()

virtual bool QXmppClientExtension::handleStanza ( const QDomElement &  stanza)
pure virtual

You need to implement this method to process incoming XMPP stanzas.

You should return true if the stanza was handled and no further processing should occur, or false to let other extensions process the stanza.

Implemented in QXmppUploadRequestManager.

◆ setClient()

void QXmppClientExtension::setClient ( QXmppClient client)
protectedvirtual

Sets the client which loaded this extension.

Parameters
client

Reimplemented in QXmppRegistrationManager, and QXmppUploadRequestManager.


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