Jellyfin Qt
QML Library for interacting with the Jellyfin multimedia server
Loading...
Searching...
No Matches
playerstateinfo.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_PLAYERSTATEINFO_H
31#define JELLYFIN_DTO_PLAYERSTATEINFO_H
32
33#include <QJsonObject>
34#include <QJsonValue>
35#include <QString>
36#include <optional>
37
42
43namespace Jellyfin {
44// Forward declaration
45class ApiClient;
46}
47namespace Jellyfin {
48namespace DTO {
49
50
52public:
54 bool canSeek,
55 bool isPaused,
56 bool isMuted,
60 );
61
62 PlayerStateInfo(const PlayerStateInfo &other);
63
67 void replaceData(PlayerStateInfo &other);
68
69 static PlayerStateInfo fromJson(QJsonObject source);
70 void setFromJson(QJsonObject source);
71 QJsonObject toJson() const;
72
73 // Properties
77 std::optional<qint64> positionTicks() const;
81 void setPositionTicks(std::optional<qint64> newPositionTicks);
82 bool positionTicksNull() const;
84
88 bool canSeek() const;
92 void setCanSeek(bool newCanSeek);
93
97 bool isPaused() const;
101 void setIsPaused(bool newIsPaused);
102
106 bool isMuted() const;
110 void setIsMuted(bool newIsMuted);
111
115 std::optional<qint32> volumeLevel() const;
119 void setVolumeLevel(std::optional<qint32> newVolumeLevel);
120 bool volumeLevelNull() const;
121 void setVolumeLevelNull();
122
126 std::optional<qint32> audioStreamIndex() const;
130 void setAudioStreamIndex(std::optional<qint32> newAudioStreamIndex);
131 bool audioStreamIndexNull() const;
133
137 std::optional<qint32> subtitleStreamIndex() const;
141 void setSubtitleStreamIndex(std::optional<qint32> newSubtitleStreamIndex);
142 bool subtitleStreamIndexNull() const;
144
148 QString mediaSourceId() const;
152 void setMediaSourceId(QString newMediaSourceId);
153 bool mediaSourceIdNull() const;
155
156
157 PlayMethod playMethod() const;
158
159 void setPlayMethod(PlayMethod newPlayMethod);
160
161
162 RepeatMode repeatMode() const;
163
164 void setRepeatMode(RepeatMode newRepeatMode);
165
166
168
169 void setPlaybackOrder(PlaybackOrder newPlaybackOrder);
170
174 QString liveStreamId() const;
178 void setLiveStreamId(QString newLiveStreamId);
179 bool liveStreamIdNull() const;
180 void setLiveStreamIdNull();
181
182
183protected:
184 std::optional<qint64> m_positionTicks = std::nullopt;
188 std::optional<qint32> m_volumeLevel = std::nullopt;
189 std::optional<qint32> m_audioStreamIndex = std::nullopt;
190 std::optional<qint32> m_subtitleStreamIndex = std::nullopt;
196
197private:
198 // Private constructor which generates an invalid object, for use withing PlayerStateInfo::fromJson();
200};
201
202
203} // NS DTO
204
205namespace Support {
206
208
209template <>
211
212template<>
214
215} // NS DTO
216} // NS Jellyfin
217
218#endif // JELLYFIN_DTO_PLAYERSTATEINFO_H
An Api client for Jellyfin. Handles requests and authentication.
Definition apiclient.h:90
Definition playerstateinfo.h:51
PlaybackOrder m_playbackOrder
Definition playerstateinfo.h:194
bool isPaused() const
Gets or sets a value indicating whether this instance is paused.
Definition playerstateinfo.cpp:168
void setVolumeLevel(std::optional< qint32 > newVolumeLevel)
Gets or sets the volume level.
Definition playerstateinfo.cpp:182
PlayMethod playMethod() const
Definition playerstateinfo.cpp:232
QString mediaSourceId() const
Gets or sets the now playing media version identifier.
Definition playerstateinfo.cpp:219
void setLiveStreamId(QString newLiveStreamId)
Gets or sets the now playing live stream identifier.
Definition playerstateinfo.cpp:252
void setAudioStreamIndexNull()
Definition playerstateinfo.cpp:202
std::optional< qint64 > m_positionTicks
Definition playerstateinfo.h:184
void setCanSeek(bool newCanSeek)
Gets or sets a value indicating whether this instance can seek.
Definition playerstateinfo.cpp:164
void setVolumeLevelNull()
Definition playerstateinfo.cpp:189
void setMediaSourceId(QString newMediaSourceId)
Gets or sets the now playing media version identifier.
Definition playerstateinfo.cpp:221
QJsonObject toJson() const
Definition playerstateinfo.cpp:107
void setIsMuted(bool newIsMuted)
Gets or sets a value indicating whether this instance is muted.
Definition playerstateinfo.cpp:176
bool audioStreamIndexNull() const
Definition playerstateinfo.cpp:198
std::optional< qint32 > m_subtitleStreamIndex
Definition playerstateinfo.h:190
std::optional< qint32 > subtitleStreamIndex() const
Gets or sets the index of the now playing subtitle stream.
Definition playerstateinfo.cpp:206
void setSubtitleStreamIndexNull()
Definition playerstateinfo.cpp:215
bool m_isMuted
Definition playerstateinfo.h:187
bool m_canSeek
Definition playerstateinfo.h:185
void setMediaSourceIdNull()
Definition playerstateinfo.cpp:228
bool positionTicksNull() const
Definition playerstateinfo.cpp:154
void setPlaybackOrder(PlaybackOrder newPlaybackOrder)
Definition playerstateinfo.cpp:246
bool volumeLevelNull() const
Definition playerstateinfo.cpp:185
QString liveStreamId() const
Gets or sets the now playing live stream identifier.
Definition playerstateinfo.cpp:250
void setPositionTicksNull()
Definition playerstateinfo.cpp:158
PlayerStateInfo(bool canSeek, bool isPaused, bool isMuted, PlayMethod playMethod, RepeatMode repeatMode, PlaybackOrder playbackOrder)
Definition playerstateinfo.cpp:36
void setIsPaused(bool newIsPaused)
Gets or sets a value indicating whether this instance is paused.
Definition playerstateinfo.cpp:170
RepeatMode repeatMode() const
Definition playerstateinfo.cpp:238
void setSubtitleStreamIndex(std::optional< qint32 > newSubtitleStreamIndex)
Gets or sets the index of the now playing subtitle stream.
Definition playerstateinfo.cpp:208
bool m_isPaused
Definition playerstateinfo.h:186
QString m_mediaSourceId
Definition playerstateinfo.h:191
std::optional< qint32 > volumeLevel() const
Gets or sets the volume level.
Definition playerstateinfo.cpp:180
void setFromJson(QJsonObject source)
Definition playerstateinfo.cpp:91
bool subtitleStreamIndexNull() const
Definition playerstateinfo.cpp:211
void setPositionTicks(std::optional< qint64 > newPositionTicks)
Gets or sets the now playing position ticks.
Definition playerstateinfo.cpp:151
std::optional< qint64 > positionTicks() const
Gets or sets the now playing position ticks.
Definition playerstateinfo.cpp:149
bool liveStreamIdNull() const
Definition playerstateinfo.cpp:255
void setRepeatMode(RepeatMode newRepeatMode)
Definition playerstateinfo.cpp:240
bool isMuted() const
Gets or sets a value indicating whether this instance is muted.
Definition playerstateinfo.cpp:174
QString m_liveStreamId
Definition playerstateinfo.h:195
std::optional< qint32 > m_audioStreamIndex
Definition playerstateinfo.h:189
bool mediaSourceIdNull() const
Definition playerstateinfo.cpp:224
void setPlayMethod(PlayMethod newPlayMethod)
Definition playerstateinfo.cpp:234
PlayMethod m_playMethod
Definition playerstateinfo.h:192
bool canSeek() const
Gets or sets a value indicating whether this instance can seek.
Definition playerstateinfo.cpp:162
std::optional< qint32 > audioStreamIndex() const
Gets or sets the index of the now playing audio stream.
Definition playerstateinfo.cpp:193
void setAudioStreamIndex(std::optional< qint32 > newAudioStreamIndex)
Gets or sets the index of the now playing audio stream.
Definition playerstateinfo.cpp:195
void replaceData(PlayerStateInfo &other)
Definition playerstateinfo.cpp:69
std::optional< qint32 > m_volumeLevel
Definition playerstateinfo.h:188
RepeatMode m_repeatMode
Definition playerstateinfo.h:193
PlaybackOrder playbackOrder() const
Definition playerstateinfo.cpp:244
static PlayerStateInfo fromJson(QJsonObject source)
Definition playerstateinfo.cpp:84
void setLiveStreamIdNull()
Definition playerstateinfo.cpp:259
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
Jellyfin::DTO::PlayerStateInfo PlayerStateInfo
Definition playerstateinfo.h:207
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