Jellyfin Qt
QML Library for interacting with the Jellyfin multimedia server
Loading...
Searching...
No Matches
quickconnectresult.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_QUICKCONNECTRESULT_H
31#define JELLYFIN_DTO_QUICKCONNECTRESULT_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 bool authenticated,
53 QString secret,
54 QString code,
55 QString deviceId,
56 QString deviceName,
57 QString appName,
58 QString appVersion,
59 QDateTime dateAdded
60 );
61
63
68
69 static QuickConnectResult fromJson(QJsonObject source);
70 void setFromJson(QJsonObject source);
71 QJsonObject toJson() const;
72
73 // Properties
77 bool authenticated() const;
81 void setAuthenticated(bool newAuthenticated);
82
86 QString secret() const;
90 void setSecret(QString newSecret);
91
95 QString code() const;
99 void setCode(QString newCode);
100
104 QString deviceId() const;
108 void setDeviceId(QString newDeviceId);
109
113 QString deviceName() const;
117 void setDeviceName(QString newDeviceName);
118
122 QString appName() const;
126 void setAppName(QString newAppName);
127
131 QString appVersion() const;
135 void setAppVersion(QString newAppVersion);
136
140 QDateTime dateAdded() const;
144 void setDateAdded(QDateTime newDateAdded);
145
146
147protected:
149 QString m_secret;
150 QString m_code;
151 QString m_deviceId;
153 QString m_appName;
155 QDateTime m_dateAdded;
156
157private:
158 // Private constructor which generates an invalid object, for use withing QuickConnectResult::fromJson();
160};
161
162
163} // NS DTO
164
165namespace Support {
166
168
169template <>
171
172template<>
174
175} // NS DTO
176} // NS Jellyfin
177
178#endif // JELLYFIN_DTO_QUICKCONNECTRESULT_H
An Api client for Jellyfin. Handles requests and authentication.
Definition apiclient.h:90
Definition quickconnectresult.h:49
static QuickConnectResult fromJson(QJsonObject source)
Definition quickconnectresult.cpp:80
void setAppName(QString newAppName)
Gets the requesting app name.
Definition quickconnectresult.cpp:145
QDateTime m_dateAdded
Definition quickconnectresult.h:155
QString appName() const
Gets the requesting app name.
Definition quickconnectresult.cpp:143
QJsonObject toJson() const
Definition quickconnectresult.cpp:99
QuickConnectResult(bool authenticated, QString secret, QString code, QString deviceId, QString deviceName, QString appName, QString appVersion, QDateTime dateAdded)
Definition quickconnectresult.cpp:36
QString m_appVersion
Definition quickconnectresult.h:154
void setDeviceId(QString newDeviceId)
Gets the requesting device id.
Definition quickconnectresult.cpp:133
QString m_code
Definition quickconnectresult.h:150
bool m_authenticated
Definition quickconnectresult.h:148
void setDateAdded(QDateTime newDateAdded)
Gets or sets the DateTime that this request was created.
Definition quickconnectresult.cpp:157
void setCode(QString newCode)
Gets the user facing code used so the user can quickly differentiate this request from others.
Definition quickconnectresult.cpp:127
void setAuthenticated(bool newAuthenticated)
Gets or sets a value indicating whether this request is authorized.
Definition quickconnectresult.cpp:115
QString secret() const
Gets the secret value used to uniquely identify this request. Can be used to retrieve authentication ...
Definition quickconnectresult.cpp:119
void setFromJson(QJsonObject source)
Definition quickconnectresult.cpp:87
QString code() const
Gets the user facing code used so the user can quickly differentiate this request from others.
Definition quickconnectresult.cpp:125
QString m_deviceName
Definition quickconnectresult.h:152
QString m_deviceId
Definition quickconnectresult.h:151
QString m_secret
Definition quickconnectresult.h:149
QString deviceId() const
Gets the requesting device id.
Definition quickconnectresult.cpp:131
void setSecret(QString newSecret)
Gets the secret value used to uniquely identify this request. Can be used to retrieve authentication ...
Definition quickconnectresult.cpp:121
QString appVersion() const
Gets the requesting app version.
Definition quickconnectresult.cpp:149
void replaceData(QuickConnectResult &other)
Definition quickconnectresult.cpp:69
QString m_appName
Definition quickconnectresult.h:153
QString deviceName() const
Gets the requesting device name.
Definition quickconnectresult.cpp:137
void setAppVersion(QString newAppVersion)
Gets the requesting app version.
Definition quickconnectresult.cpp:151
void setDeviceName(QString newDeviceName)
Gets the requesting device name.
Definition quickconnectresult.cpp:139
bool authenticated() const
Gets or sets a value indicating whether this request is authorized.
Definition quickconnectresult.cpp:113
QDateTime dateAdded() const
Gets or sets the DateTime that this request was created.
Definition quickconnectresult.cpp:155
Contains auto-generated Data Transfer Objects for the Jellyfin HTTP API.
Definition accessschedule.h:128
AccessSchedule fromJsonValue(const QJsonValue &source, convertType< AccessSchedule >)
Definition accessschedule.cpp:133
Jellyfin::DTO::QuickConnectResult QuickConnectResult
Definition quickconnectresult.h:167
QJsonValue toJsonValue(const AccessSchedule &source, convertType< AccessSchedule >)
Definition accessschedule.cpp:139
Definition jsonconvimpl.h:45