mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-25 12:38:48 +03:00
96f791daf1
See also: https://daniel.haxx.se/blog/2023/01/08/copyright-without-years/ https://hynek.me/til/copyright-years/
31 lines
617 B
C++
31 lines
617 B
C++
// SPDX-FileCopyrightText: Nheko Contributors
|
|
//
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
#pragma once
|
|
|
|
#include <QObject>
|
|
|
|
#include <vector>
|
|
|
|
#include <mtx/events.hpp>
|
|
#include <mtx/events/presence.hpp>
|
|
|
|
class PresenceEmitter final : public QObject
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
PresenceEmitter(QObject *p = nullptr)
|
|
: QObject(p)
|
|
{
|
|
}
|
|
|
|
void sync(const std::vector<mtx::events::Event<mtx::events::presence::Presence>> &presences);
|
|
|
|
Q_INVOKABLE QString userPresence(QString id) const;
|
|
Q_INVOKABLE QString userStatus(QString id) const;
|
|
|
|
signals:
|
|
void presenceChanged(QString userid);
|
|
};
|