Jellyfin Qt
QML Library for interacting with the Jellyfin multimedia server
Loading...
Searching...
No Matches
playbackprogressinfo.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_PLAYBACKPROGRESSINFO_H
31#define JELLYFIN_DTO_PLAYBACKPROGRESSINFO_H
32
33#include <QJsonObject>
34#include <QJsonValue>
35#include <QList>
36#include <QSharedPointer>
37#include <QString>
38#include <QStringList>
39#include <optional>
40
46
47namespace Jellyfin {
48// Forward declaration
49class ApiClient;
50}
51namespace Jellyfin {
52namespace DTO {
53
54
56public:
58 bool canSeek,
59 QSharedPointer<BaseItemDto> item,
60 QString itemId,
61 bool isPaused,
62 bool isMuted,
65 );
66
68
73
74 static PlaybackProgressInfo fromJson(QJsonObject source);
75 void setFromJson(QJsonObject source);
76 QJsonObject toJson() const;
77
78 // Properties
82 bool canSeek() const;
86 void setCanSeek(bool newCanSeek);
87
88
89 QSharedPointer<BaseItemDto> item() const;
90
91 void setItem(QSharedPointer<BaseItemDto> newItem);
92
96 QString itemId() const;
100 void setItemId(QString newItemId);
101
105 QString sessionId() const;
109 void setSessionId(QString newSessionId);
110 bool sessionIdNull() const;
111 void setSessionIdNull();
112
116 QString mediaSourceId() const;
120 void setMediaSourceId(QString newMediaSourceId);
121 bool mediaSourceIdNull() const;
123
127 std::optional<qint32> audioStreamIndex() const;
131 void setAudioStreamIndex(std::optional<qint32> newAudioStreamIndex);
132 bool audioStreamIndexNull() const;
134
138 std::optional<qint32> subtitleStreamIndex() const;
142 void setSubtitleStreamIndex(std::optional<qint32> newSubtitleStreamIndex);
143 bool subtitleStreamIndexNull() const;
145
149 bool isPaused() const;
153 void setIsPaused(bool newIsPaused);
154
158 bool isMuted() const;
162 void setIsMuted(bool newIsMuted);
163
167 std::optional<qint64> positionTicks() const;
171 void setPositionTicks(std::optional<qint64> newPositionTicks);
172 bool positionTicksNull() const;
174
175
176 std::optional<qint64> playbackStartTimeTicks() const;
177
178 void setPlaybackStartTimeTicks(std::optional<qint64> newPlaybackStartTimeTicks);
179 bool playbackStartTimeTicksNull() const;
181
185 std::optional<qint32> volumeLevel() const;
189 void setVolumeLevel(std::optional<qint32> newVolumeLevel);
190 bool volumeLevelNull() const;
191 void setVolumeLevelNull();
192
193
194 std::optional<qint32> brightness() const;
195
196 void setBrightness(std::optional<qint32> newBrightness);
197 bool brightnessNull() const;
198 void setBrightnessNull();
199
200
201 QString aspectRatio() const;
202
203 void setAspectRatio(QString newAspectRatio);
204 bool aspectRatioNull() const;
205 void setAspectRatioNull();
206
207
208 PlayMethod playMethod() const;
209
210 void setPlayMethod(PlayMethod newPlayMethod);
211
215 QString liveStreamId() const;
219 void setLiveStreamId(QString newLiveStreamId);
220 bool liveStreamIdNull() const;
221 void setLiveStreamIdNull();
222
226 QString playSessionId() const;
230 void setPlaySessionId(QString newPlaySessionId);
231 bool playSessionIdNull() const;
233
234
235 RepeatMode repeatMode() const;
236
237 void setRepeatMode(RepeatMode newRepeatMode);
238
239
241
242 void setNowPlayingQueue(QList<QueueItem> newNowPlayingQueue);
243 bool nowPlayingQueueNull() const;
245
246
247 QString playlistItemId() const;
248
249 void setPlaylistItemId(QString newPlaylistItemId);
250 bool playlistItemIdNull() const;
252
253
254protected:
256 QSharedPointer<BaseItemDto> m_item = QSharedPointer<BaseItemDto>();
257 QString m_itemId;
258 QString m_sessionId;
260 std::optional<qint32> m_audioStreamIndex = std::nullopt;
261 std::optional<qint32> m_subtitleStreamIndex = std::nullopt;
264 std::optional<qint64> m_positionTicks = std::nullopt;
265 std::optional<qint64> m_playbackStartTimeTicks = std::nullopt;
266 std::optional<qint32> m_volumeLevel = std::nullopt;
267 std::optional<qint32> m_brightness = std::nullopt;
275
276private:
277 // Private constructor which generates an invalid object, for use withing PlaybackProgressInfo::fromJson();
279};
280
281
282} // NS DTO
283
284namespace Support {
285
287
288template <>
290
291template<>
293
294} // NS DTO
295} // NS Jellyfin
296
297#endif // JELLYFIN_DTO_PLAYBACKPROGRESSINFO_H
Value
Definition playmethod.h:49
Definition playbackprogressinfo.h:55
QString m_mediaSourceId
Definition playbackprogressinfo.h:259
std::optional< qint32 > m_audioStreamIndex
Definition playbackprogressinfo.h:260
void setLiveStreamIdNull()
Definition playbackprogressinfo.cpp:373
bool positionTicksNull() const
Definition playbackprogressinfo.cpp:298
void setPlaylistItemIdNull()
Definition playbackprogressinfo.cpp:418
bool playbackStartTimeTicksNull() const
Definition playbackprogressinfo.cpp:311
void setPositionTicks(std::optional< qint64 > newPositionTicks)
Gets or sets the position ticks.
Definition playbackprogressinfo.cpp:295
std::optional< qint64 > playbackStartTimeTicks() const
Definition playbackprogressinfo.cpp:306
void setItemId(QString newItemId)
Gets or sets the item identifier.
Definition playbackprogressinfo.cpp:225
bool canSeek() const
Gets or sets a value indicating whether this instance can seek.
Definition playbackprogressinfo.cpp:211
std::optional< qint32 > subtitleStreamIndex() const
Gets or sets the index of the subtitle stream.
Definition playbackprogressinfo.cpp:268
RepeatMode repeatMode() const
Definition playbackprogressinfo.cpp:390
void setAspectRatio(QString newAspectRatio)
Definition playbackprogressinfo.cpp:347
void setNowPlayingQueueNull()
Definition playbackprogressinfo.cpp:405
void setSessionId(QString newSessionId)
Gets or sets the session id.
Definition playbackprogressinfo.cpp:231
PlayMethod m_playMethod
Definition playbackprogressinfo.h:269
QString mediaSourceId() const
Gets or sets the media version identifier.
Definition playbackprogressinfo.cpp:242
void setSessionIdNull()
Definition playbackprogressinfo.cpp:238
void setPlaySessionIdNull()
Definition playbackprogressinfo.cpp:386
void setCanSeek(bool newCanSeek)
Gets or sets a value indicating whether this instance can seek.
Definition playbackprogressinfo.cpp:213
void setPlaySessionId(QString newPlaySessionId)
Gets or sets the play session identifier.
Definition playbackprogressinfo.cpp:379
void setFromJson(QJsonObject source)
Definition playbackprogressinfo.cpp:109
QString sessionId() const
Gets or sets the session id.
Definition playbackprogressinfo.cpp:229
void setRepeatMode(RepeatMode newRepeatMode)
Definition playbackprogressinfo.cpp:392
void setIsMuted(bool newIsMuted)
Gets or sets a value indicating whether this instance is muted.
Definition playbackprogressinfo.cpp:289
void setPlaybackStartTimeTicksNull()
Definition playbackprogressinfo.cpp:315
QString m_playSessionId
Definition playbackprogressinfo.h:271
QString m_liveStreamId
Definition playbackprogressinfo.h:270
std::optional< qint32 > brightness() const
Definition playbackprogressinfo.cpp:332
void setNowPlayingQueue(QList< QueueItem > newNowPlayingQueue)
Definition playbackprogressinfo.cpp:398
QString m_aspectRatio
Definition playbackprogressinfo.h:268
QList< QueueItem > m_nowPlayingQueue
Definition playbackprogressinfo.h:273
std::optional< qint64 > m_positionTicks
Definition playbackprogressinfo.h:264
void setPlayMethod(PlayMethod newPlayMethod)
Definition playbackprogressinfo.cpp:360
QString m_sessionId
Definition playbackprogressinfo.h:258
QSharedPointer< BaseItemDto > item() const
Definition playbackprogressinfo.cpp:217
void setLiveStreamId(QString newLiveStreamId)
Gets or sets the live stream identifier.
Definition playbackprogressinfo.cpp:366
void setAspectRatioNull()
Definition playbackprogressinfo.cpp:354
void setAudioStreamIndex(std::optional< qint32 > newAudioStreamIndex)
Gets or sets the index of the audio stream.
Definition playbackprogressinfo.cpp:257
bool sessionIdNull() const
Definition playbackprogressinfo.cpp:234
bool liveStreamIdNull() const
Definition playbackprogressinfo.cpp:369
std::optional< qint32 > m_subtitleStreamIndex
Definition playbackprogressinfo.h:261
bool volumeLevelNull() const
Definition playbackprogressinfo.cpp:324
void setBrightness(std::optional< qint32 > newBrightness)
Definition playbackprogressinfo.cpp:334
void setVolumeLevel(std::optional< qint32 > newVolumeLevel)
Gets or sets the volume level.
Definition playbackprogressinfo.cpp:321
void setMediaSourceIdNull()
Definition playbackprogressinfo.cpp:251
bool playlistItemIdNull() const
Definition playbackprogressinfo.cpp:414
bool m_isMuted
Definition playbackprogressinfo.h:263
std::optional< qint32 > m_volumeLevel
Definition playbackprogressinfo.h:266
bool audioStreamIndexNull() const
Definition playbackprogressinfo.cpp:260
bool playSessionIdNull() const
Definition playbackprogressinfo.cpp:382
bool mediaSourceIdNull() const
Definition playbackprogressinfo.cpp:247
QString m_itemId
Definition playbackprogressinfo.h:257
bool nowPlayingQueueNull() const
Definition playbackprogressinfo.cpp:401
void setPlaylistItemId(QString newPlaylistItemId)
Definition playbackprogressinfo.cpp:411
bool m_canSeek
Definition playbackprogressinfo.h:255
QString aspectRatio() const
Definition playbackprogressinfo.cpp:345
QSharedPointer< BaseItemDto > m_item
Definition playbackprogressinfo.h:256
void setAudioStreamIndexNull()
Definition playbackprogressinfo.cpp:264
void setVolumeLevelNull()
Definition playbackprogressinfo.cpp:328
RepeatMode m_repeatMode
Definition playbackprogressinfo.h:272
bool subtitleStreamIndexNull() const
Definition playbackprogressinfo.cpp:273
bool isPaused() const
Gets or sets a value indicating whether this instance is paused.
Definition playbackprogressinfo.cpp:281
bool brightnessNull() const
Definition playbackprogressinfo.cpp:337
void setIsPaused(bool newIsPaused)
Gets or sets a value indicating whether this instance is paused.
Definition playbackprogressinfo.cpp:283
void replaceData(PlaybackProgressInfo &other)
Definition playbackprogressinfo.cpp:79
QString playSessionId() const
Gets or sets the play session identifier.
Definition playbackprogressinfo.cpp:377
std::optional< qint64 > positionTicks() const
Gets or sets the position ticks.
Definition playbackprogressinfo.cpp:293
std::optional< qint32 > m_brightness
Definition playbackprogressinfo.h:267
void setPositionTicksNull()
Definition playbackprogressinfo.cpp:302
std::optional< qint32 > volumeLevel() const
Gets or sets the volume level.
Definition playbackprogressinfo.cpp:319
QString liveStreamId() const
Gets or sets the live stream identifier.
Definition playbackprogressinfo.cpp:364
QString playlistItemId() const
Definition playbackprogressinfo.cpp:409
bool isMuted() const
Gets or sets a value indicating whether this instance is muted.
Definition playbackprogressinfo.cpp:287
void setItem(QSharedPointer< BaseItemDto > newItem)
Definition playbackprogressinfo.cpp:219
QList< QueueItem > nowPlayingQueue() const
Definition playbackprogressinfo.cpp:396
bool m_isPaused
Definition playbackprogressinfo.h:262
std::optional< qint32 > audioStreamIndex() const
Gets or sets the index of the audio stream.
Definition playbackprogressinfo.cpp:255
QString m_playlistItemId
Definition playbackprogressinfo.h:274
static PlaybackProgressInfo fromJson(QJsonObject source)
Definition playbackprogressinfo.cpp:102
bool aspectRatioNull() const
Definition playbackprogressinfo.cpp:350
void setMediaSourceId(QString newMediaSourceId)
Gets or sets the media version identifier.
Definition playbackprogressinfo.cpp:244
QJsonObject toJson() const
Definition playbackprogressinfo.cpp:133
QString itemId() const
Gets or sets the item identifier.
Definition playbackprogressinfo.cpp:223
void setPlaybackStartTimeTicks(std::optional< qint64 > newPlaybackStartTimeTicks)
Definition playbackprogressinfo.cpp:308
void setSubtitleStreamIndex(std::optional< qint32 > newSubtitleStreamIndex)
Gets or sets the index of the subtitle stream.
Definition playbackprogressinfo.cpp:270
void setBrightnessNull()
Definition playbackprogressinfo.cpp:341
void setSubtitleStreamIndexNull()
Definition playbackprogressinfo.cpp:277
PlayMethod playMethod() const
Definition playbackprogressinfo.cpp:358
std::optional< qint64 > m_playbackStartTimeTicks
Definition playbackprogressinfo.h:265
Value
Definition repeatmode.h:49
Definition mediaplayer2.h:20
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