Jellyfin Qt
QML Library for interacting with the Jellyfin multimedia server
Loading...
Searching...
No Matches
eventbus.h
Go to the documentation of this file.
1/*
2 * Sailfin: a Jellyfin client written using Qt
3 * Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 */
19
20#ifndef JELLYFIN_EVENTBUS_H
21#define JELLYFIN_EVENTBUS_H
22
23#include <QObject>
24
25namespace Jellyfin {
26namespace DTO {
27 class UserItemDataDto;
28 class PlaystateRequest;
29 class SessionInfo;
30}
31
35class EventBus : public QObject {
36 Q_OBJECT
37public:
38 explicit EventBus(QObject *parent = nullptr);
39
40signals:
46 void itemUserDataUpdated(const QString &itemId, const DTO::UserItemDataDto &userData);
47
53 void sessionInfoUpdated(const QString &sessionId, const DTO::SessionInfo &sessionInfo);
54
61 void displayMessage(const QString &header, const QString &message, int timeout = -1);
62
64};
65
66}
67
68#endif //JELLYVIN_EVENTBUS_H
Definition playstaterequest.h:49
Definition sessioninfo.h:60
Definition useritemdatadto.h:49
"EventBus" object through which "events" are sent.
Definition eventbus.h:35
void displayMessage(const QString &header, const QString &message, int timeout=-1)
The server has requested to display an message to the user.
void itemUserDataUpdated(const QString &itemId, const DTO::UserItemDataDto &userData)
The UserData of an Item has been updated.
EventBus(QObject *parent=nullptr)
Definition eventbus.cpp:23
void sessionInfoUpdated(const QString &sessionId, const DTO::SessionInfo &sessionInfo)
The information about a session has been updated.
void playstateCommandReceived(const Jellyfin::DTO::PlaystateRequest &request)
Jellyfin::DTO::PlaystateRequest PlaystateRequest
Definition playstaterequest.h:106
Jellyfin::DTO::SessionInfo SessionInfo
Definition sessioninfo.h:357
Jellyfin::DTO::UserItemDataDto UserItemDataDto
Definition useritemdatadto.h:207