Jellyfin Qt
QML Library for interacting with the Jellyfin multimedia server
Loading...
Searching...
No Matches
deviceinfo.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_DEVICEINFO_H
31#define JELLYFIN_DTO_DEVICEINFO_H
32
33#include <QDateTime>
34#include <QJsonObject>
35#include <QJsonValue>
36#include <QSharedPointer>
37#include <QString>
38#include <optional>
39
42
43namespace Jellyfin {
44// Forward declaration
45class ApiClient;
46}
47namespace Jellyfin {
48namespace DTO {
49
50
52public:
54 QString lastUserId,
55 QDateTime dateLastActivity,
56 QSharedPointer<ClientCapabilities> capabilities
57 );
58
59 DeviceInfo(const DeviceInfo &other);
60
64 void replaceData(DeviceInfo &other);
65
66 static DeviceInfo fromJson(QJsonObject source);
67 void setFromJson(QJsonObject source);
68 QJsonObject toJson() const;
69
70 // Properties
71
72 QString name() const;
73
74 void setName(QString newName);
75 bool nameNull() const;
76 void setNameNull();
77
81 QString jellyfinId() const;
85 void setJellyfinId(QString newJellyfinId);
86 bool jellyfinIdNull() const;
87 void setJellyfinIdNull();
88
92 QString lastUserName() const;
96 void setLastUserName(QString newLastUserName);
97 bool lastUserNameNull() const;
99
103 QString appName() const;
107 void setAppName(QString newAppName);
108 bool appNameNull() const;
109 void setAppNameNull();
110
114 QString appVersion() const;
118 void setAppVersion(QString newAppVersion);
119 bool appVersionNull() const;
120 void setAppVersionNull();
121
125 QString lastUserId() const;
129 void setLastUserId(QString newLastUserId);
130
134 QDateTime dateLastActivity() const;
138 void setDateLastActivity(QDateTime newDateLastActivity);
139
140
141 QSharedPointer<ClientCapabilities> capabilities() const;
142
143 void setCapabilities(QSharedPointer<ClientCapabilities> newCapabilities);
144
145
146 QString iconUrl() const;
147
148 void setIconUrl(QString newIconUrl);
149 bool iconUrlNull() const;
150 void setIconUrlNull();
151
152
153protected:
154 QString m_name;
157 QString m_appName;
161 QSharedPointer<ClientCapabilities> m_capabilities = QSharedPointer<ClientCapabilities>();
162 QString m_iconUrl;
163
164private:
165 // Private constructor which generates an invalid object, for use withing DeviceInfo::fromJson();
166 DeviceInfo();
167};
168
169
170} // NS DTO
171
172namespace Support {
173
175
176template <>
177DeviceInfo fromJsonValue(const QJsonValue &source, convertType<DeviceInfo>);
178
179template<>
180QJsonValue toJsonValue(const DeviceInfo &source, convertType<DeviceInfo>);
181
182} // NS DTO
183} // NS Jellyfin
184
185#endif // JELLYFIN_DTO_DEVICEINFO_H
Definition deviceinfo.h:51
void setJellyfinId(QString newJellyfinId)
Gets or sets the identifier.
Definition deviceinfo.cpp:146
void setJellyfinIdNull()
Definition deviceinfo.cpp:153
QSharedPointer< ClientCapabilities > m_capabilities
Definition deviceinfo.h:161
QJsonObject toJson() const
Definition deviceinfo.cpp:92
void setAppVersionNull()
Definition deviceinfo.cpp:192
void setFromJson(QJsonObject source)
Definition deviceinfo.cpp:79
QString m_appName
Definition deviceinfo.h:157
bool appVersionNull() const
Definition deviceinfo.cpp:188
QString name() const
Definition deviceinfo.cpp:131
bool iconUrlNull() const
Definition deviceinfo.cpp:219
void setName(QString newName)
Definition deviceinfo.cpp:133
void replaceData(DeviceInfo &other)
Definition deviceinfo.cpp:60
QString m_lastUserName
Definition deviceinfo.h:156
QString lastUserId() const
Gets or sets the last user identifier.
Definition deviceinfo.cpp:196
void setCapabilities(QSharedPointer< ClientCapabilities > newCapabilities)
Definition deviceinfo.cpp:210
void setLastUserName(QString newLastUserName)
Gets or sets the last name of the user.
Definition deviceinfo.cpp:159
QString m_lastUserId
Definition deviceinfo.h:159
QString jellyfinId() const
Gets or sets the identifier.
Definition deviceinfo.cpp:144
bool lastUserNameNull() const
Definition deviceinfo.cpp:162
void setAppVersion(QString newAppVersion)
Gets or sets the application version.
Definition deviceinfo.cpp:185
QString iconUrl() const
Definition deviceinfo.cpp:214
QString m_name
Definition deviceinfo.h:154
void setAppNameNull()
Definition deviceinfo.cpp:179
void setNameNull()
Definition deviceinfo.cpp:140
QDateTime dateLastActivity() const
Gets or sets the date last modified.
Definition deviceinfo.cpp:202
static DeviceInfo fromJson(QJsonObject source)
Definition deviceinfo.cpp:72
void setDateLastActivity(QDateTime newDateLastActivity)
Gets or sets the date last modified.
Definition deviceinfo.cpp:204
bool jellyfinIdNull() const
Definition deviceinfo.cpp:149
bool nameNull() const
Definition deviceinfo.cpp:136
void setAppName(QString newAppName)
Gets or sets the name of the application.
Definition deviceinfo.cpp:172
QString appName() const
Gets or sets the name of the application.
Definition deviceinfo.cpp:170
QSharedPointer< ClientCapabilities > capabilities() const
Definition deviceinfo.cpp:208
QString m_iconUrl
Definition deviceinfo.h:162
bool appNameNull() const
Definition deviceinfo.cpp:175
QString m_appVersion
Definition deviceinfo.h:158
void setIconUrlNull()
Definition deviceinfo.cpp:223
void setIconUrl(QString newIconUrl)
Definition deviceinfo.cpp:216
QDateTime m_dateLastActivity
Definition deviceinfo.h:160
QString appVersion() const
Gets or sets the application version.
Definition deviceinfo.cpp:183
void setLastUserId(QString newLastUserId)
Gets or sets the last user identifier.
Definition deviceinfo.cpp:198
QString m_jellyfinId
Definition deviceinfo.h:155
void setLastUserNameNull()
Definition deviceinfo.cpp:166
QString lastUserName() const
Gets or sets the last name of the user.
Definition deviceinfo.cpp:157
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