Jellyfin Qt
QML Library for interacting with the Jellyfin multimedia server
Loading...
Searching...
No Matches
readyrequestdto.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_READYREQUESTDTO_H
31#define JELLYFIN_DTO_READYREQUESTDTO_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
50public:
52 QDateTime when,
53 qint64 positionTicks,
54 bool isPlaying,
55 QString playlistItemId
56 );
57
58 ReadyRequestDto(const ReadyRequestDto &other);
59
63 void replaceData(ReadyRequestDto &other);
64
65 static ReadyRequestDto fromJson(QJsonObject source);
66 void setFromJson(QJsonObject source);
67 QJsonObject toJson() const;
68
69 // Properties
73 QDateTime when() const;
77 void setWhen(QDateTime newWhen);
78
82 qint64 positionTicks() const;
86 void setPositionTicks(qint64 newPositionTicks);
87
91 bool isPlaying() const;
95 void setIsPlaying(bool newIsPlaying);
96
100 QString playlistItemId() const;
104 void setPlaylistItemId(QString newPlaylistItemId);
105
106
107protected:
108 QDateTime m_when;
112
113private:
114 // Private constructor which generates an invalid object, for use withing ReadyRequestDto::fromJson();
116};
117
118
119} // NS DTO
120
121namespace Support {
122
124
125template <>
127
128template<>
130
131} // NS DTO
132} // NS Jellyfin
133
134#endif // JELLYFIN_DTO_READYREQUESTDTO_H
Definition readyrequestdto.h:49
void setPositionTicks(qint64 newPositionTicks)
Gets or sets the position ticks.
Definition readyrequestdto.cpp:97
QDateTime m_when
Definition readyrequestdto.h:108
qint64 positionTicks() const
Gets or sets the position ticks.
Definition readyrequestdto.cpp:95
qint64 m_positionTicks
Definition readyrequestdto.h:109
void setFromJson(QJsonObject source)
Definition readyrequestdto.cpp:71
QDateTime when() const
Gets or sets when the request has been made by the client.
Definition readyrequestdto.cpp:89
QJsonObject toJson() const
Definition readyrequestdto.cpp:79
QString playlistItemId() const
Gets or sets the playlist item identifier of the playing item.
Definition readyrequestdto.cpp:107
void replaceData(ReadyRequestDto &other)
Definition readyrequestdto.cpp:57
QString m_playlistItemId
Definition readyrequestdto.h:111
void setIsPlaying(bool newIsPlaying)
Gets or sets a value indicating whether the client playback is unpaused.
Definition readyrequestdto.cpp:103
bool isPlaying() const
Gets or sets a value indicating whether the client playback is unpaused.
Definition readyrequestdto.cpp:101
void setWhen(QDateTime newWhen)
Gets or sets when the request has been made by the client.
Definition readyrequestdto.cpp:91
void setPlaylistItemId(QString newPlaylistItemId)
Gets or sets the playlist item identifier of the playing item.
Definition readyrequestdto.cpp:109
static ReadyRequestDto fromJson(QJsonObject source)
Definition readyrequestdto.cpp:64
bool m_isPlaying
Definition readyrequestdto.h:110
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