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

(deprecated) QXmppRosterManager &rosterManager()
(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

[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);

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