Jellyfin Qt
QML Library for interacting with the Jellyfin multimedia server
Loading...
Searching...
No Matches
sessioninfo.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_SESSIONINFO_H
31#define JELLYFIN_DTO_SESSIONINFO_H
32
33#include <QDateTime>
34#include <QJsonObject>
35#include <QJsonValue>
36#include <QList>
37#include <QSharedPointer>
38#include <QString>
39#include <QStringList>
40#include <optional>
41
51
52namespace Jellyfin {
53// Forward declaration
54class ApiClient;
55}
56namespace Jellyfin {
57namespace DTO {
58
59
61public:
63 QSharedPointer<PlayerStateInfo> playState,
64 QSharedPointer<ClientCapabilities> capabilities,
65 QString userId,
66 QDateTime lastActivityDate,
67 QDateTime lastPlaybackCheckIn,
68 QSharedPointer<BaseItemDto> nowPlayingItem,
69 QSharedPointer<BaseItem> fullNowPlayingItem,
70 QSharedPointer<BaseItemDto> nowViewingItem,
71 QSharedPointer<TranscodingInfo> transcodingInfo,
72 bool isActive,
76 );
77
78 SessionInfo(const SessionInfo &other);
79
83 void replaceData(SessionInfo &other);
84
85 static SessionInfo fromJson(QJsonObject source);
86 void setFromJson(QJsonObject source);
87 QJsonObject toJson() const;
88
89 // Properties
90
91 QSharedPointer<PlayerStateInfo> playState() const;
92
93 void setPlayState(QSharedPointer<PlayerStateInfo> newPlayState);
94
95
97
98 void setAdditionalUsers(QList<SessionUserInfo> newAdditionalUsers);
99 bool additionalUsersNull() const;
101
102
103 QSharedPointer<ClientCapabilities> capabilities() const;
104
105 void setCapabilities(QSharedPointer<ClientCapabilities> newCapabilities);
106
110 QString remoteEndPoint() const;
114 void setRemoteEndPoint(QString newRemoteEndPoint);
115 bool remoteEndPointNull() const;
117
121 QStringList playableMediaTypes() const;
125 void setPlayableMediaTypes(QStringList newPlayableMediaTypes);
126 bool playableMediaTypesNull() const;
128
132 QString jellyfinId() const;
136 void setJellyfinId(QString newJellyfinId);
137 bool jellyfinIdNull() const;
138 void setJellyfinIdNull();
139
143 QString userId() const;
147 void setUserId(QString newUserId);
148
152 QString userName() const;
156 void setUserName(QString newUserName);
157 bool userNameNull() const;
158 void setUserNameNull();
159
163 QString client() const;
167 void setClient(QString newClient);
168 bool clientNull() const;
169 void setClientNull();
170
174 QDateTime lastActivityDate() const;
178 void setLastActivityDate(QDateTime newLastActivityDate);
179
183 QDateTime lastPlaybackCheckIn() const;
187 void setLastPlaybackCheckIn(QDateTime newLastPlaybackCheckIn);
188
192 QString deviceName() const;
196 void setDeviceName(QString newDeviceName);
197 bool deviceNameNull() const;
198 void setDeviceNameNull();
199
203 QString deviceType() const;
207 void setDeviceType(QString newDeviceType);
208 bool deviceTypeNull() const;
209 void setDeviceTypeNull();
210
211
212 QSharedPointer<BaseItemDto> nowPlayingItem() const;
213
214 void setNowPlayingItem(QSharedPointer<BaseItemDto> newNowPlayingItem);
215
216
217 QSharedPointer<BaseItem> fullNowPlayingItem() const;
218
219 void setFullNowPlayingItem(QSharedPointer<BaseItem> newFullNowPlayingItem);
220
221
222 QSharedPointer<BaseItemDto> nowViewingItem() const;
223
224 void setNowViewingItem(QSharedPointer<BaseItemDto> newNowViewingItem);
225
229 QString deviceId() const;
233 void setDeviceId(QString newDeviceId);
234 bool deviceIdNull() const;
235 void setDeviceIdNull();
236
240 QString applicationVersion() const;
244 void setApplicationVersion(QString newApplicationVersion);
245 bool applicationVersionNull() const;
247
248
249 QSharedPointer<TranscodingInfo> transcodingInfo() const;
250
251 void setTranscodingInfo(QSharedPointer<TranscodingInfo> newTranscodingInfo);
252
256 bool isActive() const;
260 void setIsActive(bool newIsActive);
261
262
263 bool supportsMediaControl() const;
264
265 void setSupportsMediaControl(bool newSupportsMediaControl);
266
267
268 bool supportsRemoteControl() const;
269
270 void setSupportsRemoteControl(bool newSupportsRemoteControl);
271
272
274
275 void setNowPlayingQueue(QList<QueueItem> newNowPlayingQueue);
276 bool nowPlayingQueueNull() const;
278
279
280 bool hasCustomDeviceName() const;
281
282 void setHasCustomDeviceName(bool newHasCustomDeviceName);
283
284
285 QString playlistItemId() const;
286
287 void setPlaylistItemId(QString newPlaylistItemId);
288 bool playlistItemIdNull() const;
290
291
292 QString serverId() const;
293
294 void setServerId(QString newServerId);
295 bool serverIdNull() const;
296 void setServerIdNull();
297
298
299 QString userPrimaryImageTag() const;
300
301 void setUserPrimaryImageTag(QString newUserPrimaryImageTag);
302 bool userPrimaryImageTagNull() const;
304
312 void setSupportedCommands(QList<GeneralCommandType> newSupportedCommands);
313 bool supportedCommandsNull() const;
315
316
317protected:
318 QSharedPointer<PlayerStateInfo> m_playState = QSharedPointer<PlayerStateInfo>();
320 QSharedPointer<ClientCapabilities> m_capabilities = QSharedPointer<ClientCapabilities>();
324 QString m_userId;
325 QString m_userName;
326 QString m_client;
331 QSharedPointer<BaseItemDto> m_nowPlayingItem = QSharedPointer<BaseItemDto>();
332 QSharedPointer<BaseItem> m_fullNowPlayingItem = QSharedPointer<BaseItem>();
333 QSharedPointer<BaseItemDto> m_nowViewingItem = QSharedPointer<BaseItemDto>();
334 QString m_deviceId;
336 QSharedPointer<TranscodingInfo> m_transcodingInfo = QSharedPointer<TranscodingInfo>();
343 QString m_serverId;
346
347private:
348 // Private constructor which generates an invalid object, for use withing SessionInfo::fromJson();
349 SessionInfo();
350};
351
352
353} // NS DTO
354
355namespace Support {
356
358
359template <>
360SessionInfo fromJsonValue(const QJsonValue &source, convertType<SessionInfo>);
361
362template<>
363QJsonValue toJsonValue(const SessionInfo &source, convertType<SessionInfo>);
364
365} // NS DTO
366} // NS Jellyfin
367
368#endif // JELLYFIN_DTO_SESSIONINFO_H
Definition sessioninfo.h:60
QStringList m_playableMediaTypes
Definition sessioninfo.h:322
bool remoteEndPointNull() const
Definition sessioninfo.cpp:293
void setJellyfinIdNull()
Definition sessioninfo.cpp:323
void setRemoteEndPointNull()
Definition sessioninfo.cpp:297
QString m_remoteEndPoint
Definition sessioninfo.h:321
QString applicationVersion() const
Gets or sets the application version.
Definition sessioninfo.cpp:428
bool supportsRemoteControl() const
Definition sessioninfo.cpp:459
QSharedPointer< PlayerStateInfo > m_playState
Definition sessioninfo.h:318
void setSupportedCommands(QList< GeneralCommandType > newSupportedCommands)
Gets or sets the supported commands.
Definition sessioninfo.cpp:525
void replaceData(SessionInfo &other)
Definition sessioninfo.cpp:99
QString m_deviceType
Definition sessioninfo.h:330
void setNowPlayingQueue(QList< QueueItem > newNowPlayingQueue)
Definition sessioninfo.cpp:467
void setSupportsRemoteControl(bool newSupportsRemoteControl)
Definition sessioninfo.cpp:461
QJsonObject toJson() const
Definition sessioninfo.cpp:169
void setUserId(QString newUserId)
Gets or sets the user id.
Definition sessioninfo.cpp:329
void setClientNull()
Definition sessioninfo.cpp:355
QString client() const
Gets or sets the type of the client.
Definition sessioninfo.cpp:346
QDateTime m_lastActivityDate
Definition sessioninfo.h:327
void setDeviceName(QString newDeviceName)
Gets or sets the name of the device.
Definition sessioninfo.cpp:373
void setClient(QString newClient)
Gets or sets the type of the client.
Definition sessioninfo.cpp:348
QList< SessionUserInfo > m_additionalUsers
Definition sessioninfo.h:319
QString m_jellyfinId
Definition sessioninfo.h:323
void setUserNameNull()
Definition sessioninfo.cpp:342
void setPlaylistItemId(QString newPlaylistItemId)
Definition sessioninfo.cpp:486
void setLastPlaybackCheckIn(QDateTime newLastPlaybackCheckIn)
Gets or sets the last playback check in.
Definition sessioninfo.cpp:367
void setLastActivityDate(QDateTime newLastActivityDate)
Gets or sets the last activity date.
Definition sessioninfo.cpp:361
bool supportsMediaControl() const
Definition sessioninfo.cpp:453
QString remoteEndPoint() const
Gets or sets the remote end point.
Definition sessioninfo.cpp:288
QString m_deviceName
Definition sessioninfo.h:329
void setPlayableMediaTypes(QStringList newPlayableMediaTypes)
Gets or sets the playable media types.
Definition sessioninfo.cpp:303
bool supportedCommandsNull() const
Definition sessioninfo.cpp:528
static SessionInfo fromJson(QJsonObject source)
Definition sessioninfo.cpp:130
bool serverIdNull() const
Definition sessioninfo.cpp:502
QString serverId() const
Definition sessioninfo.cpp:497
void setDeviceNameNull()
Definition sessioninfo.cpp:380
void setNowPlayingItem(QSharedPointer< BaseItemDto > newNowPlayingItem)
Definition sessioninfo.cpp:399
QString userName() const
Gets or sets the username.
Definition sessioninfo.cpp:333
QDateTime lastPlaybackCheckIn() const
Gets or sets the last playback check in.
Definition sessioninfo.cpp:365
void setIsActive(bool newIsActive)
Gets a value indicating whether this instance is active.
Definition sessioninfo.cpp:449
void setFromJson(QJsonObject source)
Definition sessioninfo.cpp:137
void setSupportsMediaControl(bool newSupportsMediaControl)
Definition sessioninfo.cpp:455
void setNowPlayingQueueNull()
Definition sessioninfo.cpp:474
bool m_isActive
Definition sessioninfo.h:337
QSharedPointer< BaseItemDto > m_nowViewingItem
Definition sessioninfo.h:333
bool userPrimaryImageTagNull() const
Definition sessioninfo.cpp:515
void setCapabilities(QSharedPointer< ClientCapabilities > newCapabilities)
Definition sessioninfo.cpp:284
void setDeviceIdNull()
Definition sessioninfo.cpp:424
void setUserPrimaryImageTagNull()
Definition sessioninfo.cpp:519
void setRemoteEndPoint(QString newRemoteEndPoint)
Gets or sets the remote end point.
Definition sessioninfo.cpp:290
QString userPrimaryImageTag() const
Definition sessioninfo.cpp:510
bool m_hasCustomDeviceName
Definition sessioninfo.h:341
QString m_client
Definition sessioninfo.h:326
QString userId() const
Gets or sets the user id.
Definition sessioninfo.cpp:327
QString m_deviceId
Definition sessioninfo.h:334
bool m_supportsMediaControl
Definition sessioninfo.h:338
bool hasCustomDeviceName() const
Definition sessioninfo.cpp:478
void setNowViewingItem(QSharedPointer< BaseItemDto > newNowViewingItem)
Definition sessioninfo.cpp:411
bool deviceTypeNull() const
Definition sessioninfo.cpp:389
void setDeviceId(QString newDeviceId)
Gets or sets the device id.
Definition sessioninfo.cpp:417
void setPlayableMediaTypesNull()
Definition sessioninfo.cpp:310
void setFullNowPlayingItem(QSharedPointer< BaseItem > newFullNowPlayingItem)
Definition sessioninfo.cpp:405
bool playableMediaTypesNull() const
Definition sessioninfo.cpp:306
void setDeviceType(QString newDeviceType)
Gets or sets the type of the device.
Definition sessioninfo.cpp:386
void setJellyfinId(QString newJellyfinId)
Gets or sets the id.
Definition sessioninfo.cpp:316
QString deviceId() const
Gets or sets the device id.
Definition sessioninfo.cpp:415
bool playlistItemIdNull() const
Definition sessioninfo.cpp:489
void setAdditionalUsersNull()
Definition sessioninfo.cpp:278
void setServerIdNull()
Definition sessioninfo.cpp:506
QSharedPointer< BaseItem > m_fullNowPlayingItem
Definition sessioninfo.h:332
QSharedPointer< ClientCapabilities > m_capabilities
Definition sessioninfo.h:320
void setTranscodingInfo(QSharedPointer< TranscodingInfo > newTranscodingInfo)
Definition sessioninfo.cpp:443
QString deviceName() const
Gets or sets the name of the device.
Definition sessioninfo.cpp:371
QString m_playlistItemId
Definition sessioninfo.h:342
void setHasCustomDeviceName(bool newHasCustomDeviceName)
Definition sessioninfo.cpp:480
QString playlistItemId() const
Definition sessioninfo.cpp:484
void setUserPrimaryImageTag(QString newUserPrimaryImageTag)
Definition sessioninfo.cpp:512
QList< QueueItem > m_nowPlayingQueue
Definition sessioninfo.h:340
bool deviceIdNull() const
Definition sessioninfo.cpp:420
QSharedPointer< BaseItem > fullNowPlayingItem() const
Definition sessioninfo.cpp:403
bool isActive() const
Gets a value indicating whether this instance is active.
Definition sessioninfo.cpp:447
bool additionalUsersNull() const
Definition sessioninfo.cpp:274
void setApplicationVersion(QString newApplicationVersion)
Gets or sets the application version.
Definition sessioninfo.cpp:430
QSharedPointer< BaseItemDto > m_nowPlayingItem
Definition sessioninfo.h:331
void setDeviceTypeNull()
Definition sessioninfo.cpp:393
QList< GeneralCommandType > m_supportedCommands
Definition sessioninfo.h:345
void setAdditionalUsers(QList< SessionUserInfo > newAdditionalUsers)
Definition sessioninfo.cpp:271
QDateTime lastActivityDate() const
Gets or sets the last activity date.
Definition sessioninfo.cpp:359
QSharedPointer< TranscodingInfo > transcodingInfo() const
Definition sessioninfo.cpp:441
void setApplicationVersionNull()
Definition sessioninfo.cpp:437
void setPlayState(QSharedPointer< PlayerStateInfo > newPlayState)
Definition sessioninfo.cpp:265
bool nowPlayingQueueNull() const
Definition sessioninfo.cpp:470
QList< GeneralCommandType > supportedCommands() const
Gets or sets the supported commands.
Definition sessioninfo.cpp:523
QString deviceType() const
Gets or sets the type of the device.
Definition sessioninfo.cpp:384
QString m_applicationVersion
Definition sessioninfo.h:335
bool clientNull() const
Definition sessioninfo.cpp:351
void setPlaylistItemIdNull()
Definition sessioninfo.cpp:493
bool jellyfinIdNull() const
Definition sessioninfo.cpp:319
QSharedPointer< BaseItemDto > nowViewingItem() const
Definition sessioninfo.cpp:409
QSharedPointer< TranscodingInfo > m_transcodingInfo
Definition sessioninfo.h:336
QList< QueueItem > nowPlayingQueue() const
Definition sessioninfo.cpp:465
QSharedPointer< PlayerStateInfo > playState() const
Definition sessioninfo.cpp:263
QString m_userPrimaryImageTag
Definition sessioninfo.h:344
QList< SessionUserInfo > additionalUsers() const
Definition sessioninfo.cpp:269
QString m_userId
Definition sessioninfo.h:324
QString m_serverId
Definition sessioninfo.h:343
void setServerId(QString newServerId)
Definition sessioninfo.cpp:499
QString jellyfinId() const
Gets or sets the id.
Definition sessioninfo.cpp:314
QDateTime m_lastPlaybackCheckIn
Definition sessioninfo.h:328
bool deviceNameNull() const
Definition sessioninfo.cpp:376
QSharedPointer< ClientCapabilities > capabilities() const
Definition sessioninfo.cpp:282
bool m_supportsRemoteControl
Definition sessioninfo.h:339
void setUserName(QString newUserName)
Gets or sets the username.
Definition sessioninfo.cpp:335
void setSupportedCommandsNull()
Definition sessioninfo.cpp:532
QStringList playableMediaTypes() const
Gets or sets the playable media types.
Definition sessioninfo.cpp:301
QSharedPointer< BaseItemDto > nowPlayingItem() const
Definition sessioninfo.cpp:397
QString m_userName
Definition sessioninfo.h:325
bool userNameNull() const
Definition sessioninfo.cpp:338
bool applicationVersionNull() const
Definition sessioninfo.cpp:433
Definition mediaplayer2.h:20
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