QXmpp Version: 1.5.6
Loading...
Searching...
No Matches
QXmppEntityTimeManager.h
1// SPDX-FileCopyrightText: 2010 Manjeet Dahiya <manjeetdahiya@gmail.com>
2// SPDX-FileCopyrightText: 2022 Linus Jahn <lnj@kaidan.im>
3//
4// SPDX-License-Identifier: LGPL-2.1-or-later
5
6#ifndef QXMPPENTITYTIMEMANAGER_H
7#define QXMPPENTITYTIMEMANAGER_H
8
9#include "QXmppClientExtension.h"
10
11#include <variant>
12
13template<class T>
14class QXmppTask;
16struct QXmppError;
17
25{
26 Q_OBJECT
27
28public:
29 QString requestTime(const QString &jid);
30
31 using EntityTimeResult = std::variant<QXmppEntityTimeIq, QXmppError>;
32 QXmppTask<EntityTimeResult> requestEntityTime(const QString &jid);
33
35 QStringList discoveryFeatures() const override;
36 bool handleStanza(const QDomElement &element) override;
37 std::variant<QXmppEntityTimeIq, QXmppStanza::Error> handleIq(QXmppEntityTimeIq iq);
39
40Q_SIGNALS:
44};
45
46#endif // QXMPPENTITYTIMEMANAGER_H
The QXmppClientExtension class is the base class for QXmppClient extensions.
Definition QXmppClientExtension.h:33
virtual QStringList discoveryFeatures() const
Definition QXmppClientExtension.cpp:22
virtual bool handleStanza(const QDomElement &stanza)
You need to implement this method to process incoming XMPP stanzas.
Definition QXmppClientExtension.cpp:51
QXmppEntityTimeIq represents an entity time request/response as defined in XEP-0202: Entity Time.
Definition QXmppEntityTimeIq.h:19
The QXmppEntityTimeManager class provided the functionality to get the local time of an entity as def...
Definition QXmppEntityTimeManager.h:25
void timeReceived(const QXmppEntityTimeIq &)
This signal is emitted when a time response is received. It's not emitted when the QFuture-based requ...
std::variant< QXmppEntityTimeIq, QXmppError > EntityTimeResult
Definition QXmppEntityTimeManager.h:31
Definition QXmppTask.h:62
Definition QXmppError.h:18