Jellyfin Qt
QML Library for interacting with the Jellyfin multimedia server
Loading...
Searching...
No Matches
plugininfo.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_PLUGININFO_H
31#define JELLYFIN_DTO_PLUGININFO_H
32
33#include <QJsonObject>
34#include <QJsonValue>
35#include <QSharedPointer>
36#include <QString>
37#include <optional>
38
42
43namespace Jellyfin {
44// Forward declaration
45class ApiClient;
46}
47namespace Jellyfin {
48namespace DTO {
49
50
52public:
54 QSharedPointer<Version> version,
55 QString jellyfinId,
56 bool canUninstall,
57 bool hasImage,
59 );
60
61 PluginInfo(const PluginInfo &other);
62
66 void replaceData(PluginInfo &other);
67
68 static PluginInfo fromJson(QJsonObject source);
69 void setFromJson(QJsonObject source);
70 QJsonObject toJson() const;
71
72 // Properties
76 QString name() const;
80 void setName(QString newName);
81 bool nameNull() const;
82 void setNameNull();
83
84
85 QSharedPointer<Version> version() const;
86
87 void setVersion(QSharedPointer<Version> newVersion);
88
92 QString configurationFileName() const;
96 void setConfigurationFileName(QString newConfigurationFileName);
97 bool configurationFileNameNull() const;
99
103 QString description() const;
107 void setDescription(QString newDescription);
108 bool descriptionNull() const;
109 void setDescriptionNull();
110
114 QString jellyfinId() const;
118 void setJellyfinId(QString newJellyfinId);
119
123 bool canUninstall() const;
127 void setCanUninstall(bool newCanUninstall);
128
132 bool hasImage() const;
136 void setHasImage(bool newHasImage);
137
138
139 PluginStatus status() const;
140
141 void setStatus(PluginStatus newStatus);
142
143
144protected:
145 QString m_name;
146 QSharedPointer<Version> m_version = QSharedPointer<Version>();
153
154private:
155 // Private constructor which generates an invalid object, for use withing PluginInfo::fromJson();
156 PluginInfo();
157};
158
159
160} // NS DTO
161
162namespace Support {
163
165
166template <>
167PluginInfo fromJsonValue(const QJsonValue &source, convertType<PluginInfo>);
168
169template<>
170QJsonValue toJsonValue(const PluginInfo &source, convertType<PluginInfo>);
171
172} // NS DTO
173} // NS Jellyfin
174
175#endif // JELLYFIN_DTO_PLUGININFO_H
Definition plugininfo.h:51
QString m_name
Definition plugininfo.h:145
QString m_configurationFileName
Definition plugininfo.h:147
QSharedPointer< Version > version() const
Definition plugininfo.cpp:132
bool nameNull() const
Definition plugininfo.cpp:124
void setDescriptionNull()
Definition plugininfo.cpp:160
void setStatus(PluginStatus newStatus)
Definition plugininfo.cpp:184
QString description() const
Gets or sets the description.
Definition plugininfo.cpp:151
void setName(QString newName)
Gets or sets the name.
Definition plugininfo.cpp:121
static PluginInfo fromJson(QJsonObject source)
Definition plugininfo.cpp:74
bool hasImage() const
Gets or sets a value indicating whether this plugin has a valid image.
Definition plugininfo.cpp:176
void setNameNull()
Definition plugininfo.cpp:128
void setConfigurationFileName(QString newConfigurationFileName)
Gets or sets the name of the configuration file.
Definition plugininfo.cpp:140
void setFromJson(QJsonObject source)
Definition plugininfo.cpp:81
void setCanUninstall(bool newCanUninstall)
Gets or sets a value indicating whether the plugin can be uninstalled.
Definition plugininfo.cpp:172
void setConfigurationFileNameNull()
Definition plugininfo.cpp:147
QString jellyfinId() const
Gets or sets the unique id.
Definition plugininfo.cpp:164
QString configurationFileName() const
Gets or sets the name of the configuration file.
Definition plugininfo.cpp:138
bool m_canUninstall
Definition plugininfo.h:150
void setHasImage(bool newHasImage)
Gets or sets a value indicating whether this plugin has a valid image.
Definition plugininfo.cpp:178
void replaceData(PluginInfo &other)
Definition plugininfo.cpp:63
bool m_hasImage
Definition plugininfo.h:151
void setVersion(QSharedPointer< Version > newVersion)
Definition plugininfo.cpp:134
QString name() const
Gets or sets the name.
Definition plugininfo.cpp:119
void setDescription(QString newDescription)
Gets or sets the description.
Definition plugininfo.cpp:153
bool configurationFileNameNull() const
Definition plugininfo.cpp:143
QSharedPointer< Version > m_version
Definition plugininfo.h:146
PluginStatus m_status
Definition plugininfo.h:152
void setJellyfinId(QString newJellyfinId)
Gets or sets the unique id.
Definition plugininfo.cpp:166
PluginStatus status() const
Definition plugininfo.cpp:182
QString m_description
Definition plugininfo.h:148
QJsonObject toJson() const
Definition plugininfo.cpp:93
QString m_jellyfinId
Definition plugininfo.h:149
bool canUninstall() const
Gets or sets a value indicating whether the plugin can be uninstalled.
Definition plugininfo.cpp:170
bool descriptionNull() const
Definition plugininfo.cpp:156
Value
Definition pluginstatus.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