Jellyfin Qt
QML Library for interacting with the Jellyfin multimedia server
Loading...
Searching...
No Matches
authenticationresult.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_AUTHENTICATIONRESULT_H
31#define JELLYFIN_DTO_AUTHENTICATIONRESULT_H
32
33#include <QJsonObject>
34#include <QJsonValue>
35#include <QSharedPointer>
36#include <QString>
37#include <optional>
38
42
43namespace Jellyfin {
44// Forward declaration
45class ApiClient;
46}
47namespace Jellyfin {
48namespace DTO {
49
50
52public:
54 QSharedPointer<UserDto> user,
55 QSharedPointer<SessionInfo> sessionInfo
56 );
57
59
64
65 static AuthenticationResult fromJson(QJsonObject source);
66 void setFromJson(QJsonObject source);
67 QJsonObject toJson() const;
68
69 // Properties
70
71 QSharedPointer<UserDto> user() const;
72
73 void setUser(QSharedPointer<UserDto> newUser);
74
75
76 QSharedPointer<SessionInfo> sessionInfo() const;
77
78 void setSessionInfo(QSharedPointer<SessionInfo> newSessionInfo);
79
80
81 QString accessToken() const;
82
83 void setAccessToken(QString newAccessToken);
84 bool accessTokenNull() const;
85 void setAccessTokenNull();
86
87
88 QString serverId() const;
89
90 void setServerId(QString newServerId);
91 bool serverIdNull() const;
92 void setServerIdNull();
93
94
95protected:
96 QSharedPointer<UserDto> m_user = QSharedPointer<UserDto>();
97 QSharedPointer<SessionInfo> m_sessionInfo = QSharedPointer<SessionInfo>();
99 QString m_serverId;
100
101private:
102 // Private constructor which generates an invalid object, for use withing AuthenticationResult::fromJson();
104};
105
106
107} // NS DTO
108
109namespace Support {
110
112
113template <>
115
116template<>
118
119} // NS DTO
120} // NS Jellyfin
121
122#endif // JELLYFIN_DTO_AUTHENTICATIONRESULT_H
Definition authenticationresult.h:51
void setSessionInfo(QSharedPointer< SessionInfo > newSessionInfo)
Definition authenticationresult.cpp:101
void setAccessTokenNull()
Definition authenticationresult.cpp:114
QSharedPointer< SessionInfo > m_sessionInfo
Definition authenticationresult.h:97
void setUser(QSharedPointer< UserDto > newUser)
Definition authenticationresult.cpp:95
bool accessTokenNull() const
Definition authenticationresult.cpp:110
QSharedPointer< SessionInfo > sessionInfo() const
Definition authenticationresult.cpp:99
static AuthenticationResult fromJson(QJsonObject source)
Definition authenticationresult.cpp:60
void setAccessToken(QString newAccessToken)
Definition authenticationresult.cpp:107
QSharedPointer< UserDto > user() const
Definition authenticationresult.cpp:93
QString m_serverId
Definition authenticationresult.h:99
void setFromJson(QJsonObject source)
Definition authenticationresult.cpp:67
QString m_accessToken
Definition authenticationresult.h:98
void setServerId(QString newServerId)
Definition authenticationresult.cpp:120
void replaceData(AuthenticationResult &other)
Definition authenticationresult.cpp:53
QJsonObject toJson() const
Definition authenticationresult.cpp:75
QString serverId() const
Definition authenticationresult.cpp:118
QSharedPointer< UserDto > m_user
Definition authenticationresult.h:96
QString accessToken() const
Definition authenticationresult.cpp:105
bool serverIdNull() const
Definition authenticationresult.cpp:123
void setServerIdNull()
Definition authenticationresult.cpp:127
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