mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-25 20:48:52 +03:00
27 lines
511 B
C
27 lines
511 B
C
|
#pragma once
|
||
|
|
||
|
#include <QObject>
|
||
|
|
||
|
#include <vector>
|
||
|
|
||
|
#include <mtx/events.hpp>
|
||
|
#include <mtx/events/presence.hpp>
|
||
|
|
||
|
class PresenceEmitter : 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);
|
||
|
};
|