Jellyfin Qt
QML Library for interacting with the Jellyfin multimedia server
Loading...
Searching...
No Matches
logfile.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_LOGFILE_H
31#define JELLYFIN_DTO_LOGFILE_H
32
33#include <QDateTime>
34#include <QJsonObject>
35#include <QJsonValue>
36#include <QString>
37#include <optional>
38
40
41namespace Jellyfin {
42// Forward declaration
43class ApiClient;
44}
45namespace Jellyfin {
46namespace DTO {
47
48
49class LogFile {
50public:
51 LogFile(
52 QDateTime dateCreated,
53 QDateTime dateModified,
54 qint64 size,
55 QString name
56 );
57
58 LogFile(const LogFile &other);
59
63 void replaceData(LogFile &other);
64
65 static LogFile fromJson(QJsonObject source);
66 void setFromJson(QJsonObject source);
67 QJsonObject toJson() const;
68
69 // Properties
73 QDateTime dateCreated() const;
77 void setDateCreated(QDateTime newDateCreated);
78
82 QDateTime dateModified() const;
86 void setDateModified(QDateTime newDateModified);
87
91 qint64 size() const;
95 void setSize(qint64 newSize);
96
100 QString name() const;
104 void setName(QString newName);
105
106
107protected:
108 QDateTime m_dateCreated;
109 QDateTime m_dateModified;
110 qint64 m_size;
111 QString m_name;
112
113private:
114 // Private constructor which generates an invalid object, for use withing LogFile::fromJson();
115 LogFile();
116};
117
118
119} // NS DTO
120
121namespace Support {
122
124
125template <>
126LogFile fromJsonValue(const QJsonValue &source, convertType<LogFile>);
127
128template<>
129QJsonValue toJsonValue(const LogFile &source, convertType<LogFile>);
130
131} // NS DTO
132} // NS Jellyfin
133
134#endif // JELLYFIN_DTO_LOGFILE_H
An Api client for Jellyfin. Handles requests and authentication.
Definition apiclient.h:90
Definition logfile.h:49
qint64 size() const
Gets or sets the size.
Definition logfile.cpp:101
void setDateCreated(QDateTime newDateCreated)
Gets or sets the date created.
Definition logfile.cpp:91
void setFromJson(QJsonObject source)
Definition logfile.cpp:71
QDateTime dateModified() const
Gets or sets the date modified.
Definition logfile.cpp:95
LogFile(QDateTime dateCreated, QDateTime dateModified, qint64 size, QString name)
Definition logfile.cpp:36
QString name() const
Gets or sets the name.
Definition logfile.cpp:107
QDateTime dateCreated() const
Gets or sets the date created.
Definition logfile.cpp:89
void setName(QString newName)
Gets or sets the name.
Definition logfile.cpp:109
void setSize(qint64 newSize)
Gets or sets the size.
Definition logfile.cpp:103
void setDateModified(QDateTime newDateModified)
Gets or sets the date modified.
Definition logfile.cpp:97
qint64 m_size
Definition logfile.h:110
QDateTime m_dateModified
Definition logfile.h:109
QDateTime m_dateCreated
Definition logfile.h:108
QString m_name
Definition logfile.h:111
static LogFile fromJson(QJsonObject source)
Definition logfile.cpp:64
QJsonObject toJson() const
Definition logfile.cpp:79
void replaceData(LogFile &other)
Definition logfile.cpp:57
Contains auto-generated Data Transfer Objects for the Jellyfin HTTP API.
Definition accessschedule.h:128
Jellyfin::DTO::LogFile LogFile
Definition logfile.h:123
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