Jellyfin Qt
QML Library for interacting with the Jellyfin multimedia server
Loading...
Searching...
No Matches
sendcommand.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_SENDCOMMAND_H
31#define JELLYFIN_DTO_SENDCOMMAND_H
32
33#include <QDateTime>
34#include <QJsonObject>
35#include <QJsonValue>
36#include <QString>
37#include <optional>
38
41
42namespace Jellyfin {
43// Forward declaration
44class ApiClient;
45}
46namespace Jellyfin {
47namespace DTO {
48
49
51public:
53 QString groupId,
54 QString playlistItemId,
55 QDateTime when,
57 QDateTime emittedAt
58 );
59
60 SendCommand(const SendCommand &other);
61
65 void replaceData(SendCommand &other);
66
67 static SendCommand fromJson(QJsonObject source);
68 void setFromJson(QJsonObject source);
69 QJsonObject toJson() const;
70
71 // Properties
75 QString groupId() const;
79 void setGroupId(QString newGroupId);
80
84 QString playlistItemId() const;
88 void setPlaylistItemId(QString newPlaylistItemId);
89
93 QDateTime when() const;
97 void setWhen(QDateTime newWhen);
98
102 std::optional<qint64> positionTicks() const;
106 void setPositionTicks(std::optional<qint64> newPositionTicks);
107 bool positionTicksNull() const;
109
110
111 SendCommandType command() const;
112
113 void setCommand(SendCommandType newCommand);
114
118 QDateTime emittedAt() const;
122 void setEmittedAt(QDateTime newEmittedAt);
123
124
125protected:
126 QString m_groupId;
128 QDateTime m_when;
129 std::optional<qint64> m_positionTicks = std::nullopt;
131 QDateTime m_emittedAt;
132
133private:
134 // Private constructor which generates an invalid object, for use withing SendCommand::fromJson();
135 SendCommand();
136};
137
138
139} // NS DTO
140
141namespace Support {
142
144
145template <>
146SendCommand fromJsonValue(const QJsonValue &source, convertType<SendCommand>);
147
148template<>
149QJsonValue toJsonValue(const SendCommand &source, convertType<SendCommand>);
150
151} // NS DTO
152} // NS Jellyfin
153
154#endif // JELLYFIN_DTO_SENDCOMMAND_H
Value
Definition sendcommandtype.h:49
Definition sendcommand.h:50
void setPositionTicks(std::optional< qint64 > newPositionTicks)
Gets the position ticks.
Definition sendcommand.cpp:123
void setEmittedAt(QDateTime newEmittedAt)
Gets the UTC time when this command has been emitted.
Definition sendcommand.cpp:142
void replaceData(SendCommand &other)
Definition sendcommand.cpp:61
QDateTime m_emittedAt
Definition sendcommand.h:131
QString m_groupId
Definition sendcommand.h:126
bool positionTicksNull() const
Definition sendcommand.cpp:126
void setGroupId(QString newGroupId)
Gets the group identifier.
Definition sendcommand.cpp:105
void setPlaylistItemId(QString newPlaylistItemId)
Gets the playlist identifier of the playing item.
Definition sendcommand.cpp:111
QDateTime when() const
Gets or sets the UTC time when to execute the command.
Definition sendcommand.cpp:115
std::optional< qint64 > m_positionTicks
Definition sendcommand.h:129
QJsonObject toJson() const
Definition sendcommand.cpp:87
SendCommandType command() const
Definition sendcommand.cpp:134
QString m_playlistItemId
Definition sendcommand.h:127
std::optional< qint64 > positionTicks() const
Gets the position ticks.
Definition sendcommand.cpp:121
void setCommand(SendCommandType newCommand)
Definition sendcommand.cpp:136
void setPositionTicksNull()
Definition sendcommand.cpp:130
QString groupId() const
Gets the group identifier.
Definition sendcommand.cpp:103
static SendCommand fromJson(QJsonObject source)
Definition sendcommand.cpp:70
QDateTime emittedAt() const
Gets the UTC time when this command has been emitted.
Definition sendcommand.cpp:140
QDateTime m_when
Definition sendcommand.h:128
QString playlistItemId() const
Gets the playlist identifier of the playing item.
Definition sendcommand.cpp:109
SendCommandType m_command
Definition sendcommand.h:130
void setFromJson(QJsonObject source)
Definition sendcommand.cpp:77
void setWhen(QDateTime newWhen)
Gets or sets the UTC time when to execute the command.
Definition sendcommand.cpp:117
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