File indexing completed on 2024-04-14 15:03:55

0001 /*
0002    SPDX-FileCopyrightText: 2017-2024 Laurent Montel <montel@kde.org>
0003 
0004    SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #pragma once
0008 
0009 #include "libruqola_private_export.h"
0010 #include <QObject>
0011 class QTimer;
0012 class LIBRUQOLACORE_TESTS_EXPORT TypingNotification : public QObject
0013 {
0014     Q_OBJECT
0015 public:
0016     explicit TypingNotification(QObject *parent = nullptr);
0017     ~TypingNotification() override;
0018 
0019     void textNotificationChanged(const QString &roomId, bool emptyString);
0020 Q_SIGNALS:
0021     void informTypingStatus(const QString &room, bool typing);
0022 
0023 private:
0024     void slotTimeout();
0025     QString mRoomId;
0026     bool mTypingInprogress = false;
0027     QTimer *const mTimer;
0028 };