Jellyfin Qt
QML Library for interacting with the Jellyfin multimedia server
Loading...
Searching...
No Matches
iplugin.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_IPLUGIN_H
31#define JELLYFIN_DTO_IPLUGIN_H
32
33#include <QJsonObject>
34#include <QJsonValue>
35#include <QSharedPointer>
36#include <QString>
37#include <optional>
38
41
42namespace Jellyfin {
43// Forward declaration
44class ApiClient;
45}
46namespace Jellyfin {
47namespace DTO {
48
49
50class IPlugin {
51public:
52 IPlugin(
53 QString jellyfinId,
54 QSharedPointer<Version> version,
55 bool canUninstall
56 );
57
58 IPlugin(const IPlugin &other);
59
63 void replaceData(IPlugin &other);
64
65 static IPlugin fromJson(QJsonObject source);
66 void setFromJson(QJsonObject source);
67 QJsonObject toJson() const;
68
69 // Properties
73 QString name() const;
77 void setName(QString newName);
78 bool nameNull() const;
79 void setNameNull();
80
84 QString description() const;
88 void setDescription(QString newDescription);
89 bool descriptionNull() const;
90 void setDescriptionNull();
91
95 QString jellyfinId() const;
99 void setJellyfinId(QString newJellyfinId);
100
101
102 QSharedPointer<Version> version() const;
103
104 void setVersion(QSharedPointer<Version> newVersion);
105
109 QString assemblyFilePath() const;
113 void setAssemblyFilePath(QString newAssemblyFilePath);
114 bool assemblyFilePathNull() const;
116
120 bool canUninstall() const;
124 void setCanUninstall(bool newCanUninstall);
125
129 QString dataFolderPath() const;
133 void setDataFolderPath(QString newDataFolderPath);
134 bool dataFolderPathNull() const;
136
137
138protected:
139 QString m_name;
142 QSharedPointer<Version> m_version = QSharedPointer<Version>();
146
147private:
148 // Private constructor which generates an invalid object, for use withing IPlugin::fromJson();
149 IPlugin();
150};
151
152
153} // NS DTO
154
155namespace Support {
156
158
159template <>
160IPlugin fromJsonValue(const QJsonValue &source, convertType<IPlugin>);
161
162template<>
163QJsonValue toJsonValue(const IPlugin &source, convertType<IPlugin>);
164
165} // NS DTO
166} // NS Jellyfin
167
168#endif // JELLYFIN_DTO_IPLUGIN_H
Definition iplugin.h:50
QString m_jellyfinId
Definition iplugin.h:141
void setFromJson(QJsonObject source)
Definition iplugin.cpp:75
void setAssemblyFilePath(QString newAssemblyFilePath)
Gets the path to the assembly file.
Definition iplugin.cpp:155
void setDescriptionNull()
Definition iplugin.cpp:137
bool dataFolderPathNull() const
Definition iplugin.cpp:177
QString name() const
Gets the name of the plugin.
Definition iplugin.cpp:115
QString description() const
Gets the Description.
Definition iplugin.cpp:128
void setName(QString newName)
Gets the name of the plugin.
Definition iplugin.cpp:117
QString m_description
Definition iplugin.h:140
QString m_assemblyFilePath
Definition iplugin.h:143
void replaceData(IPlugin &other)
Definition iplugin.cpp:58
QString m_dataFolderPath
Definition iplugin.h:145
QString assemblyFilePath() const
Gets the path to the assembly file.
Definition iplugin.cpp:153
void setNameNull()
Definition iplugin.cpp:124
bool descriptionNull() const
Definition iplugin.cpp:133
QSharedPointer< Version > version() const
Definition iplugin.cpp:147
void setDescription(QString newDescription)
Gets the Description.
Definition iplugin.cpp:130
QString m_name
Definition iplugin.h:139
void setCanUninstall(bool newCanUninstall)
Gets a value indicating whether the plugin can be uninstalled.
Definition iplugin.cpp:168
void setAssemblyFilePathNull()
Definition iplugin.cpp:162
void setJellyfinId(QString newJellyfinId)
Gets the unique id.
Definition iplugin.cpp:143
QString jellyfinId() const
Gets the unique id.
Definition iplugin.cpp:141
bool canUninstall() const
Gets a value indicating whether the plugin can be uninstalled.
Definition iplugin.cpp:166
QJsonObject toJson() const
Definition iplugin.cpp:86
void setDataFolderPathNull()
Definition iplugin.cpp:181
QSharedPointer< Version > m_version
Definition iplugin.h:142
QString dataFolderPath() const
Gets the full path to the data folder, where the plugin can store any miscellaneous files needed.
Definition iplugin.cpp:172
bool assemblyFilePathNull() const
Definition iplugin.cpp:158
static IPlugin fromJson(QJsonObject source)
Definition iplugin.cpp:68
bool nameNull() const
Definition iplugin.cpp:120
void setVersion(QSharedPointer< Version > newVersion)
Definition iplugin.cpp:149
bool m_canUninstall
Definition iplugin.h:144
void setDataFolderPath(QString newDataFolderPath)
Gets the full path to the data folder, where the plugin can store any miscellaneous files needed.
Definition iplugin.cpp:174
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