Debian Codegraph @

src/AvatarProvider.h

raw symbols SCIP
1 // SPDX-FileCopyrightText: Nheko Contributors
2 //
3 // SPDX-License-Identifier: GPL-3.0-or-later
4
5 #pragma once
6
7 #include <QObject>
8 #include <QPixmap>
9
10 #include <functional>
11
12 using AvatarCallback = std::function<void(QPixmap)>;
13
14 class AvatarProxy final : public QObject
15 {
16 Q_OBJECT
17
18 signals:
19 void avatarDownloaded(QPixmap pm);
20 };
21
22 namespace AvatarProvider {
23 void
24 resolve(QString avatarUrl, int size, QObject *receiver, AvatarCallback cb);
25 void
26 resolve(const QString &room_id,
27 const QString &user_id,
28 int size,
29 QObject *receiver,
30 AvatarCallback cb);
31 }