Obsolete Members for QXmppClient

The following members of class QXmppClient are deprecated. They are provided to keep old source code working. We strongly advise against using them in new code.

Public Functions

(since QXmpp 1.5, deprecated) QXmppE2eeExtension *encryptionExtension() const
(since QXmpp 1.5, deprecated) QXmppTask<QXmpp::SendResult> reply(QXmppStanza &&stanza, const std::optional<QXmppE2eeMetadata> &e2eeMetadata, const std::optional<QXmppSendStanzaParams> &params = {})
(deprecated) QXmppRosterManager &rosterManager()
(since QXmpp 1.5, deprecated) QXmppTask<QXmpp::SendResult> sendSensitive(QXmppStanza &&stanza, const std::optional<QXmppSendStanzaParams> &params = {})
(since QXmpp 1.5, deprecated) void setEncryptionExtension(QXmppE2eeExtension *extension)
(deprecated) QXmppVCardManager &vCardManager()
(deprecated) QXmppVersionManager &versionManager()

Public Slots

(deprecated) void sendMessage(const QString &bareJid, const QString &message)
(deprecated) bool sendPacket(const QXmppNonza &packet)

Member Function Documentation

[since QXmpp 1.5, deprecated] QXmppE2eeExtension *QXmppClient::encryptionExtension() const

This function is deprecated. We strongly advise against using it in new code.

Returns the currently used encryption extension.

since QXmpp 1.18, end-to-end encryptions are QXmpp::E2ee::Provider registered via QXmpp::E2ee::Providers.

This function was introduced in QXmpp 1.5.

See also setEncryptionExtension().

[since QXmpp 1.5, deprecated] QXmppTask<QXmpp::SendResult> QXmppClient::reply(QXmppStanza &&stanza, const std::optional<QXmppE2eeMetadata> &e2eeMetadata, const std::optional<QXmppSendStanzaParams> &params = {})

This function is deprecated. We strongly advise against using it in new code.

Sends the stanza with the same encryption as e2eeMetadata.

When there is no e2eeMetadata given this sends the stanza like send(), otherwise like sendSensitive(). For messages, the encryption of e2eeMetadata is the default selection of the QXmpp::Messages::SelectEncryption hook if there is a provider for it. Intended to be used for replies to IQs and messages.

since QXmpp 1.18, use send() and select the encryption via the QXmpp::Messages::SelectEncryption hook. Replies to IQ requests handled via QXmpp::Iq::Received are encrypted like the request, the encryption can be changed via the QXmpp::Iq::SelectEncryption hook.

params and stanza.

This function was introduced in QXmpp 1.5.

[deprecated] QXmppRosterManager &QXmppClient::rosterManager()

This function is deprecated. We strongly advise against using it in new code.

Returns the reference to the QXmppRosterManager object of the connected client. Use this to get the list of friends in the roster and their presence information.

This method is deprecated since QXmpp 1.1. Use QXmppClient::findExtension<QXmppRosterManager>() instead.

[slot, deprecated] void QXmppClient::sendMessage(const QString &bareJid, const QString &message)

This function is deprecated. We strongly advise against using it in new code.

Utility function to send message to all the resources associated with the specified bareJid. If there are no resources available, that is the contact is offline or not present in the roster, it will still send a message to the bareJid.

Note: Usage of this method is discouraged because most modern clients use carbon messages (XEP-0280: Message Carbons) and MAM (XEP-0313: Message Archive Management) and so could possibly receive messages multiple times or not receive them at all. QXmppClient::sendPacket() should be used instead with a QXmppMessage.

bareJid is the bareJid of the receiving entity. message is the message string to be sent.

[slot, deprecated] bool QXmppClient::sendPacket(const QXmppNonza &packet)

This function is deprecated. We strongly advise against using it in new code.

After successfully connecting to the server use this function to send stanzas to the server. This function can solely be used to send various kind of stanzas to the server. QXmppStanza is a parent class of all the stanzas QXmppMessage, QXmppPresence, QXmppIq, QXmppBind, QXmppRosterIq, QXmppSession and QXmppVCard.

This function does not end-to-end encrypt the packets.

packet is a valid XMPP stanza. It can be an iq, a message or a presence stanza.

Returns true if the packet was sent, false otherwise.

Following code snippet illustrates how to send a message using this function:

QXmppMessage message(from, to, message);
client.sendPacket(message);

[since QXmpp 1.5, deprecated] QXmppTask<QXmpp::SendResult> QXmppClient::sendSensitive(QXmppStanza &&stanza, const std::optional<QXmppSendStanzaParams> &params = {})

This function is deprecated. We strongly advise against using it in new code.

Sends a packet and reports the result via QXmppTask.

If stream management is enabled, the task continues to be active until the server acknowledges the packet. On success, QXmpp::SendSuccess with acknowledged == true is reported and the task finishes.

If connection errors occur, the packet is resent if possible. If reconnecting is not possible, an error is reported.

Messages are sent via the message pipeline (see QXmpp::Messages) and end-to-end encrypted with the encryption selected by the QXmpp::Messages::SelectEncryption hook. If no encryption is selected, the encryption extension (setEncryptionExtension()) is used like in earlier versions. Without encryption extension, the message is sent unencrypted, unless QXmppSendStanzaParams::isEncryptionRequired() is set.

Returns a QXmppTask that makes it possible to track the state of the packet.

since QXmpp 1.18, use send() and select the encryption via the QXmpp::Messages::SelectEncryption hook. With QXmppSendStanzaParams::setEncryptionRequired(), sending fails if no encryption is selected. IQ requests are encrypted via sendSensitiveIq().

params and stanza.

This function was introduced in QXmpp 1.5.

[since QXmpp 1.5, deprecated] void QXmppClient::setEncryptionExtension(QXmppE2eeExtension *extension)

This function is deprecated. We strongly advise against using it in new code.

Sets the extension to be used for end-to-end-encryption.

since QXmpp 1.18, end-to-end encryptions are QXmpp::E2ee::Provider registered via QXmpp::E2ee::Providers, e.g. QXmppOmemoManager. The encryption extension is still used for sensitive stanzas sent by QXmpp's managers if no encryption is selected by the QXmpp::Messages::SelectEncryption or QXmpp::Iq::SelectEncryption hook.

extension.

This function was introduced in QXmpp 1.5.

See also encryptionExtension().

[deprecated] QXmppVCardManager &QXmppClient::vCardManager()

This function is deprecated. We strongly advise against using it in new code.

Returns the reference to QXmppVCardManager, implementation of XEP-0054: vcard-temp.

This method is deprecated since QXmpp 1.1. Use QXmppClient::findExtension<QXmppVCardManager>() instead.

[deprecated] QXmppVersionManager &QXmppClient::versionManager()

This function is deprecated. We strongly advise against using it in new code.

Returns the reference to QXmppVersionManager, implementation of XEP-0092: Software Version.

This method is deprecated since QXmpp 1.1. Use QXmppClient::findExtension<QXmppVersionManager>() instead.