Jellyfin Qt
QML Library for interacting with the Jellyfin multimedia server
Loading...
Searching...
No Matches
playbackstartinfo.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_PLAYBACKSTARTINFO_H
31#define JELLYFIN_DTO_PLAYBACKSTARTINFO_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
72 void replaceData(PlaybackStartInfo &other);
73
74 static PlaybackStartInfo 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 PlaybackStartInfo::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_PLAYBACKSTARTINFO_H
Value
Definition playmethod.h:49
Definition playbackstartinfo.h:55
std::optional< qint32 > brightness() const
Definition playbackstartinfo.cpp:332
void setBrightnessNull()
Definition playbackstartinfo.cpp:341
void setVolumeLevelNull()
Definition playbackstartinfo.cpp:328
void setPlaySessionIdNull()
Definition playbackstartinfo.cpp:386
QString playlistItemId() const
Definition playbackstartinfo.cpp:409
void setMediaSourceIdNull()
Definition playbackstartinfo.cpp:251
QString playSessionId() const
Gets or sets the play session identifier.
Definition playbackstartinfo.cpp:377
QString itemId() const
Gets or sets the item identifier.
Definition playbackstartinfo.cpp:223
bool liveStreamIdNull() const
Definition playbackstartinfo.cpp:369
bool playbackStartTimeTicksNull() const
Definition playbackstartinfo.cpp:311
std::optional< qint64 > playbackStartTimeTicks() const
Definition playbackstartinfo.cpp:306
void setFromJson(QJsonObject source)
Definition playbackstartinfo.cpp:109
bool nowPlayingQueueNull() const
Definition playbackstartinfo.cpp:401
QList< QueueItem > nowPlayingQueue() const
Definition playbackstartinfo.cpp:396
void setLiveStreamIdNull()
Definition playbackstartinfo.cpp:373
void setIsMuted(bool newIsMuted)
Gets or sets a value indicating whether this instance is muted.
Definition playbackstartinfo.cpp:289
void setPlaySessionId(QString newPlaySessionId)
Gets or sets the play session identifier.
Definition playbackstartinfo.cpp:379
void setPositionTicksNull()
Definition playbackstartinfo.cpp:302
QString m_itemId
Definition playbackstartinfo.h:257
QSharedPointer< BaseItemDto > m_item
Definition playbackstartinfo.h:256
void setRepeatMode(RepeatMode newRepeatMode)
Definition playbackstartinfo.cpp:392
bool mediaSourceIdNull() const
Definition playbackstartinfo.cpp:247
bool brightnessNull() const
Definition playbackstartinfo.cpp:337
static PlaybackStartInfo fromJson(QJsonObject source)
Definition playbackstartinfo.cpp:102
PlayMethod m_playMethod
Definition playbackstartinfo.h:269
QString m_mediaSourceId
Definition playbackstartinfo.h:259
bool sessionIdNull() const
Definition playbackstartinfo.cpp:234
void setPlaybackStartTimeTicks(std::optional< qint64 > newPlaybackStartTimeTicks)
Definition playbackstartinfo.cpp:308
bool canSeek() const
Gets or sets a value indicating whether this instance can seek.
Definition playbackstartinfo.cpp:211
std::optional< qint32 > volumeLevel() const
Gets or sets the volume level.
Definition playbackstartinfo.cpp:319
bool playSessionIdNull() const
Definition playbackstartinfo.cpp:382
void setNowPlayingQueue(QList< QueueItem > newNowPlayingQueue)
Definition playbackstartinfo.cpp:398
std::optional< qint32 > m_volumeLevel
Definition playbackstartinfo.h:266
QSharedPointer< BaseItemDto > item() const
Definition playbackstartinfo.cpp:217
bool playlistItemIdNull() const
Definition playbackstartinfo.cpp:414
void setPlaylistItemIdNull()
Definition playbackstartinfo.cpp:418
std::optional< qint32 > audioStreamIndex() const
Gets or sets the index of the audio stream.
Definition playbackstartinfo.cpp:255
bool audioStreamIndexNull() const
Definition playbackstartinfo.cpp:260
void setAudioStreamIndexNull()
Definition playbackstartinfo.cpp:264
std::optional< qint64 > m_positionTicks
Definition playbackstartinfo.h:264
QString mediaSourceId() const
Gets or sets the media version identifier.
Definition playbackstartinfo.cpp:242
void setAspectRatio(QString newAspectRatio)
Definition playbackstartinfo.cpp:347
void setAudioStreamIndex(std::optional< qint32 > newAudioStreamIndex)
Gets or sets the index of the audio stream.
Definition playbackstartinfo.cpp:257
void setLiveStreamId(QString newLiveStreamId)
Gets or sets the live stream identifier.
Definition playbackstartinfo.cpp:366
QJsonObject toJson() const
Definition playbackstartinfo.cpp:133
std::optional< qint64 > positionTicks() const
Gets or sets the position ticks.
Definition playbackstartinfo.cpp:293
QString m_sessionId
Definition playbackstartinfo.h:258
std::optional< qint32 > subtitleStreamIndex() const
Gets or sets the index of the subtitle stream.
Definition playbackstartinfo.cpp:268
QString sessionId() const
Gets or sets the session id.
Definition playbackstartinfo.cpp:229
RepeatMode repeatMode() const
Definition playbackstartinfo.cpp:390
void setItem(QSharedPointer< BaseItemDto > newItem)
Definition playbackstartinfo.cpp:219
void setSubtitleStreamIndex(std::optional< qint32 > newSubtitleStreamIndex)
Gets or sets the index of the subtitle stream.
Definition playbackstartinfo.cpp:270
bool volumeLevelNull() const
Definition playbackstartinfo.cpp:324
std::optional< qint32 > m_brightness
Definition playbackstartinfo.h:267
void setItemId(QString newItemId)
Gets or sets the item identifier.
Definition playbackstartinfo.cpp:225
void setPlaylistItemId(QString newPlaylistItemId)
Definition playbackstartinfo.cpp:411
void setPlaybackStartTimeTicksNull()
Definition playbackstartinfo.cpp:315
bool m_canSeek
Definition playbackstartinfo.h:255
QList< QueueItem > m_nowPlayingQueue
Definition playbackstartinfo.h:273
bool aspectRatioNull() const
Definition playbackstartinfo.cpp:350
RepeatMode m_repeatMode
Definition playbackstartinfo.h:272
void setAspectRatioNull()
Definition playbackstartinfo.cpp:354
void setPositionTicks(std::optional< qint64 > newPositionTicks)
Gets or sets the position ticks.
Definition playbackstartinfo.cpp:295
bool isMuted() const
Gets or sets a value indicating whether this instance is muted.
Definition playbackstartinfo.cpp:287
bool isPaused() const
Gets or sets a value indicating whether this instance is paused.
Definition playbackstartinfo.cpp:281
void setNowPlayingQueueNull()
Definition playbackstartinfo.cpp:405
void setBrightness(std::optional< qint32 > newBrightness)
Definition playbackstartinfo.cpp:334
void setSessionId(QString newSessionId)
Gets or sets the session id.
Definition playbackstartinfo.cpp:231
std::optional< qint32 > m_audioStreamIndex
Definition playbackstartinfo.h:260
std::optional< qint64 > m_playbackStartTimeTicks
Definition playbackstartinfo.h:265
std::optional< qint32 > m_subtitleStreamIndex
Definition playbackstartinfo.h:261
bool m_isMuted
Definition playbackstartinfo.h:263
bool m_isPaused
Definition playbackstartinfo.h:262
bool subtitleStreamIndexNull() const
Definition playbackstartinfo.cpp:273
void setSubtitleStreamIndexNull()
Definition playbackstartinfo.cpp:277
PlayMethod playMethod() const
Definition playbackstartinfo.cpp:358
void setMediaSourceId(QString newMediaSourceId)
Gets or sets the media version identifier.
Definition playbackstartinfo.cpp:244
QString aspectRatio() const
Definition playbackstartinfo.cpp:345
void setVolumeLevel(std::optional< qint32 > newVolumeLevel)
Gets or sets the volume level.
Definition playbackstartinfo.cpp:321
void setCanSeek(bool newCanSeek)
Gets or sets a value indicating whether this instance can seek.
Definition playbackstartinfo.cpp:213
QString m_playlistItemId
Definition playbackstartinfo.h:274
void setPlayMethod(PlayMethod newPlayMethod)
Definition playbackstartinfo.cpp:360
QString liveStreamId() const
Gets or sets the live stream identifier.
Definition playbackstartinfo.cpp:364
QString m_liveStreamId
Definition playbackstartinfo.h:270
void setSessionIdNull()
Definition playbackstartinfo.cpp:238
QString m_playSessionId
Definition playbackstartinfo.h:271
void setIsPaused(bool newIsPaused)
Gets or sets a value indicating whether this instance is paused.
Definition playbackstartinfo.cpp:283
bool positionTicksNull() const
Definition playbackstartinfo.cpp:298
void replaceData(PlaybackStartInfo &other)
Definition playbackstartinfo.cpp:79
QString m_aspectRatio
Definition playbackstartinfo.h:268
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