Jellyfin Qt
QML Library for interacting with the Jellyfin multimedia server
Loading...
Searching...
No Matches
version.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_VERSION_H
31#define JELLYFIN_DTO_VERSION_H
32
33#include <QJsonObject>
34#include <QJsonValue>
35#include <optional>
36
38
39namespace Jellyfin {
40// Forward declaration
41class ApiClient;
42}
43namespace Jellyfin {
44namespace DTO {
45
46
47class Version {
48public:
49 Version(
50 qint32 major,
51 qint32 minor,
52 qint32 build,
53 qint32 revision,
54 qint32 majorRevision,
55 qint32 minorRevision
56 );
57
58 Version(const Version &other);
59
63 void replaceData(Version &other);
64
65 static Version fromJson(QJsonObject source);
66 void setFromJson(QJsonObject source);
67 QJsonObject toJson() const;
68
69 // Properties
70
71 qint32 major() const;
72
73 void setMajor(qint32 newMajor);
74
75
76 qint32 minor() const;
77
78 void setMinor(qint32 newMinor);
79
80
81 qint32 build() const;
82
83 void setBuild(qint32 newBuild);
84
85
86 qint32 revision() const;
87
88 void setRevision(qint32 newRevision);
89
90
91 qint32 majorRevision() const;
92
93 void setMajorRevision(qint32 newMajorRevision);
94
95
96 qint32 minorRevision() const;
97
98 void setMinorRevision(qint32 newMinorRevision);
99
100
101protected:
102 qint32 m_major;
103 qint32 m_minor;
104 qint32 m_build;
108
109private:
110 // Private constructor which generates an invalid object, for use withing Version::fromJson();
111 Version();
112};
113
114
115} // NS DTO
116
117namespace Support {
118
120
121template <>
122Version fromJsonValue(const QJsonValue &source, convertType<Version>);
123
124template<>
125QJsonValue toJsonValue(const Version &source, convertType<Version>);
126
127} // NS DTO
128} // NS Jellyfin
129
130#endif // JELLYFIN_DTO_VERSION_H
Definition version.h:47
qint32 m_minorRevision
Definition version.h:107
qint32 m_build
Definition version.h:104
void setMinorRevision(qint32 newMinorRevision)
Definition version.cpp:133
void setRevision(qint32 newRevision)
Definition version.cpp:121
qint32 m_major
Definition version.h:102
void setMajorRevision(qint32 newMajorRevision)
Definition version.cpp:127
qint32 m_majorRevision
Definition version.h:106
void replaceData(Version &other)
Definition version.cpp:63
void setFromJson(QJsonObject source)
Definition version.cpp:79
static Version fromJson(QJsonObject source)
Definition version.cpp:72
qint32 revision() const
Definition version.cpp:119
void setBuild(qint32 newBuild)
Definition version.cpp:115
qint32 m_minor
Definition version.h:103
void setMinor(qint32 newMinor)
Definition version.cpp:109
qint32 major() const
Definition version.cpp:101
qint32 minorRevision() const
Definition version.cpp:131
qint32 majorRevision() const
Definition version.cpp:125
qint32 build() const
Definition version.cpp:113
void setMajor(qint32 newMajor)
Definition version.cpp:103
qint32 m_revision
Definition version.h:105
qint32 minor() const
Definition version.cpp:107
QJsonObject toJson() const
Definition version.cpp:89
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