|
QXmpp
Version: 1.15.1
|
XEP-0045: Multi-User Chat Manager with support for XEP-0402: PEP Native Bookmarks. More...
Public Member Functions | |
| QXmppMucManagerV2 () | |
| Default constructor. | |
| QStringList | discoveryFeatures () const override |
| Supported service discovery features. | |
| const std::optional< QList< QXmppMucBookmark > > & | bookmarks () const |
| Retrieved bookmarks. | |
| Q_SIGNAL void | bookmarksReset () |
| Q_SIGNAL void | bookmarksAdded (const QList< QXmppMucBookmark > &newBookmarks) |
| Q_SIGNAL void | bookmarksChanged (const QList< QXmppMucManagerV2::BookmarkChange > &bookmarkUpdates) |
| Q_SIGNAL void | bookmarksRemoved (const QList< QString > &removedBookmarkJids) |
| QXmppTask< QXmpp::Result<> > | setBookmark (QXmppMucBookmark &&bookmark) |
| Adds or updates the bookmark for a MUC. | |
| QXmppTask< QXmpp::Result<> > | removeBookmark (const QString &jid) |
| Removes a bookmark. | |
| QXmppTask< QXmpp::Result<> > | setRoomAvatar (QString jid, const Avatar &avatar) |
| QXmppTask< QXmpp::Result<> > | removeRoomAvatar (QString jid) |
| QXmppTask< QXmpp::Result< std::optional< Avatar > > > | fetchRoomAvatar (QString jid) |
| bool | handlePubSubEvent (const QDomElement &element, const QString &pubSubService, const QString &nodeName) override |
| Handles incoming PubSub events. | |
Public Member Functions inherited from QXmppClientExtension | |
| QXmppClientExtension () | |
| virtual QList< QXmppDiscoIdentity > | 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) | |
| Q_SIGNAL void | setGauge (const QString &gauge, double value) |
| Sets the given gauge to value. | |
| Q_SIGNAL void | logMessage (QXmppLogger::MessageType type, const QString &msg) |
| This signal is emitted to send logging messages. | |
| Q_SIGNAL void | updateCounter (const QString &counter, qint64 amount=1) |
| Updates the given counter by amount. | |
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) |
| 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) |
| Logs a debugging message. | |
| void | info (const QString &message) |
| Logs an informational message. | |
| void | warning (const QString &message) |
| Logs a warning message. | |
| void | logReceived (const QString &message) |
| Logs a received packet. | |
| void | logSent (const QString &message) |
| Logs a sent packet. | |
Friends | |
| class | QXmppMucManagerV2Private |
| class | tst_QXmppMuc |
XEP-0045: Multi-User Chat Manager with support for XEP-0402: PEP Native Bookmarks.
The manager automatically fetches bookmarks on session establishment and afterwards emits bookmarksReset(), bookmarksAdded(), bookmarksRemoved() and bookmarksChanged().
The QXmppPubSubManager must be registered with the client.
| QXmppMucManagerV2::bookmarksAdded | ( | const QList< QXmppMucBookmark > & | newBookmarks | ) |
Emitted when bookmarks have been added. This is triggered by PubSub event notifications.
| QXmppMucManagerV2::bookmarksChanged | ( | const QList< QXmppMucManagerV2::BookmarkChange > & | bookmarkUpdates | ) |
Emitted when bookmarks have been changed.
| QXmppMucManagerV2::bookmarksRemoved | ( | const QList< QString > & | removedBookmarkJids | ) |
Emitted when bookmarks are retracted.
| QXmppMucManagerV2::bookmarksReset | ( | ) |
Emitted when the total set of bookmarks is reset, e.g. when receiving the initial bookmarks items query.
| QXmppTask< Result< std::optional< QXmppMucManagerV2::Avatar > > > QXmppMucManagerV2::fetchRoomAvatar | ( | QString | jid | ) |
Fetches the Avatar of a MUC room
First fetches the avatar hashes via the muc::roominfo form from service discovery information and then fetches the avatar itself via vcard-temp.
| jid | JID of the MUC room |
|
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.
| QXmppTask< QXmpp::Result<> > QXmppMucManagerV2::removeRoomAvatar | ( | QString | jid | ) |
Removes the avatar of a MUC room.
Requires the MUC service to support "vcard-temp" and to be "an owner or some other priviledged entity" of the MUC.
| jid | JID of the MUC room |
| QXmppTask< QXmpp::Result<> > QXmppMucManagerV2::setRoomAvatar | ( | QString | jid, |
| const Avatar & | avatar | ||
| ) |
Sets the avatar of a MUC room.
Requires the MUC service to support "vcard-temp" and to be "an owner or some other priviledged entity" of the MUC.
| jid | JID of the MUC room |
| avatar | Avatar to be set |
1.8.14