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 <QString>
36#include <optional>
37
39
40namespace Jellyfin {
41// Forward declaration
42class ApiClient;
43}
44namespace Jellyfin {
45namespace DTO {
46
47
48class IPlugin {
49public:
50 IPlugin(
51 QString jellyfinId,
52 bool canUninstall
53 );
54
55 IPlugin(const IPlugin &other);
56
60 void replaceData(IPlugin &other);
61
62 static IPlugin fromJson(QJsonObject source);
63 void setFromJson(QJsonObject source);
64 QJsonObject toJson() const;
65
66 // Properties
70 QString name() const;
74 void setName(QString newName);
75 bool nameNull() const;
76 void setNameNull();
77
81 QString description() const;
85 void setDescription(QString newDescription);
86 bool descriptionNull() const;
87 void setDescriptionNull();
88
92 QString jellyfinId() const;
96 void setJellyfinId(QString newJellyfinId);
97
101 QString version() const;
105 void setVersion(QString newVersion);
106 bool versionNull() const;
107 void setVersionNull();
108
112 QString assemblyFilePath() const;
116 void setAssemblyFilePath(QString newAssemblyFilePath);
117 bool assemblyFilePathNull() const;
119
123 bool canUninstall() const;
127 void setCanUninstall(bool newCanUninstall);
128
132 QString dataFolderPath() const;
136 void setDataFolderPath(QString newDataFolderPath);
137 bool dataFolderPathNull() const;
139
140
141protected:
142 QString m_name;
145 QString m_version;
149
150private:
151 // Private constructor which generates an invalid object, for use withing IPlugin::fromJson();
152 IPlugin();
153};
154
155
156} // NS DTO
157
158namespace Support {
159
161
162template <>
163IPlugin fromJsonValue(const QJsonValue &source, convertType<IPlugin>);
164
165template<>
166QJsonValue toJsonValue(const IPlugin &source, convertType<IPlugin>);
167
168} // NS DTO
169} // NS Jellyfin
170
171#endif // JELLYFIN_DTO_IPLUGIN_H
An Api client for Jellyfin. Handles requests and authentication.
Definition apiclient.h:90
Definition iplugin.h:48
QString version() const
Gets the plugin version.
Definition iplugin.cpp:149
QString m_jellyfinId
Definition iplugin.h:144
void setFromJson(QJsonObject source)
Definition iplugin.cpp:73
void setAssemblyFilePath(QString newAssemblyFilePath)
Gets the path to the assembly file.
Definition iplugin.cpp:164
void setDescriptionNull()
Definition iplugin.cpp:139
bool dataFolderPathNull() const
Definition iplugin.cpp:186
QString name() const
Gets the name of the plugin.
Definition iplugin.cpp:117
QString description() const
Gets the Description.
Definition iplugin.cpp:130
IPlugin(QString jellyfinId, bool canUninstall)
Definition iplugin.cpp:36
void setName(QString newName)
Gets the name of the plugin.
Definition iplugin.cpp:119
QString m_description
Definition iplugin.h:143
void setVersion(QString newVersion)
Gets the plugin version.
Definition iplugin.cpp:151
QString m_assemblyFilePath
Definition iplugin.h:146
void replaceData(IPlugin &other)
Definition iplugin.cpp:56
QString m_dataFolderPath
Definition iplugin.h:148
void setVersionNull()
Definition iplugin.cpp:158
QString assemblyFilePath() const
Gets the path to the assembly file.
Definition iplugin.cpp:162
void setNameNull()
Definition iplugin.cpp:126
bool descriptionNull() const
Definition iplugin.cpp:135
bool versionNull() const
Definition iplugin.cpp:154
void setDescription(QString newDescription)
Gets the Description.
Definition iplugin.cpp:132
QString m_name
Definition iplugin.h:142
void setCanUninstall(bool newCanUninstall)
Gets a value indicating whether the plugin can be uninstalled.
Definition iplugin.cpp:177
QString m_version
Definition iplugin.h:145
void setAssemblyFilePathNull()
Definition iplugin.cpp:171
void setJellyfinId(QString newJellyfinId)
Gets the unique id.
Definition iplugin.cpp:145
QString jellyfinId() const
Gets the unique id.
Definition iplugin.cpp:143
bool canUninstall() const
Gets a value indicating whether the plugin can be uninstalled.
Definition iplugin.cpp:175
QJsonObject toJson() const
Definition iplugin.cpp:84
void setDataFolderPathNull()
Definition iplugin.cpp:190
QString dataFolderPath() const
Gets the full path to the data folder, where the plugin can store any miscellaneous files needed.
Definition iplugin.cpp:181
bool assemblyFilePathNull() const
Definition iplugin.cpp:167
static IPlugin fromJson(QJsonObject source)
Definition iplugin.cpp:66
bool nameNull() const
Definition iplugin.cpp:122
bool m_canUninstall
Definition iplugin.h:147
void setDataFolderPath(QString newDataFolderPath)
Gets the full path to the data folder, where the plugin can store any miscellaneous files needed.
Definition iplugin.cpp:183
Contains auto-generated Data Transfer Objects for the Jellyfin HTTP API.
Definition accessschedule.h:128
Jellyfin::DTO::IPlugin IPlugin
Definition iplugin.h:160
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