Jellyfin Qt
QML Library for interacting with the Jellyfin multimedia server
Loading...
Searching...
No Matches
playrequest.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_PLAYREQUEST_H
31#define JELLYFIN_DTO_PLAYREQUEST_H
32
33#include <QJsonObject>
34#include <QJsonValue>
35#include <QList>
36#include <QString>
37#include <QStringList>
38#include <optional>
39
42
43namespace Jellyfin {
44// Forward declaration
45class ApiClient;
46}
47namespace Jellyfin {
48namespace DTO {
49
50
52public:
55 QString controllingUserId
56 );
57
58 PlayRequest(const PlayRequest &other);
59
63 void replaceData(PlayRequest &other);
64
65 static PlayRequest fromJson(QJsonObject source);
66 void setFromJson(QJsonObject source);
67 QJsonObject toJson() const;
68
69 // Properties
73 QStringList itemIds() const;
77 void setItemIds(QStringList newItemIds);
78 bool itemIdsNull() const;
79 void setItemIdsNull();
80
84 std::optional<qint64> startPositionTicks() const;
88 void setStartPositionTicks(std::optional<qint64> newStartPositionTicks);
89 bool startPositionTicksNull() const;
91
92
94
95 void setPlayCommand(PlayCommand newPlayCommand);
96
100 QString controllingUserId() const;
104 void setControllingUserId(QString newControllingUserId);
105
106
107 std::optional<qint32> subtitleStreamIndex() const;
108
109 void setSubtitleStreamIndex(std::optional<qint32> newSubtitleStreamIndex);
110 bool subtitleStreamIndexNull() const;
112
113
114 std::optional<qint32> audioStreamIndex() const;
115
116 void setAudioStreamIndex(std::optional<qint32> newAudioStreamIndex);
117 bool audioStreamIndexNull() const;
119
120
121 QString mediaSourceId() const;
122
123 void setMediaSourceId(QString newMediaSourceId);
124 bool mediaSourceIdNull() const;
126
127
128 std::optional<qint32> startIndex() const;
129
130 void setStartIndex(std::optional<qint32> newStartIndex);
131 bool startIndexNull() const;
132 void setStartIndexNull();
133
134
135protected:
136 QStringList m_itemIds;
137 std::optional<qint64> m_startPositionTicks = std::nullopt;
140 std::optional<qint32> m_subtitleStreamIndex = std::nullopt;
141 std::optional<qint32> m_audioStreamIndex = std::nullopt;
143 std::optional<qint32> m_startIndex = std::nullopt;
144
145private:
146 // Private constructor which generates an invalid object, for use withing PlayRequest::fromJson();
147 PlayRequest();
148};
149
150
151} // NS DTO
152
153namespace Support {
154
156
157template <>
158PlayRequest fromJsonValue(const QJsonValue &source, convertType<PlayRequest>);
159
160template<>
161QJsonValue toJsonValue(const PlayRequest &source, convertType<PlayRequest>);
162
163} // NS DTO
164} // NS Jellyfin
165
166#endif // JELLYFIN_DTO_PLAYREQUEST_H
Value
Definition playcommand.h:49
Definition playrequest.h:51
QString controllingUserId() const
Gets or sets the controlling user identifier.
Definition playrequest.cpp:157
std::optional< qint32 > subtitleStreamIndex() const
Definition playrequest.cpp:163
void setAudioStreamIndexNull()
Definition playrequest.cpp:185
std::optional< qint32 > m_startIndex
Definition playrequest.h:143
QString m_controllingUserId
Definition playrequest.h:139
void setStartIndex(std::optional< qint32 > newStartIndex)
Definition playrequest.cpp:204
void setStartPositionTicks(std::optional< qint64 > newStartPositionTicks)
Gets or sets the start position ticks that the first item should be played at.
Definition playrequest.cpp:140
QStringList m_itemIds
Definition playrequest.h:136
void setStartIndexNull()
Definition playrequest.cpp:211
void setMediaSourceIdNull()
Definition playrequest.cpp:198
std::optional< qint32 > startIndex() const
Definition playrequest.cpp:202
QString m_mediaSourceId
Definition playrequest.h:142
void setSubtitleStreamIndexNull()
Definition playrequest.cpp:172
void setAudioStreamIndex(std::optional< qint32 > newAudioStreamIndex)
Definition playrequest.cpp:178
void setMediaSourceId(QString newMediaSourceId)
Definition playrequest.cpp:191
bool audioStreamIndexNull() const
Definition playrequest.cpp:181
void replaceData(PlayRequest &other)
Definition playrequest.cpp:57
static PlayRequest fromJson(QJsonObject source)
Definition playrequest.cpp:68
bool startPositionTicksNull() const
Definition playrequest.cpp:143
void setControllingUserId(QString newControllingUserId)
Gets or sets the controlling user identifier.
Definition playrequest.cpp:159
std::optional< qint32 > m_audioStreamIndex
Definition playrequest.h:141
QString mediaSourceId() const
Definition playrequest.cpp:189
void setItemIds(QStringList newItemIds)
Gets or sets the item ids.
Definition playrequest.cpp:127
std::optional< qint32 > m_subtitleStreamIndex
Definition playrequest.h:140
void setSubtitleStreamIndex(std::optional< qint32 > newSubtitleStreamIndex)
Definition playrequest.cpp:165
void setFromJson(QJsonObject source)
Definition playrequest.cpp:75
bool startIndexNull() const
Definition playrequest.cpp:207
std::optional< qint64 > startPositionTicks() const
Gets or sets the start position ticks that the first item should be played at.
Definition playrequest.cpp:138
PlayCommand m_playCommand
Definition playrequest.h:138
QStringList itemIds() const
Gets or sets the item ids.
Definition playrequest.cpp:125
QJsonObject toJson() const
Definition playrequest.cpp:87
void setPlayCommand(PlayCommand newPlayCommand)
Definition playrequest.cpp:153
PlayCommand playCommand() const
Definition playrequest.cpp:151
bool itemIdsNull() const
Definition playrequest.cpp:130
bool subtitleStreamIndexNull() const
Definition playrequest.cpp:168
void setItemIdsNull()
Definition playrequest.cpp:134
bool mediaSourceIdNull() const
Definition playrequest.cpp:194
void setStartPositionTicksNull()
Definition playrequest.cpp:147
std::optional< qint64 > m_startPositionTicks
Definition playrequest.h:137
std::optional< qint32 > audioStreamIndex() const
Definition playrequest.cpp:176
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