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
41
42namespace Jellyfin {
43// Forward declaration
44class ApiClient;
45}
46namespace Jellyfin {
47namespace DTO {
48
49
51public:
53 bool canSeek,
54 bool isPaused,
55 bool isMuted,
58 );
59
60 PlayerStateInfo(const PlayerStateInfo &other);
61
65 void replaceData(PlayerStateInfo &other);
66
67 static PlayerStateInfo fromJson(QJsonObject source);
68 void setFromJson(QJsonObject source);
69 QJsonObject toJson() const;
70
71 // Properties
75 std::optional<qint64> positionTicks() const;
79 void setPositionTicks(std::optional<qint64> newPositionTicks);
80 bool positionTicksNull() const;
82
86 bool canSeek() const;
90 void setCanSeek(bool newCanSeek);
91
95 bool isPaused() const;
99 void setIsPaused(bool newIsPaused);
100
104 bool isMuted() const;
108 void setIsMuted(bool newIsMuted);
109
113 std::optional<qint32> volumeLevel() const;
117 void setVolumeLevel(std::optional<qint32> newVolumeLevel);
118 bool volumeLevelNull() const;
119 void setVolumeLevelNull();
120
124 std::optional<qint32> audioStreamIndex() const;
128 void setAudioStreamIndex(std::optional<qint32> newAudioStreamIndex);
129 bool audioStreamIndexNull() const;
131
135 std::optional<qint32> subtitleStreamIndex() const;
139 void setSubtitleStreamIndex(std::optional<qint32> newSubtitleStreamIndex);
140 bool subtitleStreamIndexNull() const;
142
146 QString mediaSourceId() const;
150 void setMediaSourceId(QString newMediaSourceId);
151 bool mediaSourceIdNull() const;
153
154
155 PlayMethod playMethod() const;
156
157 void setPlayMethod(PlayMethod newPlayMethod);
158
159
160 RepeatMode repeatMode() const;
161
162 void setRepeatMode(RepeatMode newRepeatMode);
163
164
165protected:
166 std::optional<qint64> m_positionTicks = std::nullopt;
170 std::optional<qint32> m_volumeLevel = std::nullopt;
171 std::optional<qint32> m_audioStreamIndex = std::nullopt;
172 std::optional<qint32> m_subtitleStreamIndex = std::nullopt;
176
177private:
178 // Private constructor which generates an invalid object, for use withing PlayerStateInfo::fromJson();
180};
181
182
183} // NS DTO
184
185namespace Support {
186
188
189template <>
191
192template<>
194
195} // NS DTO
196} // NS Jellyfin
197
198#endif // JELLYFIN_DTO_PLAYERSTATEINFO_H
Value
Definition playmethod.h:49
Definition playerstateinfo.h:50
bool isPaused() const
Gets or sets a value indicating whether this instance is paused.
Definition playerstateinfo.cpp:154
void setVolumeLevel(std::optional< qint32 > newVolumeLevel)
Gets or sets the volume level.
Definition playerstateinfo.cpp:168
PlayMethod playMethod() const
Definition playerstateinfo.cpp:218
QString mediaSourceId() const
Gets or sets the now playing media version identifier.
Definition playerstateinfo.cpp:205
void setAudioStreamIndexNull()
Definition playerstateinfo.cpp:188
std::optional< qint64 > m_positionTicks
Definition playerstateinfo.h:166
void setCanSeek(bool newCanSeek)
Gets or sets a value indicating whether this instance can seek.
Definition playerstateinfo.cpp:150
void setVolumeLevelNull()
Definition playerstateinfo.cpp:175
void setMediaSourceId(QString newMediaSourceId)
Gets or sets the now playing media version identifier.
Definition playerstateinfo.cpp:207
QJsonObject toJson() const
Definition playerstateinfo.cpp:99
void setIsMuted(bool newIsMuted)
Gets or sets a value indicating whether this instance is muted.
Definition playerstateinfo.cpp:162
bool audioStreamIndexNull() const
Definition playerstateinfo.cpp:184
std::optional< qint32 > m_subtitleStreamIndex
Definition playerstateinfo.h:172
std::optional< qint32 > subtitleStreamIndex() const
Gets or sets the index of the now playing subtitle stream.
Definition playerstateinfo.cpp:192
void setSubtitleStreamIndexNull()
Definition playerstateinfo.cpp:201
bool m_isMuted
Definition playerstateinfo.h:169
bool m_canSeek
Definition playerstateinfo.h:167
void setMediaSourceIdNull()
Definition playerstateinfo.cpp:214
bool positionTicksNull() const
Definition playerstateinfo.cpp:140
bool volumeLevelNull() const
Definition playerstateinfo.cpp:171
void setPositionTicksNull()
Definition playerstateinfo.cpp:144
void setIsPaused(bool newIsPaused)
Gets or sets a value indicating whether this instance is paused.
Definition playerstateinfo.cpp:156
RepeatMode repeatMode() const
Definition playerstateinfo.cpp:224
void setSubtitleStreamIndex(std::optional< qint32 > newSubtitleStreamIndex)
Gets or sets the index of the now playing subtitle stream.
Definition playerstateinfo.cpp:194
bool m_isPaused
Definition playerstateinfo.h:168
QString m_mediaSourceId
Definition playerstateinfo.h:173
std::optional< qint32 > volumeLevel() const
Gets or sets the volume level.
Definition playerstateinfo.cpp:166
void setFromJson(QJsonObject source)
Definition playerstateinfo.cpp:85
bool subtitleStreamIndexNull() const
Definition playerstateinfo.cpp:197
void setPositionTicks(std::optional< qint64 > newPositionTicks)
Gets or sets the now playing position ticks.
Definition playerstateinfo.cpp:137
std::optional< qint64 > positionTicks() const
Gets or sets the now playing position ticks.
Definition playerstateinfo.cpp:135
void setRepeatMode(RepeatMode newRepeatMode)
Definition playerstateinfo.cpp:226
bool isMuted() const
Gets or sets a value indicating whether this instance is muted.
Definition playerstateinfo.cpp:160
std::optional< qint32 > m_audioStreamIndex
Definition playerstateinfo.h:171
bool mediaSourceIdNull() const
Definition playerstateinfo.cpp:210
void setPlayMethod(PlayMethod newPlayMethod)
Definition playerstateinfo.cpp:220
PlayMethod m_playMethod
Definition playerstateinfo.h:174
bool canSeek() const
Gets or sets a value indicating whether this instance can seek.
Definition playerstateinfo.cpp:148
std::optional< qint32 > audioStreamIndex() const
Gets or sets the index of the now playing audio stream.
Definition playerstateinfo.cpp:179
void setAudioStreamIndex(std::optional< qint32 > newAudioStreamIndex)
Gets or sets the index of the now playing audio stream.
Definition playerstateinfo.cpp:181
void replaceData(PlayerStateInfo &other)
Definition playerstateinfo.cpp:65
std::optional< qint32 > m_volumeLevel
Definition playerstateinfo.h:170
RepeatMode m_repeatMode
Definition playerstateinfo.h:175
static PlayerStateInfo fromJson(QJsonObject source)
Definition playerstateinfo.cpp:78
Value
Definition repeatmode.h:49
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