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<SessionInfoDto> 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<SessionInfoDto> sessionInfo() const;
77
78 void setSessionInfo(QSharedPointer<SessionInfoDto> newSessionInfo);
79
83 QString accessToken() const;
87 void setAccessToken(QString newAccessToken);
88 bool accessTokenNull() const;
89 void setAccessTokenNull();
90
94 QString serverId() const;
98 void setServerId(QString newServerId);
99 bool serverIdNull() const;
100 void setServerIdNull();
101
102
103protected:
104 QSharedPointer<UserDto> m_user = QSharedPointer<UserDto>();
105 QSharedPointer<SessionInfoDto> m_sessionInfo = QSharedPointer<SessionInfoDto>();
107 QString m_serverId;
108
109private:
110 // Private constructor which generates an invalid object, for use withing AuthenticationResult::fromJson();
112};
113
114
115} // NS DTO
116
117namespace Support {
118
120
121template <>
123
124template<>
126
127} // NS DTO
128} // NS Jellyfin
129
130#endif // JELLYFIN_DTO_AUTHENTICATIONRESULT_H
An Api client for Jellyfin. Handles requests and authentication.
Definition apiclient.h:90
Definition authenticationresult.h:51
void setAccessTokenNull()
Definition authenticationresult.cpp:114
void setUser(QSharedPointer< UserDto > newUser)
Definition authenticationresult.cpp:95
bool accessTokenNull() const
Definition authenticationresult.cpp:110
void setSessionInfo(QSharedPointer< SessionInfoDto > newSessionInfo)
Definition authenticationresult.cpp:101
static AuthenticationResult fromJson(QJsonObject source)
Definition authenticationresult.cpp:60
void setAccessToken(QString newAccessToken)
Gets or sets the access token.
Definition authenticationresult.cpp:107
QSharedPointer< UserDto > user() const
Definition authenticationresult.cpp:93
QString m_serverId
Definition authenticationresult.h:107
void setFromJson(QJsonObject source)
Definition authenticationresult.cpp:67
QSharedPointer< SessionInfoDto > m_sessionInfo
Definition authenticationresult.h:105
QString m_accessToken
Definition authenticationresult.h:106
void setServerId(QString newServerId)
Gets or sets the server id.
Definition authenticationresult.cpp:120
void replaceData(AuthenticationResult &other)
Definition authenticationresult.cpp:53
QJsonObject toJson() const
Definition authenticationresult.cpp:75
QString serverId() const
Gets or sets the server id.
Definition authenticationresult.cpp:118
QSharedPointer< UserDto > m_user
Definition authenticationresult.h:104
QString accessToken() const
Gets or sets the access token.
Definition authenticationresult.cpp:105
bool serverIdNull() const
Definition authenticationresult.cpp:123
QSharedPointer< SessionInfoDto > sessionInfo() const
Definition authenticationresult.cpp:99
AuthenticationResult(QSharedPointer< UserDto > user, QSharedPointer< SessionInfoDto > sessionInfo)
Definition authenticationresult.cpp:36
void setServerIdNull()
Definition authenticationresult.cpp:127
Contains auto-generated Data Transfer Objects for the Jellyfin HTTP API.
Definition accessschedule.h:128
Jellyfin::DTO::AuthenticationResult AuthenticationResult
Definition authenticationresult.h:119
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