Jellyfin Qt
QML Library for interacting with the Jellyfin multimedia server
Loading...
Searching...
No Matches
playqueueupdate.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 * WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
21 * OVERWRITTEN AT SOME POINT!
22 *
23 * If there is a bug in this file, please fix the code generator used to generate this file found in
24 * core/openapigenerator.d.
25 *
26 * This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
27 * file with a newer file if needed instead of manually updating the files.
28 */
29
30#ifndef JELLYFIN_DTO_PLAYQUEUEUPDATE_H
31#define JELLYFIN_DTO_PLAYQUEUEUPDATE_H
32
33#include <QDateTime>
34#include <QJsonObject>
35#include <QJsonValue>
36#include <QList>
37#include <QStringList>
38#include <optional>
39
45
46namespace Jellyfin {
47// Forward declaration
48class ApiClient;
49}
50namespace Jellyfin {
51namespace DTO {
52
53
55public:
58 QDateTime lastUpdate,
60 qint32 playingItemIndex,
61 qint64 startPositionTicks,
62 bool isPlaying,
65 );
66
67 PlayQueueUpdate(const PlayQueueUpdate &other);
68
72 void replaceData(PlayQueueUpdate &other);
73
74 static PlayQueueUpdate fromJson(QJsonObject source);
75 void setFromJson(QJsonObject source);
76 QJsonObject toJson() const;
77
78 // Properties
79
81
82 void setReason(PlayQueueUpdateReason newReason);
83
87 QDateTime lastUpdate() const;
91 void setLastUpdate(QDateTime newLastUpdate);
92
100 void setPlaylist(QList<SyncPlayQueueItem> newPlaylist);
101
105 qint32 playingItemIndex() const;
109 void setPlayingItemIndex(qint32 newPlayingItemIndex);
110
114 qint64 startPositionTicks() const;
118 void setStartPositionTicks(qint64 newStartPositionTicks);
119
123 bool isPlaying() const;
127 void setIsPlaying(bool newIsPlaying);
128
129
131
132 void setShuffleMode(GroupShuffleMode newShuffleMode);
133
134
136
137 void setRepeatMode(GroupRepeatMode newRepeatMode);
138
139
140protected:
142 QDateTime m_lastUpdate;
149
150private:
151 // Private constructor which generates an invalid object, for use withing PlayQueueUpdate::fromJson();
153};
154
155
156} // NS DTO
157
158namespace Support {
159
161
162template <>
164
165template<>
167
168} // NS DTO
169} // NS Jellyfin
170
171#endif // JELLYFIN_DTO_PLAYQUEUEUPDATE_H
An Api client for Jellyfin. Handles requests and authentication.
Definition apiclient.h:90
Definition playqueueupdate.h:54
qint64 startPositionTicks() const
Gets the start position ticks.
Definition playqueueupdate.cpp:137
qint32 playingItemIndex() const
Gets the playing item index in the playlist.
Definition playqueueupdate.cpp:131
void setStartPositionTicks(qint64 newStartPositionTicks)
Gets the start position ticks.
Definition playqueueupdate.cpp:139
PlayQueueUpdate(PlayQueueUpdateReason reason, QDateTime lastUpdate, QList< SyncPlayQueueItem > playlist, qint32 playingItemIndex, qint64 startPositionTicks, bool isPlaying, GroupShuffleMode shuffleMode, GroupRepeatMode repeatMode)
Definition playqueueupdate.cpp:36
GroupShuffleMode shuffleMode() const
Definition playqueueupdate.cpp:149
void setIsPlaying(bool newIsPlaying)
Gets a value indicating whether the current item is playing.
Definition playqueueupdate.cpp:145
void setLastUpdate(QDateTime newLastUpdate)
Gets the UTC time of the last change to the playing queue.
Definition playqueueupdate.cpp:121
void setShuffleMode(GroupShuffleMode newShuffleMode)
Definition playqueueupdate.cpp:151
qint64 m_startPositionTicks
Definition playqueueupdate.h:145
void setReason(PlayQueueUpdateReason newReason)
Definition playqueueupdate.cpp:115
void setPlayingItemIndex(qint32 newPlayingItemIndex)
Gets the playing item index in the playlist.
Definition playqueueupdate.cpp:133
static PlayQueueUpdate fromJson(QJsonObject source)
Definition playqueueupdate.cpp:80
qint32 m_playingItemIndex
Definition playqueueupdate.h:144
QList< SyncPlayQueueItem > m_playlist
Definition playqueueupdate.h:143
void replaceData(PlayQueueUpdate &other)
Definition playqueueupdate.cpp:69
bool m_isPlaying
Definition playqueueupdate.h:146
bool isPlaying() const
Gets a value indicating whether the current item is playing.
Definition playqueueupdate.cpp:143
QList< SyncPlayQueueItem > playlist() const
Gets the playlist.
Definition playqueueupdate.cpp:125
QDateTime m_lastUpdate
Definition playqueueupdate.h:142
GroupShuffleMode m_shuffleMode
Definition playqueueupdate.h:147
void setRepeatMode(GroupRepeatMode newRepeatMode)
Definition playqueueupdate.cpp:157
GroupRepeatMode repeatMode() const
Definition playqueueupdate.cpp:155
GroupRepeatMode m_repeatMode
Definition playqueueupdate.h:148
PlayQueueUpdateReason reason() const
Definition playqueueupdate.cpp:113
void setFromJson(QJsonObject source)
Definition playqueueupdate.cpp:87
PlayQueueUpdateReason m_reason
Definition playqueueupdate.h:141
QDateTime lastUpdate() const
Gets the UTC time of the last change to the playing queue.
Definition playqueueupdate.cpp:119
void setPlaylist(QList< SyncPlayQueueItem > newPlaylist)
Gets the playlist.
Definition playqueueupdate.cpp:127
QJsonObject toJson() const
Definition playqueueupdate.cpp:99
Definition mediaplayer2.h:20
Contains auto-generated Data Transfer Objects for the Jellyfin HTTP API.
GroupShuffleModeClass::Value GroupShuffleMode
Definition groupshufflemode.h:59
GroupRepeatModeClass::Value GroupRepeatMode
Definition grouprepeatmode.h:60
PlayQueueUpdateReasonClass::Value PlayQueueUpdateReason
Definition playqueueupdatereason.h:67
Definition accessschedule.h:128
Jellyfin::DTO::PlayQueueUpdate PlayQueueUpdate
Definition playqueueupdate.h:160
AccessSchedule fromJsonValue(const QJsonValue &source, convertType< AccessSchedule >)
Definition accessschedule.cpp:133
QJsonValue toJsonValue(const AccessSchedule &source, convertType< AccessSchedule >)
Definition accessschedule.cpp:139
Definition jsonconvimpl.h:45