Jellyfin Qt
QML Library for interacting with the Jellyfin multimedia server
Loading...
Searching...
No Matches
mediasegmentdto.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_MEDIASEGMENTDTO_H
31#define JELLYFIN_DTO_MEDIASEGMENTDTO_H
32
33#include <QJsonObject>
34#include <QJsonValue>
35#include <QString>
36#include <optional>
37
40
41namespace Jellyfin {
42// Forward declaration
43class ApiClient;
44}
45namespace Jellyfin {
46namespace DTO {
47
48
50public:
52 QString jellyfinId,
53 QString itemId,
55 qint64 startTicks,
56 qint64 endTicks
57 );
58
59 MediaSegmentDto(const MediaSegmentDto &other);
60
64 void replaceData(MediaSegmentDto &other);
65
66 static MediaSegmentDto fromJson(QJsonObject source);
67 void setFromJson(QJsonObject source);
68 QJsonObject toJson() const;
69
70 // Properties
74 QString jellyfinId() const;
78 void setJellyfinId(QString newJellyfinId);
79
83 QString itemId() const;
87 void setItemId(QString newItemId);
88
89
90 MediaSegmentType type() const;
91
92 void setType(MediaSegmentType newType);
93
97 qint64 startTicks() const;
101 void setStartTicks(qint64 newStartTicks);
102
106 qint64 endTicks() const;
110 void setEndTicks(qint64 newEndTicks);
111
112
113protected:
115 QString m_itemId;
119
120private:
121 // Private constructor which generates an invalid object, for use withing MediaSegmentDto::fromJson();
123};
124
125
126} // NS DTO
127
128namespace Support {
129
131
132template <>
134
135template<>
137
138} // NS DTO
139} // NS Jellyfin
140
141#endif // JELLYFIN_DTO_MEDIASEGMENTDTO_H
An Api client for Jellyfin. Handles requests and authentication.
Definition apiclient.h:90
Definition mediasegmentdto.h:49
void setEndTicks(qint64 newEndTicks)
Gets or sets the end of the segment.
Definition mediasegmentdto.cpp:121
qint64 m_startTicks
Definition mediasegmentdto.h:117
QString itemId() const
Gets or sets the id of the associated item.
Definition mediasegmentdto.cpp:101
void setJellyfinId(QString newJellyfinId)
Gets or sets the id of the media segment.
Definition mediasegmentdto.cpp:97
void setFromJson(QJsonObject source)
Definition mediasegmentdto.cpp:75
qint64 startTicks() const
Gets or sets the start of the segment.
Definition mediasegmentdto.cpp:113
QString m_itemId
Definition mediasegmentdto.h:115
void replaceData(MediaSegmentDto &other)
Definition mediasegmentdto.cpp:60
QJsonObject toJson() const
Definition mediasegmentdto.cpp:84
void setItemId(QString newItemId)
Gets or sets the id of the associated item.
Definition mediasegmentdto.cpp:103
qint64 endTicks() const
Gets or sets the end of the segment.
Definition mediasegmentdto.cpp:119
static MediaSegmentDto fromJson(QJsonObject source)
Definition mediasegmentdto.cpp:68
MediaSegmentDto(QString jellyfinId, QString itemId, MediaSegmentType type, qint64 startTicks, qint64 endTicks)
Definition mediasegmentdto.cpp:36
MediaSegmentType type() const
Definition mediasegmentdto.cpp:107
void setStartTicks(qint64 newStartTicks)
Gets or sets the start of the segment.
Definition mediasegmentdto.cpp:115
qint64 m_endTicks
Definition mediasegmentdto.h:118
void setType(MediaSegmentType newType)
Definition mediasegmentdto.cpp:109
QString m_jellyfinId
Definition mediasegmentdto.h:114
MediaSegmentType m_type
Definition mediasegmentdto.h:116
QString jellyfinId() const
Gets or sets the id of the media segment.
Definition mediasegmentdto.cpp:95
Contains auto-generated Data Transfer Objects for the Jellyfin HTTP API.
MediaSegmentTypeClass::Value MediaSegmentType
Definition mediasegmenttype.h:63
Definition accessschedule.h:128
Jellyfin::DTO::MediaSegmentDto MediaSegmentDto
Definition mediasegmentdto.h:130
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