File indexing completed on 2024-11-10 04:32:36
0001 /* 0002 SPDX-FileCopyrightText: 2019-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 "utils.h" 0011 #include <QObject> 0012 class QTimer; 0013 class RocketChatAccount; 0014 class LIBRUQOLACORE_TESTS_EXPORT AvatarManager : public QObject 0015 { 0016 Q_OBJECT 0017 public: 0018 explicit AvatarManager(RocketChatAccount *account, QObject *parent = nullptr); 0019 ~AvatarManager() override; 0020 0021 void insertInDownloadQueue(const Utils::AvatarInfo &info); 0022 0023 RocketChatAccount *account() const; 0024 0025 Q_SIGNALS: 0026 void insertAvatarUrl(const QString &userId, const QUrl &url); 0027 0028 private: 0029 void slotInsertAvatarUrl(const Utils::AvatarInfo &info, const QUrl &url); 0030 void slotLoadNextAvatar(); 0031 void slotRescheduleDownload(); 0032 QVector<Utils::AvatarInfo> mAvatarDownloadIdentifer; 0033 RocketChatAccount *const mAccount; 0034 QTimer *const mTimer; 0035 };