QXmpp Version: 1.10.0
QXmppUserTuneManager.h
1// SPDX-FileCopyrightText: 2021 Linus Jahn <lnj@kaidan.im>
2//
3// SPDX-License-Identifier: LGPL-2.1-or-later
4
5#ifndef QXMPPUSERTUNEMANAGER_H
6#define QXMPPUSERTUNEMANAGER_H
7
8#include "QXmppClientExtension.h"
9#include "QXmppError.h"
10#include "QXmppPubSubEventHandler.h"
11
12#include <variant>
13
14class QXmppTuneItem;
15template<typename T>
16class QXmppTask;
17
19{
20 Q_OBJECT
21
22public:
24 using GetResult = std::variant<Item, QXmppError>;
25 using PublishResult = std::variant<QString, QXmppError>;
26
28
29 QStringList discoveryFeatures() const override;
30
31 QXmppTask<GetResult> request(const QString &jid);
33
34 Q_SIGNAL void itemReceived(const QString &jid, const QXmppTuneItem &item);
35
36protected:
38 bool handlePubSubEvent(const QDomElement &element, const QString &pubSubService, const QString &nodeName) override;
40};
41
42#endif // QXMPPUSERTUNEMANAGER_H
The QXmppClientExtension class is the base class for QXmppClient extensions.
Definition: QXmppClientExtension.h:32
virtual QStringList discoveryFeatures() const
Definition: QXmppClientExtension.cpp:22
Definition: QXmppPubSubEventHandler.h:15
virtual bool handlePubSubEvent(const QDomElement &element, const QString &pubSubService, const QString &nodeName)=0
Definition: QXmppTask.h:62
Definition: QXmppUserTuneItem.h:20
Definition: QXmppUserTuneManager.h:19
std::variant< QString, QXmppError > PublishResult
Definition: QXmppUserTuneManager.h:25
Q_SIGNAL void itemReceived(const QString &jid, const QXmppTuneItem &item)
std::variant< Item, QXmppError > GetResult
Definition: QXmppUserTuneManager.h:24