Jellyfin Qt
QML Library for interacting with the Jellyfin multimedia server
Loading...
Searching...
No Matches
channelfeatures.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_CHANNELFEATURES_H
31#define JELLYFIN_DTO_CHANNELFEATURES_H
32
33#include <QJsonObject>
34#include <QJsonValue>
35#include <QList>
36#include <QString>
37#include <QStringList>
38#include <optional>
39
44
45namespace Jellyfin {
46// Forward declaration
47class ApiClient;
48}
49namespace Jellyfin {
50namespace DTO {
51
52
54public:
56 QString name,
57 QString jellyfinId,
58 bool canSearch,
64 bool canFilter,
66 );
67
68 ChannelFeatures(const ChannelFeatures &other);
69
73 void replaceData(ChannelFeatures &other);
74
75 static ChannelFeatures fromJson(QJsonObject source);
76 void setFromJson(QJsonObject source);
77 QJsonObject toJson() const;
78
79 // Properties
83 QString name() const;
87 void setName(QString newName);
88
92 QString jellyfinId() const;
96 void setJellyfinId(QString newJellyfinId);
97
101 bool canSearch() const;
105 void setCanSearch(bool newCanSearch);
106
114 void setMediaTypes(QList<ChannelMediaType> newMediaTypes);
115
124
128 std::optional<qint32> maxPageSize() const;
132 void setMaxPageSize(std::optional<qint32> newMaxPageSize);
133 bool maxPageSizeNull() const;
134 void setMaxPageSizeNull();
135
139 std::optional<qint32> autoRefreshLevels() const;
143 void setAutoRefreshLevels(std::optional<qint32> newAutoRefreshLevels);
144 bool autoRefreshLevelsNull() const;
146
154 void setDefaultSortFields(QList<ChannelItemSortField> newDefaultSortFields);
155
159 bool supportsSortOrderToggle() const;
163 void setSupportsSortOrderToggle(bool newSupportsSortOrderToggle);
164
168 bool supportsLatestMedia() const;
172 void setSupportsLatestMedia(bool newSupportsLatestMedia);
173
177 bool canFilter() const;
181 void setCanFilter(bool newCanFilter);
182
186 bool supportsContentDownloading() const;
190 void setSupportsContentDownloading(bool newSupportsContentDownloading);
191
192
193protected:
194 QString m_name;
199 std::optional<qint32> m_maxPageSize = std::nullopt;
200 std::optional<qint32> m_autoRefreshLevels = std::nullopt;
206
207private:
208 // Private constructor which generates an invalid object, for use withing ChannelFeatures::fromJson();
210};
211
212
213} // NS DTO
214
215namespace Support {
216
218
219template <>
221
222template<>
224
225} // NS DTO
226} // NS Jellyfin
227
228#endif // JELLYFIN_DTO_CHANNELFEATURES_H
An Api client for Jellyfin. Handles requests and authentication.
Definition apiclient.h:90
Definition channelfeatures.h:53
void setCanFilter(bool newCanFilter)
Gets or sets a value indicating whether this instance can filter.
Definition channelfeatures.cpp:217
void setSupportsLatestMedia(bool newSupportsLatestMedia)
Gets or sets a value indicating whether [supports latest media].
Definition channelfeatures.cpp:211
void setSupportsContentDownloading(bool newSupportsContentDownloading)
Gets or sets a value indicating whether [supports content downloading].
Definition channelfeatures.cpp:223
void setContentTypes(QList< ChannelMediaContentType > newContentTypes)
Gets or sets the content types.
Definition channelfeatures.cpp:167
std::optional< qint32 > m_autoRefreshLevels
Definition channelfeatures.h:200
void setFromJson(QJsonObject source)
Definition channelfeatures.cpp:99
bool m_canSearch
Definition channelfeatures.h:196
bool m_supportsLatestMedia
Definition channelfeatures.h:203
void setDefaultSortFields(QList< ChannelItemSortField > newDefaultSortFields)
Gets or sets the default sort orders.
Definition channelfeatures.cpp:199
void replaceData(ChannelFeatures &other)
Definition channelfeatures.cpp:77
QList< ChannelMediaContentType > contentTypes() const
Gets or sets the content types.
Definition channelfeatures.cpp:165
std::optional< qint32 > m_maxPageSize
Definition channelfeatures.h:199
void setName(QString newName)
Gets or sets the name.
Definition channelfeatures.cpp:143
QList< ChannelMediaType > mediaTypes() const
Gets or sets the media types.
Definition channelfeatures.cpp:159
QString m_name
Definition channelfeatures.h:194
bool m_supportsSortOrderToggle
Definition channelfeatures.h:202
void setAutoRefreshLevelsNull()
Definition channelfeatures.cpp:193
void setCanSearch(bool newCanSearch)
Gets or sets a value indicating whether this instance can search.
Definition channelfeatures.cpp:155
bool supportsContentDownloading() const
Gets or sets a value indicating whether [supports content downloading].
Definition channelfeatures.cpp:221
QList< ChannelItemSortField > m_defaultSortFields
Definition channelfeatures.h:201
bool canFilter() const
Gets or sets a value indicating whether this instance can filter.
Definition channelfeatures.cpp:215
bool supportsSortOrderToggle() const
Gets or sets a value indicating whether a sort ascending/descending toggle is supported.
Definition channelfeatures.cpp:203
bool maxPageSizeNull() const
Definition channelfeatures.cpp:176
bool autoRefreshLevelsNull() const
Definition channelfeatures.cpp:189
static ChannelFeatures fromJson(QJsonObject source)
Definition channelfeatures.cpp:92
bool supportsLatestMedia() const
Gets or sets a value indicating whether [supports latest media].
Definition channelfeatures.cpp:209
QString jellyfinId() const
Gets or sets the identifier.
Definition channelfeatures.cpp:147
void setMaxPageSizeNull()
Definition channelfeatures.cpp:180
std::optional< qint32 > autoRefreshLevels() const
Gets or sets the automatic refresh levels.
Definition channelfeatures.cpp:184
QString name() const
Gets or sets the name.
Definition channelfeatures.cpp:141
QList< ChannelItemSortField > defaultSortFields() const
Gets or sets the default sort orders.
Definition channelfeatures.cpp:197
ChannelFeatures(QString name, QString jellyfinId, bool canSearch, QList< ChannelMediaType > mediaTypes, QList< ChannelMediaContentType > contentTypes, QList< ChannelItemSortField > defaultSortFields, bool supportsSortOrderToggle, bool supportsLatestMedia, bool canFilter, bool supportsContentDownloading)
Definition channelfeatures.cpp:36
bool m_supportsContentDownloading
Definition channelfeatures.h:205
void setAutoRefreshLevels(std::optional< qint32 > newAutoRefreshLevels)
Gets or sets the automatic refresh levels.
Definition channelfeatures.cpp:186
void setMediaTypes(QList< ChannelMediaType > newMediaTypes)
Gets or sets the media types.
Definition channelfeatures.cpp:161
bool m_canFilter
Definition channelfeatures.h:204
QList< ChannelMediaType > m_mediaTypes
Definition channelfeatures.h:197
std::optional< qint32 > maxPageSize() const
Gets or sets the maximum number of records the channel allows retrieving at a time.
Definition channelfeatures.cpp:171
QString m_jellyfinId
Definition channelfeatures.h:195
bool canSearch() const
Gets or sets a value indicating whether this instance can search.
Definition channelfeatures.cpp:153
void setJellyfinId(QString newJellyfinId)
Gets or sets the identifier.
Definition channelfeatures.cpp:149
QJsonObject toJson() const
Definition channelfeatures.cpp:115
void setSupportsSortOrderToggle(bool newSupportsSortOrderToggle)
Gets or sets a value indicating whether a sort ascending/descending toggle is supported.
Definition channelfeatures.cpp:205
QList< ChannelMediaContentType > m_contentTypes
Definition channelfeatures.h:198
void setMaxPageSize(std::optional< qint32 > newMaxPageSize)
Gets or sets the maximum number of records the channel allows retrieving at a time.
Definition channelfeatures.cpp:173
Definition mediaplayer2.h:20
Contains auto-generated Data Transfer Objects for the Jellyfin HTTP API.
Definition accessschedule.h:128
AccessSchedule fromJsonValue(const QJsonValue &source, convertType< AccessSchedule >)
Definition accessschedule.cpp:133
Jellyfin::DTO::ChannelFeatures ChannelFeatures
Definition channelfeatures.h:217
QJsonValue toJsonValue(const AccessSchedule &source, convertType< AccessSchedule >)
Definition accessschedule.cpp:139
Definition jsonconvimpl.h:45