QXmpp Version: 1.5.6
Loading...
Searching...
No Matches
QXmppAttentionManager.h
1// SPDX-FileCopyrightText: 2020 Linus Jahn <lnj@kaidan.im>
2//
3// SPDX-License-Identifier: LGPL-2.1-or-later
4
5#ifndef QXMPPATTENTIONMANAGER_H
6#define QXMPPATTENTIONMANAGER_H
7
8#include "QXmppClientExtension.h"
9
10#include <QTime>
11
12class QXmppAttentionManagerPrivate;
13class QXmppMessage;
14
16{
17 Q_OBJECT
18
19public:
20 QXmppAttentionManager(quint8 allowedAttempts = 3, QTime timeFrame = QTime(0, 15, 0));
22
23 QStringList discoveryFeatures() const override;
24
25 quint8 allowedAttempts() const;
26 void setAllowedAttempts(quint8 allowedAttempts);
27
28 QTime allowedAttemptsTimeInterval() const;
29 void setAllowedAttemptsTimeInterval(QTime interval);
30
31public Q_SLOTS:
32 QString requestAttention(const QString &jid, const QString &message = {});
33
34Q_SIGNALS:
35 void attentionRequested(const QXmppMessage &message, bool isTrusted);
37
38protected:
39 void setClient(QXmppClient *client) override;
40
41private Q_SLOTS:
42 void handleMessageReceived(const QXmppMessage &message);
43
44private:
45 const std::unique_ptr<QXmppAttentionManagerPrivate> d;
46};
47
48#endif // QXMPPATTENTIONMANAGER_H
The QXmppAttentionManager class manages attention requests as defined by XEP-0224: Attention.
Definition QXmppAttentionManager.h:16
void attentionRequested(const QXmppMessage &message, bool isTrusted)
void attentionRequestRateLimited(const QXmppMessage &message)
The QXmppClientExtension class is the base class for QXmppClient extensions.
Definition QXmppClientExtension.h:33
virtual void setClient(QXmppClient *client)
Definition QXmppClientExtension.cpp:88
virtual QStringList discoveryFeatures() const
Definition QXmppClientExtension.cpp:22
The QXmppClient class is the main class for using QXmpp.
Definition QXmppClient.h:84
The QXmppMessage class represents an XMPP message.
Definition QXmppMessage.h:35