Loading...
Searching...
No Matches
QXmppUserTuneManager Class Reference
Managers
Inheritance diagram for QXmppUserTuneManager:
[legend]
Collaboration diagram for QXmppUserTuneManager:
[legend]

## Public Types

using | Item = QXmppTuneItem
using | GetResult = std::variant< Item, QXmppError >
using | PublishResult = std::variant< QString, QXmppError >

## Public Member Functions

QStringList | discoveryFeatures () const override
QXmppTask< GetResult > | request (const QString &jid)
QXmppTask< PublishResult > | publish (const QXmppTuneItem &)
Q_SIGNAL void | itemReceived (const QString &jid, const QXmppTuneItem &item)
Public Member Functions inherited from QXmppClientExtension
| QXmppClientExtension ()
virtual QList< QXmppDiscoveryIq::Identity > | discoveryIdentities () const
virtual bool | handleStanza (const QDomElement &stanza)
| You need to implement this method to process incoming XMPP stanzas.
virtual bool | handleStanza (const QDomElement &stanza, const std::optional< QXmppE2eeMetadata > &e2eeMetadata)
| You need to implement this method to process incoming XMPP stanzas.
Public Member Functions inherited from QXmppLoggable
| QXmppLoggable (QObject *parent=nullptr)
Public Member Functions inherited from QXmppPubSubEventHandler
virtual bool | handlePubSubEvent (const QDomElement &element, const QString &pubSubService, const QString &nodeName)=0

## 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.
Protected Member Functions inherited from QXmppClientExtension
QXmppClient * | client ()
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)
void | info (const QString &message)
void | warning (const QString &message)
void | logReceived (const QString &message)
void | logSent (const QString &message)

## Detailed Description

The QXmppUserTuneManager implements XEP-0118: User Tune. You'll receive tune updates from all presence subscriptions. You can publish tune information on the user's account (publish()) and request tune information from specific accounts (request()).

The manager needs to be added to the client first and also requires the QXmppPubSubManager.

QXmppClient client;
auto *pubSubManager = client.addNewExtension<QXmppPubSubManager>();
auto *tuneManager = client.addNewExtension<QXmppUserTuneManager>();
QXmppClientExtension::client
QXmppClient * client()
Definition QXmppClientExtension.cpp:78
QXmppClient
The QXmppClient class is the main class for using QXmpp.
Definition QXmppClient.h:84
QXmppClient::addNewExtension
T * addNewExtension(Args... args)
Definition QXmppClient.h:129
QXmppPubSubManager
The QXmppPubSubManager aims to provide publish-subscribe functionality as specified in XEP-0060: Publ...
Definition QXmppPubSubManager.h:21
QXmppUserTuneManager
Definition QXmppUserTuneManager.h:19

Since
  QXmpp 1.5

## Member Typedef Documentation

## GetResult

QXmppUserTuneManager::GetResult

Contains the User Tune information or an error.

## Item

QXmppUserTuneManager::Item

Used pubsub item type.

## PublishResult

QXmppUserTuneManager::PublishResult

Contains the ID of the published item on success or a stanza error.

## Member Function Documentation

## discoveryFeatures()

QStringList QXmppUserTuneManager::discoveryFeatures | ( |  | ) | const

override virtual

Returns the discovery features to add to the client.

Reimplemented from QXmppClientExtension.

## itemReceived()

QXmppUserTuneManager::itemReceived | ( | const QString & | jid,
|  | const QXmppTuneItem & | item
| ) |  |

Emitted whenever a XEP-0118: User Tune items event arrives.

## publish()

auto QXmppUserTuneManager::publish | ( | const QXmppTuneItem & | item | ) |

Publishes User Tune information on the user's account.

Parameters

  item | The User Tune item to be published.

## request()

auto QXmppUserTuneManager::request | ( | const QString & | jid | ) |

Request User Tune information from an account.

Parameters

  jid | The account JID to request.

The documentation for this class was generated from the following files:

- QXmppUserTuneManager.h
- QXmppUserTuneManager.cpp