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
47
48namespace Jellyfin {
49// Forward declaration
50class ApiClient;
51}
52namespace Jellyfin {
53namespace DTO {
54
55
57public:
59 bool canSeek,
60 QSharedPointer<BaseItemDto> item,
61 QString itemId,
62 bool isPaused,
63 bool isMuted,
67 );
68
70
75
76 static PlaybackProgressInfo fromJson(QJsonObject source);
77 void setFromJson(QJsonObject source);
78 QJsonObject toJson() const;
79
80 // Properties
84 bool canSeek() const;
88 void setCanSeek(bool newCanSeek);
89
90
91 QSharedPointer<BaseItemDto> item() const;
92
93 void setItem(QSharedPointer<BaseItemDto> newItem);
94
98 QString itemId() const;
102 void setItemId(QString newItemId);
103
107 QString sessionId() const;
111 void setSessionId(QString newSessionId);
112 bool sessionIdNull() const;
113 void setSessionIdNull();
114
118 QString mediaSourceId() const;
122 void setMediaSourceId(QString newMediaSourceId);
123 bool mediaSourceIdNull() const;
125
129 std::optional<qint32> audioStreamIndex() const;
133 void setAudioStreamIndex(std::optional<qint32> newAudioStreamIndex);
134 bool audioStreamIndexNull() const;
136
140 std::optional<qint32> subtitleStreamIndex() const;
144 void setSubtitleStreamIndex(std::optional<qint32> newSubtitleStreamIndex);
145 bool subtitleStreamIndexNull() const;
147
151 bool isPaused() const;
155 void setIsPaused(bool newIsPaused);
156
160 bool isMuted() const;
164 void setIsMuted(bool newIsMuted);
165
169 std::optional<qint64> positionTicks() const;
173 void setPositionTicks(std::optional<qint64> newPositionTicks);
174 bool positionTicksNull() const;
176
177
178 std::optional<qint64> playbackStartTimeTicks() const;
179
180 void setPlaybackStartTimeTicks(std::optional<qint64> newPlaybackStartTimeTicks);
181 bool playbackStartTimeTicksNull() const;
183
187 std::optional<qint32> volumeLevel() const;
191 void setVolumeLevel(std::optional<qint32> newVolumeLevel);
192 bool volumeLevelNull() const;
193 void setVolumeLevelNull();
194
195
196 std::optional<qint32> brightness() const;
197
198 void setBrightness(std::optional<qint32> newBrightness);
199 bool brightnessNull() const;
200 void setBrightnessNull();
201
202
203 QString aspectRatio() const;
204
205 void setAspectRatio(QString newAspectRatio);
206 bool aspectRatioNull() const;
207 void setAspectRatioNull();
208
209
210 PlayMethod playMethod() const;
211
212 void setPlayMethod(PlayMethod newPlayMethod);
213
217 QString liveStreamId() const;
221 void setLiveStreamId(QString newLiveStreamId);
222 bool liveStreamIdNull() const;
223 void setLiveStreamIdNull();
224
228 QString playSessionId() const;
232 void setPlaySessionId(QString newPlaySessionId);
233 bool playSessionIdNull() const;
235
236
237 RepeatMode repeatMode() const;
238
239 void setRepeatMode(RepeatMode newRepeatMode);
240
241
243
244 void setPlaybackOrder(PlaybackOrder newPlaybackOrder);
245
246
248
249 void setNowPlayingQueue(QList<QueueItem> newNowPlayingQueue);
250 bool nowPlayingQueueNull() const;
252
253
254 QString playlistItemId() const;
255
256 void setPlaylistItemId(QString newPlaylistItemId);
257 bool playlistItemIdNull() const;
259
260
261protected:
263 QSharedPointer<BaseItemDto> m_item = QSharedPointer<BaseItemDto>();
264 QString m_itemId;
265 QString m_sessionId;
267 std::optional<qint32> m_audioStreamIndex = std::nullopt;
268 std::optional<qint32> m_subtitleStreamIndex = std::nullopt;
271 std::optional<qint64> m_positionTicks = std::nullopt;
272 std::optional<qint64> m_playbackStartTimeTicks = std::nullopt;
273 std::optional<qint32> m_volumeLevel = std::nullopt;
274 std::optional<qint32> m_brightness = std::nullopt;
283
284private:
285 // Private constructor which generates an invalid object, for use withing PlaybackProgressInfo::fromJson();
287};
288
289
290} // NS DTO
291
292namespace Support {
293
295
296template <>
298
299template<>
301
302} // NS DTO
303} // NS Jellyfin
304
305#endif // JELLYFIN_DTO_PLAYBACKPROGRESSINFO_H
An Api client for Jellyfin. Handles requests and authentication.
Definition apiclient.h:90
Definition playbackprogressinfo.h:56
QString m_mediaSourceId
Definition playbackprogressinfo.h:266
std::optional< qint32 > m_audioStreamIndex
Definition playbackprogressinfo.h:267
void setLiveStreamIdNull()
Definition playbackprogressinfo.cpp:379
bool positionTicksNull() const
Definition playbackprogressinfo.cpp:304
void setPlaylistItemIdNull()
Definition playbackprogressinfo.cpp:430
bool playbackStartTimeTicksNull() const
Definition playbackprogressinfo.cpp:317
void setPositionTicks(std::optional< qint64 > newPositionTicks)
Gets or sets the position ticks.
Definition playbackprogressinfo.cpp:301
std::optional< qint64 > playbackStartTimeTicks() const
Definition playbackprogressinfo.cpp:312
void setItemId(QString newItemId)
Gets or sets the item identifier.
Definition playbackprogressinfo.cpp:231
bool canSeek() const
Gets or sets a value indicating whether this instance can seek.
Definition playbackprogressinfo.cpp:217
PlaybackOrder playbackOrder() const
Definition playbackprogressinfo.cpp:402
std::optional< qint32 > subtitleStreamIndex() const
Gets or sets the index of the subtitle stream.
Definition playbackprogressinfo.cpp:274
RepeatMode repeatMode() const
Definition playbackprogressinfo.cpp:396
void setAspectRatio(QString newAspectRatio)
Definition playbackprogressinfo.cpp:353
void setNowPlayingQueueNull()
Definition playbackprogressinfo.cpp:417
void setSessionId(QString newSessionId)
Gets or sets the session id.
Definition playbackprogressinfo.cpp:237
PlayMethod m_playMethod
Definition playbackprogressinfo.h:276
QString mediaSourceId() const
Gets or sets the media version identifier.
Definition playbackprogressinfo.cpp:248
void setSessionIdNull()
Definition playbackprogressinfo.cpp:244
void setPlaySessionIdNull()
Definition playbackprogressinfo.cpp:392
void setCanSeek(bool newCanSeek)
Gets or sets a value indicating whether this instance can seek.
Definition playbackprogressinfo.cpp:219
void setPlaySessionId(QString newPlaySessionId)
Gets or sets the play session identifier.
Definition playbackprogressinfo.cpp:385
void setFromJson(QJsonObject source)
Definition playbackprogressinfo.cpp:113
void setPlaybackOrder(PlaybackOrder newPlaybackOrder)
Definition playbackprogressinfo.cpp:404
QString sessionId() const
Gets or sets the session id.
Definition playbackprogressinfo.cpp:235
void setRepeatMode(RepeatMode newRepeatMode)
Definition playbackprogressinfo.cpp:398
void setIsMuted(bool newIsMuted)
Gets or sets a value indicating whether this instance is muted.
Definition playbackprogressinfo.cpp:295
void setPlaybackStartTimeTicksNull()
Definition playbackprogressinfo.cpp:321
QString m_playSessionId
Definition playbackprogressinfo.h:278
QString m_liveStreamId
Definition playbackprogressinfo.h:277
std::optional< qint32 > brightness() const
Definition playbackprogressinfo.cpp:338
void setNowPlayingQueue(QList< QueueItem > newNowPlayingQueue)
Definition playbackprogressinfo.cpp:410
QString m_aspectRatio
Definition playbackprogressinfo.h:275
QList< QueueItem > m_nowPlayingQueue
Definition playbackprogressinfo.h:281
std::optional< qint64 > m_positionTicks
Definition playbackprogressinfo.h:271
void setPlayMethod(PlayMethod newPlayMethod)
Definition playbackprogressinfo.cpp:366
QString m_sessionId
Definition playbackprogressinfo.h:265
QSharedPointer< BaseItemDto > item() const
Definition playbackprogressinfo.cpp:223
void setLiveStreamId(QString newLiveStreamId)
Gets or sets the live stream identifier.
Definition playbackprogressinfo.cpp:372
void setAspectRatioNull()
Definition playbackprogressinfo.cpp:360
PlaybackOrder m_playbackOrder
Definition playbackprogressinfo.h:280
void setAudioStreamIndex(std::optional< qint32 > newAudioStreamIndex)
Gets or sets the index of the audio stream.
Definition playbackprogressinfo.cpp:263
bool sessionIdNull() const
Definition playbackprogressinfo.cpp:240
bool liveStreamIdNull() const
Definition playbackprogressinfo.cpp:375
std::optional< qint32 > m_subtitleStreamIndex
Definition playbackprogressinfo.h:268
bool volumeLevelNull() const
Definition playbackprogressinfo.cpp:330
void setBrightness(std::optional< qint32 > newBrightness)
Definition playbackprogressinfo.cpp:340
void setVolumeLevel(std::optional< qint32 > newVolumeLevel)
Gets or sets the volume level.
Definition playbackprogressinfo.cpp:327
void setMediaSourceIdNull()
Definition playbackprogressinfo.cpp:257
bool playlistItemIdNull() const
Definition playbackprogressinfo.cpp:426
bool m_isMuted
Definition playbackprogressinfo.h:270
std::optional< qint32 > m_volumeLevel
Definition playbackprogressinfo.h:273
bool audioStreamIndexNull() const
Definition playbackprogressinfo.cpp:266
bool playSessionIdNull() const
Definition playbackprogressinfo.cpp:388
bool mediaSourceIdNull() const
Definition playbackprogressinfo.cpp:253
QString m_itemId
Definition playbackprogressinfo.h:264
bool nowPlayingQueueNull() const
Definition playbackprogressinfo.cpp:413
void setPlaylistItemId(QString newPlaylistItemId)
Definition playbackprogressinfo.cpp:423
bool m_canSeek
Definition playbackprogressinfo.h:262
QString aspectRatio() const
Definition playbackprogressinfo.cpp:351
QSharedPointer< BaseItemDto > m_item
Definition playbackprogressinfo.h:263
void setAudioStreamIndexNull()
Definition playbackprogressinfo.cpp:270
void setVolumeLevelNull()
Definition playbackprogressinfo.cpp:334
RepeatMode m_repeatMode
Definition playbackprogressinfo.h:279
bool subtitleStreamIndexNull() const
Definition playbackprogressinfo.cpp:279
bool isPaused() const
Gets or sets a value indicating whether this instance is paused.
Definition playbackprogressinfo.cpp:287
bool brightnessNull() const
Definition playbackprogressinfo.cpp:343
void setIsPaused(bool newIsPaused)
Gets or sets a value indicating whether this instance is paused.
Definition playbackprogressinfo.cpp:289
void replaceData(PlaybackProgressInfo &other)
Definition playbackprogressinfo.cpp:82
PlaybackProgressInfo(bool canSeek, QSharedPointer< BaseItemDto > item, QString itemId, bool isPaused, bool isMuted, PlayMethod playMethod, RepeatMode repeatMode, PlaybackOrder playbackOrder)
Definition playbackprogressinfo.cpp:36
QString playSessionId() const
Gets or sets the play session identifier.
Definition playbackprogressinfo.cpp:383
std::optional< qint64 > positionTicks() const
Gets or sets the position ticks.
Definition playbackprogressinfo.cpp:299
std::optional< qint32 > m_brightness
Definition playbackprogressinfo.h:274
void setPositionTicksNull()
Definition playbackprogressinfo.cpp:308
std::optional< qint32 > volumeLevel() const
Gets or sets the volume level.
Definition playbackprogressinfo.cpp:325
QString liveStreamId() const
Gets or sets the live stream identifier.
Definition playbackprogressinfo.cpp:370
QString playlistItemId() const
Definition playbackprogressinfo.cpp:421
bool isMuted() const
Gets or sets a value indicating whether this instance is muted.
Definition playbackprogressinfo.cpp:293
void setItem(QSharedPointer< BaseItemDto > newItem)
Definition playbackprogressinfo.cpp:225
QList< QueueItem > nowPlayingQueue() const
Definition playbackprogressinfo.cpp:408
bool m_isPaused
Definition playbackprogressinfo.h:269
std::optional< qint32 > audioStreamIndex() const
Gets or sets the index of the audio stream.
Definition playbackprogressinfo.cpp:261
QString m_playlistItemId
Definition playbackprogressinfo.h:282
static PlaybackProgressInfo fromJson(QJsonObject source)
Definition playbackprogressinfo.cpp:106
bool aspectRatioNull() const
Definition playbackprogressinfo.cpp:356
void setMediaSourceId(QString newMediaSourceId)
Gets or sets the media version identifier.
Definition playbackprogressinfo.cpp:250
QJsonObject toJson() const
Definition playbackprogressinfo.cpp:138
QString itemId() const
Gets or sets the item identifier.
Definition playbackprogressinfo.cpp:229
void setPlaybackStartTimeTicks(std::optional< qint64 > newPlaybackStartTimeTicks)
Definition playbackprogressinfo.cpp:314
void setSubtitleStreamIndex(std::optional< qint32 > newSubtitleStreamIndex)
Gets or sets the index of the subtitle stream.
Definition playbackprogressinfo.cpp:276
void setBrightnessNull()
Definition playbackprogressinfo.cpp:347
void setSubtitleStreamIndexNull()
Definition playbackprogressinfo.cpp:283
PlayMethod playMethod() const
Definition playbackprogressinfo.cpp:364
std::optional< qint64 > m_playbackStartTimeTicks
Definition playbackprogressinfo.h:272
Definition mediaplayer2.h:20
Contains auto-generated Data Transfer Objects for the Jellyfin HTTP API.
PlayMethodClass::Value PlayMethod
Definition playmethod.h:60
PlaybackOrderClass::Value PlaybackOrder
Definition playbackorder.h:59
RepeatModeClass::Value RepeatMode
Definition repeatmode.h:60
Definition accessschedule.h:128
AccessSchedule fromJsonValue(const QJsonValue &source, convertType< AccessSchedule >)
Definition accessschedule.cpp:133
Jellyfin::DTO::PlaybackProgressInfo PlaybackProgressInfo
Definition playbackprogressinfo.h:294
QJsonValue toJsonValue(const AccessSchedule &source, convertType< AccessSchedule >)
Definition accessschedule.cpp:139
Definition jsonconvimpl.h:45