QXmpp
Version: 1.10.0
src
client
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
14
class
QXmppTuneItem
;
15
template
<
typename
T>
16
class
QXmppTask
;
17
18
class
QXMPP_EXPORT
QXmppUserTuneManager
:
public
QXmppClientExtension
,
public
QXmppPubSubEventHandler
19
{
20
Q_OBJECT
21
22
public
:
23
using
Item
=
QXmppTuneItem
;
24
using
GetResult
= std::variant<Item, QXmppError>;
25
using
PublishResult
= std::variant<QString, QXmppError>;
26
27
QXmppUserTuneManager
();
28
29
QStringList
discoveryFeatures
()
const override
;
30
31
QXmppTask<GetResult>
request(
const
QString &jid);
32
QXmppTask<PublishResult>
publish(
const
QXmppTuneItem
&);
33
34
Q_SIGNAL
void
itemReceived
(
const
QString &jid,
const
QXmppTuneItem
&item);
35
36
protected
:
38
bool
handlePubSubEvent
(
const
QDomElement &element,
const
QString &pubSubService,
const
QString &nodeName)
override
;
40
};
41
42
#endif
// QXMPPUSERTUNEMANAGER_H
QXmppClientExtension
The QXmppClientExtension class is the base class for QXmppClient extensions.
Definition:
QXmppClientExtension.h:32
QXmppClientExtension::discoveryFeatures
virtual QStringList discoveryFeatures() const
Definition:
QXmppClientExtension.cpp:22
QXmppPubSubEventHandler
Definition:
QXmppPubSubEventHandler.h:15
QXmppPubSubEventHandler::handlePubSubEvent
virtual bool handlePubSubEvent(const QDomElement &element, const QString &pubSubService, const QString &nodeName)=0
QXmppTask
Definition:
QXmppTask.h:62
QXmppTuneItem
Definition:
QXmppUserTuneItem.h:20
QXmppUserTuneManager
Definition:
QXmppUserTuneManager.h:19
QXmppUserTuneManager::PublishResult
std::variant< QString, QXmppError > PublishResult
Definition:
QXmppUserTuneManager.h:25
QXmppUserTuneManager::itemReceived
Q_SIGNAL void itemReceived(const QString &jid, const QXmppTuneItem &item)
QXmppUserTuneManager::GetResult
std::variant< Item, QXmppError > GetResult
Definition:
QXmppUserTuneManager.h:24
Generated by
1.9.4