QXmpp Version: 1.5.6
Loading...
Searching...
No Matches
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
15template<typename T>
16class QXmppTask;
17class QXmppGeolocItem;
18
20{
21 Q_OBJECT
22
23public:
25 using GetResult = std::variant<Item, QXmppError>;
26 using PublishResult = std::variant<QString, QXmppError>;
27
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
37protected:
39 bool handlePubSubEvent(const QDomElement &element, const QString &pubSubService, const QString &nodeName) override;
41};
42
43#endif // QXMPPUSERLOCATIONMANAGER_H
The QXmppClientExtension class is the base class for QXmppClient extensions.
Definition QXmppClientExtension.h:33
virtual QStringList discoveryFeatures() const
Definition QXmppClientExtension.cpp:22
Definition QXmppGeolocItem.h:17
Definition QXmppPubSubEventHandler.h:15
virtual bool handlePubSubEvent(const QDomElement &element, const QString &pubSubService, const QString &nodeName)=0
Definition QXmppTask.h:62
Definition QXmppUserLocationManager.h:20
Q_SIGNAL void itemReceived(const QString &jid, const QXmppGeolocItem &)
std::variant< QString, QXmppError > PublishResult
Definition QXmppUserLocationManager.h:26
std::variant< Item, QXmppError > GetResult
Definition QXmppUserLocationManager.h:25