QXmppCarbonManagerV2 Class

The QXmppCarbonManagerV2 class handles message carbons as described in XEP-0280: Message Carbons. More...

Header: #include <QXmppCarbonManagerV2>
Since: QXmpp 1.5
Inherits: QXmppClientExtension

Public Functions

QBindable<bool> enabled() const

Detailed Description

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.

 QXmppClient client;
 client.addNewExtension<QXmppCarbonManagerV2>();

To distinguish carbon messages, you can use QXmppMessage::isCarbonMessage().

Note: Enabling via Bind 2 has been added in QXmpp 1.8.

Member Function Documentation

QBindable<bool> QXmppCarbonManagerV2::enabled() const

Returns whether message carbons are currently enabled on the server.