mirror of
https://github.com/HenkKalkwater/harbour-sailfin.git
synced 2025-09-04 01:42:44 +00:00
Add support for server-side notifications
This commit is contained in:
parent
357ac89330
commit
60bc90c5fa
14 changed files with 179 additions and 14 deletions
|
@ -100,7 +100,7 @@ public:
|
|||
Q_PROPERTY(QString userId READ userId NOTIFY userIdChanged)
|
||||
Q_PROPERTY(QJsonObject deviceProfile READ deviceProfileJson NOTIFY deviceProfileChanged)
|
||||
Q_PROPERTY(QString version READ version)
|
||||
Q_PROPERTY(EventBus *eventbus READ eventbus FINAL)
|
||||
Q_PROPERTY(Jellyfin::EventBus *eventbus READ eventbus FINAL)
|
||||
Q_PROPERTY(Jellyfin::WebSocket *websocket READ websocket FINAL)
|
||||
Q_PROPERTY(QVariantList supportedCommands READ supportedCommands WRITE setSupportedCommands NOTIFY supportedCommandsChanged)
|
||||
Q_PROPERTY(Jellyfin::ViewModel::Settings *settings READ settings NOTIFY settingsChanged)
|
||||
|
|
|
@ -45,9 +45,11 @@ signals:
|
|||
|
||||
/**
|
||||
* @brief The server has requested to display an message to the user
|
||||
* @param header The header of the message.
|
||||
* @param message The message to show.
|
||||
* @param timeout Timeout in MS to show the message. -1: no timeout supplied.
|
||||
*/
|
||||
void displayMessage(const QString &message);
|
||||
void displayMessage(const QString &header, const QString &message, int timeout = -1);
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -37,6 +37,19 @@ extern template QDateTime fromJsonValue<QDateTime>(const QJsonValue &source, con
|
|||
extern template QVariant fromJsonValue<QVariant>(const QJsonValue &source, convertType<QVariant>);
|
||||
extern template QUuid fromJsonValue<QUuid>(const QJsonValue &source, convertType<QUuid>);
|
||||
|
||||
extern template QJsonValue toJsonValue<int>(const int &source, convertType<int>);
|
||||
extern template QJsonValue toJsonValue<qint64>(const qint64 &source, convertType<qint64>);
|
||||
extern template QJsonValue toJsonValue<bool>(const bool &source, convertType<bool>);
|
||||
extern template QJsonValue toJsonValue<QString>(const QString &source, convertType<QString>);
|
||||
extern template QJsonValue toJsonValue<QStringList>(const QStringList &source, convertType<QStringList>);
|
||||
extern template QJsonValue toJsonValue<QJsonObject>(const QJsonObject &source, convertType<QJsonObject>);
|
||||
extern template QJsonValue toJsonValue<double>(const double &source, convertType<double>);
|
||||
extern template QJsonValue toJsonValue<float>(const float &source, convertType<float>);
|
||||
extern template QJsonValue toJsonValue<QDateTime>(const QDateTime &source, convertType<QDateTime>);
|
||||
extern template QJsonValue toJsonValue<QVariant>(const QVariant &source, convertType<QVariant>);
|
||||
extern template QJsonValue toJsonValue<QUuid>(const QUuid &source, convertType<QUuid>);
|
||||
|
||||
|
||||
extern template QString toString(const QUuid &source, convertType<QUuid>);
|
||||
extern template QString toString(const qint32 &source, convertType<qint32>);
|
||||
extern template QString toString(const qint64 &source, convertType<qint64>);
|
||||
|
|
|
@ -33,9 +33,12 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|||
|
||||
#include "apiclient.h"
|
||||
|
||||
Q_DECLARE_LOGGING_CATEGORY(jellyfinWebSocket);
|
||||
|
||||
namespace Jellyfin {
|
||||
class ApiClient;
|
||||
|
||||
|
||||
namespace DTO {
|
||||
class UserItemDataDto;
|
||||
using UserData = UserItemDataDto;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue