QXmpp
Version: 1.10.0
src
client
QXmppUserLocationManager.h
1
// SPDX-FileCopyrightText: 2022 Linus Jahn <lnj@kaidan.im>
2
// SPDX-FileCopyrightText: 2022 Cochise César <cochisecesar@zoho.com>
3
//
4
// SPDX-License-Identifier: LGPL-2.1-or-later
5
6
#ifndef QXMPPUSERLOCATIONMANAGER_H
7
#define QXMPPUSERLOCATIONMANAGER_H
8
9
#include "QXmppClientExtension.h"
10
#include "QXmppError.h"
11
#include "QXmppPubSubEventHandler.h"
12
13
#include <variant>
14
15
template
<
typename
T>
16
class
QXmppTask
;
17
class
QXmppGeolocItem
;
18
19
class
QXMPP_EXPORT
QXmppUserLocationManager
:
public
QXmppClientExtension
,
public
QXmppPubSubEventHandler
20
{
21
Q_OBJECT
22
23
public
:
24
using
Item
=
QXmppGeolocItem
;
25
using
GetResult
= std::variant<Item, QXmppError>;
26
using
PublishResult
= std::variant<QString, QXmppError>;
27
28
QXmppUserLocationManager
();
29
30
QStringList
discoveryFeatures
()
const override
;
31
32
QXmppTask<GetResult>
request(
const
QString &jid);
33
QXmppTask<PublishResult>
publish(
const
Item
&);
34
35
Q_SIGNAL
void
itemReceived
(
const
QString &jid,
const
QXmppGeolocItem
&);
36
37
protected
:
39
bool
handlePubSubEvent
(
const
QDomElement &element,
const
QString &pubSubService,
const
QString &nodeName)
override
;
41
};
42
43
#endif
// QXMPPUSERLOCATIONMANAGER_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
QXmppGeolocItem
Definition:
QXmppGeolocItem.h:17
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
QXmppUserLocationManager
Definition:
QXmppUserLocationManager.h:20
QXmppUserLocationManager::itemReceived
Q_SIGNAL void itemReceived(const QString &jid, const QXmppGeolocItem &)
QXmppUserLocationManager::PublishResult
std::variant< QString, QXmppError > PublishResult
Definition:
QXmppUserLocationManager.h:26
QXmppUserLocationManager::GetResult
std::variant< Item, QXmppError > GetResult
Definition:
QXmppUserLocationManager.h:25
Generated by
1.9.4