QXmpp Version: 1.10.0
|
The QXmppCarbonManagerV2 class handles message carbons as described in XEP-0280: Message Carbons. More...
Public Member Functions | |
bool | handleStanza (const QDomElement &, const std::optional< QXmppE2eeMetadata > &) override |
You need to implement this method to process incoming XMPP stanzas. More... | |
Public Member Functions inherited from QXmppClientExtension | |
QXmppClientExtension () | |
virtual QStringList | discoveryFeatures () const |
virtual QList< QXmppDiscoveryIq::Identity > | discoveryIdentities () const |
virtual bool | handleStanza (const QDomElement &stanza) |
You need to implement this method to process incoming XMPP stanzas. More... | |
virtual bool | handleStanza (const QDomElement &stanza, const std::optional< QXmppE2eeMetadata > &e2eeMetadata) |
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 | |
void | onRegistered (QXmppClient *client) override |
void | onUnregistered (QXmppClient *client) override |
Protected Member Functions inherited from QXmppClientExtension | |
QXmppClient * | client () const |
virtual void | setClient (QXmppClient *client) |
virtual void | onRegistered (QXmppClient *client) |
virtual void | onUnregistered (QXmppClient *client) |
void | injectIq (const QDomElement &element, const std::optional< QXmppE2eeMetadata > &e2eeMetadata) |
bool | injectMessage (QXmppMessage &&message) |
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) |
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. | |
The QXmppCarbonManagerV2 class handles message carbons as described in XEP-0280: Message Carbons.
The manager automatically enables carbons when a connection is established. Either by using XEP-0386: Bind 2 if available or by sending a normal IQ request on connection. Carbon copied messages from other devices of the same account and carbon copied messages from other accounts are injected into the QXmppClient. This way you can handle them like any other incoming message by implementing QXmppMessageHandler or using QXmppClient::messageReceived().
Checks are done to ensure that the entity sending the carbon copy is allowed to send the forwarded message.
You don't need to do anything other than adding the extension to the client to use it.
To distinguish carbon messages, you can use QXmppMessage::isCarbonMessage().
|
overridevirtual |
You need to implement this method to process incoming XMPP stanzas.
stanza | The DOM element to be handled. |
e2eeMetadata | If the element has been decrypted this contains metadata about the encryption. |
Reimplemented from QXmppClientExtension.
|
overrideprotectedvirtual |
Called after the extension has been added to a QXmppClient.
client |
Reimplemented from QXmppClientExtension.
|
overrideprotectedvirtual |
Called after the extension has been removed from a QXmppClient.
client |
Reimplemented from QXmppClientExtension.