mirror of
https://github.com/HenkKalkwater/harbour-sailfin.git
synced 2025-12-13 02:23:55 +00:00
WIP: logic rewrite
WIP: adding loaders
This commit is contained in:
parent
b9b08ab384
commit
2360b261f7
1769 changed files with 124903 additions and 1963 deletions
125
core/src/dto/accessschedule.cpp
Normal file
125
core/src/dto/accessschedule.cpp
Normal file
|
|
@ -0,0 +1,125 @@
|
|||
/*
|
||||
* Sailfin: a Jellyfin client written using Qt
|
||||
* Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
|
||||
* OVERWRITTEN AT SOME POINT!
|
||||
*
|
||||
* If there is a bug in this file, please fix the code generator used to generate this file found in
|
||||
* core/openapigenerator.d.
|
||||
*
|
||||
* This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
|
||||
* file with a newer file if needed instead of manually updating the files.
|
||||
*/
|
||||
|
||||
#include <JellyfinQt/dto/accessschedule.h>
|
||||
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
AccessSchedule::AccessSchedule() {}
|
||||
|
||||
AccessSchedule::AccessSchedule(const AccessSchedule &other) :
|
||||
|
||||
m_jellyfinId(other.m_jellyfinId),
|
||||
m_userId(other.m_userId),
|
||||
m_dayOfWeek(other.m_dayOfWeek),
|
||||
m_startHour(other.m_startHour),
|
||||
m_endHour(other.m_endHour){}
|
||||
|
||||
|
||||
void AccessSchedule::replaceData(AccessSchedule &other) {
|
||||
m_jellyfinId = other.m_jellyfinId;
|
||||
m_userId = other.m_userId;
|
||||
m_dayOfWeek = other.m_dayOfWeek;
|
||||
m_startHour = other.m_startHour;
|
||||
m_endHour = other.m_endHour;
|
||||
}
|
||||
|
||||
AccessSchedule AccessSchedule::fromJson(QJsonObject source) {
|
||||
AccessSchedule instance;
|
||||
instance.setFromJson(source);
|
||||
return instance;
|
||||
}
|
||||
|
||||
|
||||
void AccessSchedule::setFromJson(QJsonObject source) {
|
||||
m_jellyfinId = Jellyfin::Support::fromJsonValue<qint32>(source["Id"]);
|
||||
m_userId = Jellyfin::Support::fromJsonValue<QString>(source["UserId"]);
|
||||
m_dayOfWeek = Jellyfin::Support::fromJsonValue<DynamicDayOfWeek>(source["DayOfWeek"]);
|
||||
m_startHour = Jellyfin::Support::fromJsonValue<double>(source["StartHour"]);
|
||||
m_endHour = Jellyfin::Support::fromJsonValue<double>(source["EndHour"]);
|
||||
|
||||
}
|
||||
|
||||
QJsonObject AccessSchedule::toJson() {
|
||||
QJsonObject result;
|
||||
result["Id"] = Jellyfin::Support::toJsonValue<qint32>(m_jellyfinId);
|
||||
result["UserId"] = Jellyfin::Support::toJsonValue<QString>(m_userId);
|
||||
result["DayOfWeek"] = Jellyfin::Support::toJsonValue<DynamicDayOfWeek>(m_dayOfWeek);
|
||||
result["StartHour"] = Jellyfin::Support::toJsonValue<double>(m_startHour);
|
||||
result["EndHour"] = Jellyfin::Support::toJsonValue<double>(m_endHour);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
qint32 AccessSchedule::jellyfinId() const { return m_jellyfinId; }
|
||||
|
||||
void AccessSchedule::setJellyfinId(qint32 newJellyfinId) {
|
||||
m_jellyfinId = newJellyfinId;
|
||||
}
|
||||
|
||||
QString AccessSchedule::userId() const { return m_userId; }
|
||||
|
||||
void AccessSchedule::setUserId(QString newUserId) {
|
||||
m_userId = newUserId;
|
||||
}
|
||||
|
||||
DynamicDayOfWeek AccessSchedule::dayOfWeek() const { return m_dayOfWeek; }
|
||||
|
||||
void AccessSchedule::setDayOfWeek(DynamicDayOfWeek newDayOfWeek) {
|
||||
m_dayOfWeek = newDayOfWeek;
|
||||
}
|
||||
|
||||
double AccessSchedule::startHour() const { return m_startHour; }
|
||||
|
||||
void AccessSchedule::setStartHour(double newStartHour) {
|
||||
m_startHour = newStartHour;
|
||||
}
|
||||
|
||||
double AccessSchedule::endHour() const { return m_endHour; }
|
||||
|
||||
void AccessSchedule::setEndHour(double newEndHour) {
|
||||
m_endHour = newEndHour;
|
||||
}
|
||||
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using AccessSchedule = Jellyfin::DTO::AccessSchedule;
|
||||
|
||||
template <>
|
||||
AccessSchedule fromJsonValue<AccessSchedule>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return AccessSchedule::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
} // NS Jellyfin
|
||||
217
core/src/dto/activitylogentry.cpp
Normal file
217
core/src/dto/activitylogentry.cpp
Normal file
|
|
@ -0,0 +1,217 @@
|
|||
/*
|
||||
* Sailfin: a Jellyfin client written using Qt
|
||||
* Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
|
||||
* OVERWRITTEN AT SOME POINT!
|
||||
*
|
||||
* If there is a bug in this file, please fix the code generator used to generate this file found in
|
||||
* core/openapigenerator.d.
|
||||
*
|
||||
* This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
|
||||
* file with a newer file if needed instead of manually updating the files.
|
||||
*/
|
||||
|
||||
#include <JellyfinQt/dto/activitylogentry.h>
|
||||
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
ActivityLogEntry::ActivityLogEntry() {}
|
||||
|
||||
ActivityLogEntry::ActivityLogEntry(const ActivityLogEntry &other) :
|
||||
|
||||
m_jellyfinId(other.m_jellyfinId),
|
||||
m_name(other.m_name),
|
||||
m_overview(other.m_overview),
|
||||
m_shortOverview(other.m_shortOverview),
|
||||
m_type(other.m_type),
|
||||
m_itemId(other.m_itemId),
|
||||
m_date(other.m_date),
|
||||
m_userId(other.m_userId),
|
||||
m_userPrimaryImageTag(other.m_userPrimaryImageTag),
|
||||
m_severity(other.m_severity){}
|
||||
|
||||
|
||||
void ActivityLogEntry::replaceData(ActivityLogEntry &other) {
|
||||
m_jellyfinId = other.m_jellyfinId;
|
||||
m_name = other.m_name;
|
||||
m_overview = other.m_overview;
|
||||
m_shortOverview = other.m_shortOverview;
|
||||
m_type = other.m_type;
|
||||
m_itemId = other.m_itemId;
|
||||
m_date = other.m_date;
|
||||
m_userId = other.m_userId;
|
||||
m_userPrimaryImageTag = other.m_userPrimaryImageTag;
|
||||
m_severity = other.m_severity;
|
||||
}
|
||||
|
||||
ActivityLogEntry ActivityLogEntry::fromJson(QJsonObject source) {
|
||||
ActivityLogEntry instance;
|
||||
instance.setFromJson(source);
|
||||
return instance;
|
||||
}
|
||||
|
||||
|
||||
void ActivityLogEntry::setFromJson(QJsonObject source) {
|
||||
m_jellyfinId = Jellyfin::Support::fromJsonValue<qint64>(source["Id"]);
|
||||
m_name = Jellyfin::Support::fromJsonValue<QString>(source["Name"]);
|
||||
m_overview = Jellyfin::Support::fromJsonValue<QString>(source["Overview"]);
|
||||
m_shortOverview = Jellyfin::Support::fromJsonValue<QString>(source["ShortOverview"]);
|
||||
m_type = Jellyfin::Support::fromJsonValue<QString>(source["Type"]);
|
||||
m_itemId = Jellyfin::Support::fromJsonValue<QString>(source["ItemId"]);
|
||||
m_date = Jellyfin::Support::fromJsonValue<QDateTime>(source["Date"]);
|
||||
m_userId = Jellyfin::Support::fromJsonValue<QString>(source["UserId"]);
|
||||
m_userPrimaryImageTag = Jellyfin::Support::fromJsonValue<QString>(source["UserPrimaryImageTag"]);
|
||||
m_severity = Jellyfin::Support::fromJsonValue<LogLevel>(source["Severity"]);
|
||||
|
||||
}
|
||||
|
||||
QJsonObject ActivityLogEntry::toJson() {
|
||||
QJsonObject result;
|
||||
result["Id"] = Jellyfin::Support::toJsonValue<qint64>(m_jellyfinId);
|
||||
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
||||
result["Overview"] = Jellyfin::Support::toJsonValue<QString>(m_overview);
|
||||
result["ShortOverview"] = Jellyfin::Support::toJsonValue<QString>(m_shortOverview);
|
||||
result["Type"] = Jellyfin::Support::toJsonValue<QString>(m_type);
|
||||
result["ItemId"] = Jellyfin::Support::toJsonValue<QString>(m_itemId);
|
||||
result["Date"] = Jellyfin::Support::toJsonValue<QDateTime>(m_date);
|
||||
result["UserId"] = Jellyfin::Support::toJsonValue<QString>(m_userId);
|
||||
result["UserPrimaryImageTag"] = Jellyfin::Support::toJsonValue<QString>(m_userPrimaryImageTag);
|
||||
result["Severity"] = Jellyfin::Support::toJsonValue<LogLevel>(m_severity);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
qint64 ActivityLogEntry::jellyfinId() const { return m_jellyfinId; }
|
||||
|
||||
void ActivityLogEntry::setJellyfinId(qint64 newJellyfinId) {
|
||||
m_jellyfinId = newJellyfinId;
|
||||
}
|
||||
|
||||
QString ActivityLogEntry::name() const { return m_name; }
|
||||
|
||||
void ActivityLogEntry::setName(QString newName) {
|
||||
m_name = newName;
|
||||
}
|
||||
bool ActivityLogEntry::nameNull() const {
|
||||
return m_name.isNull();
|
||||
}
|
||||
|
||||
void ActivityLogEntry::setNameNull() {
|
||||
m_name.clear();
|
||||
|
||||
}
|
||||
QString ActivityLogEntry::overview() const { return m_overview; }
|
||||
|
||||
void ActivityLogEntry::setOverview(QString newOverview) {
|
||||
m_overview = newOverview;
|
||||
}
|
||||
bool ActivityLogEntry::overviewNull() const {
|
||||
return m_overview.isNull();
|
||||
}
|
||||
|
||||
void ActivityLogEntry::setOverviewNull() {
|
||||
m_overview.clear();
|
||||
|
||||
}
|
||||
QString ActivityLogEntry::shortOverview() const { return m_shortOverview; }
|
||||
|
||||
void ActivityLogEntry::setShortOverview(QString newShortOverview) {
|
||||
m_shortOverview = newShortOverview;
|
||||
}
|
||||
bool ActivityLogEntry::shortOverviewNull() const {
|
||||
return m_shortOverview.isNull();
|
||||
}
|
||||
|
||||
void ActivityLogEntry::setShortOverviewNull() {
|
||||
m_shortOverview.clear();
|
||||
|
||||
}
|
||||
QString ActivityLogEntry::type() const { return m_type; }
|
||||
|
||||
void ActivityLogEntry::setType(QString newType) {
|
||||
m_type = newType;
|
||||
}
|
||||
bool ActivityLogEntry::typeNull() const {
|
||||
return m_type.isNull();
|
||||
}
|
||||
|
||||
void ActivityLogEntry::setTypeNull() {
|
||||
m_type.clear();
|
||||
|
||||
}
|
||||
QString ActivityLogEntry::itemId() const { return m_itemId; }
|
||||
|
||||
void ActivityLogEntry::setItemId(QString newItemId) {
|
||||
m_itemId = newItemId;
|
||||
}
|
||||
bool ActivityLogEntry::itemIdNull() const {
|
||||
return m_itemId.isNull();
|
||||
}
|
||||
|
||||
void ActivityLogEntry::setItemIdNull() {
|
||||
m_itemId.clear();
|
||||
|
||||
}
|
||||
QDateTime ActivityLogEntry::date() const { return m_date; }
|
||||
|
||||
void ActivityLogEntry::setDate(QDateTime newDate) {
|
||||
m_date = newDate;
|
||||
}
|
||||
|
||||
QString ActivityLogEntry::userId() const { return m_userId; }
|
||||
|
||||
void ActivityLogEntry::setUserId(QString newUserId) {
|
||||
m_userId = newUserId;
|
||||
}
|
||||
|
||||
QString ActivityLogEntry::userPrimaryImageTag() const { return m_userPrimaryImageTag; }
|
||||
|
||||
void ActivityLogEntry::setUserPrimaryImageTag(QString newUserPrimaryImageTag) {
|
||||
m_userPrimaryImageTag = newUserPrimaryImageTag;
|
||||
}
|
||||
bool ActivityLogEntry::userPrimaryImageTagNull() const {
|
||||
return m_userPrimaryImageTag.isNull();
|
||||
}
|
||||
|
||||
void ActivityLogEntry::setUserPrimaryImageTagNull() {
|
||||
m_userPrimaryImageTag.clear();
|
||||
|
||||
}
|
||||
LogLevel ActivityLogEntry::severity() const { return m_severity; }
|
||||
|
||||
void ActivityLogEntry::setSeverity(LogLevel newSeverity) {
|
||||
m_severity = newSeverity;
|
||||
}
|
||||
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using ActivityLogEntry = Jellyfin::DTO::ActivityLogEntry;
|
||||
|
||||
template <>
|
||||
ActivityLogEntry fromJsonValue<ActivityLogEntry>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return ActivityLogEntry::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
} // NS Jellyfin
|
||||
112
core/src/dto/activitylogentryqueryresult.cpp
Normal file
112
core/src/dto/activitylogentryqueryresult.cpp
Normal file
|
|
@ -0,0 +1,112 @@
|
|||
/*
|
||||
* Sailfin: a Jellyfin client written using Qt
|
||||
* Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
|
||||
* OVERWRITTEN AT SOME POINT!
|
||||
*
|
||||
* If there is a bug in this file, please fix the code generator used to generate this file found in
|
||||
* core/openapigenerator.d.
|
||||
*
|
||||
* This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
|
||||
* file with a newer file if needed instead of manually updating the files.
|
||||
*/
|
||||
|
||||
#include <JellyfinQt/dto/activitylogentryqueryresult.h>
|
||||
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
ActivityLogEntryQueryResult::ActivityLogEntryQueryResult() {}
|
||||
|
||||
ActivityLogEntryQueryResult::ActivityLogEntryQueryResult(const ActivityLogEntryQueryResult &other) :
|
||||
|
||||
m_items(other.m_items),
|
||||
m_totalRecordCount(other.m_totalRecordCount),
|
||||
m_startIndex(other.m_startIndex){}
|
||||
|
||||
|
||||
void ActivityLogEntryQueryResult::replaceData(ActivityLogEntryQueryResult &other) {
|
||||
m_items = other.m_items;
|
||||
m_totalRecordCount = other.m_totalRecordCount;
|
||||
m_startIndex = other.m_startIndex;
|
||||
}
|
||||
|
||||
ActivityLogEntryQueryResult ActivityLogEntryQueryResult::fromJson(QJsonObject source) {
|
||||
ActivityLogEntryQueryResult instance;
|
||||
instance.setFromJson(source);
|
||||
return instance;
|
||||
}
|
||||
|
||||
|
||||
void ActivityLogEntryQueryResult::setFromJson(QJsonObject source) {
|
||||
m_items = Jellyfin::Support::fromJsonValue<QList<QSharedPointer<ActivityLogEntry>>>(source["Items"]);
|
||||
m_totalRecordCount = Jellyfin::Support::fromJsonValue<qint32>(source["TotalRecordCount"]);
|
||||
m_startIndex = Jellyfin::Support::fromJsonValue<qint32>(source["StartIndex"]);
|
||||
|
||||
}
|
||||
|
||||
QJsonObject ActivityLogEntryQueryResult::toJson() {
|
||||
QJsonObject result;
|
||||
result["Items"] = Jellyfin::Support::toJsonValue<QList<QSharedPointer<ActivityLogEntry>>>(m_items);
|
||||
result["TotalRecordCount"] = Jellyfin::Support::toJsonValue<qint32>(m_totalRecordCount);
|
||||
result["StartIndex"] = Jellyfin::Support::toJsonValue<qint32>(m_startIndex);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
QList<QSharedPointer<ActivityLogEntry>> ActivityLogEntryQueryResult::items() const { return m_items; }
|
||||
|
||||
void ActivityLogEntryQueryResult::setItems(QList<QSharedPointer<ActivityLogEntry>> newItems) {
|
||||
m_items = newItems;
|
||||
}
|
||||
bool ActivityLogEntryQueryResult::itemsNull() const {
|
||||
return m_items.size() == 0;
|
||||
}
|
||||
|
||||
void ActivityLogEntryQueryResult::setItemsNull() {
|
||||
m_items.clear();
|
||||
|
||||
}
|
||||
qint32 ActivityLogEntryQueryResult::totalRecordCount() const { return m_totalRecordCount; }
|
||||
|
||||
void ActivityLogEntryQueryResult::setTotalRecordCount(qint32 newTotalRecordCount) {
|
||||
m_totalRecordCount = newTotalRecordCount;
|
||||
}
|
||||
|
||||
qint32 ActivityLogEntryQueryResult::startIndex() const { return m_startIndex; }
|
||||
|
||||
void ActivityLogEntryQueryResult::setStartIndex(qint32 newStartIndex) {
|
||||
m_startIndex = newStartIndex;
|
||||
}
|
||||
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using ActivityLogEntryQueryResult = Jellyfin::DTO::ActivityLogEntryQueryResult;
|
||||
|
||||
template <>
|
||||
ActivityLogEntryQueryResult fromJsonValue<ActivityLogEntryQueryResult>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return ActivityLogEntryQueryResult::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
} // NS Jellyfin
|
||||
85
core/src/dto/addvirtualfolderdto.cpp
Normal file
85
core/src/dto/addvirtualfolderdto.cpp
Normal file
|
|
@ -0,0 +1,85 @@
|
|||
/*
|
||||
* Sailfin: a Jellyfin client written using Qt
|
||||
* Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
|
||||
* OVERWRITTEN AT SOME POINT!
|
||||
*
|
||||
* If there is a bug in this file, please fix the code generator used to generate this file found in
|
||||
* core/openapigenerator.d.
|
||||
*
|
||||
* This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
|
||||
* file with a newer file if needed instead of manually updating the files.
|
||||
*/
|
||||
|
||||
#include <JellyfinQt/dto/addvirtualfolderdto.h>
|
||||
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
AddVirtualFolderDto::AddVirtualFolderDto() {}
|
||||
|
||||
AddVirtualFolderDto::AddVirtualFolderDto(const AddVirtualFolderDto &other) :
|
||||
|
||||
m_libraryOptions(other.m_libraryOptions){}
|
||||
|
||||
|
||||
void AddVirtualFolderDto::replaceData(AddVirtualFolderDto &other) {
|
||||
m_libraryOptions = other.m_libraryOptions;
|
||||
}
|
||||
|
||||
AddVirtualFolderDto AddVirtualFolderDto::fromJson(QJsonObject source) {
|
||||
AddVirtualFolderDto instance;
|
||||
instance.setFromJson(source);
|
||||
return instance;
|
||||
}
|
||||
|
||||
|
||||
void AddVirtualFolderDto::setFromJson(QJsonObject source) {
|
||||
m_libraryOptions = Jellyfin::Support::fromJsonValue<QSharedPointer<LibraryOptions>>(source["LibraryOptions"]);
|
||||
|
||||
}
|
||||
|
||||
QJsonObject AddVirtualFolderDto::toJson() {
|
||||
QJsonObject result;
|
||||
result["LibraryOptions"] = Jellyfin::Support::toJsonValue<QSharedPointer<LibraryOptions>>(m_libraryOptions);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
QSharedPointer<LibraryOptions> AddVirtualFolderDto::libraryOptions() const { return m_libraryOptions; }
|
||||
|
||||
void AddVirtualFolderDto::setLibraryOptions(QSharedPointer<LibraryOptions> newLibraryOptions) {
|
||||
m_libraryOptions = newLibraryOptions;
|
||||
}
|
||||
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using AddVirtualFolderDto = Jellyfin::DTO::AddVirtualFolderDto;
|
||||
|
||||
template <>
|
||||
AddVirtualFolderDto fromJsonValue<AddVirtualFolderDto>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return AddVirtualFolderDto::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
} // NS Jellyfin
|
||||
289
core/src/dto/albuminfo.cpp
Normal file
289
core/src/dto/albuminfo.cpp
Normal file
|
|
@ -0,0 +1,289 @@
|
|||
/*
|
||||
* Sailfin: a Jellyfin client written using Qt
|
||||
* Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
|
||||
* OVERWRITTEN AT SOME POINT!
|
||||
*
|
||||
* If there is a bug in this file, please fix the code generator used to generate this file found in
|
||||
* core/openapigenerator.d.
|
||||
*
|
||||
* This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
|
||||
* file with a newer file if needed instead of manually updating the files.
|
||||
*/
|
||||
|
||||
#include <JellyfinQt/dto/albuminfo.h>
|
||||
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
AlbumInfo::AlbumInfo() {}
|
||||
|
||||
AlbumInfo::AlbumInfo(const AlbumInfo &other) :
|
||||
|
||||
m_name(other.m_name),
|
||||
m_path(other.m_path),
|
||||
m_metadataLanguage(other.m_metadataLanguage),
|
||||
m_metadataCountryCode(other.m_metadataCountryCode),
|
||||
m_providerIds(other.m_providerIds),
|
||||
m_year(other.m_year),
|
||||
m_indexNumber(other.m_indexNumber),
|
||||
m_parentIndexNumber(other.m_parentIndexNumber),
|
||||
m_premiereDate(other.m_premiereDate),
|
||||
m_isAutomated(other.m_isAutomated),
|
||||
m_albumArtists(other.m_albumArtists),
|
||||
m_artistProviderIds(other.m_artistProviderIds),
|
||||
m_songInfos(other.m_songInfos){}
|
||||
|
||||
|
||||
void AlbumInfo::replaceData(AlbumInfo &other) {
|
||||
m_name = other.m_name;
|
||||
m_path = other.m_path;
|
||||
m_metadataLanguage = other.m_metadataLanguage;
|
||||
m_metadataCountryCode = other.m_metadataCountryCode;
|
||||
m_providerIds = other.m_providerIds;
|
||||
m_year = other.m_year;
|
||||
m_indexNumber = other.m_indexNumber;
|
||||
m_parentIndexNumber = other.m_parentIndexNumber;
|
||||
m_premiereDate = other.m_premiereDate;
|
||||
m_isAutomated = other.m_isAutomated;
|
||||
m_albumArtists = other.m_albumArtists;
|
||||
m_artistProviderIds = other.m_artistProviderIds;
|
||||
m_songInfos = other.m_songInfos;
|
||||
}
|
||||
|
||||
AlbumInfo AlbumInfo::fromJson(QJsonObject source) {
|
||||
AlbumInfo instance;
|
||||
instance.setFromJson(source);
|
||||
return instance;
|
||||
}
|
||||
|
||||
|
||||
void AlbumInfo::setFromJson(QJsonObject source) {
|
||||
m_name = Jellyfin::Support::fromJsonValue<QString>(source["Name"]);
|
||||
m_path = Jellyfin::Support::fromJsonValue<QString>(source["Path"]);
|
||||
m_metadataLanguage = Jellyfin::Support::fromJsonValue<QString>(source["MetadataLanguage"]);
|
||||
m_metadataCountryCode = Jellyfin::Support::fromJsonValue<QString>(source["MetadataCountryCode"]);
|
||||
m_providerIds = Jellyfin::Support::fromJsonValue<std::optional<QJsonObject>>(source["ProviderIds"]);
|
||||
m_year = Jellyfin::Support::fromJsonValue<std::optional<qint32>>(source["Year"]);
|
||||
m_indexNumber = Jellyfin::Support::fromJsonValue<std::optional<qint32>>(source["IndexNumber"]);
|
||||
m_parentIndexNumber = Jellyfin::Support::fromJsonValue<std::optional<qint32>>(source["ParentIndexNumber"]);
|
||||
m_premiereDate = Jellyfin::Support::fromJsonValue<QDateTime>(source["PremiereDate"]);
|
||||
m_isAutomated = Jellyfin::Support::fromJsonValue<bool>(source["IsAutomated"]);
|
||||
m_albumArtists = Jellyfin::Support::fromJsonValue<QStringList>(source["AlbumArtists"]);
|
||||
m_artistProviderIds = Jellyfin::Support::fromJsonValue<std::optional<QJsonObject>>(source["ArtistProviderIds"]);
|
||||
m_songInfos = Jellyfin::Support::fromJsonValue<QList<QSharedPointer<SongInfo>>>(source["SongInfos"]);
|
||||
|
||||
}
|
||||
|
||||
QJsonObject AlbumInfo::toJson() {
|
||||
QJsonObject result;
|
||||
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
||||
result["Path"] = Jellyfin::Support::toJsonValue<QString>(m_path);
|
||||
result["MetadataLanguage"] = Jellyfin::Support::toJsonValue<QString>(m_metadataLanguage);
|
||||
result["MetadataCountryCode"] = Jellyfin::Support::toJsonValue<QString>(m_metadataCountryCode);
|
||||
result["ProviderIds"] = Jellyfin::Support::toJsonValue<std::optional<QJsonObject>>(m_providerIds);
|
||||
result["Year"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_year);
|
||||
result["IndexNumber"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_indexNumber);
|
||||
result["ParentIndexNumber"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_parentIndexNumber);
|
||||
result["PremiereDate"] = Jellyfin::Support::toJsonValue<QDateTime>(m_premiereDate);
|
||||
result["IsAutomated"] = Jellyfin::Support::toJsonValue<bool>(m_isAutomated);
|
||||
result["AlbumArtists"] = Jellyfin::Support::toJsonValue<QStringList>(m_albumArtists);
|
||||
result["ArtistProviderIds"] = Jellyfin::Support::toJsonValue<std::optional<QJsonObject>>(m_artistProviderIds);
|
||||
result["SongInfos"] = Jellyfin::Support::toJsonValue<QList<QSharedPointer<SongInfo>>>(m_songInfos);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
QString AlbumInfo::name() const { return m_name; }
|
||||
|
||||
void AlbumInfo::setName(QString newName) {
|
||||
m_name = newName;
|
||||
}
|
||||
bool AlbumInfo::nameNull() const {
|
||||
return m_name.isNull();
|
||||
}
|
||||
|
||||
void AlbumInfo::setNameNull() {
|
||||
m_name.clear();
|
||||
|
||||
}
|
||||
QString AlbumInfo::path() const { return m_path; }
|
||||
|
||||
void AlbumInfo::setPath(QString newPath) {
|
||||
m_path = newPath;
|
||||
}
|
||||
bool AlbumInfo::pathNull() const {
|
||||
return m_path.isNull();
|
||||
}
|
||||
|
||||
void AlbumInfo::setPathNull() {
|
||||
m_path.clear();
|
||||
|
||||
}
|
||||
QString AlbumInfo::metadataLanguage() const { return m_metadataLanguage; }
|
||||
|
||||
void AlbumInfo::setMetadataLanguage(QString newMetadataLanguage) {
|
||||
m_metadataLanguage = newMetadataLanguage;
|
||||
}
|
||||
bool AlbumInfo::metadataLanguageNull() const {
|
||||
return m_metadataLanguage.isNull();
|
||||
}
|
||||
|
||||
void AlbumInfo::setMetadataLanguageNull() {
|
||||
m_metadataLanguage.clear();
|
||||
|
||||
}
|
||||
QString AlbumInfo::metadataCountryCode() const { return m_metadataCountryCode; }
|
||||
|
||||
void AlbumInfo::setMetadataCountryCode(QString newMetadataCountryCode) {
|
||||
m_metadataCountryCode = newMetadataCountryCode;
|
||||
}
|
||||
bool AlbumInfo::metadataCountryCodeNull() const {
|
||||
return m_metadataCountryCode.isNull();
|
||||
}
|
||||
|
||||
void AlbumInfo::setMetadataCountryCodeNull() {
|
||||
m_metadataCountryCode.clear();
|
||||
|
||||
}
|
||||
std::optional<QJsonObject> AlbumInfo::providerIds() const { return m_providerIds; }
|
||||
|
||||
void AlbumInfo::setProviderIds(std::optional<QJsonObject> newProviderIds) {
|
||||
m_providerIds = newProviderIds;
|
||||
}
|
||||
bool AlbumInfo::providerIdsNull() const {
|
||||
return !m_providerIds.has_value();
|
||||
}
|
||||
|
||||
void AlbumInfo::setProviderIdsNull() {
|
||||
m_providerIds = std::nullopt;
|
||||
|
||||
}
|
||||
std::optional<qint32> AlbumInfo::year() const { return m_year; }
|
||||
|
||||
void AlbumInfo::setYear(std::optional<qint32> newYear) {
|
||||
m_year = newYear;
|
||||
}
|
||||
bool AlbumInfo::yearNull() const {
|
||||
return !m_year.has_value();
|
||||
}
|
||||
|
||||
void AlbumInfo::setYearNull() {
|
||||
m_year = std::nullopt;
|
||||
|
||||
}
|
||||
std::optional<qint32> AlbumInfo::indexNumber() const { return m_indexNumber; }
|
||||
|
||||
void AlbumInfo::setIndexNumber(std::optional<qint32> newIndexNumber) {
|
||||
m_indexNumber = newIndexNumber;
|
||||
}
|
||||
bool AlbumInfo::indexNumberNull() const {
|
||||
return !m_indexNumber.has_value();
|
||||
}
|
||||
|
||||
void AlbumInfo::setIndexNumberNull() {
|
||||
m_indexNumber = std::nullopt;
|
||||
|
||||
}
|
||||
std::optional<qint32> AlbumInfo::parentIndexNumber() const { return m_parentIndexNumber; }
|
||||
|
||||
void AlbumInfo::setParentIndexNumber(std::optional<qint32> newParentIndexNumber) {
|
||||
m_parentIndexNumber = newParentIndexNumber;
|
||||
}
|
||||
bool AlbumInfo::parentIndexNumberNull() const {
|
||||
return !m_parentIndexNumber.has_value();
|
||||
}
|
||||
|
||||
void AlbumInfo::setParentIndexNumberNull() {
|
||||
m_parentIndexNumber = std::nullopt;
|
||||
|
||||
}
|
||||
QDateTime AlbumInfo::premiereDate() const { return m_premiereDate; }
|
||||
|
||||
void AlbumInfo::setPremiereDate(QDateTime newPremiereDate) {
|
||||
m_premiereDate = newPremiereDate;
|
||||
}
|
||||
bool AlbumInfo::premiereDateNull() const {
|
||||
return m_premiereDate.isNull();
|
||||
}
|
||||
|
||||
void AlbumInfo::setPremiereDateNull() {
|
||||
m_premiereDate= QDateTime();
|
||||
|
||||
}
|
||||
bool AlbumInfo::isAutomated() const { return m_isAutomated; }
|
||||
|
||||
void AlbumInfo::setIsAutomated(bool newIsAutomated) {
|
||||
m_isAutomated = newIsAutomated;
|
||||
}
|
||||
|
||||
QStringList AlbumInfo::albumArtists() const { return m_albumArtists; }
|
||||
|
||||
void AlbumInfo::setAlbumArtists(QStringList newAlbumArtists) {
|
||||
m_albumArtists = newAlbumArtists;
|
||||
}
|
||||
bool AlbumInfo::albumArtistsNull() const {
|
||||
return m_albumArtists.size() == 0;
|
||||
}
|
||||
|
||||
void AlbumInfo::setAlbumArtistsNull() {
|
||||
m_albumArtists.clear();
|
||||
|
||||
}
|
||||
std::optional<QJsonObject> AlbumInfo::artistProviderIds() const { return m_artistProviderIds; }
|
||||
|
||||
void AlbumInfo::setArtistProviderIds(std::optional<QJsonObject> newArtistProviderIds) {
|
||||
m_artistProviderIds = newArtistProviderIds;
|
||||
}
|
||||
bool AlbumInfo::artistProviderIdsNull() const {
|
||||
return !m_artistProviderIds.has_value();
|
||||
}
|
||||
|
||||
void AlbumInfo::setArtistProviderIdsNull() {
|
||||
m_artistProviderIds = std::nullopt;
|
||||
|
||||
}
|
||||
QList<QSharedPointer<SongInfo>> AlbumInfo::songInfos() const { return m_songInfos; }
|
||||
|
||||
void AlbumInfo::setSongInfos(QList<QSharedPointer<SongInfo>> newSongInfos) {
|
||||
m_songInfos = newSongInfos;
|
||||
}
|
||||
bool AlbumInfo::songInfosNull() const {
|
||||
return m_songInfos.size() == 0;
|
||||
}
|
||||
|
||||
void AlbumInfo::setSongInfosNull() {
|
||||
m_songInfos.clear();
|
||||
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using AlbumInfo = Jellyfin::DTO::AlbumInfo;
|
||||
|
||||
template <>
|
||||
AlbumInfo fromJsonValue<AlbumInfo>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return AlbumInfo::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
} // NS Jellyfin
|
||||
122
core/src/dto/albuminforemotesearchquery.cpp
Normal file
122
core/src/dto/albuminforemotesearchquery.cpp
Normal file
|
|
@ -0,0 +1,122 @@
|
|||
/*
|
||||
* Sailfin: a Jellyfin client written using Qt
|
||||
* Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
|
||||
* OVERWRITTEN AT SOME POINT!
|
||||
*
|
||||
* If there is a bug in this file, please fix the code generator used to generate this file found in
|
||||
* core/openapigenerator.d.
|
||||
*
|
||||
* This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
|
||||
* file with a newer file if needed instead of manually updating the files.
|
||||
*/
|
||||
|
||||
#include <JellyfinQt/dto/albuminforemotesearchquery.h>
|
||||
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
AlbumInfoRemoteSearchQuery::AlbumInfoRemoteSearchQuery() {}
|
||||
|
||||
AlbumInfoRemoteSearchQuery::AlbumInfoRemoteSearchQuery(const AlbumInfoRemoteSearchQuery &other) :
|
||||
|
||||
m_searchInfo(other.m_searchInfo),
|
||||
m_itemId(other.m_itemId),
|
||||
m_searchProviderName(other.m_searchProviderName),
|
||||
m_includeDisabledProviders(other.m_includeDisabledProviders){}
|
||||
|
||||
|
||||
void AlbumInfoRemoteSearchQuery::replaceData(AlbumInfoRemoteSearchQuery &other) {
|
||||
m_searchInfo = other.m_searchInfo;
|
||||
m_itemId = other.m_itemId;
|
||||
m_searchProviderName = other.m_searchProviderName;
|
||||
m_includeDisabledProviders = other.m_includeDisabledProviders;
|
||||
}
|
||||
|
||||
AlbumInfoRemoteSearchQuery AlbumInfoRemoteSearchQuery::fromJson(QJsonObject source) {
|
||||
AlbumInfoRemoteSearchQuery instance;
|
||||
instance.setFromJson(source);
|
||||
return instance;
|
||||
}
|
||||
|
||||
|
||||
void AlbumInfoRemoteSearchQuery::setFromJson(QJsonObject source) {
|
||||
m_searchInfo = Jellyfin::Support::fromJsonValue<QSharedPointer<AlbumInfo>>(source["SearchInfo"]);
|
||||
m_itemId = Jellyfin::Support::fromJsonValue<QString>(source["ItemId"]);
|
||||
m_searchProviderName = Jellyfin::Support::fromJsonValue<QString>(source["SearchProviderName"]);
|
||||
m_includeDisabledProviders = Jellyfin::Support::fromJsonValue<bool>(source["IncludeDisabledProviders"]);
|
||||
|
||||
}
|
||||
|
||||
QJsonObject AlbumInfoRemoteSearchQuery::toJson() {
|
||||
QJsonObject result;
|
||||
result["SearchInfo"] = Jellyfin::Support::toJsonValue<QSharedPointer<AlbumInfo>>(m_searchInfo);
|
||||
result["ItemId"] = Jellyfin::Support::toJsonValue<QString>(m_itemId);
|
||||
result["SearchProviderName"] = Jellyfin::Support::toJsonValue<QString>(m_searchProviderName);
|
||||
result["IncludeDisabledProviders"] = Jellyfin::Support::toJsonValue<bool>(m_includeDisabledProviders);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
QSharedPointer<AlbumInfo> AlbumInfoRemoteSearchQuery::searchInfo() const { return m_searchInfo; }
|
||||
|
||||
void AlbumInfoRemoteSearchQuery::setSearchInfo(QSharedPointer<AlbumInfo> newSearchInfo) {
|
||||
m_searchInfo = newSearchInfo;
|
||||
}
|
||||
|
||||
QString AlbumInfoRemoteSearchQuery::itemId() const { return m_itemId; }
|
||||
|
||||
void AlbumInfoRemoteSearchQuery::setItemId(QString newItemId) {
|
||||
m_itemId = newItemId;
|
||||
}
|
||||
|
||||
QString AlbumInfoRemoteSearchQuery::searchProviderName() const { return m_searchProviderName; }
|
||||
|
||||
void AlbumInfoRemoteSearchQuery::setSearchProviderName(QString newSearchProviderName) {
|
||||
m_searchProviderName = newSearchProviderName;
|
||||
}
|
||||
bool AlbumInfoRemoteSearchQuery::searchProviderNameNull() const {
|
||||
return m_searchProviderName.isNull();
|
||||
}
|
||||
|
||||
void AlbumInfoRemoteSearchQuery::setSearchProviderNameNull() {
|
||||
m_searchProviderName.clear();
|
||||
|
||||
}
|
||||
bool AlbumInfoRemoteSearchQuery::includeDisabledProviders() const { return m_includeDisabledProviders; }
|
||||
|
||||
void AlbumInfoRemoteSearchQuery::setIncludeDisabledProviders(bool newIncludeDisabledProviders) {
|
||||
m_includeDisabledProviders = newIncludeDisabledProviders;
|
||||
}
|
||||
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using AlbumInfoRemoteSearchQuery = Jellyfin::DTO::AlbumInfoRemoteSearchQuery;
|
||||
|
||||
template <>
|
||||
AlbumInfoRemoteSearchQuery fromJsonValue<AlbumInfoRemoteSearchQuery>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return AlbumInfoRemoteSearchQuery::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
} // NS Jellyfin
|
||||
105
core/src/dto/allthememediaresult.cpp
Normal file
105
core/src/dto/allthememediaresult.cpp
Normal file
|
|
@ -0,0 +1,105 @@
|
|||
/*
|
||||
* Sailfin: a Jellyfin client written using Qt
|
||||
* Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
|
||||
* OVERWRITTEN AT SOME POINT!
|
||||
*
|
||||
* If there is a bug in this file, please fix the code generator used to generate this file found in
|
||||
* core/openapigenerator.d.
|
||||
*
|
||||
* This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
|
||||
* file with a newer file if needed instead of manually updating the files.
|
||||
*/
|
||||
|
||||
#include <JellyfinQt/dto/allthememediaresult.h>
|
||||
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
AllThemeMediaResult::AllThemeMediaResult() {}
|
||||
|
||||
AllThemeMediaResult::AllThemeMediaResult(const AllThemeMediaResult &other) :
|
||||
|
||||
m_themeVideosResult(other.m_themeVideosResult),
|
||||
m_themeSongsResult(other.m_themeSongsResult),
|
||||
m_soundtrackSongsResult(other.m_soundtrackSongsResult){}
|
||||
|
||||
|
||||
void AllThemeMediaResult::replaceData(AllThemeMediaResult &other) {
|
||||
m_themeVideosResult = other.m_themeVideosResult;
|
||||
m_themeSongsResult = other.m_themeSongsResult;
|
||||
m_soundtrackSongsResult = other.m_soundtrackSongsResult;
|
||||
}
|
||||
|
||||
AllThemeMediaResult AllThemeMediaResult::fromJson(QJsonObject source) {
|
||||
AllThemeMediaResult instance;
|
||||
instance.setFromJson(source);
|
||||
return instance;
|
||||
}
|
||||
|
||||
|
||||
void AllThemeMediaResult::setFromJson(QJsonObject source) {
|
||||
m_themeVideosResult = Jellyfin::Support::fromJsonValue<QSharedPointer<ThemeMediaResult>>(source["ThemeVideosResult"]);
|
||||
m_themeSongsResult = Jellyfin::Support::fromJsonValue<QSharedPointer<ThemeMediaResult>>(source["ThemeSongsResult"]);
|
||||
m_soundtrackSongsResult = Jellyfin::Support::fromJsonValue<QSharedPointer<ThemeMediaResult>>(source["SoundtrackSongsResult"]);
|
||||
|
||||
}
|
||||
|
||||
QJsonObject AllThemeMediaResult::toJson() {
|
||||
QJsonObject result;
|
||||
result["ThemeVideosResult"] = Jellyfin::Support::toJsonValue<QSharedPointer<ThemeMediaResult>>(m_themeVideosResult);
|
||||
result["ThemeSongsResult"] = Jellyfin::Support::toJsonValue<QSharedPointer<ThemeMediaResult>>(m_themeSongsResult);
|
||||
result["SoundtrackSongsResult"] = Jellyfin::Support::toJsonValue<QSharedPointer<ThemeMediaResult>>(m_soundtrackSongsResult);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
QSharedPointer<ThemeMediaResult> AllThemeMediaResult::themeVideosResult() const { return m_themeVideosResult; }
|
||||
|
||||
void AllThemeMediaResult::setThemeVideosResult(QSharedPointer<ThemeMediaResult> newThemeVideosResult) {
|
||||
m_themeVideosResult = newThemeVideosResult;
|
||||
}
|
||||
|
||||
QSharedPointer<ThemeMediaResult> AllThemeMediaResult::themeSongsResult() const { return m_themeSongsResult; }
|
||||
|
||||
void AllThemeMediaResult::setThemeSongsResult(QSharedPointer<ThemeMediaResult> newThemeSongsResult) {
|
||||
m_themeSongsResult = newThemeSongsResult;
|
||||
}
|
||||
|
||||
QSharedPointer<ThemeMediaResult> AllThemeMediaResult::soundtrackSongsResult() const { return m_soundtrackSongsResult; }
|
||||
|
||||
void AllThemeMediaResult::setSoundtrackSongsResult(QSharedPointer<ThemeMediaResult> newSoundtrackSongsResult) {
|
||||
m_soundtrackSongsResult = newSoundtrackSongsResult;
|
||||
}
|
||||
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using AllThemeMediaResult = Jellyfin::DTO::AllThemeMediaResult;
|
||||
|
||||
template <>
|
||||
AllThemeMediaResult fromJsonValue<AllThemeMediaResult>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return AllThemeMediaResult::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
} // NS Jellyfin
|
||||
69
core/src/dto/architecture.cpp
Normal file
69
core/src/dto/architecture.cpp
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
/*
|
||||
* Sailfin: a Jellyfin client written using Qt
|
||||
* Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
|
||||
* OVERWRITTEN AT SOME POINT!
|
||||
*
|
||||
* If there is a bug in this file, please fix the code generator used to generate this file found in
|
||||
* core/openapigenerator.d.
|
||||
*
|
||||
* This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
|
||||
* file with a newer file if needed instead of manually updating the files.
|
||||
*/
|
||||
|
||||
#include <JellyfinQt/dto/architecture.h>
|
||||
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
ArchitectureClass::ArchitectureClass() {}
|
||||
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using Architecture = Jellyfin::DTO::Architecture;
|
||||
|
||||
template <>
|
||||
Architecture fromJsonValue<Architecture>(const QJsonValue &source) {
|
||||
if (!source.isString()) return Architecture::EnumNotSet;
|
||||
|
||||
QString str = source.toString();
|
||||
if (str == QStringLiteral("X86")) {
|
||||
return Architecture::X86;
|
||||
}
|
||||
if (str == QStringLiteral("X64")) {
|
||||
return Architecture::X64;
|
||||
}
|
||||
if (str == QStringLiteral("Arm")) {
|
||||
return Architecture::Arm;
|
||||
}
|
||||
if (str == QStringLiteral("Arm64")) {
|
||||
return Architecture::Arm64;
|
||||
}
|
||||
if (str == QStringLiteral("Wasm")) {
|
||||
return Architecture::Wasm;
|
||||
}
|
||||
|
||||
return Architecture::EnumNotSet;
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
} // NS Jellyfin
|
||||
255
core/src/dto/artistinfo.cpp
Normal file
255
core/src/dto/artistinfo.cpp
Normal file
|
|
@ -0,0 +1,255 @@
|
|||
/*
|
||||
* Sailfin: a Jellyfin client written using Qt
|
||||
* Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
|
||||
* OVERWRITTEN AT SOME POINT!
|
||||
*
|
||||
* If there is a bug in this file, please fix the code generator used to generate this file found in
|
||||
* core/openapigenerator.d.
|
||||
*
|
||||
* This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
|
||||
* file with a newer file if needed instead of manually updating the files.
|
||||
*/
|
||||
|
||||
#include <JellyfinQt/dto/artistinfo.h>
|
||||
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
ArtistInfo::ArtistInfo() {}
|
||||
|
||||
ArtistInfo::ArtistInfo(const ArtistInfo &other) :
|
||||
|
||||
m_name(other.m_name),
|
||||
m_path(other.m_path),
|
||||
m_metadataLanguage(other.m_metadataLanguage),
|
||||
m_metadataCountryCode(other.m_metadataCountryCode),
|
||||
m_providerIds(other.m_providerIds),
|
||||
m_year(other.m_year),
|
||||
m_indexNumber(other.m_indexNumber),
|
||||
m_parentIndexNumber(other.m_parentIndexNumber),
|
||||
m_premiereDate(other.m_premiereDate),
|
||||
m_isAutomated(other.m_isAutomated),
|
||||
m_songInfos(other.m_songInfos){}
|
||||
|
||||
|
||||
void ArtistInfo::replaceData(ArtistInfo &other) {
|
||||
m_name = other.m_name;
|
||||
m_path = other.m_path;
|
||||
m_metadataLanguage = other.m_metadataLanguage;
|
||||
m_metadataCountryCode = other.m_metadataCountryCode;
|
||||
m_providerIds = other.m_providerIds;
|
||||
m_year = other.m_year;
|
||||
m_indexNumber = other.m_indexNumber;
|
||||
m_parentIndexNumber = other.m_parentIndexNumber;
|
||||
m_premiereDate = other.m_premiereDate;
|
||||
m_isAutomated = other.m_isAutomated;
|
||||
m_songInfos = other.m_songInfos;
|
||||
}
|
||||
|
||||
ArtistInfo ArtistInfo::fromJson(QJsonObject source) {
|
||||
ArtistInfo instance;
|
||||
instance.setFromJson(source);
|
||||
return instance;
|
||||
}
|
||||
|
||||
|
||||
void ArtistInfo::setFromJson(QJsonObject source) {
|
||||
m_name = Jellyfin::Support::fromJsonValue<QString>(source["Name"]);
|
||||
m_path = Jellyfin::Support::fromJsonValue<QString>(source["Path"]);
|
||||
m_metadataLanguage = Jellyfin::Support::fromJsonValue<QString>(source["MetadataLanguage"]);
|
||||
m_metadataCountryCode = Jellyfin::Support::fromJsonValue<QString>(source["MetadataCountryCode"]);
|
||||
m_providerIds = Jellyfin::Support::fromJsonValue<std::optional<QJsonObject>>(source["ProviderIds"]);
|
||||
m_year = Jellyfin::Support::fromJsonValue<std::optional<qint32>>(source["Year"]);
|
||||
m_indexNumber = Jellyfin::Support::fromJsonValue<std::optional<qint32>>(source["IndexNumber"]);
|
||||
m_parentIndexNumber = Jellyfin::Support::fromJsonValue<std::optional<qint32>>(source["ParentIndexNumber"]);
|
||||
m_premiereDate = Jellyfin::Support::fromJsonValue<QDateTime>(source["PremiereDate"]);
|
||||
m_isAutomated = Jellyfin::Support::fromJsonValue<bool>(source["IsAutomated"]);
|
||||
m_songInfos = Jellyfin::Support::fromJsonValue<QList<QSharedPointer<SongInfo>>>(source["SongInfos"]);
|
||||
|
||||
}
|
||||
|
||||
QJsonObject ArtistInfo::toJson() {
|
||||
QJsonObject result;
|
||||
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
||||
result["Path"] = Jellyfin::Support::toJsonValue<QString>(m_path);
|
||||
result["MetadataLanguage"] = Jellyfin::Support::toJsonValue<QString>(m_metadataLanguage);
|
||||
result["MetadataCountryCode"] = Jellyfin::Support::toJsonValue<QString>(m_metadataCountryCode);
|
||||
result["ProviderIds"] = Jellyfin::Support::toJsonValue<std::optional<QJsonObject>>(m_providerIds);
|
||||
result["Year"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_year);
|
||||
result["IndexNumber"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_indexNumber);
|
||||
result["ParentIndexNumber"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_parentIndexNumber);
|
||||
result["PremiereDate"] = Jellyfin::Support::toJsonValue<QDateTime>(m_premiereDate);
|
||||
result["IsAutomated"] = Jellyfin::Support::toJsonValue<bool>(m_isAutomated);
|
||||
result["SongInfos"] = Jellyfin::Support::toJsonValue<QList<QSharedPointer<SongInfo>>>(m_songInfos);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
QString ArtistInfo::name() const { return m_name; }
|
||||
|
||||
void ArtistInfo::setName(QString newName) {
|
||||
m_name = newName;
|
||||
}
|
||||
bool ArtistInfo::nameNull() const {
|
||||
return m_name.isNull();
|
||||
}
|
||||
|
||||
void ArtistInfo::setNameNull() {
|
||||
m_name.clear();
|
||||
|
||||
}
|
||||
QString ArtistInfo::path() const { return m_path; }
|
||||
|
||||
void ArtistInfo::setPath(QString newPath) {
|
||||
m_path = newPath;
|
||||
}
|
||||
bool ArtistInfo::pathNull() const {
|
||||
return m_path.isNull();
|
||||
}
|
||||
|
||||
void ArtistInfo::setPathNull() {
|
||||
m_path.clear();
|
||||
|
||||
}
|
||||
QString ArtistInfo::metadataLanguage() const { return m_metadataLanguage; }
|
||||
|
||||
void ArtistInfo::setMetadataLanguage(QString newMetadataLanguage) {
|
||||
m_metadataLanguage = newMetadataLanguage;
|
||||
}
|
||||
bool ArtistInfo::metadataLanguageNull() const {
|
||||
return m_metadataLanguage.isNull();
|
||||
}
|
||||
|
||||
void ArtistInfo::setMetadataLanguageNull() {
|
||||
m_metadataLanguage.clear();
|
||||
|
||||
}
|
||||
QString ArtistInfo::metadataCountryCode() const { return m_metadataCountryCode; }
|
||||
|
||||
void ArtistInfo::setMetadataCountryCode(QString newMetadataCountryCode) {
|
||||
m_metadataCountryCode = newMetadataCountryCode;
|
||||
}
|
||||
bool ArtistInfo::metadataCountryCodeNull() const {
|
||||
return m_metadataCountryCode.isNull();
|
||||
}
|
||||
|
||||
void ArtistInfo::setMetadataCountryCodeNull() {
|
||||
m_metadataCountryCode.clear();
|
||||
|
||||
}
|
||||
std::optional<QJsonObject> ArtistInfo::providerIds() const { return m_providerIds; }
|
||||
|
||||
void ArtistInfo::setProviderIds(std::optional<QJsonObject> newProviderIds) {
|
||||
m_providerIds = newProviderIds;
|
||||
}
|
||||
bool ArtistInfo::providerIdsNull() const {
|
||||
return !m_providerIds.has_value();
|
||||
}
|
||||
|
||||
void ArtistInfo::setProviderIdsNull() {
|
||||
m_providerIds = std::nullopt;
|
||||
|
||||
}
|
||||
std::optional<qint32> ArtistInfo::year() const { return m_year; }
|
||||
|
||||
void ArtistInfo::setYear(std::optional<qint32> newYear) {
|
||||
m_year = newYear;
|
||||
}
|
||||
bool ArtistInfo::yearNull() const {
|
||||
return !m_year.has_value();
|
||||
}
|
||||
|
||||
void ArtistInfo::setYearNull() {
|
||||
m_year = std::nullopt;
|
||||
|
||||
}
|
||||
std::optional<qint32> ArtistInfo::indexNumber() const { return m_indexNumber; }
|
||||
|
||||
void ArtistInfo::setIndexNumber(std::optional<qint32> newIndexNumber) {
|
||||
m_indexNumber = newIndexNumber;
|
||||
}
|
||||
bool ArtistInfo::indexNumberNull() const {
|
||||
return !m_indexNumber.has_value();
|
||||
}
|
||||
|
||||
void ArtistInfo::setIndexNumberNull() {
|
||||
m_indexNumber = std::nullopt;
|
||||
|
||||
}
|
||||
std::optional<qint32> ArtistInfo::parentIndexNumber() const { return m_parentIndexNumber; }
|
||||
|
||||
void ArtistInfo::setParentIndexNumber(std::optional<qint32> newParentIndexNumber) {
|
||||
m_parentIndexNumber = newParentIndexNumber;
|
||||
}
|
||||
bool ArtistInfo::parentIndexNumberNull() const {
|
||||
return !m_parentIndexNumber.has_value();
|
||||
}
|
||||
|
||||
void ArtistInfo::setParentIndexNumberNull() {
|
||||
m_parentIndexNumber = std::nullopt;
|
||||
|
||||
}
|
||||
QDateTime ArtistInfo::premiereDate() const { return m_premiereDate; }
|
||||
|
||||
void ArtistInfo::setPremiereDate(QDateTime newPremiereDate) {
|
||||
m_premiereDate = newPremiereDate;
|
||||
}
|
||||
bool ArtistInfo::premiereDateNull() const {
|
||||
return m_premiereDate.isNull();
|
||||
}
|
||||
|
||||
void ArtistInfo::setPremiereDateNull() {
|
||||
m_premiereDate= QDateTime();
|
||||
|
||||
}
|
||||
bool ArtistInfo::isAutomated() const { return m_isAutomated; }
|
||||
|
||||
void ArtistInfo::setIsAutomated(bool newIsAutomated) {
|
||||
m_isAutomated = newIsAutomated;
|
||||
}
|
||||
|
||||
QList<QSharedPointer<SongInfo>> ArtistInfo::songInfos() const { return m_songInfos; }
|
||||
|
||||
void ArtistInfo::setSongInfos(QList<QSharedPointer<SongInfo>> newSongInfos) {
|
||||
m_songInfos = newSongInfos;
|
||||
}
|
||||
bool ArtistInfo::songInfosNull() const {
|
||||
return m_songInfos.size() == 0;
|
||||
}
|
||||
|
||||
void ArtistInfo::setSongInfosNull() {
|
||||
m_songInfos.clear();
|
||||
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using ArtistInfo = Jellyfin::DTO::ArtistInfo;
|
||||
|
||||
template <>
|
||||
ArtistInfo fromJsonValue<ArtistInfo>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return ArtistInfo::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
} // NS Jellyfin
|
||||
122
core/src/dto/artistinforemotesearchquery.cpp
Normal file
122
core/src/dto/artistinforemotesearchquery.cpp
Normal file
|
|
@ -0,0 +1,122 @@
|
|||
/*
|
||||
* Sailfin: a Jellyfin client written using Qt
|
||||
* Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
|
||||
* OVERWRITTEN AT SOME POINT!
|
||||
*
|
||||
* If there is a bug in this file, please fix the code generator used to generate this file found in
|
||||
* core/openapigenerator.d.
|
||||
*
|
||||
* This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
|
||||
* file with a newer file if needed instead of manually updating the files.
|
||||
*/
|
||||
|
||||
#include <JellyfinQt/dto/artistinforemotesearchquery.h>
|
||||
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
ArtistInfoRemoteSearchQuery::ArtistInfoRemoteSearchQuery() {}
|
||||
|
||||
ArtistInfoRemoteSearchQuery::ArtistInfoRemoteSearchQuery(const ArtistInfoRemoteSearchQuery &other) :
|
||||
|
||||
m_searchInfo(other.m_searchInfo),
|
||||
m_itemId(other.m_itemId),
|
||||
m_searchProviderName(other.m_searchProviderName),
|
||||
m_includeDisabledProviders(other.m_includeDisabledProviders){}
|
||||
|
||||
|
||||
void ArtistInfoRemoteSearchQuery::replaceData(ArtistInfoRemoteSearchQuery &other) {
|
||||
m_searchInfo = other.m_searchInfo;
|
||||
m_itemId = other.m_itemId;
|
||||
m_searchProviderName = other.m_searchProviderName;
|
||||
m_includeDisabledProviders = other.m_includeDisabledProviders;
|
||||
}
|
||||
|
||||
ArtistInfoRemoteSearchQuery ArtistInfoRemoteSearchQuery::fromJson(QJsonObject source) {
|
||||
ArtistInfoRemoteSearchQuery instance;
|
||||
instance.setFromJson(source);
|
||||
return instance;
|
||||
}
|
||||
|
||||
|
||||
void ArtistInfoRemoteSearchQuery::setFromJson(QJsonObject source) {
|
||||
m_searchInfo = Jellyfin::Support::fromJsonValue<QSharedPointer<ArtistInfo>>(source["SearchInfo"]);
|
||||
m_itemId = Jellyfin::Support::fromJsonValue<QString>(source["ItemId"]);
|
||||
m_searchProviderName = Jellyfin::Support::fromJsonValue<QString>(source["SearchProviderName"]);
|
||||
m_includeDisabledProviders = Jellyfin::Support::fromJsonValue<bool>(source["IncludeDisabledProviders"]);
|
||||
|
||||
}
|
||||
|
||||
QJsonObject ArtistInfoRemoteSearchQuery::toJson() {
|
||||
QJsonObject result;
|
||||
result["SearchInfo"] = Jellyfin::Support::toJsonValue<QSharedPointer<ArtistInfo>>(m_searchInfo);
|
||||
result["ItemId"] = Jellyfin::Support::toJsonValue<QString>(m_itemId);
|
||||
result["SearchProviderName"] = Jellyfin::Support::toJsonValue<QString>(m_searchProviderName);
|
||||
result["IncludeDisabledProviders"] = Jellyfin::Support::toJsonValue<bool>(m_includeDisabledProviders);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
QSharedPointer<ArtistInfo> ArtistInfoRemoteSearchQuery::searchInfo() const { return m_searchInfo; }
|
||||
|
||||
void ArtistInfoRemoteSearchQuery::setSearchInfo(QSharedPointer<ArtistInfo> newSearchInfo) {
|
||||
m_searchInfo = newSearchInfo;
|
||||
}
|
||||
|
||||
QString ArtistInfoRemoteSearchQuery::itemId() const { return m_itemId; }
|
||||
|
||||
void ArtistInfoRemoteSearchQuery::setItemId(QString newItemId) {
|
||||
m_itemId = newItemId;
|
||||
}
|
||||
|
||||
QString ArtistInfoRemoteSearchQuery::searchProviderName() const { return m_searchProviderName; }
|
||||
|
||||
void ArtistInfoRemoteSearchQuery::setSearchProviderName(QString newSearchProviderName) {
|
||||
m_searchProviderName = newSearchProviderName;
|
||||
}
|
||||
bool ArtistInfoRemoteSearchQuery::searchProviderNameNull() const {
|
||||
return m_searchProviderName.isNull();
|
||||
}
|
||||
|
||||
void ArtistInfoRemoteSearchQuery::setSearchProviderNameNull() {
|
||||
m_searchProviderName.clear();
|
||||
|
||||
}
|
||||
bool ArtistInfoRemoteSearchQuery::includeDisabledProviders() const { return m_includeDisabledProviders; }
|
||||
|
||||
void ArtistInfoRemoteSearchQuery::setIncludeDisabledProviders(bool newIncludeDisabledProviders) {
|
||||
m_includeDisabledProviders = newIncludeDisabledProviders;
|
||||
}
|
||||
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using ArtistInfoRemoteSearchQuery = Jellyfin::DTO::ArtistInfoRemoteSearchQuery;
|
||||
|
||||
template <>
|
||||
ArtistInfoRemoteSearchQuery fromJsonValue<ArtistInfoRemoteSearchQuery>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return ArtistInfoRemoteSearchQuery::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
} // NS Jellyfin
|
||||
126
core/src/dto/authenticateuserbyname.cpp
Normal file
126
core/src/dto/authenticateuserbyname.cpp
Normal file
|
|
@ -0,0 +1,126 @@
|
|||
/*
|
||||
* Sailfin: a Jellyfin client written using Qt
|
||||
* Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
|
||||
* OVERWRITTEN AT SOME POINT!
|
||||
*
|
||||
* If there is a bug in this file, please fix the code generator used to generate this file found in
|
||||
* core/openapigenerator.d.
|
||||
*
|
||||
* This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
|
||||
* file with a newer file if needed instead of manually updating the files.
|
||||
*/
|
||||
|
||||
#include <JellyfinQt/dto/authenticateuserbyname.h>
|
||||
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
AuthenticateUserByName::AuthenticateUserByName() {}
|
||||
|
||||
AuthenticateUserByName::AuthenticateUserByName(const AuthenticateUserByName &other) :
|
||||
|
||||
m_username(other.m_username),
|
||||
m_pw(other.m_pw),
|
||||
m_password(other.m_password){}
|
||||
|
||||
|
||||
void AuthenticateUserByName::replaceData(AuthenticateUserByName &other) {
|
||||
m_username = other.m_username;
|
||||
m_pw = other.m_pw;
|
||||
m_password = other.m_password;
|
||||
}
|
||||
|
||||
AuthenticateUserByName AuthenticateUserByName::fromJson(QJsonObject source) {
|
||||
AuthenticateUserByName instance;
|
||||
instance.setFromJson(source);
|
||||
return instance;
|
||||
}
|
||||
|
||||
|
||||
void AuthenticateUserByName::setFromJson(QJsonObject source) {
|
||||
m_username = Jellyfin::Support::fromJsonValue<QString>(source["Username"]);
|
||||
m_pw = Jellyfin::Support::fromJsonValue<QString>(source["Pw"]);
|
||||
m_password = Jellyfin::Support::fromJsonValue<QString>(source["Password"]);
|
||||
|
||||
}
|
||||
|
||||
QJsonObject AuthenticateUserByName::toJson() {
|
||||
QJsonObject result;
|
||||
result["Username"] = Jellyfin::Support::toJsonValue<QString>(m_username);
|
||||
result["Pw"] = Jellyfin::Support::toJsonValue<QString>(m_pw);
|
||||
result["Password"] = Jellyfin::Support::toJsonValue<QString>(m_password);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
QString AuthenticateUserByName::username() const { return m_username; }
|
||||
|
||||
void AuthenticateUserByName::setUsername(QString newUsername) {
|
||||
m_username = newUsername;
|
||||
}
|
||||
bool AuthenticateUserByName::usernameNull() const {
|
||||
return m_username.isNull();
|
||||
}
|
||||
|
||||
void AuthenticateUserByName::setUsernameNull() {
|
||||
m_username.clear();
|
||||
|
||||
}
|
||||
QString AuthenticateUserByName::pw() const { return m_pw; }
|
||||
|
||||
void AuthenticateUserByName::setPw(QString newPw) {
|
||||
m_pw = newPw;
|
||||
}
|
||||
bool AuthenticateUserByName::pwNull() const {
|
||||
return m_pw.isNull();
|
||||
}
|
||||
|
||||
void AuthenticateUserByName::setPwNull() {
|
||||
m_pw.clear();
|
||||
|
||||
}
|
||||
QString AuthenticateUserByName::password() const { return m_password; }
|
||||
|
||||
void AuthenticateUserByName::setPassword(QString newPassword) {
|
||||
m_password = newPassword;
|
||||
}
|
||||
bool AuthenticateUserByName::passwordNull() const {
|
||||
return m_password.isNull();
|
||||
}
|
||||
|
||||
void AuthenticateUserByName::setPasswordNull() {
|
||||
m_password.clear();
|
||||
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using AuthenticateUserByName = Jellyfin::DTO::AuthenticateUserByName;
|
||||
|
||||
template <>
|
||||
AuthenticateUserByName fromJsonValue<AuthenticateUserByName>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return AuthenticateUserByName::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
} // NS Jellyfin
|
||||
244
core/src/dto/authenticationinfo.cpp
Normal file
244
core/src/dto/authenticationinfo.cpp
Normal file
|
|
@ -0,0 +1,244 @@
|
|||
/*
|
||||
* Sailfin: a Jellyfin client written using Qt
|
||||
* Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
|
||||
* OVERWRITTEN AT SOME POINT!
|
||||
*
|
||||
* If there is a bug in this file, please fix the code generator used to generate this file found in
|
||||
* core/openapigenerator.d.
|
||||
*
|
||||
* This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
|
||||
* file with a newer file if needed instead of manually updating the files.
|
||||
*/
|
||||
|
||||
#include <JellyfinQt/dto/authenticationinfo.h>
|
||||
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
AuthenticationInfo::AuthenticationInfo() {}
|
||||
|
||||
AuthenticationInfo::AuthenticationInfo(const AuthenticationInfo &other) :
|
||||
|
||||
m_jellyfinId(other.m_jellyfinId),
|
||||
m_accessToken(other.m_accessToken),
|
||||
m_deviceId(other.m_deviceId),
|
||||
m_appName(other.m_appName),
|
||||
m_appVersion(other.m_appVersion),
|
||||
m_deviceName(other.m_deviceName),
|
||||
m_userId(other.m_userId),
|
||||
m_isActive(other.m_isActive),
|
||||
m_dateCreated(other.m_dateCreated),
|
||||
m_dateRevoked(other.m_dateRevoked),
|
||||
m_dateLastActivity(other.m_dateLastActivity),
|
||||
m_userName(other.m_userName){}
|
||||
|
||||
|
||||
void AuthenticationInfo::replaceData(AuthenticationInfo &other) {
|
||||
m_jellyfinId = other.m_jellyfinId;
|
||||
m_accessToken = other.m_accessToken;
|
||||
m_deviceId = other.m_deviceId;
|
||||
m_appName = other.m_appName;
|
||||
m_appVersion = other.m_appVersion;
|
||||
m_deviceName = other.m_deviceName;
|
||||
m_userId = other.m_userId;
|
||||
m_isActive = other.m_isActive;
|
||||
m_dateCreated = other.m_dateCreated;
|
||||
m_dateRevoked = other.m_dateRevoked;
|
||||
m_dateLastActivity = other.m_dateLastActivity;
|
||||
m_userName = other.m_userName;
|
||||
}
|
||||
|
||||
AuthenticationInfo AuthenticationInfo::fromJson(QJsonObject source) {
|
||||
AuthenticationInfo instance;
|
||||
instance.setFromJson(source);
|
||||
return instance;
|
||||
}
|
||||
|
||||
|
||||
void AuthenticationInfo::setFromJson(QJsonObject source) {
|
||||
m_jellyfinId = Jellyfin::Support::fromJsonValue<qint64>(source["Id"]);
|
||||
m_accessToken = Jellyfin::Support::fromJsonValue<QString>(source["AccessToken"]);
|
||||
m_deviceId = Jellyfin::Support::fromJsonValue<QString>(source["DeviceId"]);
|
||||
m_appName = Jellyfin::Support::fromJsonValue<QString>(source["AppName"]);
|
||||
m_appVersion = Jellyfin::Support::fromJsonValue<QString>(source["AppVersion"]);
|
||||
m_deviceName = Jellyfin::Support::fromJsonValue<QString>(source["DeviceName"]);
|
||||
m_userId = Jellyfin::Support::fromJsonValue<QString>(source["UserId"]);
|
||||
m_isActive = Jellyfin::Support::fromJsonValue<bool>(source["IsActive"]);
|
||||
m_dateCreated = Jellyfin::Support::fromJsonValue<QDateTime>(source["DateCreated"]);
|
||||
m_dateRevoked = Jellyfin::Support::fromJsonValue<QDateTime>(source["DateRevoked"]);
|
||||
m_dateLastActivity = Jellyfin::Support::fromJsonValue<QDateTime>(source["DateLastActivity"]);
|
||||
m_userName = Jellyfin::Support::fromJsonValue<QString>(source["UserName"]);
|
||||
|
||||
}
|
||||
|
||||
QJsonObject AuthenticationInfo::toJson() {
|
||||
QJsonObject result;
|
||||
result["Id"] = Jellyfin::Support::toJsonValue<qint64>(m_jellyfinId);
|
||||
result["AccessToken"] = Jellyfin::Support::toJsonValue<QString>(m_accessToken);
|
||||
result["DeviceId"] = Jellyfin::Support::toJsonValue<QString>(m_deviceId);
|
||||
result["AppName"] = Jellyfin::Support::toJsonValue<QString>(m_appName);
|
||||
result["AppVersion"] = Jellyfin::Support::toJsonValue<QString>(m_appVersion);
|
||||
result["DeviceName"] = Jellyfin::Support::toJsonValue<QString>(m_deviceName);
|
||||
result["UserId"] = Jellyfin::Support::toJsonValue<QString>(m_userId);
|
||||
result["IsActive"] = Jellyfin::Support::toJsonValue<bool>(m_isActive);
|
||||
result["DateCreated"] = Jellyfin::Support::toJsonValue<QDateTime>(m_dateCreated);
|
||||
result["DateRevoked"] = Jellyfin::Support::toJsonValue<QDateTime>(m_dateRevoked);
|
||||
result["DateLastActivity"] = Jellyfin::Support::toJsonValue<QDateTime>(m_dateLastActivity);
|
||||
result["UserName"] = Jellyfin::Support::toJsonValue<QString>(m_userName);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
qint64 AuthenticationInfo::jellyfinId() const { return m_jellyfinId; }
|
||||
|
||||
void AuthenticationInfo::setJellyfinId(qint64 newJellyfinId) {
|
||||
m_jellyfinId = newJellyfinId;
|
||||
}
|
||||
|
||||
QString AuthenticationInfo::accessToken() const { return m_accessToken; }
|
||||
|
||||
void AuthenticationInfo::setAccessToken(QString newAccessToken) {
|
||||
m_accessToken = newAccessToken;
|
||||
}
|
||||
bool AuthenticationInfo::accessTokenNull() const {
|
||||
return m_accessToken.isNull();
|
||||
}
|
||||
|
||||
void AuthenticationInfo::setAccessTokenNull() {
|
||||
m_accessToken.clear();
|
||||
|
||||
}
|
||||
QString AuthenticationInfo::deviceId() const { return m_deviceId; }
|
||||
|
||||
void AuthenticationInfo::setDeviceId(QString newDeviceId) {
|
||||
m_deviceId = newDeviceId;
|
||||
}
|
||||
bool AuthenticationInfo::deviceIdNull() const {
|
||||
return m_deviceId.isNull();
|
||||
}
|
||||
|
||||
void AuthenticationInfo::setDeviceIdNull() {
|
||||
m_deviceId.clear();
|
||||
|
||||
}
|
||||
QString AuthenticationInfo::appName() const { return m_appName; }
|
||||
|
||||
void AuthenticationInfo::setAppName(QString newAppName) {
|
||||
m_appName = newAppName;
|
||||
}
|
||||
bool AuthenticationInfo::appNameNull() const {
|
||||
return m_appName.isNull();
|
||||
}
|
||||
|
||||
void AuthenticationInfo::setAppNameNull() {
|
||||
m_appName.clear();
|
||||
|
||||
}
|
||||
QString AuthenticationInfo::appVersion() const { return m_appVersion; }
|
||||
|
||||
void AuthenticationInfo::setAppVersion(QString newAppVersion) {
|
||||
m_appVersion = newAppVersion;
|
||||
}
|
||||
bool AuthenticationInfo::appVersionNull() const {
|
||||
return m_appVersion.isNull();
|
||||
}
|
||||
|
||||
void AuthenticationInfo::setAppVersionNull() {
|
||||
m_appVersion.clear();
|
||||
|
||||
}
|
||||
QString AuthenticationInfo::deviceName() const { return m_deviceName; }
|
||||
|
||||
void AuthenticationInfo::setDeviceName(QString newDeviceName) {
|
||||
m_deviceName = newDeviceName;
|
||||
}
|
||||
bool AuthenticationInfo::deviceNameNull() const {
|
||||
return m_deviceName.isNull();
|
||||
}
|
||||
|
||||
void AuthenticationInfo::setDeviceNameNull() {
|
||||
m_deviceName.clear();
|
||||
|
||||
}
|
||||
QString AuthenticationInfo::userId() const { return m_userId; }
|
||||
|
||||
void AuthenticationInfo::setUserId(QString newUserId) {
|
||||
m_userId = newUserId;
|
||||
}
|
||||
|
||||
bool AuthenticationInfo::isActive() const { return m_isActive; }
|
||||
|
||||
void AuthenticationInfo::setIsActive(bool newIsActive) {
|
||||
m_isActive = newIsActive;
|
||||
}
|
||||
|
||||
QDateTime AuthenticationInfo::dateCreated() const { return m_dateCreated; }
|
||||
|
||||
void AuthenticationInfo::setDateCreated(QDateTime newDateCreated) {
|
||||
m_dateCreated = newDateCreated;
|
||||
}
|
||||
|
||||
QDateTime AuthenticationInfo::dateRevoked() const { return m_dateRevoked; }
|
||||
|
||||
void AuthenticationInfo::setDateRevoked(QDateTime newDateRevoked) {
|
||||
m_dateRevoked = newDateRevoked;
|
||||
}
|
||||
bool AuthenticationInfo::dateRevokedNull() const {
|
||||
return m_dateRevoked.isNull();
|
||||
}
|
||||
|
||||
void AuthenticationInfo::setDateRevokedNull() {
|
||||
m_dateRevoked= QDateTime();
|
||||
|
||||
}
|
||||
QDateTime AuthenticationInfo::dateLastActivity() const { return m_dateLastActivity; }
|
||||
|
||||
void AuthenticationInfo::setDateLastActivity(QDateTime newDateLastActivity) {
|
||||
m_dateLastActivity = newDateLastActivity;
|
||||
}
|
||||
|
||||
QString AuthenticationInfo::userName() const { return m_userName; }
|
||||
|
||||
void AuthenticationInfo::setUserName(QString newUserName) {
|
||||
m_userName = newUserName;
|
||||
}
|
||||
bool AuthenticationInfo::userNameNull() const {
|
||||
return m_userName.isNull();
|
||||
}
|
||||
|
||||
void AuthenticationInfo::setUserNameNull() {
|
||||
m_userName.clear();
|
||||
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using AuthenticationInfo = Jellyfin::DTO::AuthenticationInfo;
|
||||
|
||||
template <>
|
||||
AuthenticationInfo fromJsonValue<AuthenticationInfo>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return AuthenticationInfo::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
} // NS Jellyfin
|
||||
112
core/src/dto/authenticationinfoqueryresult.cpp
Normal file
112
core/src/dto/authenticationinfoqueryresult.cpp
Normal file
|
|
@ -0,0 +1,112 @@
|
|||
/*
|
||||
* Sailfin: a Jellyfin client written using Qt
|
||||
* Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
|
||||
* OVERWRITTEN AT SOME POINT!
|
||||
*
|
||||
* If there is a bug in this file, please fix the code generator used to generate this file found in
|
||||
* core/openapigenerator.d.
|
||||
*
|
||||
* This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
|
||||
* file with a newer file if needed instead of manually updating the files.
|
||||
*/
|
||||
|
||||
#include <JellyfinQt/dto/authenticationinfoqueryresult.h>
|
||||
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
AuthenticationInfoQueryResult::AuthenticationInfoQueryResult() {}
|
||||
|
||||
AuthenticationInfoQueryResult::AuthenticationInfoQueryResult(const AuthenticationInfoQueryResult &other) :
|
||||
|
||||
m_items(other.m_items),
|
||||
m_totalRecordCount(other.m_totalRecordCount),
|
||||
m_startIndex(other.m_startIndex){}
|
||||
|
||||
|
||||
void AuthenticationInfoQueryResult::replaceData(AuthenticationInfoQueryResult &other) {
|
||||
m_items = other.m_items;
|
||||
m_totalRecordCount = other.m_totalRecordCount;
|
||||
m_startIndex = other.m_startIndex;
|
||||
}
|
||||
|
||||
AuthenticationInfoQueryResult AuthenticationInfoQueryResult::fromJson(QJsonObject source) {
|
||||
AuthenticationInfoQueryResult instance;
|
||||
instance.setFromJson(source);
|
||||
return instance;
|
||||
}
|
||||
|
||||
|
||||
void AuthenticationInfoQueryResult::setFromJson(QJsonObject source) {
|
||||
m_items = Jellyfin::Support::fromJsonValue<QList<QSharedPointer<AuthenticationInfo>>>(source["Items"]);
|
||||
m_totalRecordCount = Jellyfin::Support::fromJsonValue<qint32>(source["TotalRecordCount"]);
|
||||
m_startIndex = Jellyfin::Support::fromJsonValue<qint32>(source["StartIndex"]);
|
||||
|
||||
}
|
||||
|
||||
QJsonObject AuthenticationInfoQueryResult::toJson() {
|
||||
QJsonObject result;
|
||||
result["Items"] = Jellyfin::Support::toJsonValue<QList<QSharedPointer<AuthenticationInfo>>>(m_items);
|
||||
result["TotalRecordCount"] = Jellyfin::Support::toJsonValue<qint32>(m_totalRecordCount);
|
||||
result["StartIndex"] = Jellyfin::Support::toJsonValue<qint32>(m_startIndex);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
QList<QSharedPointer<AuthenticationInfo>> AuthenticationInfoQueryResult::items() const { return m_items; }
|
||||
|
||||
void AuthenticationInfoQueryResult::setItems(QList<QSharedPointer<AuthenticationInfo>> newItems) {
|
||||
m_items = newItems;
|
||||
}
|
||||
bool AuthenticationInfoQueryResult::itemsNull() const {
|
||||
return m_items.size() == 0;
|
||||
}
|
||||
|
||||
void AuthenticationInfoQueryResult::setItemsNull() {
|
||||
m_items.clear();
|
||||
|
||||
}
|
||||
qint32 AuthenticationInfoQueryResult::totalRecordCount() const { return m_totalRecordCount; }
|
||||
|
||||
void AuthenticationInfoQueryResult::setTotalRecordCount(qint32 newTotalRecordCount) {
|
||||
m_totalRecordCount = newTotalRecordCount;
|
||||
}
|
||||
|
||||
qint32 AuthenticationInfoQueryResult::startIndex() const { return m_startIndex; }
|
||||
|
||||
void AuthenticationInfoQueryResult::setStartIndex(qint32 newStartIndex) {
|
||||
m_startIndex = newStartIndex;
|
||||
}
|
||||
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using AuthenticationInfoQueryResult = Jellyfin::DTO::AuthenticationInfoQueryResult;
|
||||
|
||||
template <>
|
||||
AuthenticationInfoQueryResult fromJsonValue<AuthenticationInfoQueryResult>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return AuthenticationInfoQueryResult::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
} // NS Jellyfin
|
||||
129
core/src/dto/authenticationresult.cpp
Normal file
129
core/src/dto/authenticationresult.cpp
Normal file
|
|
@ -0,0 +1,129 @@
|
|||
/*
|
||||
* Sailfin: a Jellyfin client written using Qt
|
||||
* Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
|
||||
* OVERWRITTEN AT SOME POINT!
|
||||
*
|
||||
* If there is a bug in this file, please fix the code generator used to generate this file found in
|
||||
* core/openapigenerator.d.
|
||||
*
|
||||
* This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
|
||||
* file with a newer file if needed instead of manually updating the files.
|
||||
*/
|
||||
|
||||
#include <JellyfinQt/dto/authenticationresult.h>
|
||||
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
AuthenticationResult::AuthenticationResult() {}
|
||||
|
||||
AuthenticationResult::AuthenticationResult(const AuthenticationResult &other) :
|
||||
|
||||
m_user(other.m_user),
|
||||
m_sessionInfo(other.m_sessionInfo),
|
||||
m_accessToken(other.m_accessToken),
|
||||
m_serverId(other.m_serverId){}
|
||||
|
||||
|
||||
void AuthenticationResult::replaceData(AuthenticationResult &other) {
|
||||
m_user = other.m_user;
|
||||
m_sessionInfo = other.m_sessionInfo;
|
||||
m_accessToken = other.m_accessToken;
|
||||
m_serverId = other.m_serverId;
|
||||
}
|
||||
|
||||
AuthenticationResult AuthenticationResult::fromJson(QJsonObject source) {
|
||||
AuthenticationResult instance;
|
||||
instance.setFromJson(source);
|
||||
return instance;
|
||||
}
|
||||
|
||||
|
||||
void AuthenticationResult::setFromJson(QJsonObject source) {
|
||||
m_user = Jellyfin::Support::fromJsonValue<QSharedPointer<UserDto>>(source["User"]);
|
||||
m_sessionInfo = Jellyfin::Support::fromJsonValue<QSharedPointer<SessionInfo>>(source["SessionInfo"]);
|
||||
m_accessToken = Jellyfin::Support::fromJsonValue<QString>(source["AccessToken"]);
|
||||
m_serverId = Jellyfin::Support::fromJsonValue<QString>(source["ServerId"]);
|
||||
|
||||
}
|
||||
|
||||
QJsonObject AuthenticationResult::toJson() {
|
||||
QJsonObject result;
|
||||
result["User"] = Jellyfin::Support::toJsonValue<QSharedPointer<UserDto>>(m_user);
|
||||
result["SessionInfo"] = Jellyfin::Support::toJsonValue<QSharedPointer<SessionInfo>>(m_sessionInfo);
|
||||
result["AccessToken"] = Jellyfin::Support::toJsonValue<QString>(m_accessToken);
|
||||
result["ServerId"] = Jellyfin::Support::toJsonValue<QString>(m_serverId);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
QSharedPointer<UserDto> AuthenticationResult::user() const { return m_user; }
|
||||
|
||||
void AuthenticationResult::setUser(QSharedPointer<UserDto> newUser) {
|
||||
m_user = newUser;
|
||||
}
|
||||
|
||||
QSharedPointer<SessionInfo> AuthenticationResult::sessionInfo() const { return m_sessionInfo; }
|
||||
|
||||
void AuthenticationResult::setSessionInfo(QSharedPointer<SessionInfo> newSessionInfo) {
|
||||
m_sessionInfo = newSessionInfo;
|
||||
}
|
||||
|
||||
QString AuthenticationResult::accessToken() const { return m_accessToken; }
|
||||
|
||||
void AuthenticationResult::setAccessToken(QString newAccessToken) {
|
||||
m_accessToken = newAccessToken;
|
||||
}
|
||||
bool AuthenticationResult::accessTokenNull() const {
|
||||
return m_accessToken.isNull();
|
||||
}
|
||||
|
||||
void AuthenticationResult::setAccessTokenNull() {
|
||||
m_accessToken.clear();
|
||||
|
||||
}
|
||||
QString AuthenticationResult::serverId() const { return m_serverId; }
|
||||
|
||||
void AuthenticationResult::setServerId(QString newServerId) {
|
||||
m_serverId = newServerId;
|
||||
}
|
||||
bool AuthenticationResult::serverIdNull() const {
|
||||
return m_serverId.isNull();
|
||||
}
|
||||
|
||||
void AuthenticationResult::setServerIdNull() {
|
||||
m_serverId.clear();
|
||||
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using AuthenticationResult = Jellyfin::DTO::AuthenticationResult;
|
||||
|
||||
template <>
|
||||
AuthenticationResult fromJsonValue<AuthenticationResult>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return AuthenticationResult::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
} // NS Jellyfin
|
||||
220
core/src/dto/baseitem.cpp
Normal file
220
core/src/dto/baseitem.cpp
Normal file
|
|
@ -0,0 +1,220 @@
|
|||
/*
|
||||
* Sailfin: a Jellyfin client written using Qt
|
||||
* Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
|
||||
* OVERWRITTEN AT SOME POINT!
|
||||
*
|
||||
* If there is a bug in this file, please fix the code generator used to generate this file found in
|
||||
* core/openapigenerator.d.
|
||||
*
|
||||
* This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
|
||||
* file with a newer file if needed instead of manually updating the files.
|
||||
*/
|
||||
|
||||
#include <JellyfinQt/dto/baseitem.h>
|
||||
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
BaseItem::BaseItem() {}
|
||||
|
||||
BaseItem::BaseItem(const BaseItem &other) :
|
||||
|
||||
m_size(other.m_size),
|
||||
m_container(other.m_container),
|
||||
m_dateLastSaved(other.m_dateLastSaved),
|
||||
m_remoteTrailers(other.m_remoteTrailers),
|
||||
m_isHD(other.m_isHD),
|
||||
m_isShortcut(other.m_isShortcut),
|
||||
m_shortcutPath(other.m_shortcutPath),
|
||||
m_width(other.m_width),
|
||||
m_height(other.m_height),
|
||||
m_extraIds(other.m_extraIds),
|
||||
m_supportsExternalTransfer(other.m_supportsExternalTransfer){}
|
||||
|
||||
|
||||
void BaseItem::replaceData(BaseItem &other) {
|
||||
m_size = other.m_size;
|
||||
m_container = other.m_container;
|
||||
m_dateLastSaved = other.m_dateLastSaved;
|
||||
m_remoteTrailers = other.m_remoteTrailers;
|
||||
m_isHD = other.m_isHD;
|
||||
m_isShortcut = other.m_isShortcut;
|
||||
m_shortcutPath = other.m_shortcutPath;
|
||||
m_width = other.m_width;
|
||||
m_height = other.m_height;
|
||||
m_extraIds = other.m_extraIds;
|
||||
m_supportsExternalTransfer = other.m_supportsExternalTransfer;
|
||||
}
|
||||
|
||||
BaseItem BaseItem::fromJson(QJsonObject source) {
|
||||
BaseItem instance;
|
||||
instance.setFromJson(source);
|
||||
return instance;
|
||||
}
|
||||
|
||||
|
||||
void BaseItem::setFromJson(QJsonObject source) {
|
||||
m_size = Jellyfin::Support::fromJsonValue<std::optional<qint64>>(source["Size"]);
|
||||
m_container = Jellyfin::Support::fromJsonValue<QString>(source["Container"]);
|
||||
m_dateLastSaved = Jellyfin::Support::fromJsonValue<QDateTime>(source["DateLastSaved"]);
|
||||
m_remoteTrailers = Jellyfin::Support::fromJsonValue<QList<QSharedPointer<MediaUrl>>>(source["RemoteTrailers"]);
|
||||
m_isHD = Jellyfin::Support::fromJsonValue<bool>(source["IsHD"]);
|
||||
m_isShortcut = Jellyfin::Support::fromJsonValue<bool>(source["IsShortcut"]);
|
||||
m_shortcutPath = Jellyfin::Support::fromJsonValue<QString>(source["ShortcutPath"]);
|
||||
m_width = Jellyfin::Support::fromJsonValue<qint32>(source["Width"]);
|
||||
m_height = Jellyfin::Support::fromJsonValue<qint32>(source["Height"]);
|
||||
m_extraIds = Jellyfin::Support::fromJsonValue<QStringList>(source["ExtraIds"]);
|
||||
m_supportsExternalTransfer = Jellyfin::Support::fromJsonValue<bool>(source["SupportsExternalTransfer"]);
|
||||
|
||||
}
|
||||
|
||||
QJsonObject BaseItem::toJson() {
|
||||
QJsonObject result;
|
||||
result["Size"] = Jellyfin::Support::toJsonValue<std::optional<qint64>>(m_size);
|
||||
result["Container"] = Jellyfin::Support::toJsonValue<QString>(m_container);
|
||||
result["DateLastSaved"] = Jellyfin::Support::toJsonValue<QDateTime>(m_dateLastSaved);
|
||||
result["RemoteTrailers"] = Jellyfin::Support::toJsonValue<QList<QSharedPointer<MediaUrl>>>(m_remoteTrailers);
|
||||
result["IsHD"] = Jellyfin::Support::toJsonValue<bool>(m_isHD);
|
||||
result["IsShortcut"] = Jellyfin::Support::toJsonValue<bool>(m_isShortcut);
|
||||
result["ShortcutPath"] = Jellyfin::Support::toJsonValue<QString>(m_shortcutPath);
|
||||
result["Width"] = Jellyfin::Support::toJsonValue<qint32>(m_width);
|
||||
result["Height"] = Jellyfin::Support::toJsonValue<qint32>(m_height);
|
||||
result["ExtraIds"] = Jellyfin::Support::toJsonValue<QStringList>(m_extraIds);
|
||||
result["SupportsExternalTransfer"] = Jellyfin::Support::toJsonValue<bool>(m_supportsExternalTransfer);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
std::optional<qint64> BaseItem::size() const { return m_size; }
|
||||
|
||||
void BaseItem::setSize(std::optional<qint64> newSize) {
|
||||
m_size = newSize;
|
||||
}
|
||||
bool BaseItem::sizeNull() const {
|
||||
return !m_size.has_value();
|
||||
}
|
||||
|
||||
void BaseItem::setSizeNull() {
|
||||
m_size = std::nullopt;
|
||||
|
||||
}
|
||||
QString BaseItem::container() const { return m_container; }
|
||||
|
||||
void BaseItem::setContainer(QString newContainer) {
|
||||
m_container = newContainer;
|
||||
}
|
||||
bool BaseItem::containerNull() const {
|
||||
return m_container.isNull();
|
||||
}
|
||||
|
||||
void BaseItem::setContainerNull() {
|
||||
m_container.clear();
|
||||
|
||||
}
|
||||
QDateTime BaseItem::dateLastSaved() const { return m_dateLastSaved; }
|
||||
|
||||
void BaseItem::setDateLastSaved(QDateTime newDateLastSaved) {
|
||||
m_dateLastSaved = newDateLastSaved;
|
||||
}
|
||||
|
||||
QList<QSharedPointer<MediaUrl>> BaseItem::remoteTrailers() const { return m_remoteTrailers; }
|
||||
|
||||
void BaseItem::setRemoteTrailers(QList<QSharedPointer<MediaUrl>> newRemoteTrailers) {
|
||||
m_remoteTrailers = newRemoteTrailers;
|
||||
}
|
||||
bool BaseItem::remoteTrailersNull() const {
|
||||
return m_remoteTrailers.size() == 0;
|
||||
}
|
||||
|
||||
void BaseItem::setRemoteTrailersNull() {
|
||||
m_remoteTrailers.clear();
|
||||
|
||||
}
|
||||
bool BaseItem::isHD() const { return m_isHD; }
|
||||
|
||||
void BaseItem::setIsHD(bool newIsHD) {
|
||||
m_isHD = newIsHD;
|
||||
}
|
||||
|
||||
bool BaseItem::isShortcut() const { return m_isShortcut; }
|
||||
|
||||
void BaseItem::setIsShortcut(bool newIsShortcut) {
|
||||
m_isShortcut = newIsShortcut;
|
||||
}
|
||||
|
||||
QString BaseItem::shortcutPath() const { return m_shortcutPath; }
|
||||
|
||||
void BaseItem::setShortcutPath(QString newShortcutPath) {
|
||||
m_shortcutPath = newShortcutPath;
|
||||
}
|
||||
bool BaseItem::shortcutPathNull() const {
|
||||
return m_shortcutPath.isNull();
|
||||
}
|
||||
|
||||
void BaseItem::setShortcutPathNull() {
|
||||
m_shortcutPath.clear();
|
||||
|
||||
}
|
||||
qint32 BaseItem::width() const { return m_width; }
|
||||
|
||||
void BaseItem::setWidth(qint32 newWidth) {
|
||||
m_width = newWidth;
|
||||
}
|
||||
|
||||
qint32 BaseItem::height() const { return m_height; }
|
||||
|
||||
void BaseItem::setHeight(qint32 newHeight) {
|
||||
m_height = newHeight;
|
||||
}
|
||||
|
||||
QStringList BaseItem::extraIds() const { return m_extraIds; }
|
||||
|
||||
void BaseItem::setExtraIds(QStringList newExtraIds) {
|
||||
m_extraIds = newExtraIds;
|
||||
}
|
||||
bool BaseItem::extraIdsNull() const {
|
||||
return m_extraIds.size() == 0;
|
||||
}
|
||||
|
||||
void BaseItem::setExtraIdsNull() {
|
||||
m_extraIds.clear();
|
||||
|
||||
}
|
||||
bool BaseItem::supportsExternalTransfer() const { return m_supportsExternalTransfer; }
|
||||
|
||||
void BaseItem::setSupportsExternalTransfer(bool newSupportsExternalTransfer) {
|
||||
m_supportsExternalTransfer = newSupportsExternalTransfer;
|
||||
}
|
||||
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using BaseItem = Jellyfin::DTO::BaseItem;
|
||||
|
||||
template <>
|
||||
BaseItem fromJsonValue<BaseItem>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return BaseItem::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
} // NS Jellyfin
|
||||
2565
core/src/dto/baseitemdto.cpp
Normal file
2565
core/src/dto/baseitemdto.cpp
Normal file
File diff suppressed because it is too large
Load diff
112
core/src/dto/baseitemdtoqueryresult.cpp
Normal file
112
core/src/dto/baseitemdtoqueryresult.cpp
Normal file
|
|
@ -0,0 +1,112 @@
|
|||
/*
|
||||
* Sailfin: a Jellyfin client written using Qt
|
||||
* Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
|
||||
* OVERWRITTEN AT SOME POINT!
|
||||
*
|
||||
* If there is a bug in this file, please fix the code generator used to generate this file found in
|
||||
* core/openapigenerator.d.
|
||||
*
|
||||
* This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
|
||||
* file with a newer file if needed instead of manually updating the files.
|
||||
*/
|
||||
|
||||
#include <JellyfinQt/dto/baseitemdtoqueryresult.h>
|
||||
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
BaseItemDtoQueryResult::BaseItemDtoQueryResult() {}
|
||||
|
||||
BaseItemDtoQueryResult::BaseItemDtoQueryResult(const BaseItemDtoQueryResult &other) :
|
||||
|
||||
m_items(other.m_items),
|
||||
m_totalRecordCount(other.m_totalRecordCount),
|
||||
m_startIndex(other.m_startIndex){}
|
||||
|
||||
|
||||
void BaseItemDtoQueryResult::replaceData(BaseItemDtoQueryResult &other) {
|
||||
m_items = other.m_items;
|
||||
m_totalRecordCount = other.m_totalRecordCount;
|
||||
m_startIndex = other.m_startIndex;
|
||||
}
|
||||
|
||||
BaseItemDtoQueryResult BaseItemDtoQueryResult::fromJson(QJsonObject source) {
|
||||
BaseItemDtoQueryResult instance;
|
||||
instance.setFromJson(source);
|
||||
return instance;
|
||||
}
|
||||
|
||||
|
||||
void BaseItemDtoQueryResult::setFromJson(QJsonObject source) {
|
||||
m_items = Jellyfin::Support::fromJsonValue<QList<QSharedPointer<BaseItemDto>>>(source["Items"]);
|
||||
m_totalRecordCount = Jellyfin::Support::fromJsonValue<qint32>(source["TotalRecordCount"]);
|
||||
m_startIndex = Jellyfin::Support::fromJsonValue<qint32>(source["StartIndex"]);
|
||||
|
||||
}
|
||||
|
||||
QJsonObject BaseItemDtoQueryResult::toJson() {
|
||||
QJsonObject result;
|
||||
result["Items"] = Jellyfin::Support::toJsonValue<QList<QSharedPointer<BaseItemDto>>>(m_items);
|
||||
result["TotalRecordCount"] = Jellyfin::Support::toJsonValue<qint32>(m_totalRecordCount);
|
||||
result["StartIndex"] = Jellyfin::Support::toJsonValue<qint32>(m_startIndex);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
QList<QSharedPointer<BaseItemDto>> BaseItemDtoQueryResult::items() const { return m_items; }
|
||||
|
||||
void BaseItemDtoQueryResult::setItems(QList<QSharedPointer<BaseItemDto>> newItems) {
|
||||
m_items = newItems;
|
||||
}
|
||||
bool BaseItemDtoQueryResult::itemsNull() const {
|
||||
return m_items.size() == 0;
|
||||
}
|
||||
|
||||
void BaseItemDtoQueryResult::setItemsNull() {
|
||||
m_items.clear();
|
||||
|
||||
}
|
||||
qint32 BaseItemDtoQueryResult::totalRecordCount() const { return m_totalRecordCount; }
|
||||
|
||||
void BaseItemDtoQueryResult::setTotalRecordCount(qint32 newTotalRecordCount) {
|
||||
m_totalRecordCount = newTotalRecordCount;
|
||||
}
|
||||
|
||||
qint32 BaseItemDtoQueryResult::startIndex() const { return m_startIndex; }
|
||||
|
||||
void BaseItemDtoQueryResult::setStartIndex(qint32 newStartIndex) {
|
||||
m_startIndex = newStartIndex;
|
||||
}
|
||||
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using BaseItemDtoQueryResult = Jellyfin::DTO::BaseItemDtoQueryResult;
|
||||
|
||||
template <>
|
||||
BaseItemDtoQueryResult fromJsonValue<BaseItemDtoQueryResult>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return BaseItemDtoQueryResult::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
} // NS Jellyfin
|
||||
177
core/src/dto/baseitemperson.cpp
Normal file
177
core/src/dto/baseitemperson.cpp
Normal file
|
|
@ -0,0 +1,177 @@
|
|||
/*
|
||||
* Sailfin: a Jellyfin client written using Qt
|
||||
* Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
|
||||
* OVERWRITTEN AT SOME POINT!
|
||||
*
|
||||
* If there is a bug in this file, please fix the code generator used to generate this file found in
|
||||
* core/openapigenerator.d.
|
||||
*
|
||||
* This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
|
||||
* file with a newer file if needed instead of manually updating the files.
|
||||
*/
|
||||
|
||||
#include <JellyfinQt/dto/baseitemperson.h>
|
||||
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
BaseItemPerson::BaseItemPerson() {}
|
||||
|
||||
BaseItemPerson::BaseItemPerson(const BaseItemPerson &other) :
|
||||
|
||||
m_name(other.m_name),
|
||||
m_jellyfinId(other.m_jellyfinId),
|
||||
m_role(other.m_role),
|
||||
m_type(other.m_type),
|
||||
m_primaryImageTag(other.m_primaryImageTag),
|
||||
m_imageBlurHashes(other.m_imageBlurHashes){}
|
||||
|
||||
|
||||
void BaseItemPerson::replaceData(BaseItemPerson &other) {
|
||||
m_name = other.m_name;
|
||||
m_jellyfinId = other.m_jellyfinId;
|
||||
m_role = other.m_role;
|
||||
m_type = other.m_type;
|
||||
m_primaryImageTag = other.m_primaryImageTag;
|
||||
m_imageBlurHashes = other.m_imageBlurHashes;
|
||||
}
|
||||
|
||||
BaseItemPerson BaseItemPerson::fromJson(QJsonObject source) {
|
||||
BaseItemPerson instance;
|
||||
instance.setFromJson(source);
|
||||
return instance;
|
||||
}
|
||||
|
||||
|
||||
void BaseItemPerson::setFromJson(QJsonObject source) {
|
||||
m_name = Jellyfin::Support::fromJsonValue<QString>(source["Name"]);
|
||||
m_jellyfinId = Jellyfin::Support::fromJsonValue<QString>(source["Id"]);
|
||||
m_role = Jellyfin::Support::fromJsonValue<QString>(source["Role"]);
|
||||
m_type = Jellyfin::Support::fromJsonValue<QString>(source["Type"]);
|
||||
m_primaryImageTag = Jellyfin::Support::fromJsonValue<QString>(source["PrimaryImageTag"]);
|
||||
m_imageBlurHashes = Jellyfin::Support::fromJsonValue<std::optional<QJsonObject>>(source["ImageBlurHashes"]);
|
||||
|
||||
}
|
||||
|
||||
QJsonObject BaseItemPerson::toJson() {
|
||||
QJsonObject result;
|
||||
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
||||
result["Id"] = Jellyfin::Support::toJsonValue<QString>(m_jellyfinId);
|
||||
result["Role"] = Jellyfin::Support::toJsonValue<QString>(m_role);
|
||||
result["Type"] = Jellyfin::Support::toJsonValue<QString>(m_type);
|
||||
result["PrimaryImageTag"] = Jellyfin::Support::toJsonValue<QString>(m_primaryImageTag);
|
||||
result["ImageBlurHashes"] = Jellyfin::Support::toJsonValue<std::optional<QJsonObject>>(m_imageBlurHashes);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
QString BaseItemPerson::name() const { return m_name; }
|
||||
|
||||
void BaseItemPerson::setName(QString newName) {
|
||||
m_name = newName;
|
||||
}
|
||||
bool BaseItemPerson::nameNull() const {
|
||||
return m_name.isNull();
|
||||
}
|
||||
|
||||
void BaseItemPerson::setNameNull() {
|
||||
m_name.clear();
|
||||
|
||||
}
|
||||
QString BaseItemPerson::jellyfinId() const { return m_jellyfinId; }
|
||||
|
||||
void BaseItemPerson::setJellyfinId(QString newJellyfinId) {
|
||||
m_jellyfinId = newJellyfinId;
|
||||
}
|
||||
bool BaseItemPerson::jellyfinIdNull() const {
|
||||
return m_jellyfinId.isNull();
|
||||
}
|
||||
|
||||
void BaseItemPerson::setJellyfinIdNull() {
|
||||
m_jellyfinId.clear();
|
||||
|
||||
}
|
||||
QString BaseItemPerson::role() const { return m_role; }
|
||||
|
||||
void BaseItemPerson::setRole(QString newRole) {
|
||||
m_role = newRole;
|
||||
}
|
||||
bool BaseItemPerson::roleNull() const {
|
||||
return m_role.isNull();
|
||||
}
|
||||
|
||||
void BaseItemPerson::setRoleNull() {
|
||||
m_role.clear();
|
||||
|
||||
}
|
||||
QString BaseItemPerson::type() const { return m_type; }
|
||||
|
||||
void BaseItemPerson::setType(QString newType) {
|
||||
m_type = newType;
|
||||
}
|
||||
bool BaseItemPerson::typeNull() const {
|
||||
return m_type.isNull();
|
||||
}
|
||||
|
||||
void BaseItemPerson::setTypeNull() {
|
||||
m_type.clear();
|
||||
|
||||
}
|
||||
QString BaseItemPerson::primaryImageTag() const { return m_primaryImageTag; }
|
||||
|
||||
void BaseItemPerson::setPrimaryImageTag(QString newPrimaryImageTag) {
|
||||
m_primaryImageTag = newPrimaryImageTag;
|
||||
}
|
||||
bool BaseItemPerson::primaryImageTagNull() const {
|
||||
return m_primaryImageTag.isNull();
|
||||
}
|
||||
|
||||
void BaseItemPerson::setPrimaryImageTagNull() {
|
||||
m_primaryImageTag.clear();
|
||||
|
||||
}
|
||||
std::optional<QJsonObject> BaseItemPerson::imageBlurHashes() const { return m_imageBlurHashes; }
|
||||
|
||||
void BaseItemPerson::setImageBlurHashes(std::optional<QJsonObject> newImageBlurHashes) {
|
||||
m_imageBlurHashes = newImageBlurHashes;
|
||||
}
|
||||
bool BaseItemPerson::imageBlurHashesNull() const {
|
||||
return !m_imageBlurHashes.has_value();
|
||||
}
|
||||
|
||||
void BaseItemPerson::setImageBlurHashesNull() {
|
||||
m_imageBlurHashes = std::nullopt;
|
||||
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using BaseItemPerson = Jellyfin::DTO::BaseItemPerson;
|
||||
|
||||
template <>
|
||||
BaseItemPerson fromJsonValue<BaseItemPerson>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return BaseItemPerson::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
} // NS Jellyfin
|
||||
0
core/src/dto/basepluginconfiguration.cpp
Normal file
0
core/src/dto/basepluginconfiguration.cpp
Normal file
255
core/src/dto/bookinfo.cpp
Normal file
255
core/src/dto/bookinfo.cpp
Normal file
|
|
@ -0,0 +1,255 @@
|
|||
/*
|
||||
* Sailfin: a Jellyfin client written using Qt
|
||||
* Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
|
||||
* OVERWRITTEN AT SOME POINT!
|
||||
*
|
||||
* If there is a bug in this file, please fix the code generator used to generate this file found in
|
||||
* core/openapigenerator.d.
|
||||
*
|
||||
* This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
|
||||
* file with a newer file if needed instead of manually updating the files.
|
||||
*/
|
||||
|
||||
#include <JellyfinQt/dto/bookinfo.h>
|
||||
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
BookInfo::BookInfo() {}
|
||||
|
||||
BookInfo::BookInfo(const BookInfo &other) :
|
||||
|
||||
m_name(other.m_name),
|
||||
m_path(other.m_path),
|
||||
m_metadataLanguage(other.m_metadataLanguage),
|
||||
m_metadataCountryCode(other.m_metadataCountryCode),
|
||||
m_providerIds(other.m_providerIds),
|
||||
m_year(other.m_year),
|
||||
m_indexNumber(other.m_indexNumber),
|
||||
m_parentIndexNumber(other.m_parentIndexNumber),
|
||||
m_premiereDate(other.m_premiereDate),
|
||||
m_isAutomated(other.m_isAutomated),
|
||||
m_seriesName(other.m_seriesName){}
|
||||
|
||||
|
||||
void BookInfo::replaceData(BookInfo &other) {
|
||||
m_name = other.m_name;
|
||||
m_path = other.m_path;
|
||||
m_metadataLanguage = other.m_metadataLanguage;
|
||||
m_metadataCountryCode = other.m_metadataCountryCode;
|
||||
m_providerIds = other.m_providerIds;
|
||||
m_year = other.m_year;
|
||||
m_indexNumber = other.m_indexNumber;
|
||||
m_parentIndexNumber = other.m_parentIndexNumber;
|
||||
m_premiereDate = other.m_premiereDate;
|
||||
m_isAutomated = other.m_isAutomated;
|
||||
m_seriesName = other.m_seriesName;
|
||||
}
|
||||
|
||||
BookInfo BookInfo::fromJson(QJsonObject source) {
|
||||
BookInfo instance;
|
||||
instance.setFromJson(source);
|
||||
return instance;
|
||||
}
|
||||
|
||||
|
||||
void BookInfo::setFromJson(QJsonObject source) {
|
||||
m_name = Jellyfin::Support::fromJsonValue<QString>(source["Name"]);
|
||||
m_path = Jellyfin::Support::fromJsonValue<QString>(source["Path"]);
|
||||
m_metadataLanguage = Jellyfin::Support::fromJsonValue<QString>(source["MetadataLanguage"]);
|
||||
m_metadataCountryCode = Jellyfin::Support::fromJsonValue<QString>(source["MetadataCountryCode"]);
|
||||
m_providerIds = Jellyfin::Support::fromJsonValue<std::optional<QJsonObject>>(source["ProviderIds"]);
|
||||
m_year = Jellyfin::Support::fromJsonValue<std::optional<qint32>>(source["Year"]);
|
||||
m_indexNumber = Jellyfin::Support::fromJsonValue<std::optional<qint32>>(source["IndexNumber"]);
|
||||
m_parentIndexNumber = Jellyfin::Support::fromJsonValue<std::optional<qint32>>(source["ParentIndexNumber"]);
|
||||
m_premiereDate = Jellyfin::Support::fromJsonValue<QDateTime>(source["PremiereDate"]);
|
||||
m_isAutomated = Jellyfin::Support::fromJsonValue<bool>(source["IsAutomated"]);
|
||||
m_seriesName = Jellyfin::Support::fromJsonValue<QString>(source["SeriesName"]);
|
||||
|
||||
}
|
||||
|
||||
QJsonObject BookInfo::toJson() {
|
||||
QJsonObject result;
|
||||
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
||||
result["Path"] = Jellyfin::Support::toJsonValue<QString>(m_path);
|
||||
result["MetadataLanguage"] = Jellyfin::Support::toJsonValue<QString>(m_metadataLanguage);
|
||||
result["MetadataCountryCode"] = Jellyfin::Support::toJsonValue<QString>(m_metadataCountryCode);
|
||||
result["ProviderIds"] = Jellyfin::Support::toJsonValue<std::optional<QJsonObject>>(m_providerIds);
|
||||
result["Year"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_year);
|
||||
result["IndexNumber"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_indexNumber);
|
||||
result["ParentIndexNumber"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_parentIndexNumber);
|
||||
result["PremiereDate"] = Jellyfin::Support::toJsonValue<QDateTime>(m_premiereDate);
|
||||
result["IsAutomated"] = Jellyfin::Support::toJsonValue<bool>(m_isAutomated);
|
||||
result["SeriesName"] = Jellyfin::Support::toJsonValue<QString>(m_seriesName);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
QString BookInfo::name() const { return m_name; }
|
||||
|
||||
void BookInfo::setName(QString newName) {
|
||||
m_name = newName;
|
||||
}
|
||||
bool BookInfo::nameNull() const {
|
||||
return m_name.isNull();
|
||||
}
|
||||
|
||||
void BookInfo::setNameNull() {
|
||||
m_name.clear();
|
||||
|
||||
}
|
||||
QString BookInfo::path() const { return m_path; }
|
||||
|
||||
void BookInfo::setPath(QString newPath) {
|
||||
m_path = newPath;
|
||||
}
|
||||
bool BookInfo::pathNull() const {
|
||||
return m_path.isNull();
|
||||
}
|
||||
|
||||
void BookInfo::setPathNull() {
|
||||
m_path.clear();
|
||||
|
||||
}
|
||||
QString BookInfo::metadataLanguage() const { return m_metadataLanguage; }
|
||||
|
||||
void BookInfo::setMetadataLanguage(QString newMetadataLanguage) {
|
||||
m_metadataLanguage = newMetadataLanguage;
|
||||
}
|
||||
bool BookInfo::metadataLanguageNull() const {
|
||||
return m_metadataLanguage.isNull();
|
||||
}
|
||||
|
||||
void BookInfo::setMetadataLanguageNull() {
|
||||
m_metadataLanguage.clear();
|
||||
|
||||
}
|
||||
QString BookInfo::metadataCountryCode() const { return m_metadataCountryCode; }
|
||||
|
||||
void BookInfo::setMetadataCountryCode(QString newMetadataCountryCode) {
|
||||
m_metadataCountryCode = newMetadataCountryCode;
|
||||
}
|
||||
bool BookInfo::metadataCountryCodeNull() const {
|
||||
return m_metadataCountryCode.isNull();
|
||||
}
|
||||
|
||||
void BookInfo::setMetadataCountryCodeNull() {
|
||||
m_metadataCountryCode.clear();
|
||||
|
||||
}
|
||||
std::optional<QJsonObject> BookInfo::providerIds() const { return m_providerIds; }
|
||||
|
||||
void BookInfo::setProviderIds(std::optional<QJsonObject> newProviderIds) {
|
||||
m_providerIds = newProviderIds;
|
||||
}
|
||||
bool BookInfo::providerIdsNull() const {
|
||||
return !m_providerIds.has_value();
|
||||
}
|
||||
|
||||
void BookInfo::setProviderIdsNull() {
|
||||
m_providerIds = std::nullopt;
|
||||
|
||||
}
|
||||
std::optional<qint32> BookInfo::year() const { return m_year; }
|
||||
|
||||
void BookInfo::setYear(std::optional<qint32> newYear) {
|
||||
m_year = newYear;
|
||||
}
|
||||
bool BookInfo::yearNull() const {
|
||||
return !m_year.has_value();
|
||||
}
|
||||
|
||||
void BookInfo::setYearNull() {
|
||||
m_year = std::nullopt;
|
||||
|
||||
}
|
||||
std::optional<qint32> BookInfo::indexNumber() const { return m_indexNumber; }
|
||||
|
||||
void BookInfo::setIndexNumber(std::optional<qint32> newIndexNumber) {
|
||||
m_indexNumber = newIndexNumber;
|
||||
}
|
||||
bool BookInfo::indexNumberNull() const {
|
||||
return !m_indexNumber.has_value();
|
||||
}
|
||||
|
||||
void BookInfo::setIndexNumberNull() {
|
||||
m_indexNumber = std::nullopt;
|
||||
|
||||
}
|
||||
std::optional<qint32> BookInfo::parentIndexNumber() const { return m_parentIndexNumber; }
|
||||
|
||||
void BookInfo::setParentIndexNumber(std::optional<qint32> newParentIndexNumber) {
|
||||
m_parentIndexNumber = newParentIndexNumber;
|
||||
}
|
||||
bool BookInfo::parentIndexNumberNull() const {
|
||||
return !m_parentIndexNumber.has_value();
|
||||
}
|
||||
|
||||
void BookInfo::setParentIndexNumberNull() {
|
||||
m_parentIndexNumber = std::nullopt;
|
||||
|
||||
}
|
||||
QDateTime BookInfo::premiereDate() const { return m_premiereDate; }
|
||||
|
||||
void BookInfo::setPremiereDate(QDateTime newPremiereDate) {
|
||||
m_premiereDate = newPremiereDate;
|
||||
}
|
||||
bool BookInfo::premiereDateNull() const {
|
||||
return m_premiereDate.isNull();
|
||||
}
|
||||
|
||||
void BookInfo::setPremiereDateNull() {
|
||||
m_premiereDate= QDateTime();
|
||||
|
||||
}
|
||||
bool BookInfo::isAutomated() const { return m_isAutomated; }
|
||||
|
||||
void BookInfo::setIsAutomated(bool newIsAutomated) {
|
||||
m_isAutomated = newIsAutomated;
|
||||
}
|
||||
|
||||
QString BookInfo::seriesName() const { return m_seriesName; }
|
||||
|
||||
void BookInfo::setSeriesName(QString newSeriesName) {
|
||||
m_seriesName = newSeriesName;
|
||||
}
|
||||
bool BookInfo::seriesNameNull() const {
|
||||
return m_seriesName.isNull();
|
||||
}
|
||||
|
||||
void BookInfo::setSeriesNameNull() {
|
||||
m_seriesName.clear();
|
||||
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using BookInfo = Jellyfin::DTO::BookInfo;
|
||||
|
||||
template <>
|
||||
BookInfo fromJsonValue<BookInfo>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return BookInfo::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
} // NS Jellyfin
|
||||
122
core/src/dto/bookinforemotesearchquery.cpp
Normal file
122
core/src/dto/bookinforemotesearchquery.cpp
Normal file
|
|
@ -0,0 +1,122 @@
|
|||
/*
|
||||
* Sailfin: a Jellyfin client written using Qt
|
||||
* Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
|
||||
* OVERWRITTEN AT SOME POINT!
|
||||
*
|
||||
* If there is a bug in this file, please fix the code generator used to generate this file found in
|
||||
* core/openapigenerator.d.
|
||||
*
|
||||
* This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
|
||||
* file with a newer file if needed instead of manually updating the files.
|
||||
*/
|
||||
|
||||
#include <JellyfinQt/dto/bookinforemotesearchquery.h>
|
||||
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
BookInfoRemoteSearchQuery::BookInfoRemoteSearchQuery() {}
|
||||
|
||||
BookInfoRemoteSearchQuery::BookInfoRemoteSearchQuery(const BookInfoRemoteSearchQuery &other) :
|
||||
|
||||
m_searchInfo(other.m_searchInfo),
|
||||
m_itemId(other.m_itemId),
|
||||
m_searchProviderName(other.m_searchProviderName),
|
||||
m_includeDisabledProviders(other.m_includeDisabledProviders){}
|
||||
|
||||
|
||||
void BookInfoRemoteSearchQuery::replaceData(BookInfoRemoteSearchQuery &other) {
|
||||
m_searchInfo = other.m_searchInfo;
|
||||
m_itemId = other.m_itemId;
|
||||
m_searchProviderName = other.m_searchProviderName;
|
||||
m_includeDisabledProviders = other.m_includeDisabledProviders;
|
||||
}
|
||||
|
||||
BookInfoRemoteSearchQuery BookInfoRemoteSearchQuery::fromJson(QJsonObject source) {
|
||||
BookInfoRemoteSearchQuery instance;
|
||||
instance.setFromJson(source);
|
||||
return instance;
|
||||
}
|
||||
|
||||
|
||||
void BookInfoRemoteSearchQuery::setFromJson(QJsonObject source) {
|
||||
m_searchInfo = Jellyfin::Support::fromJsonValue<QSharedPointer<BookInfo>>(source["SearchInfo"]);
|
||||
m_itemId = Jellyfin::Support::fromJsonValue<QString>(source["ItemId"]);
|
||||
m_searchProviderName = Jellyfin::Support::fromJsonValue<QString>(source["SearchProviderName"]);
|
||||
m_includeDisabledProviders = Jellyfin::Support::fromJsonValue<bool>(source["IncludeDisabledProviders"]);
|
||||
|
||||
}
|
||||
|
||||
QJsonObject BookInfoRemoteSearchQuery::toJson() {
|
||||
QJsonObject result;
|
||||
result["SearchInfo"] = Jellyfin::Support::toJsonValue<QSharedPointer<BookInfo>>(m_searchInfo);
|
||||
result["ItemId"] = Jellyfin::Support::toJsonValue<QString>(m_itemId);
|
||||
result["SearchProviderName"] = Jellyfin::Support::toJsonValue<QString>(m_searchProviderName);
|
||||
result["IncludeDisabledProviders"] = Jellyfin::Support::toJsonValue<bool>(m_includeDisabledProviders);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
QSharedPointer<BookInfo> BookInfoRemoteSearchQuery::searchInfo() const { return m_searchInfo; }
|
||||
|
||||
void BookInfoRemoteSearchQuery::setSearchInfo(QSharedPointer<BookInfo> newSearchInfo) {
|
||||
m_searchInfo = newSearchInfo;
|
||||
}
|
||||
|
||||
QString BookInfoRemoteSearchQuery::itemId() const { return m_itemId; }
|
||||
|
||||
void BookInfoRemoteSearchQuery::setItemId(QString newItemId) {
|
||||
m_itemId = newItemId;
|
||||
}
|
||||
|
||||
QString BookInfoRemoteSearchQuery::searchProviderName() const { return m_searchProviderName; }
|
||||
|
||||
void BookInfoRemoteSearchQuery::setSearchProviderName(QString newSearchProviderName) {
|
||||
m_searchProviderName = newSearchProviderName;
|
||||
}
|
||||
bool BookInfoRemoteSearchQuery::searchProviderNameNull() const {
|
||||
return m_searchProviderName.isNull();
|
||||
}
|
||||
|
||||
void BookInfoRemoteSearchQuery::setSearchProviderNameNull() {
|
||||
m_searchProviderName.clear();
|
||||
|
||||
}
|
||||
bool BookInfoRemoteSearchQuery::includeDisabledProviders() const { return m_includeDisabledProviders; }
|
||||
|
||||
void BookInfoRemoteSearchQuery::setIncludeDisabledProviders(bool newIncludeDisabledProviders) {
|
||||
m_includeDisabledProviders = newIncludeDisabledProviders;
|
||||
}
|
||||
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using BookInfoRemoteSearchQuery = Jellyfin::DTO::BookInfoRemoteSearchQuery;
|
||||
|
||||
template <>
|
||||
BookInfoRemoteSearchQuery fromJsonValue<BookInfoRemoteSearchQuery>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return BookInfoRemoteSearchQuery::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
} // NS Jellyfin
|
||||
238
core/src/dto/boxsetinfo.cpp
Normal file
238
core/src/dto/boxsetinfo.cpp
Normal file
|
|
@ -0,0 +1,238 @@
|
|||
/*
|
||||
* Sailfin: a Jellyfin client written using Qt
|
||||
* Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
|
||||
* OVERWRITTEN AT SOME POINT!
|
||||
*
|
||||
* If there is a bug in this file, please fix the code generator used to generate this file found in
|
||||
* core/openapigenerator.d.
|
||||
*
|
||||
* This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
|
||||
* file with a newer file if needed instead of manually updating the files.
|
||||
*/
|
||||
|
||||
#include <JellyfinQt/dto/boxsetinfo.h>
|
||||
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
BoxSetInfo::BoxSetInfo() {}
|
||||
|
||||
BoxSetInfo::BoxSetInfo(const BoxSetInfo &other) :
|
||||
|
||||
m_name(other.m_name),
|
||||
m_path(other.m_path),
|
||||
m_metadataLanguage(other.m_metadataLanguage),
|
||||
m_metadataCountryCode(other.m_metadataCountryCode),
|
||||
m_providerIds(other.m_providerIds),
|
||||
m_year(other.m_year),
|
||||
m_indexNumber(other.m_indexNumber),
|
||||
m_parentIndexNumber(other.m_parentIndexNumber),
|
||||
m_premiereDate(other.m_premiereDate),
|
||||
m_isAutomated(other.m_isAutomated){}
|
||||
|
||||
|
||||
void BoxSetInfo::replaceData(BoxSetInfo &other) {
|
||||
m_name = other.m_name;
|
||||
m_path = other.m_path;
|
||||
m_metadataLanguage = other.m_metadataLanguage;
|
||||
m_metadataCountryCode = other.m_metadataCountryCode;
|
||||
m_providerIds = other.m_providerIds;
|
||||
m_year = other.m_year;
|
||||
m_indexNumber = other.m_indexNumber;
|
||||
m_parentIndexNumber = other.m_parentIndexNumber;
|
||||
m_premiereDate = other.m_premiereDate;
|
||||
m_isAutomated = other.m_isAutomated;
|
||||
}
|
||||
|
||||
BoxSetInfo BoxSetInfo::fromJson(QJsonObject source) {
|
||||
BoxSetInfo instance;
|
||||
instance.setFromJson(source);
|
||||
return instance;
|
||||
}
|
||||
|
||||
|
||||
void BoxSetInfo::setFromJson(QJsonObject source) {
|
||||
m_name = Jellyfin::Support::fromJsonValue<QString>(source["Name"]);
|
||||
m_path = Jellyfin::Support::fromJsonValue<QString>(source["Path"]);
|
||||
m_metadataLanguage = Jellyfin::Support::fromJsonValue<QString>(source["MetadataLanguage"]);
|
||||
m_metadataCountryCode = Jellyfin::Support::fromJsonValue<QString>(source["MetadataCountryCode"]);
|
||||
m_providerIds = Jellyfin::Support::fromJsonValue<std::optional<QJsonObject>>(source["ProviderIds"]);
|
||||
m_year = Jellyfin::Support::fromJsonValue<std::optional<qint32>>(source["Year"]);
|
||||
m_indexNumber = Jellyfin::Support::fromJsonValue<std::optional<qint32>>(source["IndexNumber"]);
|
||||
m_parentIndexNumber = Jellyfin::Support::fromJsonValue<std::optional<qint32>>(source["ParentIndexNumber"]);
|
||||
m_premiereDate = Jellyfin::Support::fromJsonValue<QDateTime>(source["PremiereDate"]);
|
||||
m_isAutomated = Jellyfin::Support::fromJsonValue<bool>(source["IsAutomated"]);
|
||||
|
||||
}
|
||||
|
||||
QJsonObject BoxSetInfo::toJson() {
|
||||
QJsonObject result;
|
||||
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
||||
result["Path"] = Jellyfin::Support::toJsonValue<QString>(m_path);
|
||||
result["MetadataLanguage"] = Jellyfin::Support::toJsonValue<QString>(m_metadataLanguage);
|
||||
result["MetadataCountryCode"] = Jellyfin::Support::toJsonValue<QString>(m_metadataCountryCode);
|
||||
result["ProviderIds"] = Jellyfin::Support::toJsonValue<std::optional<QJsonObject>>(m_providerIds);
|
||||
result["Year"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_year);
|
||||
result["IndexNumber"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_indexNumber);
|
||||
result["ParentIndexNumber"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_parentIndexNumber);
|
||||
result["PremiereDate"] = Jellyfin::Support::toJsonValue<QDateTime>(m_premiereDate);
|
||||
result["IsAutomated"] = Jellyfin::Support::toJsonValue<bool>(m_isAutomated);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
QString BoxSetInfo::name() const { return m_name; }
|
||||
|
||||
void BoxSetInfo::setName(QString newName) {
|
||||
m_name = newName;
|
||||
}
|
||||
bool BoxSetInfo::nameNull() const {
|
||||
return m_name.isNull();
|
||||
}
|
||||
|
||||
void BoxSetInfo::setNameNull() {
|
||||
m_name.clear();
|
||||
|
||||
}
|
||||
QString BoxSetInfo::path() const { return m_path; }
|
||||
|
||||
void BoxSetInfo::setPath(QString newPath) {
|
||||
m_path = newPath;
|
||||
}
|
||||
bool BoxSetInfo::pathNull() const {
|
||||
return m_path.isNull();
|
||||
}
|
||||
|
||||
void BoxSetInfo::setPathNull() {
|
||||
m_path.clear();
|
||||
|
||||
}
|
||||
QString BoxSetInfo::metadataLanguage() const { return m_metadataLanguage; }
|
||||
|
||||
void BoxSetInfo::setMetadataLanguage(QString newMetadataLanguage) {
|
||||
m_metadataLanguage = newMetadataLanguage;
|
||||
}
|
||||
bool BoxSetInfo::metadataLanguageNull() const {
|
||||
return m_metadataLanguage.isNull();
|
||||
}
|
||||
|
||||
void BoxSetInfo::setMetadataLanguageNull() {
|
||||
m_metadataLanguage.clear();
|
||||
|
||||
}
|
||||
QString BoxSetInfo::metadataCountryCode() const { return m_metadataCountryCode; }
|
||||
|
||||
void BoxSetInfo::setMetadataCountryCode(QString newMetadataCountryCode) {
|
||||
m_metadataCountryCode = newMetadataCountryCode;
|
||||
}
|
||||
bool BoxSetInfo::metadataCountryCodeNull() const {
|
||||
return m_metadataCountryCode.isNull();
|
||||
}
|
||||
|
||||
void BoxSetInfo::setMetadataCountryCodeNull() {
|
||||
m_metadataCountryCode.clear();
|
||||
|
||||
}
|
||||
std::optional<QJsonObject> BoxSetInfo::providerIds() const { return m_providerIds; }
|
||||
|
||||
void BoxSetInfo::setProviderIds(std::optional<QJsonObject> newProviderIds) {
|
||||
m_providerIds = newProviderIds;
|
||||
}
|
||||
bool BoxSetInfo::providerIdsNull() const {
|
||||
return !m_providerIds.has_value();
|
||||
}
|
||||
|
||||
void BoxSetInfo::setProviderIdsNull() {
|
||||
m_providerIds = std::nullopt;
|
||||
|
||||
}
|
||||
std::optional<qint32> BoxSetInfo::year() const { return m_year; }
|
||||
|
||||
void BoxSetInfo::setYear(std::optional<qint32> newYear) {
|
||||
m_year = newYear;
|
||||
}
|
||||
bool BoxSetInfo::yearNull() const {
|
||||
return !m_year.has_value();
|
||||
}
|
||||
|
||||
void BoxSetInfo::setYearNull() {
|
||||
m_year = std::nullopt;
|
||||
|
||||
}
|
||||
std::optional<qint32> BoxSetInfo::indexNumber() const { return m_indexNumber; }
|
||||
|
||||
void BoxSetInfo::setIndexNumber(std::optional<qint32> newIndexNumber) {
|
||||
m_indexNumber = newIndexNumber;
|
||||
}
|
||||
bool BoxSetInfo::indexNumberNull() const {
|
||||
return !m_indexNumber.has_value();
|
||||
}
|
||||
|
||||
void BoxSetInfo::setIndexNumberNull() {
|
||||
m_indexNumber = std::nullopt;
|
||||
|
||||
}
|
||||
std::optional<qint32> BoxSetInfo::parentIndexNumber() const { return m_parentIndexNumber; }
|
||||
|
||||
void BoxSetInfo::setParentIndexNumber(std::optional<qint32> newParentIndexNumber) {
|
||||
m_parentIndexNumber = newParentIndexNumber;
|
||||
}
|
||||
bool BoxSetInfo::parentIndexNumberNull() const {
|
||||
return !m_parentIndexNumber.has_value();
|
||||
}
|
||||
|
||||
void BoxSetInfo::setParentIndexNumberNull() {
|
||||
m_parentIndexNumber = std::nullopt;
|
||||
|
||||
}
|
||||
QDateTime BoxSetInfo::premiereDate() const { return m_premiereDate; }
|
||||
|
||||
void BoxSetInfo::setPremiereDate(QDateTime newPremiereDate) {
|
||||
m_premiereDate = newPremiereDate;
|
||||
}
|
||||
bool BoxSetInfo::premiereDateNull() const {
|
||||
return m_premiereDate.isNull();
|
||||
}
|
||||
|
||||
void BoxSetInfo::setPremiereDateNull() {
|
||||
m_premiereDate= QDateTime();
|
||||
|
||||
}
|
||||
bool BoxSetInfo::isAutomated() const { return m_isAutomated; }
|
||||
|
||||
void BoxSetInfo::setIsAutomated(bool newIsAutomated) {
|
||||
m_isAutomated = newIsAutomated;
|
||||
}
|
||||
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using BoxSetInfo = Jellyfin::DTO::BoxSetInfo;
|
||||
|
||||
template <>
|
||||
BoxSetInfo fromJsonValue<BoxSetInfo>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return BoxSetInfo::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
} // NS Jellyfin
|
||||
122
core/src/dto/boxsetinforemotesearchquery.cpp
Normal file
122
core/src/dto/boxsetinforemotesearchquery.cpp
Normal file
|
|
@ -0,0 +1,122 @@
|
|||
/*
|
||||
* Sailfin: a Jellyfin client written using Qt
|
||||
* Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
|
||||
* OVERWRITTEN AT SOME POINT!
|
||||
*
|
||||
* If there is a bug in this file, please fix the code generator used to generate this file found in
|
||||
* core/openapigenerator.d.
|
||||
*
|
||||
* This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
|
||||
* file with a newer file if needed instead of manually updating the files.
|
||||
*/
|
||||
|
||||
#include <JellyfinQt/dto/boxsetinforemotesearchquery.h>
|
||||
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
BoxSetInfoRemoteSearchQuery::BoxSetInfoRemoteSearchQuery() {}
|
||||
|
||||
BoxSetInfoRemoteSearchQuery::BoxSetInfoRemoteSearchQuery(const BoxSetInfoRemoteSearchQuery &other) :
|
||||
|
||||
m_searchInfo(other.m_searchInfo),
|
||||
m_itemId(other.m_itemId),
|
||||
m_searchProviderName(other.m_searchProviderName),
|
||||
m_includeDisabledProviders(other.m_includeDisabledProviders){}
|
||||
|
||||
|
||||
void BoxSetInfoRemoteSearchQuery::replaceData(BoxSetInfoRemoteSearchQuery &other) {
|
||||
m_searchInfo = other.m_searchInfo;
|
||||
m_itemId = other.m_itemId;
|
||||
m_searchProviderName = other.m_searchProviderName;
|
||||
m_includeDisabledProviders = other.m_includeDisabledProviders;
|
||||
}
|
||||
|
||||
BoxSetInfoRemoteSearchQuery BoxSetInfoRemoteSearchQuery::fromJson(QJsonObject source) {
|
||||
BoxSetInfoRemoteSearchQuery instance;
|
||||
instance.setFromJson(source);
|
||||
return instance;
|
||||
}
|
||||
|
||||
|
||||
void BoxSetInfoRemoteSearchQuery::setFromJson(QJsonObject source) {
|
||||
m_searchInfo = Jellyfin::Support::fromJsonValue<QSharedPointer<BoxSetInfo>>(source["SearchInfo"]);
|
||||
m_itemId = Jellyfin::Support::fromJsonValue<QString>(source["ItemId"]);
|
||||
m_searchProviderName = Jellyfin::Support::fromJsonValue<QString>(source["SearchProviderName"]);
|
||||
m_includeDisabledProviders = Jellyfin::Support::fromJsonValue<bool>(source["IncludeDisabledProviders"]);
|
||||
|
||||
}
|
||||
|
||||
QJsonObject BoxSetInfoRemoteSearchQuery::toJson() {
|
||||
QJsonObject result;
|
||||
result["SearchInfo"] = Jellyfin::Support::toJsonValue<QSharedPointer<BoxSetInfo>>(m_searchInfo);
|
||||
result["ItemId"] = Jellyfin::Support::toJsonValue<QString>(m_itemId);
|
||||
result["SearchProviderName"] = Jellyfin::Support::toJsonValue<QString>(m_searchProviderName);
|
||||
result["IncludeDisabledProviders"] = Jellyfin::Support::toJsonValue<bool>(m_includeDisabledProviders);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
QSharedPointer<BoxSetInfo> BoxSetInfoRemoteSearchQuery::searchInfo() const { return m_searchInfo; }
|
||||
|
||||
void BoxSetInfoRemoteSearchQuery::setSearchInfo(QSharedPointer<BoxSetInfo> newSearchInfo) {
|
||||
m_searchInfo = newSearchInfo;
|
||||
}
|
||||
|
||||
QString BoxSetInfoRemoteSearchQuery::itemId() const { return m_itemId; }
|
||||
|
||||
void BoxSetInfoRemoteSearchQuery::setItemId(QString newItemId) {
|
||||
m_itemId = newItemId;
|
||||
}
|
||||
|
||||
QString BoxSetInfoRemoteSearchQuery::searchProviderName() const { return m_searchProviderName; }
|
||||
|
||||
void BoxSetInfoRemoteSearchQuery::setSearchProviderName(QString newSearchProviderName) {
|
||||
m_searchProviderName = newSearchProviderName;
|
||||
}
|
||||
bool BoxSetInfoRemoteSearchQuery::searchProviderNameNull() const {
|
||||
return m_searchProviderName.isNull();
|
||||
}
|
||||
|
||||
void BoxSetInfoRemoteSearchQuery::setSearchProviderNameNull() {
|
||||
m_searchProviderName.clear();
|
||||
|
||||
}
|
||||
bool BoxSetInfoRemoteSearchQuery::includeDisabledProviders() const { return m_includeDisabledProviders; }
|
||||
|
||||
void BoxSetInfoRemoteSearchQuery::setIncludeDisabledProviders(bool newIncludeDisabledProviders) {
|
||||
m_includeDisabledProviders = newIncludeDisabledProviders;
|
||||
}
|
||||
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using BoxSetInfoRemoteSearchQuery = Jellyfin::DTO::BoxSetInfoRemoteSearchQuery;
|
||||
|
||||
template <>
|
||||
BoxSetInfoRemoteSearchQuery fromJsonValue<BoxSetInfoRemoteSearchQuery>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return BoxSetInfoRemoteSearchQuery::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
} // NS Jellyfin
|
||||
109
core/src/dto/brandingoptions.cpp
Normal file
109
core/src/dto/brandingoptions.cpp
Normal file
|
|
@ -0,0 +1,109 @@
|
|||
/*
|
||||
* Sailfin: a Jellyfin client written using Qt
|
||||
* Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
|
||||
* OVERWRITTEN AT SOME POINT!
|
||||
*
|
||||
* If there is a bug in this file, please fix the code generator used to generate this file found in
|
||||
* core/openapigenerator.d.
|
||||
*
|
||||
* This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
|
||||
* file with a newer file if needed instead of manually updating the files.
|
||||
*/
|
||||
|
||||
#include <JellyfinQt/dto/brandingoptions.h>
|
||||
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
BrandingOptions::BrandingOptions() {}
|
||||
|
||||
BrandingOptions::BrandingOptions(const BrandingOptions &other) :
|
||||
|
||||
m_loginDisclaimer(other.m_loginDisclaimer),
|
||||
m_customCss(other.m_customCss){}
|
||||
|
||||
|
||||
void BrandingOptions::replaceData(BrandingOptions &other) {
|
||||
m_loginDisclaimer = other.m_loginDisclaimer;
|
||||
m_customCss = other.m_customCss;
|
||||
}
|
||||
|
||||
BrandingOptions BrandingOptions::fromJson(QJsonObject source) {
|
||||
BrandingOptions instance;
|
||||
instance.setFromJson(source);
|
||||
return instance;
|
||||
}
|
||||
|
||||
|
||||
void BrandingOptions::setFromJson(QJsonObject source) {
|
||||
m_loginDisclaimer = Jellyfin::Support::fromJsonValue<QString>(source["LoginDisclaimer"]);
|
||||
m_customCss = Jellyfin::Support::fromJsonValue<QString>(source["CustomCss"]);
|
||||
|
||||
}
|
||||
|
||||
QJsonObject BrandingOptions::toJson() {
|
||||
QJsonObject result;
|
||||
result["LoginDisclaimer"] = Jellyfin::Support::toJsonValue<QString>(m_loginDisclaimer);
|
||||
result["CustomCss"] = Jellyfin::Support::toJsonValue<QString>(m_customCss);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
QString BrandingOptions::loginDisclaimer() const { return m_loginDisclaimer; }
|
||||
|
||||
void BrandingOptions::setLoginDisclaimer(QString newLoginDisclaimer) {
|
||||
m_loginDisclaimer = newLoginDisclaimer;
|
||||
}
|
||||
bool BrandingOptions::loginDisclaimerNull() const {
|
||||
return m_loginDisclaimer.isNull();
|
||||
}
|
||||
|
||||
void BrandingOptions::setLoginDisclaimerNull() {
|
||||
m_loginDisclaimer.clear();
|
||||
|
||||
}
|
||||
QString BrandingOptions::customCss() const { return m_customCss; }
|
||||
|
||||
void BrandingOptions::setCustomCss(QString newCustomCss) {
|
||||
m_customCss = newCustomCss;
|
||||
}
|
||||
bool BrandingOptions::customCssNull() const {
|
||||
return m_customCss.isNull();
|
||||
}
|
||||
|
||||
void BrandingOptions::setCustomCssNull() {
|
||||
m_customCss.clear();
|
||||
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using BrandingOptions = Jellyfin::DTO::BrandingOptions;
|
||||
|
||||
template <>
|
||||
BrandingOptions fromJsonValue<BrandingOptions>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return BrandingOptions::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
} // NS Jellyfin
|
||||
115
core/src/dto/bufferrequestdto.cpp
Normal file
115
core/src/dto/bufferrequestdto.cpp
Normal file
|
|
@ -0,0 +1,115 @@
|
|||
/*
|
||||
* Sailfin: a Jellyfin client written using Qt
|
||||
* Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
|
||||
* OVERWRITTEN AT SOME POINT!
|
||||
*
|
||||
* If there is a bug in this file, please fix the code generator used to generate this file found in
|
||||
* core/openapigenerator.d.
|
||||
*
|
||||
* This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
|
||||
* file with a newer file if needed instead of manually updating the files.
|
||||
*/
|
||||
|
||||
#include <JellyfinQt/dto/bufferrequestdto.h>
|
||||
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
BufferRequestDto::BufferRequestDto() {}
|
||||
|
||||
BufferRequestDto::BufferRequestDto(const BufferRequestDto &other) :
|
||||
|
||||
m_when(other.m_when),
|
||||
m_positionTicks(other.m_positionTicks),
|
||||
m_isPlaying(other.m_isPlaying),
|
||||
m_playlistItemId(other.m_playlistItemId){}
|
||||
|
||||
|
||||
void BufferRequestDto::replaceData(BufferRequestDto &other) {
|
||||
m_when = other.m_when;
|
||||
m_positionTicks = other.m_positionTicks;
|
||||
m_isPlaying = other.m_isPlaying;
|
||||
m_playlistItemId = other.m_playlistItemId;
|
||||
}
|
||||
|
||||
BufferRequestDto BufferRequestDto::fromJson(QJsonObject source) {
|
||||
BufferRequestDto instance;
|
||||
instance.setFromJson(source);
|
||||
return instance;
|
||||
}
|
||||
|
||||
|
||||
void BufferRequestDto::setFromJson(QJsonObject source) {
|
||||
m_when = Jellyfin::Support::fromJsonValue<QDateTime>(source["When"]);
|
||||
m_positionTicks = Jellyfin::Support::fromJsonValue<qint64>(source["PositionTicks"]);
|
||||
m_isPlaying = Jellyfin::Support::fromJsonValue<bool>(source["IsPlaying"]);
|
||||
m_playlistItemId = Jellyfin::Support::fromJsonValue<QString>(source["PlaylistItemId"]);
|
||||
|
||||
}
|
||||
|
||||
QJsonObject BufferRequestDto::toJson() {
|
||||
QJsonObject result;
|
||||
result["When"] = Jellyfin::Support::toJsonValue<QDateTime>(m_when);
|
||||
result["PositionTicks"] = Jellyfin::Support::toJsonValue<qint64>(m_positionTicks);
|
||||
result["IsPlaying"] = Jellyfin::Support::toJsonValue<bool>(m_isPlaying);
|
||||
result["PlaylistItemId"] = Jellyfin::Support::toJsonValue<QString>(m_playlistItemId);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
QDateTime BufferRequestDto::when() const { return m_when; }
|
||||
|
||||
void BufferRequestDto::setWhen(QDateTime newWhen) {
|
||||
m_when = newWhen;
|
||||
}
|
||||
|
||||
qint64 BufferRequestDto::positionTicks() const { return m_positionTicks; }
|
||||
|
||||
void BufferRequestDto::setPositionTicks(qint64 newPositionTicks) {
|
||||
m_positionTicks = newPositionTicks;
|
||||
}
|
||||
|
||||
bool BufferRequestDto::isPlaying() const { return m_isPlaying; }
|
||||
|
||||
void BufferRequestDto::setIsPlaying(bool newIsPlaying) {
|
||||
m_isPlaying = newIsPlaying;
|
||||
}
|
||||
|
||||
QString BufferRequestDto::playlistItemId() const { return m_playlistItemId; }
|
||||
|
||||
void BufferRequestDto::setPlaylistItemId(QString newPlaylistItemId) {
|
||||
m_playlistItemId = newPlaylistItemId;
|
||||
}
|
||||
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using BufferRequestDto = Jellyfin::DTO::BufferRequestDto;
|
||||
|
||||
template <>
|
||||
BufferRequestDto fromJsonValue<BufferRequestDto>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return BufferRequestDto::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
} // NS Jellyfin
|
||||
244
core/src/dto/channelfeatures.cpp
Normal file
244
core/src/dto/channelfeatures.cpp
Normal file
|
|
@ -0,0 +1,244 @@
|
|||
/*
|
||||
* Sailfin: a Jellyfin client written using Qt
|
||||
* Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
|
||||
* OVERWRITTEN AT SOME POINT!
|
||||
*
|
||||
* If there is a bug in this file, please fix the code generator used to generate this file found in
|
||||
* core/openapigenerator.d.
|
||||
*
|
||||
* This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
|
||||
* file with a newer file if needed instead of manually updating the files.
|
||||
*/
|
||||
|
||||
#include <JellyfinQt/dto/channelfeatures.h>
|
||||
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
ChannelFeatures::ChannelFeatures() {}
|
||||
|
||||
ChannelFeatures::ChannelFeatures(const ChannelFeatures &other) :
|
||||
|
||||
m_name(other.m_name),
|
||||
m_jellyfinId(other.m_jellyfinId),
|
||||
m_canSearch(other.m_canSearch),
|
||||
m_mediaTypes(other.m_mediaTypes),
|
||||
m_contentTypes(other.m_contentTypes),
|
||||
m_maxPageSize(other.m_maxPageSize),
|
||||
m_autoRefreshLevels(other.m_autoRefreshLevels),
|
||||
m_defaultSortFields(other.m_defaultSortFields),
|
||||
m_supportsSortOrderToggle(other.m_supportsSortOrderToggle),
|
||||
m_supportsLatestMedia(other.m_supportsLatestMedia),
|
||||
m_canFilter(other.m_canFilter),
|
||||
m_supportsContentDownloading(other.m_supportsContentDownloading){}
|
||||
|
||||
|
||||
void ChannelFeatures::replaceData(ChannelFeatures &other) {
|
||||
m_name = other.m_name;
|
||||
m_jellyfinId = other.m_jellyfinId;
|
||||
m_canSearch = other.m_canSearch;
|
||||
m_mediaTypes = other.m_mediaTypes;
|
||||
m_contentTypes = other.m_contentTypes;
|
||||
m_maxPageSize = other.m_maxPageSize;
|
||||
m_autoRefreshLevels = other.m_autoRefreshLevels;
|
||||
m_defaultSortFields = other.m_defaultSortFields;
|
||||
m_supportsSortOrderToggle = other.m_supportsSortOrderToggle;
|
||||
m_supportsLatestMedia = other.m_supportsLatestMedia;
|
||||
m_canFilter = other.m_canFilter;
|
||||
m_supportsContentDownloading = other.m_supportsContentDownloading;
|
||||
}
|
||||
|
||||
ChannelFeatures ChannelFeatures::fromJson(QJsonObject source) {
|
||||
ChannelFeatures instance;
|
||||
instance.setFromJson(source);
|
||||
return instance;
|
||||
}
|
||||
|
||||
|
||||
void ChannelFeatures::setFromJson(QJsonObject source) {
|
||||
m_name = Jellyfin::Support::fromJsonValue<QString>(source["Name"]);
|
||||
m_jellyfinId = Jellyfin::Support::fromJsonValue<QString>(source["Id"]);
|
||||
m_canSearch = Jellyfin::Support::fromJsonValue<bool>(source["CanSearch"]);
|
||||
m_mediaTypes = Jellyfin::Support::fromJsonValue<QList<ChannelMediaType>>(source["MediaTypes"]);
|
||||
m_contentTypes = Jellyfin::Support::fromJsonValue<QList<ChannelMediaContentType>>(source["ContentTypes"]);
|
||||
m_maxPageSize = Jellyfin::Support::fromJsonValue<std::optional<qint32>>(source["MaxPageSize"]);
|
||||
m_autoRefreshLevels = Jellyfin::Support::fromJsonValue<std::optional<qint32>>(source["AutoRefreshLevels"]);
|
||||
m_defaultSortFields = Jellyfin::Support::fromJsonValue<QList<ChannelItemSortField>>(source["DefaultSortFields"]);
|
||||
m_supportsSortOrderToggle = Jellyfin::Support::fromJsonValue<bool>(source["SupportsSortOrderToggle"]);
|
||||
m_supportsLatestMedia = Jellyfin::Support::fromJsonValue<bool>(source["SupportsLatestMedia"]);
|
||||
m_canFilter = Jellyfin::Support::fromJsonValue<bool>(source["CanFilter"]);
|
||||
m_supportsContentDownloading = Jellyfin::Support::fromJsonValue<bool>(source["SupportsContentDownloading"]);
|
||||
|
||||
}
|
||||
|
||||
QJsonObject ChannelFeatures::toJson() {
|
||||
QJsonObject result;
|
||||
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
||||
result["Id"] = Jellyfin::Support::toJsonValue<QString>(m_jellyfinId);
|
||||
result["CanSearch"] = Jellyfin::Support::toJsonValue<bool>(m_canSearch);
|
||||
result["MediaTypes"] = Jellyfin::Support::toJsonValue<QList<ChannelMediaType>>(m_mediaTypes);
|
||||
result["ContentTypes"] = Jellyfin::Support::toJsonValue<QList<ChannelMediaContentType>>(m_contentTypes);
|
||||
result["MaxPageSize"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_maxPageSize);
|
||||
result["AutoRefreshLevels"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_autoRefreshLevels);
|
||||
result["DefaultSortFields"] = Jellyfin::Support::toJsonValue<QList<ChannelItemSortField>>(m_defaultSortFields);
|
||||
result["SupportsSortOrderToggle"] = Jellyfin::Support::toJsonValue<bool>(m_supportsSortOrderToggle);
|
||||
result["SupportsLatestMedia"] = Jellyfin::Support::toJsonValue<bool>(m_supportsLatestMedia);
|
||||
result["CanFilter"] = Jellyfin::Support::toJsonValue<bool>(m_canFilter);
|
||||
result["SupportsContentDownloading"] = Jellyfin::Support::toJsonValue<bool>(m_supportsContentDownloading);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
QString ChannelFeatures::name() const { return m_name; }
|
||||
|
||||
void ChannelFeatures::setName(QString newName) {
|
||||
m_name = newName;
|
||||
}
|
||||
bool ChannelFeatures::nameNull() const {
|
||||
return m_name.isNull();
|
||||
}
|
||||
|
||||
void ChannelFeatures::setNameNull() {
|
||||
m_name.clear();
|
||||
|
||||
}
|
||||
QString ChannelFeatures::jellyfinId() const { return m_jellyfinId; }
|
||||
|
||||
void ChannelFeatures::setJellyfinId(QString newJellyfinId) {
|
||||
m_jellyfinId = newJellyfinId;
|
||||
}
|
||||
bool ChannelFeatures::jellyfinIdNull() const {
|
||||
return m_jellyfinId.isNull();
|
||||
}
|
||||
|
||||
void ChannelFeatures::setJellyfinIdNull() {
|
||||
m_jellyfinId.clear();
|
||||
|
||||
}
|
||||
bool ChannelFeatures::canSearch() const { return m_canSearch; }
|
||||
|
||||
void ChannelFeatures::setCanSearch(bool newCanSearch) {
|
||||
m_canSearch = newCanSearch;
|
||||
}
|
||||
|
||||
QList<ChannelMediaType> ChannelFeatures::mediaTypes() const { return m_mediaTypes; }
|
||||
|
||||
void ChannelFeatures::setMediaTypes(QList<ChannelMediaType> newMediaTypes) {
|
||||
m_mediaTypes = newMediaTypes;
|
||||
}
|
||||
bool ChannelFeatures::mediaTypesNull() const {
|
||||
return m_mediaTypes.size() == 0;
|
||||
}
|
||||
|
||||
void ChannelFeatures::setMediaTypesNull() {
|
||||
m_mediaTypes.clear();
|
||||
|
||||
}
|
||||
QList<ChannelMediaContentType> ChannelFeatures::contentTypes() const { return m_contentTypes; }
|
||||
|
||||
void ChannelFeatures::setContentTypes(QList<ChannelMediaContentType> newContentTypes) {
|
||||
m_contentTypes = newContentTypes;
|
||||
}
|
||||
bool ChannelFeatures::contentTypesNull() const {
|
||||
return m_contentTypes.size() == 0;
|
||||
}
|
||||
|
||||
void ChannelFeatures::setContentTypesNull() {
|
||||
m_contentTypes.clear();
|
||||
|
||||
}
|
||||
std::optional<qint32> ChannelFeatures::maxPageSize() const { return m_maxPageSize; }
|
||||
|
||||
void ChannelFeatures::setMaxPageSize(std::optional<qint32> newMaxPageSize) {
|
||||
m_maxPageSize = newMaxPageSize;
|
||||
}
|
||||
bool ChannelFeatures::maxPageSizeNull() const {
|
||||
return !m_maxPageSize.has_value();
|
||||
}
|
||||
|
||||
void ChannelFeatures::setMaxPageSizeNull() {
|
||||
m_maxPageSize = std::nullopt;
|
||||
|
||||
}
|
||||
std::optional<qint32> ChannelFeatures::autoRefreshLevels() const { return m_autoRefreshLevels; }
|
||||
|
||||
void ChannelFeatures::setAutoRefreshLevels(std::optional<qint32> newAutoRefreshLevels) {
|
||||
m_autoRefreshLevels = newAutoRefreshLevels;
|
||||
}
|
||||
bool ChannelFeatures::autoRefreshLevelsNull() const {
|
||||
return !m_autoRefreshLevels.has_value();
|
||||
}
|
||||
|
||||
void ChannelFeatures::setAutoRefreshLevelsNull() {
|
||||
m_autoRefreshLevels = std::nullopt;
|
||||
|
||||
}
|
||||
QList<ChannelItemSortField> ChannelFeatures::defaultSortFields() const { return m_defaultSortFields; }
|
||||
|
||||
void ChannelFeatures::setDefaultSortFields(QList<ChannelItemSortField> newDefaultSortFields) {
|
||||
m_defaultSortFields = newDefaultSortFields;
|
||||
}
|
||||
bool ChannelFeatures::defaultSortFieldsNull() const {
|
||||
return m_defaultSortFields.size() == 0;
|
||||
}
|
||||
|
||||
void ChannelFeatures::setDefaultSortFieldsNull() {
|
||||
m_defaultSortFields.clear();
|
||||
|
||||
}
|
||||
bool ChannelFeatures::supportsSortOrderToggle() const { return m_supportsSortOrderToggle; }
|
||||
|
||||
void ChannelFeatures::setSupportsSortOrderToggle(bool newSupportsSortOrderToggle) {
|
||||
m_supportsSortOrderToggle = newSupportsSortOrderToggle;
|
||||
}
|
||||
|
||||
bool ChannelFeatures::supportsLatestMedia() const { return m_supportsLatestMedia; }
|
||||
|
||||
void ChannelFeatures::setSupportsLatestMedia(bool newSupportsLatestMedia) {
|
||||
m_supportsLatestMedia = newSupportsLatestMedia;
|
||||
}
|
||||
|
||||
bool ChannelFeatures::canFilter() const { return m_canFilter; }
|
||||
|
||||
void ChannelFeatures::setCanFilter(bool newCanFilter) {
|
||||
m_canFilter = newCanFilter;
|
||||
}
|
||||
|
||||
bool ChannelFeatures::supportsContentDownloading() const { return m_supportsContentDownloading; }
|
||||
|
||||
void ChannelFeatures::setSupportsContentDownloading(bool newSupportsContentDownloading) {
|
||||
m_supportsContentDownloading = newSupportsContentDownloading;
|
||||
}
|
||||
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using ChannelFeatures = Jellyfin::DTO::ChannelFeatures;
|
||||
|
||||
template <>
|
||||
ChannelFeatures fromJsonValue<ChannelFeatures>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return ChannelFeatures::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
} // NS Jellyfin
|
||||
75
core/src/dto/channelitemsortfield.cpp
Normal file
75
core/src/dto/channelitemsortfield.cpp
Normal file
|
|
@ -0,0 +1,75 @@
|
|||
/*
|
||||
* Sailfin: a Jellyfin client written using Qt
|
||||
* Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
|
||||
* OVERWRITTEN AT SOME POINT!
|
||||
*
|
||||
* If there is a bug in this file, please fix the code generator used to generate this file found in
|
||||
* core/openapigenerator.d.
|
||||
*
|
||||
* This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
|
||||
* file with a newer file if needed instead of manually updating the files.
|
||||
*/
|
||||
|
||||
#include <JellyfinQt/dto/channelitemsortfield.h>
|
||||
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
ChannelItemSortFieldClass::ChannelItemSortFieldClass() {}
|
||||
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using ChannelItemSortField = Jellyfin::DTO::ChannelItemSortField;
|
||||
|
||||
template <>
|
||||
ChannelItemSortField fromJsonValue<ChannelItemSortField>(const QJsonValue &source) {
|
||||
if (!source.isString()) return ChannelItemSortField::EnumNotSet;
|
||||
|
||||
QString str = source.toString();
|
||||
if (str == QStringLiteral("Name")) {
|
||||
return ChannelItemSortField::Name;
|
||||
}
|
||||
if (str == QStringLiteral("CommunityRating")) {
|
||||
return ChannelItemSortField::CommunityRating;
|
||||
}
|
||||
if (str == QStringLiteral("PremiereDate")) {
|
||||
return ChannelItemSortField::PremiereDate;
|
||||
}
|
||||
if (str == QStringLiteral("DateCreated")) {
|
||||
return ChannelItemSortField::DateCreated;
|
||||
}
|
||||
if (str == QStringLiteral("Runtime")) {
|
||||
return ChannelItemSortField::Runtime;
|
||||
}
|
||||
if (str == QStringLiteral("PlayCount")) {
|
||||
return ChannelItemSortField::PlayCount;
|
||||
}
|
||||
if (str == QStringLiteral("CommunityPlayCount")) {
|
||||
return ChannelItemSortField::CommunityPlayCount;
|
||||
}
|
||||
|
||||
return ChannelItemSortField::EnumNotSet;
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
} // NS Jellyfin
|
||||
143
core/src/dto/channelmappingoptionsdto.cpp
Normal file
143
core/src/dto/channelmappingoptionsdto.cpp
Normal file
|
|
@ -0,0 +1,143 @@
|
|||
/*
|
||||
* Sailfin: a Jellyfin client written using Qt
|
||||
* Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
|
||||
* OVERWRITTEN AT SOME POINT!
|
||||
*
|
||||
* If there is a bug in this file, please fix the code generator used to generate this file found in
|
||||
* core/openapigenerator.d.
|
||||
*
|
||||
* This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
|
||||
* file with a newer file if needed instead of manually updating the files.
|
||||
*/
|
||||
|
||||
#include <JellyfinQt/dto/channelmappingoptionsdto.h>
|
||||
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
ChannelMappingOptionsDto::ChannelMappingOptionsDto() {}
|
||||
|
||||
ChannelMappingOptionsDto::ChannelMappingOptionsDto(const ChannelMappingOptionsDto &other) :
|
||||
|
||||
m_tunerChannels(other.m_tunerChannels),
|
||||
m_providerChannels(other.m_providerChannels),
|
||||
m_mappings(other.m_mappings),
|
||||
m_providerName(other.m_providerName){}
|
||||
|
||||
|
||||
void ChannelMappingOptionsDto::replaceData(ChannelMappingOptionsDto &other) {
|
||||
m_tunerChannels = other.m_tunerChannels;
|
||||
m_providerChannels = other.m_providerChannels;
|
||||
m_mappings = other.m_mappings;
|
||||
m_providerName = other.m_providerName;
|
||||
}
|
||||
|
||||
ChannelMappingOptionsDto ChannelMappingOptionsDto::fromJson(QJsonObject source) {
|
||||
ChannelMappingOptionsDto instance;
|
||||
instance.setFromJson(source);
|
||||
return instance;
|
||||
}
|
||||
|
||||
|
||||
void ChannelMappingOptionsDto::setFromJson(QJsonObject source) {
|
||||
m_tunerChannels = Jellyfin::Support::fromJsonValue<QList<QSharedPointer<TunerChannelMapping>>>(source["TunerChannels"]);
|
||||
m_providerChannels = Jellyfin::Support::fromJsonValue<QList<QSharedPointer<NameIdPair>>>(source["ProviderChannels"]);
|
||||
m_mappings = Jellyfin::Support::fromJsonValue<QList<QSharedPointer<NameValuePair>>>(source["Mappings"]);
|
||||
m_providerName = Jellyfin::Support::fromJsonValue<QString>(source["ProviderName"]);
|
||||
|
||||
}
|
||||
|
||||
QJsonObject ChannelMappingOptionsDto::toJson() {
|
||||
QJsonObject result;
|
||||
result["TunerChannels"] = Jellyfin::Support::toJsonValue<QList<QSharedPointer<TunerChannelMapping>>>(m_tunerChannels);
|
||||
result["ProviderChannels"] = Jellyfin::Support::toJsonValue<QList<QSharedPointer<NameIdPair>>>(m_providerChannels);
|
||||
result["Mappings"] = Jellyfin::Support::toJsonValue<QList<QSharedPointer<NameValuePair>>>(m_mappings);
|
||||
result["ProviderName"] = Jellyfin::Support::toJsonValue<QString>(m_providerName);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
QList<QSharedPointer<TunerChannelMapping>> ChannelMappingOptionsDto::tunerChannels() const { return m_tunerChannels; }
|
||||
|
||||
void ChannelMappingOptionsDto::setTunerChannels(QList<QSharedPointer<TunerChannelMapping>> newTunerChannels) {
|
||||
m_tunerChannels = newTunerChannels;
|
||||
}
|
||||
bool ChannelMappingOptionsDto::tunerChannelsNull() const {
|
||||
return m_tunerChannels.size() == 0;
|
||||
}
|
||||
|
||||
void ChannelMappingOptionsDto::setTunerChannelsNull() {
|
||||
m_tunerChannels.clear();
|
||||
|
||||
}
|
||||
QList<QSharedPointer<NameIdPair>> ChannelMappingOptionsDto::providerChannels() const { return m_providerChannels; }
|
||||
|
||||
void ChannelMappingOptionsDto::setProviderChannels(QList<QSharedPointer<NameIdPair>> newProviderChannels) {
|
||||
m_providerChannels = newProviderChannels;
|
||||
}
|
||||
bool ChannelMappingOptionsDto::providerChannelsNull() const {
|
||||
return m_providerChannels.size() == 0;
|
||||
}
|
||||
|
||||
void ChannelMappingOptionsDto::setProviderChannelsNull() {
|
||||
m_providerChannels.clear();
|
||||
|
||||
}
|
||||
QList<QSharedPointer<NameValuePair>> ChannelMappingOptionsDto::mappings() const { return m_mappings; }
|
||||
|
||||
void ChannelMappingOptionsDto::setMappings(QList<QSharedPointer<NameValuePair>> newMappings) {
|
||||
m_mappings = newMappings;
|
||||
}
|
||||
bool ChannelMappingOptionsDto::mappingsNull() const {
|
||||
return m_mappings.size() == 0;
|
||||
}
|
||||
|
||||
void ChannelMappingOptionsDto::setMappingsNull() {
|
||||
m_mappings.clear();
|
||||
|
||||
}
|
||||
QString ChannelMappingOptionsDto::providerName() const { return m_providerName; }
|
||||
|
||||
void ChannelMappingOptionsDto::setProviderName(QString newProviderName) {
|
||||
m_providerName = newProviderName;
|
||||
}
|
||||
bool ChannelMappingOptionsDto::providerNameNull() const {
|
||||
return m_providerName.isNull();
|
||||
}
|
||||
|
||||
void ChannelMappingOptionsDto::setProviderNameNull() {
|
||||
m_providerName.clear();
|
||||
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using ChannelMappingOptionsDto = Jellyfin::DTO::ChannelMappingOptionsDto;
|
||||
|
||||
template <>
|
||||
ChannelMappingOptionsDto fromJsonValue<ChannelMappingOptionsDto>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return ChannelMappingOptionsDto::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
} // NS Jellyfin
|
||||
78
core/src/dto/channelmediacontenttype.cpp
Normal file
78
core/src/dto/channelmediacontenttype.cpp
Normal file
|
|
@ -0,0 +1,78 @@
|
|||
/*
|
||||
* Sailfin: a Jellyfin client written using Qt
|
||||
* Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
|
||||
* OVERWRITTEN AT SOME POINT!
|
||||
*
|
||||
* If there is a bug in this file, please fix the code generator used to generate this file found in
|
||||
* core/openapigenerator.d.
|
||||
*
|
||||
* This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
|
||||
* file with a newer file if needed instead of manually updating the files.
|
||||
*/
|
||||
|
||||
#include <JellyfinQt/dto/channelmediacontenttype.h>
|
||||
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
ChannelMediaContentTypeClass::ChannelMediaContentTypeClass() {}
|
||||
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using ChannelMediaContentType = Jellyfin::DTO::ChannelMediaContentType;
|
||||
|
||||
template <>
|
||||
ChannelMediaContentType fromJsonValue<ChannelMediaContentType>(const QJsonValue &source) {
|
||||
if (!source.isString()) return ChannelMediaContentType::EnumNotSet;
|
||||
|
||||
QString str = source.toString();
|
||||
if (str == QStringLiteral("Clip")) {
|
||||
return ChannelMediaContentType::Clip;
|
||||
}
|
||||
if (str == QStringLiteral("Podcast")) {
|
||||
return ChannelMediaContentType::Podcast;
|
||||
}
|
||||
if (str == QStringLiteral("Trailer")) {
|
||||
return ChannelMediaContentType::Trailer;
|
||||
}
|
||||
if (str == QStringLiteral("Movie")) {
|
||||
return ChannelMediaContentType::Movie;
|
||||
}
|
||||
if (str == QStringLiteral("Episode")) {
|
||||
return ChannelMediaContentType::Episode;
|
||||
}
|
||||
if (str == QStringLiteral("Song")) {
|
||||
return ChannelMediaContentType::Song;
|
||||
}
|
||||
if (str == QStringLiteral("MovieExtra")) {
|
||||
return ChannelMediaContentType::MovieExtra;
|
||||
}
|
||||
if (str == QStringLiteral("TvExtra")) {
|
||||
return ChannelMediaContentType::TvExtra;
|
||||
}
|
||||
|
||||
return ChannelMediaContentType::EnumNotSet;
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
} // NS Jellyfin
|
||||
63
core/src/dto/channelmediatype.cpp
Normal file
63
core/src/dto/channelmediatype.cpp
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
/*
|
||||
* Sailfin: a Jellyfin client written using Qt
|
||||
* Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
|
||||
* OVERWRITTEN AT SOME POINT!
|
||||
*
|
||||
* If there is a bug in this file, please fix the code generator used to generate this file found in
|
||||
* core/openapigenerator.d.
|
||||
*
|
||||
* This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
|
||||
* file with a newer file if needed instead of manually updating the files.
|
||||
*/
|
||||
|
||||
#include <JellyfinQt/dto/channelmediatype.h>
|
||||
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
ChannelMediaTypeClass::ChannelMediaTypeClass() {}
|
||||
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using ChannelMediaType = Jellyfin::DTO::ChannelMediaType;
|
||||
|
||||
template <>
|
||||
ChannelMediaType fromJsonValue<ChannelMediaType>(const QJsonValue &source) {
|
||||
if (!source.isString()) return ChannelMediaType::EnumNotSet;
|
||||
|
||||
QString str = source.toString();
|
||||
if (str == QStringLiteral("Audio")) {
|
||||
return ChannelMediaType::Audio;
|
||||
}
|
||||
if (str == QStringLiteral("Video")) {
|
||||
return ChannelMediaType::Video;
|
||||
}
|
||||
if (str == QStringLiteral("Photo")) {
|
||||
return ChannelMediaType::Photo;
|
||||
}
|
||||
|
||||
return ChannelMediaType::EnumNotSet;
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
} // NS Jellyfin
|
||||
60
core/src/dto/channeltype.cpp
Normal file
60
core/src/dto/channeltype.cpp
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
/*
|
||||
* Sailfin: a Jellyfin client written using Qt
|
||||
* Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
|
||||
* OVERWRITTEN AT SOME POINT!
|
||||
*
|
||||
* If there is a bug in this file, please fix the code generator used to generate this file found in
|
||||
* core/openapigenerator.d.
|
||||
*
|
||||
* This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
|
||||
* file with a newer file if needed instead of manually updating the files.
|
||||
*/
|
||||
|
||||
#include <JellyfinQt/dto/channeltype.h>
|
||||
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
ChannelTypeClass::ChannelTypeClass() {}
|
||||
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using ChannelType = Jellyfin::DTO::ChannelType;
|
||||
|
||||
template <>
|
||||
ChannelType fromJsonValue<ChannelType>(const QJsonValue &source) {
|
||||
if (!source.isString()) return ChannelType::EnumNotSet;
|
||||
|
||||
QString str = source.toString();
|
||||
if (str == QStringLiteral("TV")) {
|
||||
return ChannelType::TV;
|
||||
}
|
||||
if (str == QStringLiteral("Radio")) {
|
||||
return ChannelType::Radio;
|
||||
}
|
||||
|
||||
return ChannelType::EnumNotSet;
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
} // NS Jellyfin
|
||||
146
core/src/dto/chapterinfo.cpp
Normal file
146
core/src/dto/chapterinfo.cpp
Normal file
|
|
@ -0,0 +1,146 @@
|
|||
/*
|
||||
* Sailfin: a Jellyfin client written using Qt
|
||||
* Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
|
||||
* OVERWRITTEN AT SOME POINT!
|
||||
*
|
||||
* If there is a bug in this file, please fix the code generator used to generate this file found in
|
||||
* core/openapigenerator.d.
|
||||
*
|
||||
* This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
|
||||
* file with a newer file if needed instead of manually updating the files.
|
||||
*/
|
||||
|
||||
#include <JellyfinQt/dto/chapterinfo.h>
|
||||
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
ChapterInfo::ChapterInfo() {}
|
||||
|
||||
ChapterInfo::ChapterInfo(const ChapterInfo &other) :
|
||||
|
||||
m_startPositionTicks(other.m_startPositionTicks),
|
||||
m_name(other.m_name),
|
||||
m_imagePath(other.m_imagePath),
|
||||
m_imageDateModified(other.m_imageDateModified),
|
||||
m_imageTag(other.m_imageTag){}
|
||||
|
||||
|
||||
void ChapterInfo::replaceData(ChapterInfo &other) {
|
||||
m_startPositionTicks = other.m_startPositionTicks;
|
||||
m_name = other.m_name;
|
||||
m_imagePath = other.m_imagePath;
|
||||
m_imageDateModified = other.m_imageDateModified;
|
||||
m_imageTag = other.m_imageTag;
|
||||
}
|
||||
|
||||
ChapterInfo ChapterInfo::fromJson(QJsonObject source) {
|
||||
ChapterInfo instance;
|
||||
instance.setFromJson(source);
|
||||
return instance;
|
||||
}
|
||||
|
||||
|
||||
void ChapterInfo::setFromJson(QJsonObject source) {
|
||||
m_startPositionTicks = Jellyfin::Support::fromJsonValue<qint64>(source["StartPositionTicks"]);
|
||||
m_name = Jellyfin::Support::fromJsonValue<QString>(source["Name"]);
|
||||
m_imagePath = Jellyfin::Support::fromJsonValue<QString>(source["ImagePath"]);
|
||||
m_imageDateModified = Jellyfin::Support::fromJsonValue<QDateTime>(source["ImageDateModified"]);
|
||||
m_imageTag = Jellyfin::Support::fromJsonValue<QString>(source["ImageTag"]);
|
||||
|
||||
}
|
||||
|
||||
QJsonObject ChapterInfo::toJson() {
|
||||
QJsonObject result;
|
||||
result["StartPositionTicks"] = Jellyfin::Support::toJsonValue<qint64>(m_startPositionTicks);
|
||||
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
||||
result["ImagePath"] = Jellyfin::Support::toJsonValue<QString>(m_imagePath);
|
||||
result["ImageDateModified"] = Jellyfin::Support::toJsonValue<QDateTime>(m_imageDateModified);
|
||||
result["ImageTag"] = Jellyfin::Support::toJsonValue<QString>(m_imageTag);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
qint64 ChapterInfo::startPositionTicks() const { return m_startPositionTicks; }
|
||||
|
||||
void ChapterInfo::setStartPositionTicks(qint64 newStartPositionTicks) {
|
||||
m_startPositionTicks = newStartPositionTicks;
|
||||
}
|
||||
|
||||
QString ChapterInfo::name() const { return m_name; }
|
||||
|
||||
void ChapterInfo::setName(QString newName) {
|
||||
m_name = newName;
|
||||
}
|
||||
bool ChapterInfo::nameNull() const {
|
||||
return m_name.isNull();
|
||||
}
|
||||
|
||||
void ChapterInfo::setNameNull() {
|
||||
m_name.clear();
|
||||
|
||||
}
|
||||
QString ChapterInfo::imagePath() const { return m_imagePath; }
|
||||
|
||||
void ChapterInfo::setImagePath(QString newImagePath) {
|
||||
m_imagePath = newImagePath;
|
||||
}
|
||||
bool ChapterInfo::imagePathNull() const {
|
||||
return m_imagePath.isNull();
|
||||
}
|
||||
|
||||
void ChapterInfo::setImagePathNull() {
|
||||
m_imagePath.clear();
|
||||
|
||||
}
|
||||
QDateTime ChapterInfo::imageDateModified() const { return m_imageDateModified; }
|
||||
|
||||
void ChapterInfo::setImageDateModified(QDateTime newImageDateModified) {
|
||||
m_imageDateModified = newImageDateModified;
|
||||
}
|
||||
|
||||
QString ChapterInfo::imageTag() const { return m_imageTag; }
|
||||
|
||||
void ChapterInfo::setImageTag(QString newImageTag) {
|
||||
m_imageTag = newImageTag;
|
||||
}
|
||||
bool ChapterInfo::imageTagNull() const {
|
||||
return m_imageTag.isNull();
|
||||
}
|
||||
|
||||
void ChapterInfo::setImageTagNull() {
|
||||
m_imageTag.clear();
|
||||
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using ChapterInfo = Jellyfin::DTO::ChapterInfo;
|
||||
|
||||
template <>
|
||||
ChapterInfo fromJsonValue<ChapterInfo>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return ChapterInfo::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
} // NS Jellyfin
|
||||
210
core/src/dto/clientcapabilities.cpp
Normal file
210
core/src/dto/clientcapabilities.cpp
Normal file
|
|
@ -0,0 +1,210 @@
|
|||
/*
|
||||
* Sailfin: a Jellyfin client written using Qt
|
||||
* Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
|
||||
* OVERWRITTEN AT SOME POINT!
|
||||
*
|
||||
* If there is a bug in this file, please fix the code generator used to generate this file found in
|
||||
* core/openapigenerator.d.
|
||||
*
|
||||
* This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
|
||||
* file with a newer file if needed instead of manually updating the files.
|
||||
*/
|
||||
|
||||
#include <JellyfinQt/dto/clientcapabilities.h>
|
||||
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
ClientCapabilities::ClientCapabilities() {}
|
||||
|
||||
ClientCapabilities::ClientCapabilities(const ClientCapabilities &other) :
|
||||
|
||||
m_playableMediaTypes(other.m_playableMediaTypes),
|
||||
m_supportedCommands(other.m_supportedCommands),
|
||||
m_supportsMediaControl(other.m_supportsMediaControl),
|
||||
m_supportsContentUploading(other.m_supportsContentUploading),
|
||||
m_messageCallbackUrl(other.m_messageCallbackUrl),
|
||||
m_supportsPersistentIdentifier(other.m_supportsPersistentIdentifier),
|
||||
m_supportsSync(other.m_supportsSync),
|
||||
m_deviceProfile(other.m_deviceProfile),
|
||||
m_appStoreUrl(other.m_appStoreUrl),
|
||||
m_iconUrl(other.m_iconUrl){}
|
||||
|
||||
|
||||
void ClientCapabilities::replaceData(ClientCapabilities &other) {
|
||||
m_playableMediaTypes = other.m_playableMediaTypes;
|
||||
m_supportedCommands = other.m_supportedCommands;
|
||||
m_supportsMediaControl = other.m_supportsMediaControl;
|
||||
m_supportsContentUploading = other.m_supportsContentUploading;
|
||||
m_messageCallbackUrl = other.m_messageCallbackUrl;
|
||||
m_supportsPersistentIdentifier = other.m_supportsPersistentIdentifier;
|
||||
m_supportsSync = other.m_supportsSync;
|
||||
m_deviceProfile = other.m_deviceProfile;
|
||||
m_appStoreUrl = other.m_appStoreUrl;
|
||||
m_iconUrl = other.m_iconUrl;
|
||||
}
|
||||
|
||||
ClientCapabilities ClientCapabilities::fromJson(QJsonObject source) {
|
||||
ClientCapabilities instance;
|
||||
instance.setFromJson(source);
|
||||
return instance;
|
||||
}
|
||||
|
||||
|
||||
void ClientCapabilities::setFromJson(QJsonObject source) {
|
||||
m_playableMediaTypes = Jellyfin::Support::fromJsonValue<QStringList>(source["PlayableMediaTypes"]);
|
||||
m_supportedCommands = Jellyfin::Support::fromJsonValue<QList<GeneralCommandType>>(source["SupportedCommands"]);
|
||||
m_supportsMediaControl = Jellyfin::Support::fromJsonValue<bool>(source["SupportsMediaControl"]);
|
||||
m_supportsContentUploading = Jellyfin::Support::fromJsonValue<bool>(source["SupportsContentUploading"]);
|
||||
m_messageCallbackUrl = Jellyfin::Support::fromJsonValue<QString>(source["MessageCallbackUrl"]);
|
||||
m_supportsPersistentIdentifier = Jellyfin::Support::fromJsonValue<bool>(source["SupportsPersistentIdentifier"]);
|
||||
m_supportsSync = Jellyfin::Support::fromJsonValue<bool>(source["SupportsSync"]);
|
||||
m_deviceProfile = Jellyfin::Support::fromJsonValue<QSharedPointer<DeviceProfile>>(source["DeviceProfile"]);
|
||||
m_appStoreUrl = Jellyfin::Support::fromJsonValue<QString>(source["AppStoreUrl"]);
|
||||
m_iconUrl = Jellyfin::Support::fromJsonValue<QString>(source["IconUrl"]);
|
||||
|
||||
}
|
||||
|
||||
QJsonObject ClientCapabilities::toJson() {
|
||||
QJsonObject result;
|
||||
result["PlayableMediaTypes"] = Jellyfin::Support::toJsonValue<QStringList>(m_playableMediaTypes);
|
||||
result["SupportedCommands"] = Jellyfin::Support::toJsonValue<QList<GeneralCommandType>>(m_supportedCommands);
|
||||
result["SupportsMediaControl"] = Jellyfin::Support::toJsonValue<bool>(m_supportsMediaControl);
|
||||
result["SupportsContentUploading"] = Jellyfin::Support::toJsonValue<bool>(m_supportsContentUploading);
|
||||
result["MessageCallbackUrl"] = Jellyfin::Support::toJsonValue<QString>(m_messageCallbackUrl);
|
||||
result["SupportsPersistentIdentifier"] = Jellyfin::Support::toJsonValue<bool>(m_supportsPersistentIdentifier);
|
||||
result["SupportsSync"] = Jellyfin::Support::toJsonValue<bool>(m_supportsSync);
|
||||
result["DeviceProfile"] = Jellyfin::Support::toJsonValue<QSharedPointer<DeviceProfile>>(m_deviceProfile);
|
||||
result["AppStoreUrl"] = Jellyfin::Support::toJsonValue<QString>(m_appStoreUrl);
|
||||
result["IconUrl"] = Jellyfin::Support::toJsonValue<QString>(m_iconUrl);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
QStringList ClientCapabilities::playableMediaTypes() const { return m_playableMediaTypes; }
|
||||
|
||||
void ClientCapabilities::setPlayableMediaTypes(QStringList newPlayableMediaTypes) {
|
||||
m_playableMediaTypes = newPlayableMediaTypes;
|
||||
}
|
||||
bool ClientCapabilities::playableMediaTypesNull() const {
|
||||
return m_playableMediaTypes.size() == 0;
|
||||
}
|
||||
|
||||
void ClientCapabilities::setPlayableMediaTypesNull() {
|
||||
m_playableMediaTypes.clear();
|
||||
|
||||
}
|
||||
QList<GeneralCommandType> ClientCapabilities::supportedCommands() const { return m_supportedCommands; }
|
||||
|
||||
void ClientCapabilities::setSupportedCommands(QList<GeneralCommandType> newSupportedCommands) {
|
||||
m_supportedCommands = newSupportedCommands;
|
||||
}
|
||||
bool ClientCapabilities::supportedCommandsNull() const {
|
||||
return m_supportedCommands.size() == 0;
|
||||
}
|
||||
|
||||
void ClientCapabilities::setSupportedCommandsNull() {
|
||||
m_supportedCommands.clear();
|
||||
|
||||
}
|
||||
bool ClientCapabilities::supportsMediaControl() const { return m_supportsMediaControl; }
|
||||
|
||||
void ClientCapabilities::setSupportsMediaControl(bool newSupportsMediaControl) {
|
||||
m_supportsMediaControl = newSupportsMediaControl;
|
||||
}
|
||||
|
||||
bool ClientCapabilities::supportsContentUploading() const { return m_supportsContentUploading; }
|
||||
|
||||
void ClientCapabilities::setSupportsContentUploading(bool newSupportsContentUploading) {
|
||||
m_supportsContentUploading = newSupportsContentUploading;
|
||||
}
|
||||
|
||||
QString ClientCapabilities::messageCallbackUrl() const { return m_messageCallbackUrl; }
|
||||
|
||||
void ClientCapabilities::setMessageCallbackUrl(QString newMessageCallbackUrl) {
|
||||
m_messageCallbackUrl = newMessageCallbackUrl;
|
||||
}
|
||||
bool ClientCapabilities::messageCallbackUrlNull() const {
|
||||
return m_messageCallbackUrl.isNull();
|
||||
}
|
||||
|
||||
void ClientCapabilities::setMessageCallbackUrlNull() {
|
||||
m_messageCallbackUrl.clear();
|
||||
|
||||
}
|
||||
bool ClientCapabilities::supportsPersistentIdentifier() const { return m_supportsPersistentIdentifier; }
|
||||
|
||||
void ClientCapabilities::setSupportsPersistentIdentifier(bool newSupportsPersistentIdentifier) {
|
||||
m_supportsPersistentIdentifier = newSupportsPersistentIdentifier;
|
||||
}
|
||||
|
||||
bool ClientCapabilities::supportsSync() const { return m_supportsSync; }
|
||||
|
||||
void ClientCapabilities::setSupportsSync(bool newSupportsSync) {
|
||||
m_supportsSync = newSupportsSync;
|
||||
}
|
||||
|
||||
QSharedPointer<DeviceProfile> ClientCapabilities::deviceProfile() const { return m_deviceProfile; }
|
||||
|
||||
void ClientCapabilities::setDeviceProfile(QSharedPointer<DeviceProfile> newDeviceProfile) {
|
||||
m_deviceProfile = newDeviceProfile;
|
||||
}
|
||||
|
||||
QString ClientCapabilities::appStoreUrl() const { return m_appStoreUrl; }
|
||||
|
||||
void ClientCapabilities::setAppStoreUrl(QString newAppStoreUrl) {
|
||||
m_appStoreUrl = newAppStoreUrl;
|
||||
}
|
||||
bool ClientCapabilities::appStoreUrlNull() const {
|
||||
return m_appStoreUrl.isNull();
|
||||
}
|
||||
|
||||
void ClientCapabilities::setAppStoreUrlNull() {
|
||||
m_appStoreUrl.clear();
|
||||
|
||||
}
|
||||
QString ClientCapabilities::iconUrl() const { return m_iconUrl; }
|
||||
|
||||
void ClientCapabilities::setIconUrl(QString newIconUrl) {
|
||||
m_iconUrl = newIconUrl;
|
||||
}
|
||||
bool ClientCapabilities::iconUrlNull() const {
|
||||
return m_iconUrl.isNull();
|
||||
}
|
||||
|
||||
void ClientCapabilities::setIconUrlNull() {
|
||||
m_iconUrl.clear();
|
||||
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using ClientCapabilities = Jellyfin::DTO::ClientCapabilities;
|
||||
|
||||
template <>
|
||||
ClientCapabilities fromJsonValue<ClientCapabilities>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return ClientCapabilities::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
} // NS Jellyfin
|
||||
210
core/src/dto/clientcapabilitiesdto.cpp
Normal file
210
core/src/dto/clientcapabilitiesdto.cpp
Normal file
|
|
@ -0,0 +1,210 @@
|
|||
/*
|
||||
* Sailfin: a Jellyfin client written using Qt
|
||||
* Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
|
||||
* OVERWRITTEN AT SOME POINT!
|
||||
*
|
||||
* If there is a bug in this file, please fix the code generator used to generate this file found in
|
||||
* core/openapigenerator.d.
|
||||
*
|
||||
* This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
|
||||
* file with a newer file if needed instead of manually updating the files.
|
||||
*/
|
||||
|
||||
#include <JellyfinQt/dto/clientcapabilitiesdto.h>
|
||||
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
ClientCapabilitiesDto::ClientCapabilitiesDto() {}
|
||||
|
||||
ClientCapabilitiesDto::ClientCapabilitiesDto(const ClientCapabilitiesDto &other) :
|
||||
|
||||
m_playableMediaTypes(other.m_playableMediaTypes),
|
||||
m_supportedCommands(other.m_supportedCommands),
|
||||
m_supportsMediaControl(other.m_supportsMediaControl),
|
||||
m_supportsContentUploading(other.m_supportsContentUploading),
|
||||
m_messageCallbackUrl(other.m_messageCallbackUrl),
|
||||
m_supportsPersistentIdentifier(other.m_supportsPersistentIdentifier),
|
||||
m_supportsSync(other.m_supportsSync),
|
||||
m_deviceProfile(other.m_deviceProfile),
|
||||
m_appStoreUrl(other.m_appStoreUrl),
|
||||
m_iconUrl(other.m_iconUrl){}
|
||||
|
||||
|
||||
void ClientCapabilitiesDto::replaceData(ClientCapabilitiesDto &other) {
|
||||
m_playableMediaTypes = other.m_playableMediaTypes;
|
||||
m_supportedCommands = other.m_supportedCommands;
|
||||
m_supportsMediaControl = other.m_supportsMediaControl;
|
||||
m_supportsContentUploading = other.m_supportsContentUploading;
|
||||
m_messageCallbackUrl = other.m_messageCallbackUrl;
|
||||
m_supportsPersistentIdentifier = other.m_supportsPersistentIdentifier;
|
||||
m_supportsSync = other.m_supportsSync;
|
||||
m_deviceProfile = other.m_deviceProfile;
|
||||
m_appStoreUrl = other.m_appStoreUrl;
|
||||
m_iconUrl = other.m_iconUrl;
|
||||
}
|
||||
|
||||
ClientCapabilitiesDto ClientCapabilitiesDto::fromJson(QJsonObject source) {
|
||||
ClientCapabilitiesDto instance;
|
||||
instance.setFromJson(source);
|
||||
return instance;
|
||||
}
|
||||
|
||||
|
||||
void ClientCapabilitiesDto::setFromJson(QJsonObject source) {
|
||||
m_playableMediaTypes = Jellyfin::Support::fromJsonValue<QStringList>(source["PlayableMediaTypes"]);
|
||||
m_supportedCommands = Jellyfin::Support::fromJsonValue<QList<GeneralCommandType>>(source["SupportedCommands"]);
|
||||
m_supportsMediaControl = Jellyfin::Support::fromJsonValue<bool>(source["SupportsMediaControl"]);
|
||||
m_supportsContentUploading = Jellyfin::Support::fromJsonValue<bool>(source["SupportsContentUploading"]);
|
||||
m_messageCallbackUrl = Jellyfin::Support::fromJsonValue<QString>(source["MessageCallbackUrl"]);
|
||||
m_supportsPersistentIdentifier = Jellyfin::Support::fromJsonValue<bool>(source["SupportsPersistentIdentifier"]);
|
||||
m_supportsSync = Jellyfin::Support::fromJsonValue<bool>(source["SupportsSync"]);
|
||||
m_deviceProfile = Jellyfin::Support::fromJsonValue<QSharedPointer<DeviceProfile>>(source["DeviceProfile"]);
|
||||
m_appStoreUrl = Jellyfin::Support::fromJsonValue<QString>(source["AppStoreUrl"]);
|
||||
m_iconUrl = Jellyfin::Support::fromJsonValue<QString>(source["IconUrl"]);
|
||||
|
||||
}
|
||||
|
||||
QJsonObject ClientCapabilitiesDto::toJson() {
|
||||
QJsonObject result;
|
||||
result["PlayableMediaTypes"] = Jellyfin::Support::toJsonValue<QStringList>(m_playableMediaTypes);
|
||||
result["SupportedCommands"] = Jellyfin::Support::toJsonValue<QList<GeneralCommandType>>(m_supportedCommands);
|
||||
result["SupportsMediaControl"] = Jellyfin::Support::toJsonValue<bool>(m_supportsMediaControl);
|
||||
result["SupportsContentUploading"] = Jellyfin::Support::toJsonValue<bool>(m_supportsContentUploading);
|
||||
result["MessageCallbackUrl"] = Jellyfin::Support::toJsonValue<QString>(m_messageCallbackUrl);
|
||||
result["SupportsPersistentIdentifier"] = Jellyfin::Support::toJsonValue<bool>(m_supportsPersistentIdentifier);
|
||||
result["SupportsSync"] = Jellyfin::Support::toJsonValue<bool>(m_supportsSync);
|
||||
result["DeviceProfile"] = Jellyfin::Support::toJsonValue<QSharedPointer<DeviceProfile>>(m_deviceProfile);
|
||||
result["AppStoreUrl"] = Jellyfin::Support::toJsonValue<QString>(m_appStoreUrl);
|
||||
result["IconUrl"] = Jellyfin::Support::toJsonValue<QString>(m_iconUrl);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
QStringList ClientCapabilitiesDto::playableMediaTypes() const { return m_playableMediaTypes; }
|
||||
|
||||
void ClientCapabilitiesDto::setPlayableMediaTypes(QStringList newPlayableMediaTypes) {
|
||||
m_playableMediaTypes = newPlayableMediaTypes;
|
||||
}
|
||||
bool ClientCapabilitiesDto::playableMediaTypesNull() const {
|
||||
return m_playableMediaTypes.size() == 0;
|
||||
}
|
||||
|
||||
void ClientCapabilitiesDto::setPlayableMediaTypesNull() {
|
||||
m_playableMediaTypes.clear();
|
||||
|
||||
}
|
||||
QList<GeneralCommandType> ClientCapabilitiesDto::supportedCommands() const { return m_supportedCommands; }
|
||||
|
||||
void ClientCapabilitiesDto::setSupportedCommands(QList<GeneralCommandType> newSupportedCommands) {
|
||||
m_supportedCommands = newSupportedCommands;
|
||||
}
|
||||
bool ClientCapabilitiesDto::supportedCommandsNull() const {
|
||||
return m_supportedCommands.size() == 0;
|
||||
}
|
||||
|
||||
void ClientCapabilitiesDto::setSupportedCommandsNull() {
|
||||
m_supportedCommands.clear();
|
||||
|
||||
}
|
||||
bool ClientCapabilitiesDto::supportsMediaControl() const { return m_supportsMediaControl; }
|
||||
|
||||
void ClientCapabilitiesDto::setSupportsMediaControl(bool newSupportsMediaControl) {
|
||||
m_supportsMediaControl = newSupportsMediaControl;
|
||||
}
|
||||
|
||||
bool ClientCapabilitiesDto::supportsContentUploading() const { return m_supportsContentUploading; }
|
||||
|
||||
void ClientCapabilitiesDto::setSupportsContentUploading(bool newSupportsContentUploading) {
|
||||
m_supportsContentUploading = newSupportsContentUploading;
|
||||
}
|
||||
|
||||
QString ClientCapabilitiesDto::messageCallbackUrl() const { return m_messageCallbackUrl; }
|
||||
|
||||
void ClientCapabilitiesDto::setMessageCallbackUrl(QString newMessageCallbackUrl) {
|
||||
m_messageCallbackUrl = newMessageCallbackUrl;
|
||||
}
|
||||
bool ClientCapabilitiesDto::messageCallbackUrlNull() const {
|
||||
return m_messageCallbackUrl.isNull();
|
||||
}
|
||||
|
||||
void ClientCapabilitiesDto::setMessageCallbackUrlNull() {
|
||||
m_messageCallbackUrl.clear();
|
||||
|
||||
}
|
||||
bool ClientCapabilitiesDto::supportsPersistentIdentifier() const { return m_supportsPersistentIdentifier; }
|
||||
|
||||
void ClientCapabilitiesDto::setSupportsPersistentIdentifier(bool newSupportsPersistentIdentifier) {
|
||||
m_supportsPersistentIdentifier = newSupportsPersistentIdentifier;
|
||||
}
|
||||
|
||||
bool ClientCapabilitiesDto::supportsSync() const { return m_supportsSync; }
|
||||
|
||||
void ClientCapabilitiesDto::setSupportsSync(bool newSupportsSync) {
|
||||
m_supportsSync = newSupportsSync;
|
||||
}
|
||||
|
||||
QSharedPointer<DeviceProfile> ClientCapabilitiesDto::deviceProfile() const { return m_deviceProfile; }
|
||||
|
||||
void ClientCapabilitiesDto::setDeviceProfile(QSharedPointer<DeviceProfile> newDeviceProfile) {
|
||||
m_deviceProfile = newDeviceProfile;
|
||||
}
|
||||
|
||||
QString ClientCapabilitiesDto::appStoreUrl() const { return m_appStoreUrl; }
|
||||
|
||||
void ClientCapabilitiesDto::setAppStoreUrl(QString newAppStoreUrl) {
|
||||
m_appStoreUrl = newAppStoreUrl;
|
||||
}
|
||||
bool ClientCapabilitiesDto::appStoreUrlNull() const {
|
||||
return m_appStoreUrl.isNull();
|
||||
}
|
||||
|
||||
void ClientCapabilitiesDto::setAppStoreUrlNull() {
|
||||
m_appStoreUrl.clear();
|
||||
|
||||
}
|
||||
QString ClientCapabilitiesDto::iconUrl() const { return m_iconUrl; }
|
||||
|
||||
void ClientCapabilitiesDto::setIconUrl(QString newIconUrl) {
|
||||
m_iconUrl = newIconUrl;
|
||||
}
|
||||
bool ClientCapabilitiesDto::iconUrlNull() const {
|
||||
return m_iconUrl.isNull();
|
||||
}
|
||||
|
||||
void ClientCapabilitiesDto::setIconUrlNull() {
|
||||
m_iconUrl.clear();
|
||||
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using ClientCapabilitiesDto = Jellyfin::DTO::ClientCapabilitiesDto;
|
||||
|
||||
template <>
|
||||
ClientCapabilitiesDto fromJsonValue<ClientCapabilitiesDto>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return ClientCapabilitiesDto::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
} // NS Jellyfin
|
||||
153
core/src/dto/codecprofile.cpp
Normal file
153
core/src/dto/codecprofile.cpp
Normal file
|
|
@ -0,0 +1,153 @@
|
|||
/*
|
||||
* Sailfin: a Jellyfin client written using Qt
|
||||
* Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
|
||||
* OVERWRITTEN AT SOME POINT!
|
||||
*
|
||||
* If there is a bug in this file, please fix the code generator used to generate this file found in
|
||||
* core/openapigenerator.d.
|
||||
*
|
||||
* This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
|
||||
* file with a newer file if needed instead of manually updating the files.
|
||||
*/
|
||||
|
||||
#include <JellyfinQt/dto/codecprofile.h>
|
||||
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
CodecProfile::CodecProfile() {}
|
||||
|
||||
CodecProfile::CodecProfile(const CodecProfile &other) :
|
||||
|
||||
m_type(other.m_type),
|
||||
m_conditions(other.m_conditions),
|
||||
m_applyConditions(other.m_applyConditions),
|
||||
m_codec(other.m_codec),
|
||||
m_container(other.m_container){}
|
||||
|
||||
|
||||
void CodecProfile::replaceData(CodecProfile &other) {
|
||||
m_type = other.m_type;
|
||||
m_conditions = other.m_conditions;
|
||||
m_applyConditions = other.m_applyConditions;
|
||||
m_codec = other.m_codec;
|
||||
m_container = other.m_container;
|
||||
}
|
||||
|
||||
CodecProfile CodecProfile::fromJson(QJsonObject source) {
|
||||
CodecProfile instance;
|
||||
instance.setFromJson(source);
|
||||
return instance;
|
||||
}
|
||||
|
||||
|
||||
void CodecProfile::setFromJson(QJsonObject source) {
|
||||
m_type = Jellyfin::Support::fromJsonValue<CodecType>(source["Type"]);
|
||||
m_conditions = Jellyfin::Support::fromJsonValue<QList<QSharedPointer<ProfileCondition>>>(source["Conditions"]);
|
||||
m_applyConditions = Jellyfin::Support::fromJsonValue<QList<QSharedPointer<ProfileCondition>>>(source["ApplyConditions"]);
|
||||
m_codec = Jellyfin::Support::fromJsonValue<QString>(source["Codec"]);
|
||||
m_container = Jellyfin::Support::fromJsonValue<QString>(source["Container"]);
|
||||
|
||||
}
|
||||
|
||||
QJsonObject CodecProfile::toJson() {
|
||||
QJsonObject result;
|
||||
result["Type"] = Jellyfin::Support::toJsonValue<CodecType>(m_type);
|
||||
result["Conditions"] = Jellyfin::Support::toJsonValue<QList<QSharedPointer<ProfileCondition>>>(m_conditions);
|
||||
result["ApplyConditions"] = Jellyfin::Support::toJsonValue<QList<QSharedPointer<ProfileCondition>>>(m_applyConditions);
|
||||
result["Codec"] = Jellyfin::Support::toJsonValue<QString>(m_codec);
|
||||
result["Container"] = Jellyfin::Support::toJsonValue<QString>(m_container);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
CodecType CodecProfile::type() const { return m_type; }
|
||||
|
||||
void CodecProfile::setType(CodecType newType) {
|
||||
m_type = newType;
|
||||
}
|
||||
|
||||
QList<QSharedPointer<ProfileCondition>> CodecProfile::conditions() const { return m_conditions; }
|
||||
|
||||
void CodecProfile::setConditions(QList<QSharedPointer<ProfileCondition>> newConditions) {
|
||||
m_conditions = newConditions;
|
||||
}
|
||||
bool CodecProfile::conditionsNull() const {
|
||||
return m_conditions.size() == 0;
|
||||
}
|
||||
|
||||
void CodecProfile::setConditionsNull() {
|
||||
m_conditions.clear();
|
||||
|
||||
}
|
||||
QList<QSharedPointer<ProfileCondition>> CodecProfile::applyConditions() const { return m_applyConditions; }
|
||||
|
||||
void CodecProfile::setApplyConditions(QList<QSharedPointer<ProfileCondition>> newApplyConditions) {
|
||||
m_applyConditions = newApplyConditions;
|
||||
}
|
||||
bool CodecProfile::applyConditionsNull() const {
|
||||
return m_applyConditions.size() == 0;
|
||||
}
|
||||
|
||||
void CodecProfile::setApplyConditionsNull() {
|
||||
m_applyConditions.clear();
|
||||
|
||||
}
|
||||
QString CodecProfile::codec() const { return m_codec; }
|
||||
|
||||
void CodecProfile::setCodec(QString newCodec) {
|
||||
m_codec = newCodec;
|
||||
}
|
||||
bool CodecProfile::codecNull() const {
|
||||
return m_codec.isNull();
|
||||
}
|
||||
|
||||
void CodecProfile::setCodecNull() {
|
||||
m_codec.clear();
|
||||
|
||||
}
|
||||
QString CodecProfile::container() const { return m_container; }
|
||||
|
||||
void CodecProfile::setContainer(QString newContainer) {
|
||||
m_container = newContainer;
|
||||
}
|
||||
bool CodecProfile::containerNull() const {
|
||||
return m_container.isNull();
|
||||
}
|
||||
|
||||
void CodecProfile::setContainerNull() {
|
||||
m_container.clear();
|
||||
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using CodecProfile = Jellyfin::DTO::CodecProfile;
|
||||
|
||||
template <>
|
||||
CodecProfile fromJsonValue<CodecProfile>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return CodecProfile::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
} // NS Jellyfin
|
||||
63
core/src/dto/codectype.cpp
Normal file
63
core/src/dto/codectype.cpp
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
/*
|
||||
* Sailfin: a Jellyfin client written using Qt
|
||||
* Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
|
||||
* OVERWRITTEN AT SOME POINT!
|
||||
*
|
||||
* If there is a bug in this file, please fix the code generator used to generate this file found in
|
||||
* core/openapigenerator.d.
|
||||
*
|
||||
* This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
|
||||
* file with a newer file if needed instead of manually updating the files.
|
||||
*/
|
||||
|
||||
#include <JellyfinQt/dto/codectype.h>
|
||||
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
CodecTypeClass::CodecTypeClass() {}
|
||||
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using CodecType = Jellyfin::DTO::CodecType;
|
||||
|
||||
template <>
|
||||
CodecType fromJsonValue<CodecType>(const QJsonValue &source) {
|
||||
if (!source.isString()) return CodecType::EnumNotSet;
|
||||
|
||||
QString str = source.toString();
|
||||
if (str == QStringLiteral("Video")) {
|
||||
return CodecType::Video;
|
||||
}
|
||||
if (str == QStringLiteral("VideoAudio")) {
|
||||
return CodecType::VideoAudio;
|
||||
}
|
||||
if (str == QStringLiteral("Audio")) {
|
||||
return CodecType::Audio;
|
||||
}
|
||||
|
||||
return CodecType::EnumNotSet;
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
} // NS Jellyfin
|
||||
85
core/src/dto/collectioncreationresult.cpp
Normal file
85
core/src/dto/collectioncreationresult.cpp
Normal file
|
|
@ -0,0 +1,85 @@
|
|||
/*
|
||||
* Sailfin: a Jellyfin client written using Qt
|
||||
* Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
|
||||
* OVERWRITTEN AT SOME POINT!
|
||||
*
|
||||
* If there is a bug in this file, please fix the code generator used to generate this file found in
|
||||
* core/openapigenerator.d.
|
||||
*
|
||||
* This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
|
||||
* file with a newer file if needed instead of manually updating the files.
|
||||
*/
|
||||
|
||||
#include <JellyfinQt/dto/collectioncreationresult.h>
|
||||
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
CollectionCreationResult::CollectionCreationResult() {}
|
||||
|
||||
CollectionCreationResult::CollectionCreationResult(const CollectionCreationResult &other) :
|
||||
|
||||
m_jellyfinId(other.m_jellyfinId){}
|
||||
|
||||
|
||||
void CollectionCreationResult::replaceData(CollectionCreationResult &other) {
|
||||
m_jellyfinId = other.m_jellyfinId;
|
||||
}
|
||||
|
||||
CollectionCreationResult CollectionCreationResult::fromJson(QJsonObject source) {
|
||||
CollectionCreationResult instance;
|
||||
instance.setFromJson(source);
|
||||
return instance;
|
||||
}
|
||||
|
||||
|
||||
void CollectionCreationResult::setFromJson(QJsonObject source) {
|
||||
m_jellyfinId = Jellyfin::Support::fromJsonValue<QString>(source["Id"]);
|
||||
|
||||
}
|
||||
|
||||
QJsonObject CollectionCreationResult::toJson() {
|
||||
QJsonObject result;
|
||||
result["Id"] = Jellyfin::Support::toJsonValue<QString>(m_jellyfinId);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
QString CollectionCreationResult::jellyfinId() const { return m_jellyfinId; }
|
||||
|
||||
void CollectionCreationResult::setJellyfinId(QString newJellyfinId) {
|
||||
m_jellyfinId = newJellyfinId;
|
||||
}
|
||||
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using CollectionCreationResult = Jellyfin::DTO::CollectionCreationResult;
|
||||
|
||||
template <>
|
||||
CollectionCreationResult fromJsonValue<CollectionCreationResult>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return CollectionCreationResult::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
} // NS Jellyfin
|
||||
180
core/src/dto/configurationpageinfo.cpp
Normal file
180
core/src/dto/configurationpageinfo.cpp
Normal file
|
|
@ -0,0 +1,180 @@
|
|||
/*
|
||||
* Sailfin: a Jellyfin client written using Qt
|
||||
* Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
|
||||
* OVERWRITTEN AT SOME POINT!
|
||||
*
|
||||
* If there is a bug in this file, please fix the code generator used to generate this file found in
|
||||
* core/openapigenerator.d.
|
||||
*
|
||||
* This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
|
||||
* file with a newer file if needed instead of manually updating the files.
|
||||
*/
|
||||
|
||||
#include <JellyfinQt/dto/configurationpageinfo.h>
|
||||
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
ConfigurationPageInfo::ConfigurationPageInfo() {}
|
||||
|
||||
ConfigurationPageInfo::ConfigurationPageInfo(const ConfigurationPageInfo &other) :
|
||||
|
||||
m_name(other.m_name),
|
||||
m_enableInMainMenu(other.m_enableInMainMenu),
|
||||
m_menuSection(other.m_menuSection),
|
||||
m_menuIcon(other.m_menuIcon),
|
||||
m_displayName(other.m_displayName),
|
||||
m_configurationPageType(other.m_configurationPageType),
|
||||
m_pluginId(other.m_pluginId){}
|
||||
|
||||
|
||||
void ConfigurationPageInfo::replaceData(ConfigurationPageInfo &other) {
|
||||
m_name = other.m_name;
|
||||
m_enableInMainMenu = other.m_enableInMainMenu;
|
||||
m_menuSection = other.m_menuSection;
|
||||
m_menuIcon = other.m_menuIcon;
|
||||
m_displayName = other.m_displayName;
|
||||
m_configurationPageType = other.m_configurationPageType;
|
||||
m_pluginId = other.m_pluginId;
|
||||
}
|
||||
|
||||
ConfigurationPageInfo ConfigurationPageInfo::fromJson(QJsonObject source) {
|
||||
ConfigurationPageInfo instance;
|
||||
instance.setFromJson(source);
|
||||
return instance;
|
||||
}
|
||||
|
||||
|
||||
void ConfigurationPageInfo::setFromJson(QJsonObject source) {
|
||||
m_name = Jellyfin::Support::fromJsonValue<QString>(source["Name"]);
|
||||
m_enableInMainMenu = Jellyfin::Support::fromJsonValue<bool>(source["EnableInMainMenu"]);
|
||||
m_menuSection = Jellyfin::Support::fromJsonValue<QString>(source["MenuSection"]);
|
||||
m_menuIcon = Jellyfin::Support::fromJsonValue<QString>(source["MenuIcon"]);
|
||||
m_displayName = Jellyfin::Support::fromJsonValue<QString>(source["DisplayName"]);
|
||||
m_configurationPageType = Jellyfin::Support::fromJsonValue<ConfigurationPageType>(source["ConfigurationPageType"]);
|
||||
m_pluginId = Jellyfin::Support::fromJsonValue<QString>(source["PluginId"]);
|
||||
|
||||
}
|
||||
|
||||
QJsonObject ConfigurationPageInfo::toJson() {
|
||||
QJsonObject result;
|
||||
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
||||
result["EnableInMainMenu"] = Jellyfin::Support::toJsonValue<bool>(m_enableInMainMenu);
|
||||
result["MenuSection"] = Jellyfin::Support::toJsonValue<QString>(m_menuSection);
|
||||
result["MenuIcon"] = Jellyfin::Support::toJsonValue<QString>(m_menuIcon);
|
||||
result["DisplayName"] = Jellyfin::Support::toJsonValue<QString>(m_displayName);
|
||||
result["ConfigurationPageType"] = Jellyfin::Support::toJsonValue<ConfigurationPageType>(m_configurationPageType);
|
||||
result["PluginId"] = Jellyfin::Support::toJsonValue<QString>(m_pluginId);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
QString ConfigurationPageInfo::name() const { return m_name; }
|
||||
|
||||
void ConfigurationPageInfo::setName(QString newName) {
|
||||
m_name = newName;
|
||||
}
|
||||
bool ConfigurationPageInfo::nameNull() const {
|
||||
return m_name.isNull();
|
||||
}
|
||||
|
||||
void ConfigurationPageInfo::setNameNull() {
|
||||
m_name.clear();
|
||||
|
||||
}
|
||||
bool ConfigurationPageInfo::enableInMainMenu() const { return m_enableInMainMenu; }
|
||||
|
||||
void ConfigurationPageInfo::setEnableInMainMenu(bool newEnableInMainMenu) {
|
||||
m_enableInMainMenu = newEnableInMainMenu;
|
||||
}
|
||||
|
||||
QString ConfigurationPageInfo::menuSection() const { return m_menuSection; }
|
||||
|
||||
void ConfigurationPageInfo::setMenuSection(QString newMenuSection) {
|
||||
m_menuSection = newMenuSection;
|
||||
}
|
||||
bool ConfigurationPageInfo::menuSectionNull() const {
|
||||
return m_menuSection.isNull();
|
||||
}
|
||||
|
||||
void ConfigurationPageInfo::setMenuSectionNull() {
|
||||
m_menuSection.clear();
|
||||
|
||||
}
|
||||
QString ConfigurationPageInfo::menuIcon() const { return m_menuIcon; }
|
||||
|
||||
void ConfigurationPageInfo::setMenuIcon(QString newMenuIcon) {
|
||||
m_menuIcon = newMenuIcon;
|
||||
}
|
||||
bool ConfigurationPageInfo::menuIconNull() const {
|
||||
return m_menuIcon.isNull();
|
||||
}
|
||||
|
||||
void ConfigurationPageInfo::setMenuIconNull() {
|
||||
m_menuIcon.clear();
|
||||
|
||||
}
|
||||
QString ConfigurationPageInfo::displayName() const { return m_displayName; }
|
||||
|
||||
void ConfigurationPageInfo::setDisplayName(QString newDisplayName) {
|
||||
m_displayName = newDisplayName;
|
||||
}
|
||||
bool ConfigurationPageInfo::displayNameNull() const {
|
||||
return m_displayName.isNull();
|
||||
}
|
||||
|
||||
void ConfigurationPageInfo::setDisplayNameNull() {
|
||||
m_displayName.clear();
|
||||
|
||||
}
|
||||
ConfigurationPageType ConfigurationPageInfo::configurationPageType() const { return m_configurationPageType; }
|
||||
|
||||
void ConfigurationPageInfo::setConfigurationPageType(ConfigurationPageType newConfigurationPageType) {
|
||||
m_configurationPageType = newConfigurationPageType;
|
||||
}
|
||||
|
||||
QString ConfigurationPageInfo::pluginId() const { return m_pluginId; }
|
||||
|
||||
void ConfigurationPageInfo::setPluginId(QString newPluginId) {
|
||||
m_pluginId = newPluginId;
|
||||
}
|
||||
bool ConfigurationPageInfo::pluginIdNull() const {
|
||||
return m_pluginId.isNull();
|
||||
}
|
||||
|
||||
void ConfigurationPageInfo::setPluginIdNull() {
|
||||
m_pluginId.clear();
|
||||
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using ConfigurationPageInfo = Jellyfin::DTO::ConfigurationPageInfo;
|
||||
|
||||
template <>
|
||||
ConfigurationPageInfo fromJsonValue<ConfigurationPageInfo>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return ConfigurationPageInfo::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
} // NS Jellyfin
|
||||
60
core/src/dto/configurationpagetype.cpp
Normal file
60
core/src/dto/configurationpagetype.cpp
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
/*
|
||||
* Sailfin: a Jellyfin client written using Qt
|
||||
* Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
|
||||
* OVERWRITTEN AT SOME POINT!
|
||||
*
|
||||
* If there is a bug in this file, please fix the code generator used to generate this file found in
|
||||
* core/openapigenerator.d.
|
||||
*
|
||||
* This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
|
||||
* file with a newer file if needed instead of manually updating the files.
|
||||
*/
|
||||
|
||||
#include <JellyfinQt/dto/configurationpagetype.h>
|
||||
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
ConfigurationPageTypeClass::ConfigurationPageTypeClass() {}
|
||||
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using ConfigurationPageType = Jellyfin::DTO::ConfigurationPageType;
|
||||
|
||||
template <>
|
||||
ConfigurationPageType fromJsonValue<ConfigurationPageType>(const QJsonValue &source) {
|
||||
if (!source.isString()) return ConfigurationPageType::EnumNotSet;
|
||||
|
||||
QString str = source.toString();
|
||||
if (str == QStringLiteral("PluginConfiguration")) {
|
||||
return ConfigurationPageType::PluginConfiguration;
|
||||
}
|
||||
if (str == QStringLiteral("None")) {
|
||||
return ConfigurationPageType::None;
|
||||
}
|
||||
|
||||
return ConfigurationPageType::EnumNotSet;
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
} // NS Jellyfin
|
||||
119
core/src/dto/containerprofile.cpp
Normal file
119
core/src/dto/containerprofile.cpp
Normal file
|
|
@ -0,0 +1,119 @@
|
|||
/*
|
||||
* Sailfin: a Jellyfin client written using Qt
|
||||
* Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
|
||||
* OVERWRITTEN AT SOME POINT!
|
||||
*
|
||||
* If there is a bug in this file, please fix the code generator used to generate this file found in
|
||||
* core/openapigenerator.d.
|
||||
*
|
||||
* This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
|
||||
* file with a newer file if needed instead of manually updating the files.
|
||||
*/
|
||||
|
||||
#include <JellyfinQt/dto/containerprofile.h>
|
||||
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
ContainerProfile::ContainerProfile() {}
|
||||
|
||||
ContainerProfile::ContainerProfile(const ContainerProfile &other) :
|
||||
|
||||
m_type(other.m_type),
|
||||
m_conditions(other.m_conditions),
|
||||
m_container(other.m_container){}
|
||||
|
||||
|
||||
void ContainerProfile::replaceData(ContainerProfile &other) {
|
||||
m_type = other.m_type;
|
||||
m_conditions = other.m_conditions;
|
||||
m_container = other.m_container;
|
||||
}
|
||||
|
||||
ContainerProfile ContainerProfile::fromJson(QJsonObject source) {
|
||||
ContainerProfile instance;
|
||||
instance.setFromJson(source);
|
||||
return instance;
|
||||
}
|
||||
|
||||
|
||||
void ContainerProfile::setFromJson(QJsonObject source) {
|
||||
m_type = Jellyfin::Support::fromJsonValue<DlnaProfileType>(source["Type"]);
|
||||
m_conditions = Jellyfin::Support::fromJsonValue<QList<QSharedPointer<ProfileCondition>>>(source["Conditions"]);
|
||||
m_container = Jellyfin::Support::fromJsonValue<QString>(source["Container"]);
|
||||
|
||||
}
|
||||
|
||||
QJsonObject ContainerProfile::toJson() {
|
||||
QJsonObject result;
|
||||
result["Type"] = Jellyfin::Support::toJsonValue<DlnaProfileType>(m_type);
|
||||
result["Conditions"] = Jellyfin::Support::toJsonValue<QList<QSharedPointer<ProfileCondition>>>(m_conditions);
|
||||
result["Container"] = Jellyfin::Support::toJsonValue<QString>(m_container);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
DlnaProfileType ContainerProfile::type() const { return m_type; }
|
||||
|
||||
void ContainerProfile::setType(DlnaProfileType newType) {
|
||||
m_type = newType;
|
||||
}
|
||||
|
||||
QList<QSharedPointer<ProfileCondition>> ContainerProfile::conditions() const { return m_conditions; }
|
||||
|
||||
void ContainerProfile::setConditions(QList<QSharedPointer<ProfileCondition>> newConditions) {
|
||||
m_conditions = newConditions;
|
||||
}
|
||||
bool ContainerProfile::conditionsNull() const {
|
||||
return m_conditions.size() == 0;
|
||||
}
|
||||
|
||||
void ContainerProfile::setConditionsNull() {
|
||||
m_conditions.clear();
|
||||
|
||||
}
|
||||
QString ContainerProfile::container() const { return m_container; }
|
||||
|
||||
void ContainerProfile::setContainer(QString newContainer) {
|
||||
m_container = newContainer;
|
||||
}
|
||||
bool ContainerProfile::containerNull() const {
|
||||
return m_container.isNull();
|
||||
}
|
||||
|
||||
void ContainerProfile::setContainerNull() {
|
||||
m_container.clear();
|
||||
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using ContainerProfile = Jellyfin::DTO::ContainerProfile;
|
||||
|
||||
template <>
|
||||
ContainerProfile fromJsonValue<ContainerProfile>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return ContainerProfile::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
} // NS Jellyfin
|
||||
119
core/src/dto/controlresponse.cpp
Normal file
119
core/src/dto/controlresponse.cpp
Normal file
|
|
@ -0,0 +1,119 @@
|
|||
/*
|
||||
* Sailfin: a Jellyfin client written using Qt
|
||||
* Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
|
||||
* OVERWRITTEN AT SOME POINT!
|
||||
*
|
||||
* If there is a bug in this file, please fix the code generator used to generate this file found in
|
||||
* core/openapigenerator.d.
|
||||
*
|
||||
* This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
|
||||
* file with a newer file if needed instead of manually updating the files.
|
||||
*/
|
||||
|
||||
#include <JellyfinQt/dto/controlresponse.h>
|
||||
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
ControlResponse::ControlResponse() {}
|
||||
|
||||
ControlResponse::ControlResponse(const ControlResponse &other) :
|
||||
|
||||
m_headers(other.m_headers),
|
||||
m_xml(other.m_xml),
|
||||
m_isSuccessful(other.m_isSuccessful){}
|
||||
|
||||
|
||||
void ControlResponse::replaceData(ControlResponse &other) {
|
||||
m_headers = other.m_headers;
|
||||
m_xml = other.m_xml;
|
||||
m_isSuccessful = other.m_isSuccessful;
|
||||
}
|
||||
|
||||
ControlResponse ControlResponse::fromJson(QJsonObject source) {
|
||||
ControlResponse instance;
|
||||
instance.setFromJson(source);
|
||||
return instance;
|
||||
}
|
||||
|
||||
|
||||
void ControlResponse::setFromJson(QJsonObject source) {
|
||||
m_headers = Jellyfin::Support::fromJsonValue<std::optional<QJsonObject>>(source["Headers"]);
|
||||
m_xml = Jellyfin::Support::fromJsonValue<QString>(source["Xml"]);
|
||||
m_isSuccessful = Jellyfin::Support::fromJsonValue<bool>(source["IsSuccessful"]);
|
||||
|
||||
}
|
||||
|
||||
QJsonObject ControlResponse::toJson() {
|
||||
QJsonObject result;
|
||||
result["Headers"] = Jellyfin::Support::toJsonValue<std::optional<QJsonObject>>(m_headers);
|
||||
result["Xml"] = Jellyfin::Support::toJsonValue<QString>(m_xml);
|
||||
result["IsSuccessful"] = Jellyfin::Support::toJsonValue<bool>(m_isSuccessful);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
std::optional<QJsonObject> ControlResponse::headers() const { return m_headers; }
|
||||
|
||||
void ControlResponse::setHeaders(std::optional<QJsonObject> newHeaders) {
|
||||
m_headers = newHeaders;
|
||||
}
|
||||
bool ControlResponse::headersNull() const {
|
||||
return !m_headers.has_value();
|
||||
}
|
||||
|
||||
void ControlResponse::setHeadersNull() {
|
||||
m_headers = std::nullopt;
|
||||
|
||||
}
|
||||
QString ControlResponse::xml() const { return m_xml; }
|
||||
|
||||
void ControlResponse::setXml(QString newXml) {
|
||||
m_xml = newXml;
|
||||
}
|
||||
bool ControlResponse::xmlNull() const {
|
||||
return m_xml.isNull();
|
||||
}
|
||||
|
||||
void ControlResponse::setXmlNull() {
|
||||
m_xml.clear();
|
||||
|
||||
}
|
||||
bool ControlResponse::isSuccessful() const { return m_isSuccessful; }
|
||||
|
||||
void ControlResponse::setIsSuccessful(bool newIsSuccessful) {
|
||||
m_isSuccessful = newIsSuccessful;
|
||||
}
|
||||
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using ControlResponse = Jellyfin::DTO::ControlResponse;
|
||||
|
||||
template <>
|
||||
ControlResponse fromJsonValue<ControlResponse>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return ControlResponse::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
} // NS Jellyfin
|
||||
143
core/src/dto/countryinfo.cpp
Normal file
143
core/src/dto/countryinfo.cpp
Normal file
|
|
@ -0,0 +1,143 @@
|
|||
/*
|
||||
* Sailfin: a Jellyfin client written using Qt
|
||||
* Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
|
||||
* OVERWRITTEN AT SOME POINT!
|
||||
*
|
||||
* If there is a bug in this file, please fix the code generator used to generate this file found in
|
||||
* core/openapigenerator.d.
|
||||
*
|
||||
* This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
|
||||
* file with a newer file if needed instead of manually updating the files.
|
||||
*/
|
||||
|
||||
#include <JellyfinQt/dto/countryinfo.h>
|
||||
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
CountryInfo::CountryInfo() {}
|
||||
|
||||
CountryInfo::CountryInfo(const CountryInfo &other) :
|
||||
|
||||
m_name(other.m_name),
|
||||
m_displayName(other.m_displayName),
|
||||
m_twoLetterISORegionName(other.m_twoLetterISORegionName),
|
||||
m_threeLetterISORegionName(other.m_threeLetterISORegionName){}
|
||||
|
||||
|
||||
void CountryInfo::replaceData(CountryInfo &other) {
|
||||
m_name = other.m_name;
|
||||
m_displayName = other.m_displayName;
|
||||
m_twoLetterISORegionName = other.m_twoLetterISORegionName;
|
||||
m_threeLetterISORegionName = other.m_threeLetterISORegionName;
|
||||
}
|
||||
|
||||
CountryInfo CountryInfo::fromJson(QJsonObject source) {
|
||||
CountryInfo instance;
|
||||
instance.setFromJson(source);
|
||||
return instance;
|
||||
}
|
||||
|
||||
|
||||
void CountryInfo::setFromJson(QJsonObject source) {
|
||||
m_name = Jellyfin::Support::fromJsonValue<QString>(source["Name"]);
|
||||
m_displayName = Jellyfin::Support::fromJsonValue<QString>(source["DisplayName"]);
|
||||
m_twoLetterISORegionName = Jellyfin::Support::fromJsonValue<QString>(source["TwoLetterISORegionName"]);
|
||||
m_threeLetterISORegionName = Jellyfin::Support::fromJsonValue<QString>(source["ThreeLetterISORegionName"]);
|
||||
|
||||
}
|
||||
|
||||
QJsonObject CountryInfo::toJson() {
|
||||
QJsonObject result;
|
||||
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
||||
result["DisplayName"] = Jellyfin::Support::toJsonValue<QString>(m_displayName);
|
||||
result["TwoLetterISORegionName"] = Jellyfin::Support::toJsonValue<QString>(m_twoLetterISORegionName);
|
||||
result["ThreeLetterISORegionName"] = Jellyfin::Support::toJsonValue<QString>(m_threeLetterISORegionName);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
QString CountryInfo::name() const { return m_name; }
|
||||
|
||||
void CountryInfo::setName(QString newName) {
|
||||
m_name = newName;
|
||||
}
|
||||
bool CountryInfo::nameNull() const {
|
||||
return m_name.isNull();
|
||||
}
|
||||
|
||||
void CountryInfo::setNameNull() {
|
||||
m_name.clear();
|
||||
|
||||
}
|
||||
QString CountryInfo::displayName() const { return m_displayName; }
|
||||
|
||||
void CountryInfo::setDisplayName(QString newDisplayName) {
|
||||
m_displayName = newDisplayName;
|
||||
}
|
||||
bool CountryInfo::displayNameNull() const {
|
||||
return m_displayName.isNull();
|
||||
}
|
||||
|
||||
void CountryInfo::setDisplayNameNull() {
|
||||
m_displayName.clear();
|
||||
|
||||
}
|
||||
QString CountryInfo::twoLetterISORegionName() const { return m_twoLetterISORegionName; }
|
||||
|
||||
void CountryInfo::setTwoLetterISORegionName(QString newTwoLetterISORegionName) {
|
||||
m_twoLetterISORegionName = newTwoLetterISORegionName;
|
||||
}
|
||||
bool CountryInfo::twoLetterISORegionNameNull() const {
|
||||
return m_twoLetterISORegionName.isNull();
|
||||
}
|
||||
|
||||
void CountryInfo::setTwoLetterISORegionNameNull() {
|
||||
m_twoLetterISORegionName.clear();
|
||||
|
||||
}
|
||||
QString CountryInfo::threeLetterISORegionName() const { return m_threeLetterISORegionName; }
|
||||
|
||||
void CountryInfo::setThreeLetterISORegionName(QString newThreeLetterISORegionName) {
|
||||
m_threeLetterISORegionName = newThreeLetterISORegionName;
|
||||
}
|
||||
bool CountryInfo::threeLetterISORegionNameNull() const {
|
||||
return m_threeLetterISORegionName.isNull();
|
||||
}
|
||||
|
||||
void CountryInfo::setThreeLetterISORegionNameNull() {
|
||||
m_threeLetterISORegionName.clear();
|
||||
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using CountryInfo = Jellyfin::DTO::CountryInfo;
|
||||
|
||||
template <>
|
||||
CountryInfo fromJsonValue<CountryInfo>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return CountryInfo::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
} // NS Jellyfin
|
||||
143
core/src/dto/createplaylistdto.cpp
Normal file
143
core/src/dto/createplaylistdto.cpp
Normal file
|
|
@ -0,0 +1,143 @@
|
|||
/*
|
||||
* Sailfin: a Jellyfin client written using Qt
|
||||
* Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
|
||||
* OVERWRITTEN AT SOME POINT!
|
||||
*
|
||||
* If there is a bug in this file, please fix the code generator used to generate this file found in
|
||||
* core/openapigenerator.d.
|
||||
*
|
||||
* This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
|
||||
* file with a newer file if needed instead of manually updating the files.
|
||||
*/
|
||||
|
||||
#include <JellyfinQt/dto/createplaylistdto.h>
|
||||
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
CreatePlaylistDto::CreatePlaylistDto() {}
|
||||
|
||||
CreatePlaylistDto::CreatePlaylistDto(const CreatePlaylistDto &other) :
|
||||
|
||||
m_name(other.m_name),
|
||||
m_ids(other.m_ids),
|
||||
m_userId(other.m_userId),
|
||||
m_mediaType(other.m_mediaType){}
|
||||
|
||||
|
||||
void CreatePlaylistDto::replaceData(CreatePlaylistDto &other) {
|
||||
m_name = other.m_name;
|
||||
m_ids = other.m_ids;
|
||||
m_userId = other.m_userId;
|
||||
m_mediaType = other.m_mediaType;
|
||||
}
|
||||
|
||||
CreatePlaylistDto CreatePlaylistDto::fromJson(QJsonObject source) {
|
||||
CreatePlaylistDto instance;
|
||||
instance.setFromJson(source);
|
||||
return instance;
|
||||
}
|
||||
|
||||
|
||||
void CreatePlaylistDto::setFromJson(QJsonObject source) {
|
||||
m_name = Jellyfin::Support::fromJsonValue<QString>(source["Name"]);
|
||||
m_ids = Jellyfin::Support::fromJsonValue<QStringList>(source["Ids"]);
|
||||
m_userId = Jellyfin::Support::fromJsonValue<QString>(source["UserId"]);
|
||||
m_mediaType = Jellyfin::Support::fromJsonValue<QString>(source["MediaType"]);
|
||||
|
||||
}
|
||||
|
||||
QJsonObject CreatePlaylistDto::toJson() {
|
||||
QJsonObject result;
|
||||
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
||||
result["Ids"] = Jellyfin::Support::toJsonValue<QStringList>(m_ids);
|
||||
result["UserId"] = Jellyfin::Support::toJsonValue<QString>(m_userId);
|
||||
result["MediaType"] = Jellyfin::Support::toJsonValue<QString>(m_mediaType);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
QString CreatePlaylistDto::name() const { return m_name; }
|
||||
|
||||
void CreatePlaylistDto::setName(QString newName) {
|
||||
m_name = newName;
|
||||
}
|
||||
bool CreatePlaylistDto::nameNull() const {
|
||||
return m_name.isNull();
|
||||
}
|
||||
|
||||
void CreatePlaylistDto::setNameNull() {
|
||||
m_name.clear();
|
||||
|
||||
}
|
||||
QStringList CreatePlaylistDto::ids() const { return m_ids; }
|
||||
|
||||
void CreatePlaylistDto::setIds(QStringList newIds) {
|
||||
m_ids = newIds;
|
||||
}
|
||||
bool CreatePlaylistDto::idsNull() const {
|
||||
return m_ids.size() == 0;
|
||||
}
|
||||
|
||||
void CreatePlaylistDto::setIdsNull() {
|
||||
m_ids.clear();
|
||||
|
||||
}
|
||||
QString CreatePlaylistDto::userId() const { return m_userId; }
|
||||
|
||||
void CreatePlaylistDto::setUserId(QString newUserId) {
|
||||
m_userId = newUserId;
|
||||
}
|
||||
bool CreatePlaylistDto::userIdNull() const {
|
||||
return m_userId.isNull();
|
||||
}
|
||||
|
||||
void CreatePlaylistDto::setUserIdNull() {
|
||||
m_userId.clear();
|
||||
|
||||
}
|
||||
QString CreatePlaylistDto::mediaType() const { return m_mediaType; }
|
||||
|
||||
void CreatePlaylistDto::setMediaType(QString newMediaType) {
|
||||
m_mediaType = newMediaType;
|
||||
}
|
||||
bool CreatePlaylistDto::mediaTypeNull() const {
|
||||
return m_mediaType.isNull();
|
||||
}
|
||||
|
||||
void CreatePlaylistDto::setMediaTypeNull() {
|
||||
m_mediaType.clear();
|
||||
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using CreatePlaylistDto = Jellyfin::DTO::CreatePlaylistDto;
|
||||
|
||||
template <>
|
||||
CreatePlaylistDto fromJsonValue<CreatePlaylistDto>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return CreatePlaylistDto::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
} // NS Jellyfin
|
||||
109
core/src/dto/createuserbyname.cpp
Normal file
109
core/src/dto/createuserbyname.cpp
Normal file
|
|
@ -0,0 +1,109 @@
|
|||
/*
|
||||
* Sailfin: a Jellyfin client written using Qt
|
||||
* Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
|
||||
* OVERWRITTEN AT SOME POINT!
|
||||
*
|
||||
* If there is a bug in this file, please fix the code generator used to generate this file found in
|
||||
* core/openapigenerator.d.
|
||||
*
|
||||
* This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
|
||||
* file with a newer file if needed instead of manually updating the files.
|
||||
*/
|
||||
|
||||
#include <JellyfinQt/dto/createuserbyname.h>
|
||||
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
CreateUserByName::CreateUserByName() {}
|
||||
|
||||
CreateUserByName::CreateUserByName(const CreateUserByName &other) :
|
||||
|
||||
m_name(other.m_name),
|
||||
m_password(other.m_password){}
|
||||
|
||||
|
||||
void CreateUserByName::replaceData(CreateUserByName &other) {
|
||||
m_name = other.m_name;
|
||||
m_password = other.m_password;
|
||||
}
|
||||
|
||||
CreateUserByName CreateUserByName::fromJson(QJsonObject source) {
|
||||
CreateUserByName instance;
|
||||
instance.setFromJson(source);
|
||||
return instance;
|
||||
}
|
||||
|
||||
|
||||
void CreateUserByName::setFromJson(QJsonObject source) {
|
||||
m_name = Jellyfin::Support::fromJsonValue<QString>(source["Name"]);
|
||||
m_password = Jellyfin::Support::fromJsonValue<QString>(source["Password"]);
|
||||
|
||||
}
|
||||
|
||||
QJsonObject CreateUserByName::toJson() {
|
||||
QJsonObject result;
|
||||
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
||||
result["Password"] = Jellyfin::Support::toJsonValue<QString>(m_password);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
QString CreateUserByName::name() const { return m_name; }
|
||||
|
||||
void CreateUserByName::setName(QString newName) {
|
||||
m_name = newName;
|
||||
}
|
||||
bool CreateUserByName::nameNull() const {
|
||||
return m_name.isNull();
|
||||
}
|
||||
|
||||
void CreateUserByName::setNameNull() {
|
||||
m_name.clear();
|
||||
|
||||
}
|
||||
QString CreateUserByName::password() const { return m_password; }
|
||||
|
||||
void CreateUserByName::setPassword(QString newPassword) {
|
||||
m_password = newPassword;
|
||||
}
|
||||
bool CreateUserByName::passwordNull() const {
|
||||
return m_password.isNull();
|
||||
}
|
||||
|
||||
void CreateUserByName::setPasswordNull() {
|
||||
m_password.clear();
|
||||
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using CreateUserByName = Jellyfin::DTO::CreateUserByName;
|
||||
|
||||
template <>
|
||||
CreateUserByName fromJsonValue<CreateUserByName>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return CreateUserByName::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
} // NS Jellyfin
|
||||
160
core/src/dto/culturedto.cpp
Normal file
160
core/src/dto/culturedto.cpp
Normal file
|
|
@ -0,0 +1,160 @@
|
|||
/*
|
||||
* Sailfin: a Jellyfin client written using Qt
|
||||
* Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
|
||||
* OVERWRITTEN AT SOME POINT!
|
||||
*
|
||||
* If there is a bug in this file, please fix the code generator used to generate this file found in
|
||||
* core/openapigenerator.d.
|
||||
*
|
||||
* This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
|
||||
* file with a newer file if needed instead of manually updating the files.
|
||||
*/
|
||||
|
||||
#include <JellyfinQt/dto/culturedto.h>
|
||||
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
CultureDto::CultureDto() {}
|
||||
|
||||
CultureDto::CultureDto(const CultureDto &other) :
|
||||
|
||||
m_name(other.m_name),
|
||||
m_displayName(other.m_displayName),
|
||||
m_twoLetterISOLanguageName(other.m_twoLetterISOLanguageName),
|
||||
m_threeLetterISOLanguageName(other.m_threeLetterISOLanguageName),
|
||||
m_threeLetterISOLanguageNames(other.m_threeLetterISOLanguageNames){}
|
||||
|
||||
|
||||
void CultureDto::replaceData(CultureDto &other) {
|
||||
m_name = other.m_name;
|
||||
m_displayName = other.m_displayName;
|
||||
m_twoLetterISOLanguageName = other.m_twoLetterISOLanguageName;
|
||||
m_threeLetterISOLanguageName = other.m_threeLetterISOLanguageName;
|
||||
m_threeLetterISOLanguageNames = other.m_threeLetterISOLanguageNames;
|
||||
}
|
||||
|
||||
CultureDto CultureDto::fromJson(QJsonObject source) {
|
||||
CultureDto instance;
|
||||
instance.setFromJson(source);
|
||||
return instance;
|
||||
}
|
||||
|
||||
|
||||
void CultureDto::setFromJson(QJsonObject source) {
|
||||
m_name = Jellyfin::Support::fromJsonValue<QString>(source["Name"]);
|
||||
m_displayName = Jellyfin::Support::fromJsonValue<QString>(source["DisplayName"]);
|
||||
m_twoLetterISOLanguageName = Jellyfin::Support::fromJsonValue<QString>(source["TwoLetterISOLanguageName"]);
|
||||
m_threeLetterISOLanguageName = Jellyfin::Support::fromJsonValue<QString>(source["ThreeLetterISOLanguageName"]);
|
||||
m_threeLetterISOLanguageNames = Jellyfin::Support::fromJsonValue<QStringList>(source["ThreeLetterISOLanguageNames"]);
|
||||
|
||||
}
|
||||
|
||||
QJsonObject CultureDto::toJson() {
|
||||
QJsonObject result;
|
||||
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
||||
result["DisplayName"] = Jellyfin::Support::toJsonValue<QString>(m_displayName);
|
||||
result["TwoLetterISOLanguageName"] = Jellyfin::Support::toJsonValue<QString>(m_twoLetterISOLanguageName);
|
||||
result["ThreeLetterISOLanguageName"] = Jellyfin::Support::toJsonValue<QString>(m_threeLetterISOLanguageName);
|
||||
result["ThreeLetterISOLanguageNames"] = Jellyfin::Support::toJsonValue<QStringList>(m_threeLetterISOLanguageNames);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
QString CultureDto::name() const { return m_name; }
|
||||
|
||||
void CultureDto::setName(QString newName) {
|
||||
m_name = newName;
|
||||
}
|
||||
bool CultureDto::nameNull() const {
|
||||
return m_name.isNull();
|
||||
}
|
||||
|
||||
void CultureDto::setNameNull() {
|
||||
m_name.clear();
|
||||
|
||||
}
|
||||
QString CultureDto::displayName() const { return m_displayName; }
|
||||
|
||||
void CultureDto::setDisplayName(QString newDisplayName) {
|
||||
m_displayName = newDisplayName;
|
||||
}
|
||||
bool CultureDto::displayNameNull() const {
|
||||
return m_displayName.isNull();
|
||||
}
|
||||
|
||||
void CultureDto::setDisplayNameNull() {
|
||||
m_displayName.clear();
|
||||
|
||||
}
|
||||
QString CultureDto::twoLetterISOLanguageName() const { return m_twoLetterISOLanguageName; }
|
||||
|
||||
void CultureDto::setTwoLetterISOLanguageName(QString newTwoLetterISOLanguageName) {
|
||||
m_twoLetterISOLanguageName = newTwoLetterISOLanguageName;
|
||||
}
|
||||
bool CultureDto::twoLetterISOLanguageNameNull() const {
|
||||
return m_twoLetterISOLanguageName.isNull();
|
||||
}
|
||||
|
||||
void CultureDto::setTwoLetterISOLanguageNameNull() {
|
||||
m_twoLetterISOLanguageName.clear();
|
||||
|
||||
}
|
||||
QString CultureDto::threeLetterISOLanguageName() const { return m_threeLetterISOLanguageName; }
|
||||
|
||||
void CultureDto::setThreeLetterISOLanguageName(QString newThreeLetterISOLanguageName) {
|
||||
m_threeLetterISOLanguageName = newThreeLetterISOLanguageName;
|
||||
}
|
||||
bool CultureDto::threeLetterISOLanguageNameNull() const {
|
||||
return m_threeLetterISOLanguageName.isNull();
|
||||
}
|
||||
|
||||
void CultureDto::setThreeLetterISOLanguageNameNull() {
|
||||
m_threeLetterISOLanguageName.clear();
|
||||
|
||||
}
|
||||
QStringList CultureDto::threeLetterISOLanguageNames() const { return m_threeLetterISOLanguageNames; }
|
||||
|
||||
void CultureDto::setThreeLetterISOLanguageNames(QStringList newThreeLetterISOLanguageNames) {
|
||||
m_threeLetterISOLanguageNames = newThreeLetterISOLanguageNames;
|
||||
}
|
||||
bool CultureDto::threeLetterISOLanguageNamesNull() const {
|
||||
return m_threeLetterISOLanguageNames.size() == 0;
|
||||
}
|
||||
|
||||
void CultureDto::setThreeLetterISOLanguageNamesNull() {
|
||||
m_threeLetterISOLanguageNames.clear();
|
||||
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using CultureDto = Jellyfin::DTO::CultureDto;
|
||||
|
||||
template <>
|
||||
CultureDto fromJsonValue<CultureDto>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return CultureDto::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
} // NS Jellyfin
|
||||
75
core/src/dto/dayofweek.cpp
Normal file
75
core/src/dto/dayofweek.cpp
Normal file
|
|
@ -0,0 +1,75 @@
|
|||
/*
|
||||
* Sailfin: a Jellyfin client written using Qt
|
||||
* Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
|
||||
* OVERWRITTEN AT SOME POINT!
|
||||
*
|
||||
* If there is a bug in this file, please fix the code generator used to generate this file found in
|
||||
* core/openapigenerator.d.
|
||||
*
|
||||
* This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
|
||||
* file with a newer file if needed instead of manually updating the files.
|
||||
*/
|
||||
|
||||
#include <JellyfinQt/dto/dayofweek.h>
|
||||
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
DayOfWeekClass::DayOfWeekClass() {}
|
||||
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using DayOfWeek = Jellyfin::DTO::DayOfWeek;
|
||||
|
||||
template <>
|
||||
DayOfWeek fromJsonValue<DayOfWeek>(const QJsonValue &source) {
|
||||
if (!source.isString()) return DayOfWeek::EnumNotSet;
|
||||
|
||||
QString str = source.toString();
|
||||
if (str == QStringLiteral("Sunday")) {
|
||||
return DayOfWeek::Sunday;
|
||||
}
|
||||
if (str == QStringLiteral("Monday")) {
|
||||
return DayOfWeek::Monday;
|
||||
}
|
||||
if (str == QStringLiteral("Tuesday")) {
|
||||
return DayOfWeek::Tuesday;
|
||||
}
|
||||
if (str == QStringLiteral("Wednesday")) {
|
||||
return DayOfWeek::Wednesday;
|
||||
}
|
||||
if (str == QStringLiteral("Thursday")) {
|
||||
return DayOfWeek::Thursday;
|
||||
}
|
||||
if (str == QStringLiteral("Friday")) {
|
||||
return DayOfWeek::Friday;
|
||||
}
|
||||
if (str == QStringLiteral("Saturday")) {
|
||||
return DayOfWeek::Saturday;
|
||||
}
|
||||
|
||||
return DayOfWeek::EnumNotSet;
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
} // NS Jellyfin
|
||||
63
core/src/dto/daypattern.cpp
Normal file
63
core/src/dto/daypattern.cpp
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
/*
|
||||
* Sailfin: a Jellyfin client written using Qt
|
||||
* Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
|
||||
* OVERWRITTEN AT SOME POINT!
|
||||
*
|
||||
* If there is a bug in this file, please fix the code generator used to generate this file found in
|
||||
* core/openapigenerator.d.
|
||||
*
|
||||
* This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
|
||||
* file with a newer file if needed instead of manually updating the files.
|
||||
*/
|
||||
|
||||
#include <JellyfinQt/dto/daypattern.h>
|
||||
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
DayPatternClass::DayPatternClass() {}
|
||||
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using DayPattern = Jellyfin::DTO::DayPattern;
|
||||
|
||||
template <>
|
||||
DayPattern fromJsonValue<DayPattern>(const QJsonValue &source) {
|
||||
if (!source.isString()) return DayPattern::EnumNotSet;
|
||||
|
||||
QString str = source.toString();
|
||||
if (str == QStringLiteral("Daily")) {
|
||||
return DayPattern::Daily;
|
||||
}
|
||||
if (str == QStringLiteral("Weekdays")) {
|
||||
return DayPattern::Weekdays;
|
||||
}
|
||||
if (str == QStringLiteral("Weekends")) {
|
||||
return DayPattern::Weekends;
|
||||
}
|
||||
|
||||
return DayPattern::EnumNotSet;
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
} // NS Jellyfin
|
||||
92
core/src/dto/defaultdirectorybrowserinfodto.cpp
Normal file
92
core/src/dto/defaultdirectorybrowserinfodto.cpp
Normal file
|
|
@ -0,0 +1,92 @@
|
|||
/*
|
||||
* Sailfin: a Jellyfin client written using Qt
|
||||
* Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
|
||||
* OVERWRITTEN AT SOME POINT!
|
||||
*
|
||||
* If there is a bug in this file, please fix the code generator used to generate this file found in
|
||||
* core/openapigenerator.d.
|
||||
*
|
||||
* This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
|
||||
* file with a newer file if needed instead of manually updating the files.
|
||||
*/
|
||||
|
||||
#include <JellyfinQt/dto/defaultdirectorybrowserinfodto.h>
|
||||
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
DefaultDirectoryBrowserInfoDto::DefaultDirectoryBrowserInfoDto() {}
|
||||
|
||||
DefaultDirectoryBrowserInfoDto::DefaultDirectoryBrowserInfoDto(const DefaultDirectoryBrowserInfoDto &other) :
|
||||
|
||||
m_path(other.m_path){}
|
||||
|
||||
|
||||
void DefaultDirectoryBrowserInfoDto::replaceData(DefaultDirectoryBrowserInfoDto &other) {
|
||||
m_path = other.m_path;
|
||||
}
|
||||
|
||||
DefaultDirectoryBrowserInfoDto DefaultDirectoryBrowserInfoDto::fromJson(QJsonObject source) {
|
||||
DefaultDirectoryBrowserInfoDto instance;
|
||||
instance.setFromJson(source);
|
||||
return instance;
|
||||
}
|
||||
|
||||
|
||||
void DefaultDirectoryBrowserInfoDto::setFromJson(QJsonObject source) {
|
||||
m_path = Jellyfin::Support::fromJsonValue<QString>(source["Path"]);
|
||||
|
||||
}
|
||||
|
||||
QJsonObject DefaultDirectoryBrowserInfoDto::toJson() {
|
||||
QJsonObject result;
|
||||
result["Path"] = Jellyfin::Support::toJsonValue<QString>(m_path);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
QString DefaultDirectoryBrowserInfoDto::path() const { return m_path; }
|
||||
|
||||
void DefaultDirectoryBrowserInfoDto::setPath(QString newPath) {
|
||||
m_path = newPath;
|
||||
}
|
||||
bool DefaultDirectoryBrowserInfoDto::pathNull() const {
|
||||
return m_path.isNull();
|
||||
}
|
||||
|
||||
void DefaultDirectoryBrowserInfoDto::setPathNull() {
|
||||
m_path.clear();
|
||||
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using DefaultDirectoryBrowserInfoDto = Jellyfin::DTO::DefaultDirectoryBrowserInfoDto;
|
||||
|
||||
template <>
|
||||
DefaultDirectoryBrowserInfoDto fromJsonValue<DefaultDirectoryBrowserInfoDto>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return DefaultDirectoryBrowserInfoDto::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
} // NS Jellyfin
|
||||
228
core/src/dto/deviceidentification.cpp
Normal file
228
core/src/dto/deviceidentification.cpp
Normal file
|
|
@ -0,0 +1,228 @@
|
|||
/*
|
||||
* Sailfin: a Jellyfin client written using Qt
|
||||
* Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
|
||||
* OVERWRITTEN AT SOME POINT!
|
||||
*
|
||||
* If there is a bug in this file, please fix the code generator used to generate this file found in
|
||||
* core/openapigenerator.d.
|
||||
*
|
||||
* This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
|
||||
* file with a newer file if needed instead of manually updating the files.
|
||||
*/
|
||||
|
||||
#include <JellyfinQt/dto/deviceidentification.h>
|
||||
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
DeviceIdentification::DeviceIdentification() {}
|
||||
|
||||
DeviceIdentification::DeviceIdentification(const DeviceIdentification &other) :
|
||||
|
||||
m_friendlyName(other.m_friendlyName),
|
||||
m_modelNumber(other.m_modelNumber),
|
||||
m_serialNumber(other.m_serialNumber),
|
||||
m_modelName(other.m_modelName),
|
||||
m_modelDescription(other.m_modelDescription),
|
||||
m_modelUrl(other.m_modelUrl),
|
||||
m_manufacturer(other.m_manufacturer),
|
||||
m_manufacturerUrl(other.m_manufacturerUrl),
|
||||
m_headers(other.m_headers){}
|
||||
|
||||
|
||||
void DeviceIdentification::replaceData(DeviceIdentification &other) {
|
||||
m_friendlyName = other.m_friendlyName;
|
||||
m_modelNumber = other.m_modelNumber;
|
||||
m_serialNumber = other.m_serialNumber;
|
||||
m_modelName = other.m_modelName;
|
||||
m_modelDescription = other.m_modelDescription;
|
||||
m_modelUrl = other.m_modelUrl;
|
||||
m_manufacturer = other.m_manufacturer;
|
||||
m_manufacturerUrl = other.m_manufacturerUrl;
|
||||
m_headers = other.m_headers;
|
||||
}
|
||||
|
||||
DeviceIdentification DeviceIdentification::fromJson(QJsonObject source) {
|
||||
DeviceIdentification instance;
|
||||
instance.setFromJson(source);
|
||||
return instance;
|
||||
}
|
||||
|
||||
|
||||
void DeviceIdentification::setFromJson(QJsonObject source) {
|
||||
m_friendlyName = Jellyfin::Support::fromJsonValue<QString>(source["FriendlyName"]);
|
||||
m_modelNumber = Jellyfin::Support::fromJsonValue<QString>(source["ModelNumber"]);
|
||||
m_serialNumber = Jellyfin::Support::fromJsonValue<QString>(source["SerialNumber"]);
|
||||
m_modelName = Jellyfin::Support::fromJsonValue<QString>(source["ModelName"]);
|
||||
m_modelDescription = Jellyfin::Support::fromJsonValue<QString>(source["ModelDescription"]);
|
||||
m_modelUrl = Jellyfin::Support::fromJsonValue<QString>(source["ModelUrl"]);
|
||||
m_manufacturer = Jellyfin::Support::fromJsonValue<QString>(source["Manufacturer"]);
|
||||
m_manufacturerUrl = Jellyfin::Support::fromJsonValue<QString>(source["ManufacturerUrl"]);
|
||||
m_headers = Jellyfin::Support::fromJsonValue<QList<QSharedPointer<HttpHeaderInfo>>>(source["Headers"]);
|
||||
|
||||
}
|
||||
|
||||
QJsonObject DeviceIdentification::toJson() {
|
||||
QJsonObject result;
|
||||
result["FriendlyName"] = Jellyfin::Support::toJsonValue<QString>(m_friendlyName);
|
||||
result["ModelNumber"] = Jellyfin::Support::toJsonValue<QString>(m_modelNumber);
|
||||
result["SerialNumber"] = Jellyfin::Support::toJsonValue<QString>(m_serialNumber);
|
||||
result["ModelName"] = Jellyfin::Support::toJsonValue<QString>(m_modelName);
|
||||
result["ModelDescription"] = Jellyfin::Support::toJsonValue<QString>(m_modelDescription);
|
||||
result["ModelUrl"] = Jellyfin::Support::toJsonValue<QString>(m_modelUrl);
|
||||
result["Manufacturer"] = Jellyfin::Support::toJsonValue<QString>(m_manufacturer);
|
||||
result["ManufacturerUrl"] = Jellyfin::Support::toJsonValue<QString>(m_manufacturerUrl);
|
||||
result["Headers"] = Jellyfin::Support::toJsonValue<QList<QSharedPointer<HttpHeaderInfo>>>(m_headers);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
QString DeviceIdentification::friendlyName() const { return m_friendlyName; }
|
||||
|
||||
void DeviceIdentification::setFriendlyName(QString newFriendlyName) {
|
||||
m_friendlyName = newFriendlyName;
|
||||
}
|
||||
bool DeviceIdentification::friendlyNameNull() const {
|
||||
return m_friendlyName.isNull();
|
||||
}
|
||||
|
||||
void DeviceIdentification::setFriendlyNameNull() {
|
||||
m_friendlyName.clear();
|
||||
|
||||
}
|
||||
QString DeviceIdentification::modelNumber() const { return m_modelNumber; }
|
||||
|
||||
void DeviceIdentification::setModelNumber(QString newModelNumber) {
|
||||
m_modelNumber = newModelNumber;
|
||||
}
|
||||
bool DeviceIdentification::modelNumberNull() const {
|
||||
return m_modelNumber.isNull();
|
||||
}
|
||||
|
||||
void DeviceIdentification::setModelNumberNull() {
|
||||
m_modelNumber.clear();
|
||||
|
||||
}
|
||||
QString DeviceIdentification::serialNumber() const { return m_serialNumber; }
|
||||
|
||||
void DeviceIdentification::setSerialNumber(QString newSerialNumber) {
|
||||
m_serialNumber = newSerialNumber;
|
||||
}
|
||||
bool DeviceIdentification::serialNumberNull() const {
|
||||
return m_serialNumber.isNull();
|
||||
}
|
||||
|
||||
void DeviceIdentification::setSerialNumberNull() {
|
||||
m_serialNumber.clear();
|
||||
|
||||
}
|
||||
QString DeviceIdentification::modelName() const { return m_modelName; }
|
||||
|
||||
void DeviceIdentification::setModelName(QString newModelName) {
|
||||
m_modelName = newModelName;
|
||||
}
|
||||
bool DeviceIdentification::modelNameNull() const {
|
||||
return m_modelName.isNull();
|
||||
}
|
||||
|
||||
void DeviceIdentification::setModelNameNull() {
|
||||
m_modelName.clear();
|
||||
|
||||
}
|
||||
QString DeviceIdentification::modelDescription() const { return m_modelDescription; }
|
||||
|
||||
void DeviceIdentification::setModelDescription(QString newModelDescription) {
|
||||
m_modelDescription = newModelDescription;
|
||||
}
|
||||
bool DeviceIdentification::modelDescriptionNull() const {
|
||||
return m_modelDescription.isNull();
|
||||
}
|
||||
|
||||
void DeviceIdentification::setModelDescriptionNull() {
|
||||
m_modelDescription.clear();
|
||||
|
||||
}
|
||||
QString DeviceIdentification::modelUrl() const { return m_modelUrl; }
|
||||
|
||||
void DeviceIdentification::setModelUrl(QString newModelUrl) {
|
||||
m_modelUrl = newModelUrl;
|
||||
}
|
||||
bool DeviceIdentification::modelUrlNull() const {
|
||||
return m_modelUrl.isNull();
|
||||
}
|
||||
|
||||
void DeviceIdentification::setModelUrlNull() {
|
||||
m_modelUrl.clear();
|
||||
|
||||
}
|
||||
QString DeviceIdentification::manufacturer() const { return m_manufacturer; }
|
||||
|
||||
void DeviceIdentification::setManufacturer(QString newManufacturer) {
|
||||
m_manufacturer = newManufacturer;
|
||||
}
|
||||
bool DeviceIdentification::manufacturerNull() const {
|
||||
return m_manufacturer.isNull();
|
||||
}
|
||||
|
||||
void DeviceIdentification::setManufacturerNull() {
|
||||
m_manufacturer.clear();
|
||||
|
||||
}
|
||||
QString DeviceIdentification::manufacturerUrl() const { return m_manufacturerUrl; }
|
||||
|
||||
void DeviceIdentification::setManufacturerUrl(QString newManufacturerUrl) {
|
||||
m_manufacturerUrl = newManufacturerUrl;
|
||||
}
|
||||
bool DeviceIdentification::manufacturerUrlNull() const {
|
||||
return m_manufacturerUrl.isNull();
|
||||
}
|
||||
|
||||
void DeviceIdentification::setManufacturerUrlNull() {
|
||||
m_manufacturerUrl.clear();
|
||||
|
||||
}
|
||||
QList<QSharedPointer<HttpHeaderInfo>> DeviceIdentification::headers() const { return m_headers; }
|
||||
|
||||
void DeviceIdentification::setHeaders(QList<QSharedPointer<HttpHeaderInfo>> newHeaders) {
|
||||
m_headers = newHeaders;
|
||||
}
|
||||
bool DeviceIdentification::headersNull() const {
|
||||
return m_headers.size() == 0;
|
||||
}
|
||||
|
||||
void DeviceIdentification::setHeadersNull() {
|
||||
m_headers.clear();
|
||||
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using DeviceIdentification = Jellyfin::DTO::DeviceIdentification;
|
||||
|
||||
template <>
|
||||
DeviceIdentification fromJsonValue<DeviceIdentification>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return DeviceIdentification::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
} // NS Jellyfin
|
||||
207
core/src/dto/deviceinfo.cpp
Normal file
207
core/src/dto/deviceinfo.cpp
Normal file
|
|
@ -0,0 +1,207 @@
|
|||
/*
|
||||
* Sailfin: a Jellyfin client written using Qt
|
||||
* Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
|
||||
* OVERWRITTEN AT SOME POINT!
|
||||
*
|
||||
* If there is a bug in this file, please fix the code generator used to generate this file found in
|
||||
* core/openapigenerator.d.
|
||||
*
|
||||
* This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
|
||||
* file with a newer file if needed instead of manually updating the files.
|
||||
*/
|
||||
|
||||
#include <JellyfinQt/dto/deviceinfo.h>
|
||||
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
DeviceInfo::DeviceInfo() {}
|
||||
|
||||
DeviceInfo::DeviceInfo(const DeviceInfo &other) :
|
||||
|
||||
m_name(other.m_name),
|
||||
m_jellyfinId(other.m_jellyfinId),
|
||||
m_lastUserName(other.m_lastUserName),
|
||||
m_appName(other.m_appName),
|
||||
m_appVersion(other.m_appVersion),
|
||||
m_lastUserId(other.m_lastUserId),
|
||||
m_dateLastActivity(other.m_dateLastActivity),
|
||||
m_capabilities(other.m_capabilities),
|
||||
m_iconUrl(other.m_iconUrl){}
|
||||
|
||||
|
||||
void DeviceInfo::replaceData(DeviceInfo &other) {
|
||||
m_name = other.m_name;
|
||||
m_jellyfinId = other.m_jellyfinId;
|
||||
m_lastUserName = other.m_lastUserName;
|
||||
m_appName = other.m_appName;
|
||||
m_appVersion = other.m_appVersion;
|
||||
m_lastUserId = other.m_lastUserId;
|
||||
m_dateLastActivity = other.m_dateLastActivity;
|
||||
m_capabilities = other.m_capabilities;
|
||||
m_iconUrl = other.m_iconUrl;
|
||||
}
|
||||
|
||||
DeviceInfo DeviceInfo::fromJson(QJsonObject source) {
|
||||
DeviceInfo instance;
|
||||
instance.setFromJson(source);
|
||||
return instance;
|
||||
}
|
||||
|
||||
|
||||
void DeviceInfo::setFromJson(QJsonObject source) {
|
||||
m_name = Jellyfin::Support::fromJsonValue<QString>(source["Name"]);
|
||||
m_jellyfinId = Jellyfin::Support::fromJsonValue<QString>(source["Id"]);
|
||||
m_lastUserName = Jellyfin::Support::fromJsonValue<QString>(source["LastUserName"]);
|
||||
m_appName = Jellyfin::Support::fromJsonValue<QString>(source["AppName"]);
|
||||
m_appVersion = Jellyfin::Support::fromJsonValue<QString>(source["AppVersion"]);
|
||||
m_lastUserId = Jellyfin::Support::fromJsonValue<QString>(source["LastUserId"]);
|
||||
m_dateLastActivity = Jellyfin::Support::fromJsonValue<QDateTime>(source["DateLastActivity"]);
|
||||
m_capabilities = Jellyfin::Support::fromJsonValue<QSharedPointer<ClientCapabilities>>(source["Capabilities"]);
|
||||
m_iconUrl = Jellyfin::Support::fromJsonValue<QString>(source["IconUrl"]);
|
||||
|
||||
}
|
||||
|
||||
QJsonObject DeviceInfo::toJson() {
|
||||
QJsonObject result;
|
||||
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
||||
result["Id"] = Jellyfin::Support::toJsonValue<QString>(m_jellyfinId);
|
||||
result["LastUserName"] = Jellyfin::Support::toJsonValue<QString>(m_lastUserName);
|
||||
result["AppName"] = Jellyfin::Support::toJsonValue<QString>(m_appName);
|
||||
result["AppVersion"] = Jellyfin::Support::toJsonValue<QString>(m_appVersion);
|
||||
result["LastUserId"] = Jellyfin::Support::toJsonValue<QString>(m_lastUserId);
|
||||
result["DateLastActivity"] = Jellyfin::Support::toJsonValue<QDateTime>(m_dateLastActivity);
|
||||
result["Capabilities"] = Jellyfin::Support::toJsonValue<QSharedPointer<ClientCapabilities>>(m_capabilities);
|
||||
result["IconUrl"] = Jellyfin::Support::toJsonValue<QString>(m_iconUrl);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
QString DeviceInfo::name() const { return m_name; }
|
||||
|
||||
void DeviceInfo::setName(QString newName) {
|
||||
m_name = newName;
|
||||
}
|
||||
bool DeviceInfo::nameNull() const {
|
||||
return m_name.isNull();
|
||||
}
|
||||
|
||||
void DeviceInfo::setNameNull() {
|
||||
m_name.clear();
|
||||
|
||||
}
|
||||
QString DeviceInfo::jellyfinId() const { return m_jellyfinId; }
|
||||
|
||||
void DeviceInfo::setJellyfinId(QString newJellyfinId) {
|
||||
m_jellyfinId = newJellyfinId;
|
||||
}
|
||||
bool DeviceInfo::jellyfinIdNull() const {
|
||||
return m_jellyfinId.isNull();
|
||||
}
|
||||
|
||||
void DeviceInfo::setJellyfinIdNull() {
|
||||
m_jellyfinId.clear();
|
||||
|
||||
}
|
||||
QString DeviceInfo::lastUserName() const { return m_lastUserName; }
|
||||
|
||||
void DeviceInfo::setLastUserName(QString newLastUserName) {
|
||||
m_lastUserName = newLastUserName;
|
||||
}
|
||||
bool DeviceInfo::lastUserNameNull() const {
|
||||
return m_lastUserName.isNull();
|
||||
}
|
||||
|
||||
void DeviceInfo::setLastUserNameNull() {
|
||||
m_lastUserName.clear();
|
||||
|
||||
}
|
||||
QString DeviceInfo::appName() const { return m_appName; }
|
||||
|
||||
void DeviceInfo::setAppName(QString newAppName) {
|
||||
m_appName = newAppName;
|
||||
}
|
||||
bool DeviceInfo::appNameNull() const {
|
||||
return m_appName.isNull();
|
||||
}
|
||||
|
||||
void DeviceInfo::setAppNameNull() {
|
||||
m_appName.clear();
|
||||
|
||||
}
|
||||
QString DeviceInfo::appVersion() const { return m_appVersion; }
|
||||
|
||||
void DeviceInfo::setAppVersion(QString newAppVersion) {
|
||||
m_appVersion = newAppVersion;
|
||||
}
|
||||
bool DeviceInfo::appVersionNull() const {
|
||||
return m_appVersion.isNull();
|
||||
}
|
||||
|
||||
void DeviceInfo::setAppVersionNull() {
|
||||
m_appVersion.clear();
|
||||
|
||||
}
|
||||
QString DeviceInfo::lastUserId() const { return m_lastUserId; }
|
||||
|
||||
void DeviceInfo::setLastUserId(QString newLastUserId) {
|
||||
m_lastUserId = newLastUserId;
|
||||
}
|
||||
|
||||
QDateTime DeviceInfo::dateLastActivity() const { return m_dateLastActivity; }
|
||||
|
||||
void DeviceInfo::setDateLastActivity(QDateTime newDateLastActivity) {
|
||||
m_dateLastActivity = newDateLastActivity;
|
||||
}
|
||||
|
||||
QSharedPointer<ClientCapabilities> DeviceInfo::capabilities() const { return m_capabilities; }
|
||||
|
||||
void DeviceInfo::setCapabilities(QSharedPointer<ClientCapabilities> newCapabilities) {
|
||||
m_capabilities = newCapabilities;
|
||||
}
|
||||
|
||||
QString DeviceInfo::iconUrl() const { return m_iconUrl; }
|
||||
|
||||
void DeviceInfo::setIconUrl(QString newIconUrl) {
|
||||
m_iconUrl = newIconUrl;
|
||||
}
|
||||
bool DeviceInfo::iconUrlNull() const {
|
||||
return m_iconUrl.isNull();
|
||||
}
|
||||
|
||||
void DeviceInfo::setIconUrlNull() {
|
||||
m_iconUrl.clear();
|
||||
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using DeviceInfo = Jellyfin::DTO::DeviceInfo;
|
||||
|
||||
template <>
|
||||
DeviceInfo fromJsonValue<DeviceInfo>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return DeviceInfo::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
} // NS Jellyfin
|
||||
112
core/src/dto/deviceinfoqueryresult.cpp
Normal file
112
core/src/dto/deviceinfoqueryresult.cpp
Normal file
|
|
@ -0,0 +1,112 @@
|
|||
/*
|
||||
* Sailfin: a Jellyfin client written using Qt
|
||||
* Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
|
||||
* OVERWRITTEN AT SOME POINT!
|
||||
*
|
||||
* If there is a bug in this file, please fix the code generator used to generate this file found in
|
||||
* core/openapigenerator.d.
|
||||
*
|
||||
* This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
|
||||
* file with a newer file if needed instead of manually updating the files.
|
||||
*/
|
||||
|
||||
#include <JellyfinQt/dto/deviceinfoqueryresult.h>
|
||||
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
DeviceInfoQueryResult::DeviceInfoQueryResult() {}
|
||||
|
||||
DeviceInfoQueryResult::DeviceInfoQueryResult(const DeviceInfoQueryResult &other) :
|
||||
|
||||
m_items(other.m_items),
|
||||
m_totalRecordCount(other.m_totalRecordCount),
|
||||
m_startIndex(other.m_startIndex){}
|
||||
|
||||
|
||||
void DeviceInfoQueryResult::replaceData(DeviceInfoQueryResult &other) {
|
||||
m_items = other.m_items;
|
||||
m_totalRecordCount = other.m_totalRecordCount;
|
||||
m_startIndex = other.m_startIndex;
|
||||
}
|
||||
|
||||
DeviceInfoQueryResult DeviceInfoQueryResult::fromJson(QJsonObject source) {
|
||||
DeviceInfoQueryResult instance;
|
||||
instance.setFromJson(source);
|
||||
return instance;
|
||||
}
|
||||
|
||||
|
||||
void DeviceInfoQueryResult::setFromJson(QJsonObject source) {
|
||||
m_items = Jellyfin::Support::fromJsonValue<QList<QSharedPointer<DeviceInfo>>>(source["Items"]);
|
||||
m_totalRecordCount = Jellyfin::Support::fromJsonValue<qint32>(source["TotalRecordCount"]);
|
||||
m_startIndex = Jellyfin::Support::fromJsonValue<qint32>(source["StartIndex"]);
|
||||
|
||||
}
|
||||
|
||||
QJsonObject DeviceInfoQueryResult::toJson() {
|
||||
QJsonObject result;
|
||||
result["Items"] = Jellyfin::Support::toJsonValue<QList<QSharedPointer<DeviceInfo>>>(m_items);
|
||||
result["TotalRecordCount"] = Jellyfin::Support::toJsonValue<qint32>(m_totalRecordCount);
|
||||
result["StartIndex"] = Jellyfin::Support::toJsonValue<qint32>(m_startIndex);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
QList<QSharedPointer<DeviceInfo>> DeviceInfoQueryResult::items() const { return m_items; }
|
||||
|
||||
void DeviceInfoQueryResult::setItems(QList<QSharedPointer<DeviceInfo>> newItems) {
|
||||
m_items = newItems;
|
||||
}
|
||||
bool DeviceInfoQueryResult::itemsNull() const {
|
||||
return m_items.size() == 0;
|
||||
}
|
||||
|
||||
void DeviceInfoQueryResult::setItemsNull() {
|
||||
m_items.clear();
|
||||
|
||||
}
|
||||
qint32 DeviceInfoQueryResult::totalRecordCount() const { return m_totalRecordCount; }
|
||||
|
||||
void DeviceInfoQueryResult::setTotalRecordCount(qint32 newTotalRecordCount) {
|
||||
m_totalRecordCount = newTotalRecordCount;
|
||||
}
|
||||
|
||||
qint32 DeviceInfoQueryResult::startIndex() const { return m_startIndex; }
|
||||
|
||||
void DeviceInfoQueryResult::setStartIndex(qint32 newStartIndex) {
|
||||
m_startIndex = newStartIndex;
|
||||
}
|
||||
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using DeviceInfoQueryResult = Jellyfin::DTO::DeviceInfoQueryResult;
|
||||
|
||||
template <>
|
||||
DeviceInfoQueryResult fromJsonValue<DeviceInfoQueryResult>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return DeviceInfoQueryResult::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
} // NS Jellyfin
|
||||
92
core/src/dto/deviceoptions.cpp
Normal file
92
core/src/dto/deviceoptions.cpp
Normal file
|
|
@ -0,0 +1,92 @@
|
|||
/*
|
||||
* Sailfin: a Jellyfin client written using Qt
|
||||
* Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
|
||||
* OVERWRITTEN AT SOME POINT!
|
||||
*
|
||||
* If there is a bug in this file, please fix the code generator used to generate this file found in
|
||||
* core/openapigenerator.d.
|
||||
*
|
||||
* This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
|
||||
* file with a newer file if needed instead of manually updating the files.
|
||||
*/
|
||||
|
||||
#include <JellyfinQt/dto/deviceoptions.h>
|
||||
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
DeviceOptions::DeviceOptions() {}
|
||||
|
||||
DeviceOptions::DeviceOptions(const DeviceOptions &other) :
|
||||
|
||||
m_customName(other.m_customName){}
|
||||
|
||||
|
||||
void DeviceOptions::replaceData(DeviceOptions &other) {
|
||||
m_customName = other.m_customName;
|
||||
}
|
||||
|
||||
DeviceOptions DeviceOptions::fromJson(QJsonObject source) {
|
||||
DeviceOptions instance;
|
||||
instance.setFromJson(source);
|
||||
return instance;
|
||||
}
|
||||
|
||||
|
||||
void DeviceOptions::setFromJson(QJsonObject source) {
|
||||
m_customName = Jellyfin::Support::fromJsonValue<QString>(source["CustomName"]);
|
||||
|
||||
}
|
||||
|
||||
QJsonObject DeviceOptions::toJson() {
|
||||
QJsonObject result;
|
||||
result["CustomName"] = Jellyfin::Support::toJsonValue<QString>(m_customName);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
QString DeviceOptions::customName() const { return m_customName; }
|
||||
|
||||
void DeviceOptions::setCustomName(QString newCustomName) {
|
||||
m_customName = newCustomName;
|
||||
}
|
||||
bool DeviceOptions::customNameNull() const {
|
||||
return m_customName.isNull();
|
||||
}
|
||||
|
||||
void DeviceOptions::setCustomNameNull() {
|
||||
m_customName.clear();
|
||||
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using DeviceOptions = Jellyfin::DTO::DeviceOptions;
|
||||
|
||||
template <>
|
||||
DeviceOptions fromJsonValue<DeviceOptions>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return DeviceOptions::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
} // NS Jellyfin
|
||||
661
core/src/dto/deviceprofile.cpp
Normal file
661
core/src/dto/deviceprofile.cpp
Normal file
|
|
@ -0,0 +1,661 @@
|
|||
/*
|
||||
* Sailfin: a Jellyfin client written using Qt
|
||||
* Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
|
||||
* OVERWRITTEN AT SOME POINT!
|
||||
*
|
||||
* If there is a bug in this file, please fix the code generator used to generate this file found in
|
||||
* core/openapigenerator.d.
|
||||
*
|
||||
* This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
|
||||
* file with a newer file if needed instead of manually updating the files.
|
||||
*/
|
||||
|
||||
#include <JellyfinQt/dto/deviceprofile.h>
|
||||
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
DeviceProfile::DeviceProfile() {}
|
||||
|
||||
DeviceProfile::DeviceProfile(const DeviceProfile &other) :
|
||||
|
||||
m_name(other.m_name),
|
||||
m_jellyfinId(other.m_jellyfinId),
|
||||
m_identification(other.m_identification),
|
||||
m_friendlyName(other.m_friendlyName),
|
||||
m_manufacturer(other.m_manufacturer),
|
||||
m_manufacturerUrl(other.m_manufacturerUrl),
|
||||
m_modelName(other.m_modelName),
|
||||
m_modelDescription(other.m_modelDescription),
|
||||
m_modelNumber(other.m_modelNumber),
|
||||
m_modelUrl(other.m_modelUrl),
|
||||
m_serialNumber(other.m_serialNumber),
|
||||
m_enableAlbumArtInDidl(other.m_enableAlbumArtInDidl),
|
||||
m_enableSingleAlbumArtLimit(other.m_enableSingleAlbumArtLimit),
|
||||
m_enableSingleSubtitleLimit(other.m_enableSingleSubtitleLimit),
|
||||
m_supportedMediaTypes(other.m_supportedMediaTypes),
|
||||
m_userId(other.m_userId),
|
||||
m_albumArtPn(other.m_albumArtPn),
|
||||
m_maxAlbumArtWidth(other.m_maxAlbumArtWidth),
|
||||
m_maxAlbumArtHeight(other.m_maxAlbumArtHeight),
|
||||
m_maxIconWidth(other.m_maxIconWidth),
|
||||
m_maxIconHeight(other.m_maxIconHeight),
|
||||
m_maxStreamingBitrate(other.m_maxStreamingBitrate),
|
||||
m_maxStaticBitrate(other.m_maxStaticBitrate),
|
||||
m_musicStreamingTranscodingBitrate(other.m_musicStreamingTranscodingBitrate),
|
||||
m_maxStaticMusicBitrate(other.m_maxStaticMusicBitrate),
|
||||
m_sonyAggregationFlags(other.m_sonyAggregationFlags),
|
||||
m_protocolInfo(other.m_protocolInfo),
|
||||
m_timelineOffsetSeconds(other.m_timelineOffsetSeconds),
|
||||
m_requiresPlainVideoItems(other.m_requiresPlainVideoItems),
|
||||
m_requiresPlainFolders(other.m_requiresPlainFolders),
|
||||
m_enableMSMediaReceiverRegistrar(other.m_enableMSMediaReceiverRegistrar),
|
||||
m_ignoreTranscodeByteRangeRequests(other.m_ignoreTranscodeByteRangeRequests),
|
||||
m_xmlRootAttributes(other.m_xmlRootAttributes),
|
||||
m_directPlayProfiles(other.m_directPlayProfiles),
|
||||
m_transcodingProfiles(other.m_transcodingProfiles),
|
||||
m_containerProfiles(other.m_containerProfiles),
|
||||
m_codecProfiles(other.m_codecProfiles),
|
||||
m_responseProfiles(other.m_responseProfiles),
|
||||
m_subtitleProfiles(other.m_subtitleProfiles){}
|
||||
|
||||
|
||||
void DeviceProfile::replaceData(DeviceProfile &other) {
|
||||
m_name = other.m_name;
|
||||
m_jellyfinId = other.m_jellyfinId;
|
||||
m_identification = other.m_identification;
|
||||
m_friendlyName = other.m_friendlyName;
|
||||
m_manufacturer = other.m_manufacturer;
|
||||
m_manufacturerUrl = other.m_manufacturerUrl;
|
||||
m_modelName = other.m_modelName;
|
||||
m_modelDescription = other.m_modelDescription;
|
||||
m_modelNumber = other.m_modelNumber;
|
||||
m_modelUrl = other.m_modelUrl;
|
||||
m_serialNumber = other.m_serialNumber;
|
||||
m_enableAlbumArtInDidl = other.m_enableAlbumArtInDidl;
|
||||
m_enableSingleAlbumArtLimit = other.m_enableSingleAlbumArtLimit;
|
||||
m_enableSingleSubtitleLimit = other.m_enableSingleSubtitleLimit;
|
||||
m_supportedMediaTypes = other.m_supportedMediaTypes;
|
||||
m_userId = other.m_userId;
|
||||
m_albumArtPn = other.m_albumArtPn;
|
||||
m_maxAlbumArtWidth = other.m_maxAlbumArtWidth;
|
||||
m_maxAlbumArtHeight = other.m_maxAlbumArtHeight;
|
||||
m_maxIconWidth = other.m_maxIconWidth;
|
||||
m_maxIconHeight = other.m_maxIconHeight;
|
||||
m_maxStreamingBitrate = other.m_maxStreamingBitrate;
|
||||
m_maxStaticBitrate = other.m_maxStaticBitrate;
|
||||
m_musicStreamingTranscodingBitrate = other.m_musicStreamingTranscodingBitrate;
|
||||
m_maxStaticMusicBitrate = other.m_maxStaticMusicBitrate;
|
||||
m_sonyAggregationFlags = other.m_sonyAggregationFlags;
|
||||
m_protocolInfo = other.m_protocolInfo;
|
||||
m_timelineOffsetSeconds = other.m_timelineOffsetSeconds;
|
||||
m_requiresPlainVideoItems = other.m_requiresPlainVideoItems;
|
||||
m_requiresPlainFolders = other.m_requiresPlainFolders;
|
||||
m_enableMSMediaReceiverRegistrar = other.m_enableMSMediaReceiverRegistrar;
|
||||
m_ignoreTranscodeByteRangeRequests = other.m_ignoreTranscodeByteRangeRequests;
|
||||
m_xmlRootAttributes = other.m_xmlRootAttributes;
|
||||
m_directPlayProfiles = other.m_directPlayProfiles;
|
||||
m_transcodingProfiles = other.m_transcodingProfiles;
|
||||
m_containerProfiles = other.m_containerProfiles;
|
||||
m_codecProfiles = other.m_codecProfiles;
|
||||
m_responseProfiles = other.m_responseProfiles;
|
||||
m_subtitleProfiles = other.m_subtitleProfiles;
|
||||
}
|
||||
|
||||
DeviceProfile DeviceProfile::fromJson(QJsonObject source) {
|
||||
DeviceProfile instance;
|
||||
instance.setFromJson(source);
|
||||
return instance;
|
||||
}
|
||||
|
||||
|
||||
void DeviceProfile::setFromJson(QJsonObject source) {
|
||||
m_name = Jellyfin::Support::fromJsonValue<QString>(source["Name"]);
|
||||
m_jellyfinId = Jellyfin::Support::fromJsonValue<QString>(source["Id"]);
|
||||
m_identification = Jellyfin::Support::fromJsonValue<QSharedPointer<DeviceIdentification>>(source["Identification"]);
|
||||
m_friendlyName = Jellyfin::Support::fromJsonValue<QString>(source["FriendlyName"]);
|
||||
m_manufacturer = Jellyfin::Support::fromJsonValue<QString>(source["Manufacturer"]);
|
||||
m_manufacturerUrl = Jellyfin::Support::fromJsonValue<QString>(source["ManufacturerUrl"]);
|
||||
m_modelName = Jellyfin::Support::fromJsonValue<QString>(source["ModelName"]);
|
||||
m_modelDescription = Jellyfin::Support::fromJsonValue<QString>(source["ModelDescription"]);
|
||||
m_modelNumber = Jellyfin::Support::fromJsonValue<QString>(source["ModelNumber"]);
|
||||
m_modelUrl = Jellyfin::Support::fromJsonValue<QString>(source["ModelUrl"]);
|
||||
m_serialNumber = Jellyfin::Support::fromJsonValue<QString>(source["SerialNumber"]);
|
||||
m_enableAlbumArtInDidl = Jellyfin::Support::fromJsonValue<bool>(source["EnableAlbumArtInDidl"]);
|
||||
m_enableSingleAlbumArtLimit = Jellyfin::Support::fromJsonValue<bool>(source["EnableSingleAlbumArtLimit"]);
|
||||
m_enableSingleSubtitleLimit = Jellyfin::Support::fromJsonValue<bool>(source["EnableSingleSubtitleLimit"]);
|
||||
m_supportedMediaTypes = Jellyfin::Support::fromJsonValue<QString>(source["SupportedMediaTypes"]);
|
||||
m_userId = Jellyfin::Support::fromJsonValue<QString>(source["UserId"]);
|
||||
m_albumArtPn = Jellyfin::Support::fromJsonValue<QString>(source["AlbumArtPn"]);
|
||||
m_maxAlbumArtWidth = Jellyfin::Support::fromJsonValue<qint32>(source["MaxAlbumArtWidth"]);
|
||||
m_maxAlbumArtHeight = Jellyfin::Support::fromJsonValue<qint32>(source["MaxAlbumArtHeight"]);
|
||||
m_maxIconWidth = Jellyfin::Support::fromJsonValue<std::optional<qint32>>(source["MaxIconWidth"]);
|
||||
m_maxIconHeight = Jellyfin::Support::fromJsonValue<std::optional<qint32>>(source["MaxIconHeight"]);
|
||||
m_maxStreamingBitrate = Jellyfin::Support::fromJsonValue<std::optional<qint32>>(source["MaxStreamingBitrate"]);
|
||||
m_maxStaticBitrate = Jellyfin::Support::fromJsonValue<std::optional<qint32>>(source["MaxStaticBitrate"]);
|
||||
m_musicStreamingTranscodingBitrate = Jellyfin::Support::fromJsonValue<std::optional<qint32>>(source["MusicStreamingTranscodingBitrate"]);
|
||||
m_maxStaticMusicBitrate = Jellyfin::Support::fromJsonValue<std::optional<qint32>>(source["MaxStaticMusicBitrate"]);
|
||||
m_sonyAggregationFlags = Jellyfin::Support::fromJsonValue<QString>(source["SonyAggregationFlags"]);
|
||||
m_protocolInfo = Jellyfin::Support::fromJsonValue<QString>(source["ProtocolInfo"]);
|
||||
m_timelineOffsetSeconds = Jellyfin::Support::fromJsonValue<qint32>(source["TimelineOffsetSeconds"]);
|
||||
m_requiresPlainVideoItems = Jellyfin::Support::fromJsonValue<bool>(source["RequiresPlainVideoItems"]);
|
||||
m_requiresPlainFolders = Jellyfin::Support::fromJsonValue<bool>(source["RequiresPlainFolders"]);
|
||||
m_enableMSMediaReceiverRegistrar = Jellyfin::Support::fromJsonValue<bool>(source["EnableMSMediaReceiverRegistrar"]);
|
||||
m_ignoreTranscodeByteRangeRequests = Jellyfin::Support::fromJsonValue<bool>(source["IgnoreTranscodeByteRangeRequests"]);
|
||||
m_xmlRootAttributes = Jellyfin::Support::fromJsonValue<QList<QSharedPointer<XmlAttribute>>>(source["XmlRootAttributes"]);
|
||||
m_directPlayProfiles = Jellyfin::Support::fromJsonValue<QList<QSharedPointer<DirectPlayProfile>>>(source["DirectPlayProfiles"]);
|
||||
m_transcodingProfiles = Jellyfin::Support::fromJsonValue<QList<QSharedPointer<TranscodingProfile>>>(source["TranscodingProfiles"]);
|
||||
m_containerProfiles = Jellyfin::Support::fromJsonValue<QList<QSharedPointer<ContainerProfile>>>(source["ContainerProfiles"]);
|
||||
m_codecProfiles = Jellyfin::Support::fromJsonValue<QList<QSharedPointer<CodecProfile>>>(source["CodecProfiles"]);
|
||||
m_responseProfiles = Jellyfin::Support::fromJsonValue<QList<QSharedPointer<ResponseProfile>>>(source["ResponseProfiles"]);
|
||||
m_subtitleProfiles = Jellyfin::Support::fromJsonValue<QList<QSharedPointer<SubtitleProfile>>>(source["SubtitleProfiles"]);
|
||||
|
||||
}
|
||||
|
||||
QJsonObject DeviceProfile::toJson() {
|
||||
QJsonObject result;
|
||||
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
||||
result["Id"] = Jellyfin::Support::toJsonValue<QString>(m_jellyfinId);
|
||||
result["Identification"] = Jellyfin::Support::toJsonValue<QSharedPointer<DeviceIdentification>>(m_identification);
|
||||
result["FriendlyName"] = Jellyfin::Support::toJsonValue<QString>(m_friendlyName);
|
||||
result["Manufacturer"] = Jellyfin::Support::toJsonValue<QString>(m_manufacturer);
|
||||
result["ManufacturerUrl"] = Jellyfin::Support::toJsonValue<QString>(m_manufacturerUrl);
|
||||
result["ModelName"] = Jellyfin::Support::toJsonValue<QString>(m_modelName);
|
||||
result["ModelDescription"] = Jellyfin::Support::toJsonValue<QString>(m_modelDescription);
|
||||
result["ModelNumber"] = Jellyfin::Support::toJsonValue<QString>(m_modelNumber);
|
||||
result["ModelUrl"] = Jellyfin::Support::toJsonValue<QString>(m_modelUrl);
|
||||
result["SerialNumber"] = Jellyfin::Support::toJsonValue<QString>(m_serialNumber);
|
||||
result["EnableAlbumArtInDidl"] = Jellyfin::Support::toJsonValue<bool>(m_enableAlbumArtInDidl);
|
||||
result["EnableSingleAlbumArtLimit"] = Jellyfin::Support::toJsonValue<bool>(m_enableSingleAlbumArtLimit);
|
||||
result["EnableSingleSubtitleLimit"] = Jellyfin::Support::toJsonValue<bool>(m_enableSingleSubtitleLimit);
|
||||
result["SupportedMediaTypes"] = Jellyfin::Support::toJsonValue<QString>(m_supportedMediaTypes);
|
||||
result["UserId"] = Jellyfin::Support::toJsonValue<QString>(m_userId);
|
||||
result["AlbumArtPn"] = Jellyfin::Support::toJsonValue<QString>(m_albumArtPn);
|
||||
result["MaxAlbumArtWidth"] = Jellyfin::Support::toJsonValue<qint32>(m_maxAlbumArtWidth);
|
||||
result["MaxAlbumArtHeight"] = Jellyfin::Support::toJsonValue<qint32>(m_maxAlbumArtHeight);
|
||||
result["MaxIconWidth"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_maxIconWidth);
|
||||
result["MaxIconHeight"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_maxIconHeight);
|
||||
result["MaxStreamingBitrate"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_maxStreamingBitrate);
|
||||
result["MaxStaticBitrate"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_maxStaticBitrate);
|
||||
result["MusicStreamingTranscodingBitrate"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_musicStreamingTranscodingBitrate);
|
||||
result["MaxStaticMusicBitrate"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_maxStaticMusicBitrate);
|
||||
result["SonyAggregationFlags"] = Jellyfin::Support::toJsonValue<QString>(m_sonyAggregationFlags);
|
||||
result["ProtocolInfo"] = Jellyfin::Support::toJsonValue<QString>(m_protocolInfo);
|
||||
result["TimelineOffsetSeconds"] = Jellyfin::Support::toJsonValue<qint32>(m_timelineOffsetSeconds);
|
||||
result["RequiresPlainVideoItems"] = Jellyfin::Support::toJsonValue<bool>(m_requiresPlainVideoItems);
|
||||
result["RequiresPlainFolders"] = Jellyfin::Support::toJsonValue<bool>(m_requiresPlainFolders);
|
||||
result["EnableMSMediaReceiverRegistrar"] = Jellyfin::Support::toJsonValue<bool>(m_enableMSMediaReceiverRegistrar);
|
||||
result["IgnoreTranscodeByteRangeRequests"] = Jellyfin::Support::toJsonValue<bool>(m_ignoreTranscodeByteRangeRequests);
|
||||
result["XmlRootAttributes"] = Jellyfin::Support::toJsonValue<QList<QSharedPointer<XmlAttribute>>>(m_xmlRootAttributes);
|
||||
result["DirectPlayProfiles"] = Jellyfin::Support::toJsonValue<QList<QSharedPointer<DirectPlayProfile>>>(m_directPlayProfiles);
|
||||
result["TranscodingProfiles"] = Jellyfin::Support::toJsonValue<QList<QSharedPointer<TranscodingProfile>>>(m_transcodingProfiles);
|
||||
result["ContainerProfiles"] = Jellyfin::Support::toJsonValue<QList<QSharedPointer<ContainerProfile>>>(m_containerProfiles);
|
||||
result["CodecProfiles"] = Jellyfin::Support::toJsonValue<QList<QSharedPointer<CodecProfile>>>(m_codecProfiles);
|
||||
result["ResponseProfiles"] = Jellyfin::Support::toJsonValue<QList<QSharedPointer<ResponseProfile>>>(m_responseProfiles);
|
||||
result["SubtitleProfiles"] = Jellyfin::Support::toJsonValue<QList<QSharedPointer<SubtitleProfile>>>(m_subtitleProfiles);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
QString DeviceProfile::name() const { return m_name; }
|
||||
|
||||
void DeviceProfile::setName(QString newName) {
|
||||
m_name = newName;
|
||||
}
|
||||
bool DeviceProfile::nameNull() const {
|
||||
return m_name.isNull();
|
||||
}
|
||||
|
||||
void DeviceProfile::setNameNull() {
|
||||
m_name.clear();
|
||||
|
||||
}
|
||||
QString DeviceProfile::jellyfinId() const { return m_jellyfinId; }
|
||||
|
||||
void DeviceProfile::setJellyfinId(QString newJellyfinId) {
|
||||
m_jellyfinId = newJellyfinId;
|
||||
}
|
||||
bool DeviceProfile::jellyfinIdNull() const {
|
||||
return m_jellyfinId.isNull();
|
||||
}
|
||||
|
||||
void DeviceProfile::setJellyfinIdNull() {
|
||||
m_jellyfinId.clear();
|
||||
|
||||
}
|
||||
QSharedPointer<DeviceIdentification> DeviceProfile::identification() const { return m_identification; }
|
||||
|
||||
void DeviceProfile::setIdentification(QSharedPointer<DeviceIdentification> newIdentification) {
|
||||
m_identification = newIdentification;
|
||||
}
|
||||
|
||||
QString DeviceProfile::friendlyName() const { return m_friendlyName; }
|
||||
|
||||
void DeviceProfile::setFriendlyName(QString newFriendlyName) {
|
||||
m_friendlyName = newFriendlyName;
|
||||
}
|
||||
bool DeviceProfile::friendlyNameNull() const {
|
||||
return m_friendlyName.isNull();
|
||||
}
|
||||
|
||||
void DeviceProfile::setFriendlyNameNull() {
|
||||
m_friendlyName.clear();
|
||||
|
||||
}
|
||||
QString DeviceProfile::manufacturer() const { return m_manufacturer; }
|
||||
|
||||
void DeviceProfile::setManufacturer(QString newManufacturer) {
|
||||
m_manufacturer = newManufacturer;
|
||||
}
|
||||
bool DeviceProfile::manufacturerNull() const {
|
||||
return m_manufacturer.isNull();
|
||||
}
|
||||
|
||||
void DeviceProfile::setManufacturerNull() {
|
||||
m_manufacturer.clear();
|
||||
|
||||
}
|
||||
QString DeviceProfile::manufacturerUrl() const { return m_manufacturerUrl; }
|
||||
|
||||
void DeviceProfile::setManufacturerUrl(QString newManufacturerUrl) {
|
||||
m_manufacturerUrl = newManufacturerUrl;
|
||||
}
|
||||
bool DeviceProfile::manufacturerUrlNull() const {
|
||||
return m_manufacturerUrl.isNull();
|
||||
}
|
||||
|
||||
void DeviceProfile::setManufacturerUrlNull() {
|
||||
m_manufacturerUrl.clear();
|
||||
|
||||
}
|
||||
QString DeviceProfile::modelName() const { return m_modelName; }
|
||||
|
||||
void DeviceProfile::setModelName(QString newModelName) {
|
||||
m_modelName = newModelName;
|
||||
}
|
||||
bool DeviceProfile::modelNameNull() const {
|
||||
return m_modelName.isNull();
|
||||
}
|
||||
|
||||
void DeviceProfile::setModelNameNull() {
|
||||
m_modelName.clear();
|
||||
|
||||
}
|
||||
QString DeviceProfile::modelDescription() const { return m_modelDescription; }
|
||||
|
||||
void DeviceProfile::setModelDescription(QString newModelDescription) {
|
||||
m_modelDescription = newModelDescription;
|
||||
}
|
||||
bool DeviceProfile::modelDescriptionNull() const {
|
||||
return m_modelDescription.isNull();
|
||||
}
|
||||
|
||||
void DeviceProfile::setModelDescriptionNull() {
|
||||
m_modelDescription.clear();
|
||||
|
||||
}
|
||||
QString DeviceProfile::modelNumber() const { return m_modelNumber; }
|
||||
|
||||
void DeviceProfile::setModelNumber(QString newModelNumber) {
|
||||
m_modelNumber = newModelNumber;
|
||||
}
|
||||
bool DeviceProfile::modelNumberNull() const {
|
||||
return m_modelNumber.isNull();
|
||||
}
|
||||
|
||||
void DeviceProfile::setModelNumberNull() {
|
||||
m_modelNumber.clear();
|
||||
|
||||
}
|
||||
QString DeviceProfile::modelUrl() const { return m_modelUrl; }
|
||||
|
||||
void DeviceProfile::setModelUrl(QString newModelUrl) {
|
||||
m_modelUrl = newModelUrl;
|
||||
}
|
||||
bool DeviceProfile::modelUrlNull() const {
|
||||
return m_modelUrl.isNull();
|
||||
}
|
||||
|
||||
void DeviceProfile::setModelUrlNull() {
|
||||
m_modelUrl.clear();
|
||||
|
||||
}
|
||||
QString DeviceProfile::serialNumber() const { return m_serialNumber; }
|
||||
|
||||
void DeviceProfile::setSerialNumber(QString newSerialNumber) {
|
||||
m_serialNumber = newSerialNumber;
|
||||
}
|
||||
bool DeviceProfile::serialNumberNull() const {
|
||||
return m_serialNumber.isNull();
|
||||
}
|
||||
|
||||
void DeviceProfile::setSerialNumberNull() {
|
||||
m_serialNumber.clear();
|
||||
|
||||
}
|
||||
bool DeviceProfile::enableAlbumArtInDidl() const { return m_enableAlbumArtInDidl; }
|
||||
|
||||
void DeviceProfile::setEnableAlbumArtInDidl(bool newEnableAlbumArtInDidl) {
|
||||
m_enableAlbumArtInDidl = newEnableAlbumArtInDidl;
|
||||
}
|
||||
|
||||
bool DeviceProfile::enableSingleAlbumArtLimit() const { return m_enableSingleAlbumArtLimit; }
|
||||
|
||||
void DeviceProfile::setEnableSingleAlbumArtLimit(bool newEnableSingleAlbumArtLimit) {
|
||||
m_enableSingleAlbumArtLimit = newEnableSingleAlbumArtLimit;
|
||||
}
|
||||
|
||||
bool DeviceProfile::enableSingleSubtitleLimit() const { return m_enableSingleSubtitleLimit; }
|
||||
|
||||
void DeviceProfile::setEnableSingleSubtitleLimit(bool newEnableSingleSubtitleLimit) {
|
||||
m_enableSingleSubtitleLimit = newEnableSingleSubtitleLimit;
|
||||
}
|
||||
|
||||
QString DeviceProfile::supportedMediaTypes() const { return m_supportedMediaTypes; }
|
||||
|
||||
void DeviceProfile::setSupportedMediaTypes(QString newSupportedMediaTypes) {
|
||||
m_supportedMediaTypes = newSupportedMediaTypes;
|
||||
}
|
||||
bool DeviceProfile::supportedMediaTypesNull() const {
|
||||
return m_supportedMediaTypes.isNull();
|
||||
}
|
||||
|
||||
void DeviceProfile::setSupportedMediaTypesNull() {
|
||||
m_supportedMediaTypes.clear();
|
||||
|
||||
}
|
||||
QString DeviceProfile::userId() const { return m_userId; }
|
||||
|
||||
void DeviceProfile::setUserId(QString newUserId) {
|
||||
m_userId = newUserId;
|
||||
}
|
||||
bool DeviceProfile::userIdNull() const {
|
||||
return m_userId.isNull();
|
||||
}
|
||||
|
||||
void DeviceProfile::setUserIdNull() {
|
||||
m_userId.clear();
|
||||
|
||||
}
|
||||
QString DeviceProfile::albumArtPn() const { return m_albumArtPn; }
|
||||
|
||||
void DeviceProfile::setAlbumArtPn(QString newAlbumArtPn) {
|
||||
m_albumArtPn = newAlbumArtPn;
|
||||
}
|
||||
bool DeviceProfile::albumArtPnNull() const {
|
||||
return m_albumArtPn.isNull();
|
||||
}
|
||||
|
||||
void DeviceProfile::setAlbumArtPnNull() {
|
||||
m_albumArtPn.clear();
|
||||
|
||||
}
|
||||
qint32 DeviceProfile::maxAlbumArtWidth() const { return m_maxAlbumArtWidth; }
|
||||
|
||||
void DeviceProfile::setMaxAlbumArtWidth(qint32 newMaxAlbumArtWidth) {
|
||||
m_maxAlbumArtWidth = newMaxAlbumArtWidth;
|
||||
}
|
||||
|
||||
qint32 DeviceProfile::maxAlbumArtHeight() const { return m_maxAlbumArtHeight; }
|
||||
|
||||
void DeviceProfile::setMaxAlbumArtHeight(qint32 newMaxAlbumArtHeight) {
|
||||
m_maxAlbumArtHeight = newMaxAlbumArtHeight;
|
||||
}
|
||||
|
||||
std::optional<qint32> DeviceProfile::maxIconWidth() const { return m_maxIconWidth; }
|
||||
|
||||
void DeviceProfile::setMaxIconWidth(std::optional<qint32> newMaxIconWidth) {
|
||||
m_maxIconWidth = newMaxIconWidth;
|
||||
}
|
||||
bool DeviceProfile::maxIconWidthNull() const {
|
||||
return !m_maxIconWidth.has_value();
|
||||
}
|
||||
|
||||
void DeviceProfile::setMaxIconWidthNull() {
|
||||
m_maxIconWidth = std::nullopt;
|
||||
|
||||
}
|
||||
std::optional<qint32> DeviceProfile::maxIconHeight() const { return m_maxIconHeight; }
|
||||
|
||||
void DeviceProfile::setMaxIconHeight(std::optional<qint32> newMaxIconHeight) {
|
||||
m_maxIconHeight = newMaxIconHeight;
|
||||
}
|
||||
bool DeviceProfile::maxIconHeightNull() const {
|
||||
return !m_maxIconHeight.has_value();
|
||||
}
|
||||
|
||||
void DeviceProfile::setMaxIconHeightNull() {
|
||||
m_maxIconHeight = std::nullopt;
|
||||
|
||||
}
|
||||
std::optional<qint32> DeviceProfile::maxStreamingBitrate() const { return m_maxStreamingBitrate; }
|
||||
|
||||
void DeviceProfile::setMaxStreamingBitrate(std::optional<qint32> newMaxStreamingBitrate) {
|
||||
m_maxStreamingBitrate = newMaxStreamingBitrate;
|
||||
}
|
||||
bool DeviceProfile::maxStreamingBitrateNull() const {
|
||||
return !m_maxStreamingBitrate.has_value();
|
||||
}
|
||||
|
||||
void DeviceProfile::setMaxStreamingBitrateNull() {
|
||||
m_maxStreamingBitrate = std::nullopt;
|
||||
|
||||
}
|
||||
std::optional<qint32> DeviceProfile::maxStaticBitrate() const { return m_maxStaticBitrate; }
|
||||
|
||||
void DeviceProfile::setMaxStaticBitrate(std::optional<qint32> newMaxStaticBitrate) {
|
||||
m_maxStaticBitrate = newMaxStaticBitrate;
|
||||
}
|
||||
bool DeviceProfile::maxStaticBitrateNull() const {
|
||||
return !m_maxStaticBitrate.has_value();
|
||||
}
|
||||
|
||||
void DeviceProfile::setMaxStaticBitrateNull() {
|
||||
m_maxStaticBitrate = std::nullopt;
|
||||
|
||||
}
|
||||
std::optional<qint32> DeviceProfile::musicStreamingTranscodingBitrate() const { return m_musicStreamingTranscodingBitrate; }
|
||||
|
||||
void DeviceProfile::setMusicStreamingTranscodingBitrate(std::optional<qint32> newMusicStreamingTranscodingBitrate) {
|
||||
m_musicStreamingTranscodingBitrate = newMusicStreamingTranscodingBitrate;
|
||||
}
|
||||
bool DeviceProfile::musicStreamingTranscodingBitrateNull() const {
|
||||
return !m_musicStreamingTranscodingBitrate.has_value();
|
||||
}
|
||||
|
||||
void DeviceProfile::setMusicStreamingTranscodingBitrateNull() {
|
||||
m_musicStreamingTranscodingBitrate = std::nullopt;
|
||||
|
||||
}
|
||||
std::optional<qint32> DeviceProfile::maxStaticMusicBitrate() const { return m_maxStaticMusicBitrate; }
|
||||
|
||||
void DeviceProfile::setMaxStaticMusicBitrate(std::optional<qint32> newMaxStaticMusicBitrate) {
|
||||
m_maxStaticMusicBitrate = newMaxStaticMusicBitrate;
|
||||
}
|
||||
bool DeviceProfile::maxStaticMusicBitrateNull() const {
|
||||
return !m_maxStaticMusicBitrate.has_value();
|
||||
}
|
||||
|
||||
void DeviceProfile::setMaxStaticMusicBitrateNull() {
|
||||
m_maxStaticMusicBitrate = std::nullopt;
|
||||
|
||||
}
|
||||
QString DeviceProfile::sonyAggregationFlags() const { return m_sonyAggregationFlags; }
|
||||
|
||||
void DeviceProfile::setSonyAggregationFlags(QString newSonyAggregationFlags) {
|
||||
m_sonyAggregationFlags = newSonyAggregationFlags;
|
||||
}
|
||||
bool DeviceProfile::sonyAggregationFlagsNull() const {
|
||||
return m_sonyAggregationFlags.isNull();
|
||||
}
|
||||
|
||||
void DeviceProfile::setSonyAggregationFlagsNull() {
|
||||
m_sonyAggregationFlags.clear();
|
||||
|
||||
}
|
||||
QString DeviceProfile::protocolInfo() const { return m_protocolInfo; }
|
||||
|
||||
void DeviceProfile::setProtocolInfo(QString newProtocolInfo) {
|
||||
m_protocolInfo = newProtocolInfo;
|
||||
}
|
||||
bool DeviceProfile::protocolInfoNull() const {
|
||||
return m_protocolInfo.isNull();
|
||||
}
|
||||
|
||||
void DeviceProfile::setProtocolInfoNull() {
|
||||
m_protocolInfo.clear();
|
||||
|
||||
}
|
||||
qint32 DeviceProfile::timelineOffsetSeconds() const { return m_timelineOffsetSeconds; }
|
||||
|
||||
void DeviceProfile::setTimelineOffsetSeconds(qint32 newTimelineOffsetSeconds) {
|
||||
m_timelineOffsetSeconds = newTimelineOffsetSeconds;
|
||||
}
|
||||
|
||||
bool DeviceProfile::requiresPlainVideoItems() const { return m_requiresPlainVideoItems; }
|
||||
|
||||
void DeviceProfile::setRequiresPlainVideoItems(bool newRequiresPlainVideoItems) {
|
||||
m_requiresPlainVideoItems = newRequiresPlainVideoItems;
|
||||
}
|
||||
|
||||
bool DeviceProfile::requiresPlainFolders() const { return m_requiresPlainFolders; }
|
||||
|
||||
void DeviceProfile::setRequiresPlainFolders(bool newRequiresPlainFolders) {
|
||||
m_requiresPlainFolders = newRequiresPlainFolders;
|
||||
}
|
||||
|
||||
bool DeviceProfile::enableMSMediaReceiverRegistrar() const { return m_enableMSMediaReceiverRegistrar; }
|
||||
|
||||
void DeviceProfile::setEnableMSMediaReceiverRegistrar(bool newEnableMSMediaReceiverRegistrar) {
|
||||
m_enableMSMediaReceiverRegistrar = newEnableMSMediaReceiverRegistrar;
|
||||
}
|
||||
|
||||
bool DeviceProfile::ignoreTranscodeByteRangeRequests() const { return m_ignoreTranscodeByteRangeRequests; }
|
||||
|
||||
void DeviceProfile::setIgnoreTranscodeByteRangeRequests(bool newIgnoreTranscodeByteRangeRequests) {
|
||||
m_ignoreTranscodeByteRangeRequests = newIgnoreTranscodeByteRangeRequests;
|
||||
}
|
||||
|
||||
QList<QSharedPointer<XmlAttribute>> DeviceProfile::xmlRootAttributes() const { return m_xmlRootAttributes; }
|
||||
|
||||
void DeviceProfile::setXmlRootAttributes(QList<QSharedPointer<XmlAttribute>> newXmlRootAttributes) {
|
||||
m_xmlRootAttributes = newXmlRootAttributes;
|
||||
}
|
||||
bool DeviceProfile::xmlRootAttributesNull() const {
|
||||
return m_xmlRootAttributes.size() == 0;
|
||||
}
|
||||
|
||||
void DeviceProfile::setXmlRootAttributesNull() {
|
||||
m_xmlRootAttributes.clear();
|
||||
|
||||
}
|
||||
QList<QSharedPointer<DirectPlayProfile>> DeviceProfile::directPlayProfiles() const { return m_directPlayProfiles; }
|
||||
|
||||
void DeviceProfile::setDirectPlayProfiles(QList<QSharedPointer<DirectPlayProfile>> newDirectPlayProfiles) {
|
||||
m_directPlayProfiles = newDirectPlayProfiles;
|
||||
}
|
||||
bool DeviceProfile::directPlayProfilesNull() const {
|
||||
return m_directPlayProfiles.size() == 0;
|
||||
}
|
||||
|
||||
void DeviceProfile::setDirectPlayProfilesNull() {
|
||||
m_directPlayProfiles.clear();
|
||||
|
||||
}
|
||||
QList<QSharedPointer<TranscodingProfile>> DeviceProfile::transcodingProfiles() const { return m_transcodingProfiles; }
|
||||
|
||||
void DeviceProfile::setTranscodingProfiles(QList<QSharedPointer<TranscodingProfile>> newTranscodingProfiles) {
|
||||
m_transcodingProfiles = newTranscodingProfiles;
|
||||
}
|
||||
bool DeviceProfile::transcodingProfilesNull() const {
|
||||
return m_transcodingProfiles.size() == 0;
|
||||
}
|
||||
|
||||
void DeviceProfile::setTranscodingProfilesNull() {
|
||||
m_transcodingProfiles.clear();
|
||||
|
||||
}
|
||||
QList<QSharedPointer<ContainerProfile>> DeviceProfile::containerProfiles() const { return m_containerProfiles; }
|
||||
|
||||
void DeviceProfile::setContainerProfiles(QList<QSharedPointer<ContainerProfile>> newContainerProfiles) {
|
||||
m_containerProfiles = newContainerProfiles;
|
||||
}
|
||||
bool DeviceProfile::containerProfilesNull() const {
|
||||
return m_containerProfiles.size() == 0;
|
||||
}
|
||||
|
||||
void DeviceProfile::setContainerProfilesNull() {
|
||||
m_containerProfiles.clear();
|
||||
|
||||
}
|
||||
QList<QSharedPointer<CodecProfile>> DeviceProfile::codecProfiles() const { return m_codecProfiles; }
|
||||
|
||||
void DeviceProfile::setCodecProfiles(QList<QSharedPointer<CodecProfile>> newCodecProfiles) {
|
||||
m_codecProfiles = newCodecProfiles;
|
||||
}
|
||||
bool DeviceProfile::codecProfilesNull() const {
|
||||
return m_codecProfiles.size() == 0;
|
||||
}
|
||||
|
||||
void DeviceProfile::setCodecProfilesNull() {
|
||||
m_codecProfiles.clear();
|
||||
|
||||
}
|
||||
QList<QSharedPointer<ResponseProfile>> DeviceProfile::responseProfiles() const { return m_responseProfiles; }
|
||||
|
||||
void DeviceProfile::setResponseProfiles(QList<QSharedPointer<ResponseProfile>> newResponseProfiles) {
|
||||
m_responseProfiles = newResponseProfiles;
|
||||
}
|
||||
bool DeviceProfile::responseProfilesNull() const {
|
||||
return m_responseProfiles.size() == 0;
|
||||
}
|
||||
|
||||
void DeviceProfile::setResponseProfilesNull() {
|
||||
m_responseProfiles.clear();
|
||||
|
||||
}
|
||||
QList<QSharedPointer<SubtitleProfile>> DeviceProfile::subtitleProfiles() const { return m_subtitleProfiles; }
|
||||
|
||||
void DeviceProfile::setSubtitleProfiles(QList<QSharedPointer<SubtitleProfile>> newSubtitleProfiles) {
|
||||
m_subtitleProfiles = newSubtitleProfiles;
|
||||
}
|
||||
bool DeviceProfile::subtitleProfilesNull() const {
|
||||
return m_subtitleProfiles.size() == 0;
|
||||
}
|
||||
|
||||
void DeviceProfile::setSubtitleProfilesNull() {
|
||||
m_subtitleProfiles.clear();
|
||||
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using DeviceProfile = Jellyfin::DTO::DeviceProfile;
|
||||
|
||||
template <>
|
||||
DeviceProfile fromJsonValue<DeviceProfile>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return DeviceProfile::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
} // NS Jellyfin
|
||||
119
core/src/dto/deviceprofileinfo.cpp
Normal file
119
core/src/dto/deviceprofileinfo.cpp
Normal file
|
|
@ -0,0 +1,119 @@
|
|||
/*
|
||||
* Sailfin: a Jellyfin client written using Qt
|
||||
* Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
|
||||
* OVERWRITTEN AT SOME POINT!
|
||||
*
|
||||
* If there is a bug in this file, please fix the code generator used to generate this file found in
|
||||
* core/openapigenerator.d.
|
||||
*
|
||||
* This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
|
||||
* file with a newer file if needed instead of manually updating the files.
|
||||
*/
|
||||
|
||||
#include <JellyfinQt/dto/deviceprofileinfo.h>
|
||||
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
DeviceProfileInfo::DeviceProfileInfo() {}
|
||||
|
||||
DeviceProfileInfo::DeviceProfileInfo(const DeviceProfileInfo &other) :
|
||||
|
||||
m_jellyfinId(other.m_jellyfinId),
|
||||
m_name(other.m_name),
|
||||
m_type(other.m_type){}
|
||||
|
||||
|
||||
void DeviceProfileInfo::replaceData(DeviceProfileInfo &other) {
|
||||
m_jellyfinId = other.m_jellyfinId;
|
||||
m_name = other.m_name;
|
||||
m_type = other.m_type;
|
||||
}
|
||||
|
||||
DeviceProfileInfo DeviceProfileInfo::fromJson(QJsonObject source) {
|
||||
DeviceProfileInfo instance;
|
||||
instance.setFromJson(source);
|
||||
return instance;
|
||||
}
|
||||
|
||||
|
||||
void DeviceProfileInfo::setFromJson(QJsonObject source) {
|
||||
m_jellyfinId = Jellyfin::Support::fromJsonValue<QString>(source["Id"]);
|
||||
m_name = Jellyfin::Support::fromJsonValue<QString>(source["Name"]);
|
||||
m_type = Jellyfin::Support::fromJsonValue<DeviceProfileType>(source["Type"]);
|
||||
|
||||
}
|
||||
|
||||
QJsonObject DeviceProfileInfo::toJson() {
|
||||
QJsonObject result;
|
||||
result["Id"] = Jellyfin::Support::toJsonValue<QString>(m_jellyfinId);
|
||||
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
||||
result["Type"] = Jellyfin::Support::toJsonValue<DeviceProfileType>(m_type);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
QString DeviceProfileInfo::jellyfinId() const { return m_jellyfinId; }
|
||||
|
||||
void DeviceProfileInfo::setJellyfinId(QString newJellyfinId) {
|
||||
m_jellyfinId = newJellyfinId;
|
||||
}
|
||||
bool DeviceProfileInfo::jellyfinIdNull() const {
|
||||
return m_jellyfinId.isNull();
|
||||
}
|
||||
|
||||
void DeviceProfileInfo::setJellyfinIdNull() {
|
||||
m_jellyfinId.clear();
|
||||
|
||||
}
|
||||
QString DeviceProfileInfo::name() const { return m_name; }
|
||||
|
||||
void DeviceProfileInfo::setName(QString newName) {
|
||||
m_name = newName;
|
||||
}
|
||||
bool DeviceProfileInfo::nameNull() const {
|
||||
return m_name.isNull();
|
||||
}
|
||||
|
||||
void DeviceProfileInfo::setNameNull() {
|
||||
m_name.clear();
|
||||
|
||||
}
|
||||
DeviceProfileType DeviceProfileInfo::type() const { return m_type; }
|
||||
|
||||
void DeviceProfileInfo::setType(DeviceProfileType newType) {
|
||||
m_type = newType;
|
||||
}
|
||||
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using DeviceProfileInfo = Jellyfin::DTO::DeviceProfileInfo;
|
||||
|
||||
template <>
|
||||
DeviceProfileInfo fromJsonValue<DeviceProfileInfo>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return DeviceProfileInfo::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
} // NS Jellyfin
|
||||
60
core/src/dto/deviceprofiletype.cpp
Normal file
60
core/src/dto/deviceprofiletype.cpp
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
/*
|
||||
* Sailfin: a Jellyfin client written using Qt
|
||||
* Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
|
||||
* OVERWRITTEN AT SOME POINT!
|
||||
*
|
||||
* If there is a bug in this file, please fix the code generator used to generate this file found in
|
||||
* core/openapigenerator.d.
|
||||
*
|
||||
* This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
|
||||
* file with a newer file if needed instead of manually updating the files.
|
||||
*/
|
||||
|
||||
#include <JellyfinQt/dto/deviceprofiletype.h>
|
||||
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
DeviceProfileTypeClass::DeviceProfileTypeClass() {}
|
||||
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using DeviceProfileType = Jellyfin::DTO::DeviceProfileType;
|
||||
|
||||
template <>
|
||||
DeviceProfileType fromJsonValue<DeviceProfileType>(const QJsonValue &source) {
|
||||
if (!source.isString()) return DeviceProfileType::EnumNotSet;
|
||||
|
||||
QString str = source.toString();
|
||||
if (str == QStringLiteral("System")) {
|
||||
return DeviceProfileType::System;
|
||||
}
|
||||
if (str == QStringLiteral("User")) {
|
||||
return DeviceProfileType::User;
|
||||
}
|
||||
|
||||
return DeviceProfileType::EnumNotSet;
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
} // NS Jellyfin
|
||||
136
core/src/dto/directplayprofile.cpp
Normal file
136
core/src/dto/directplayprofile.cpp
Normal file
|
|
@ -0,0 +1,136 @@
|
|||
/*
|
||||
* Sailfin: a Jellyfin client written using Qt
|
||||
* Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
|
||||
* OVERWRITTEN AT SOME POINT!
|
||||
*
|
||||
* If there is a bug in this file, please fix the code generator used to generate this file found in
|
||||
* core/openapigenerator.d.
|
||||
*
|
||||
* This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
|
||||
* file with a newer file if needed instead of manually updating the files.
|
||||
*/
|
||||
|
||||
#include <JellyfinQt/dto/directplayprofile.h>
|
||||
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
DirectPlayProfile::DirectPlayProfile() {}
|
||||
|
||||
DirectPlayProfile::DirectPlayProfile(const DirectPlayProfile &other) :
|
||||
|
||||
m_container(other.m_container),
|
||||
m_audioCodec(other.m_audioCodec),
|
||||
m_videoCodec(other.m_videoCodec),
|
||||
m_type(other.m_type){}
|
||||
|
||||
|
||||
void DirectPlayProfile::replaceData(DirectPlayProfile &other) {
|
||||
m_container = other.m_container;
|
||||
m_audioCodec = other.m_audioCodec;
|
||||
m_videoCodec = other.m_videoCodec;
|
||||
m_type = other.m_type;
|
||||
}
|
||||
|
||||
DirectPlayProfile DirectPlayProfile::fromJson(QJsonObject source) {
|
||||
DirectPlayProfile instance;
|
||||
instance.setFromJson(source);
|
||||
return instance;
|
||||
}
|
||||
|
||||
|
||||
void DirectPlayProfile::setFromJson(QJsonObject source) {
|
||||
m_container = Jellyfin::Support::fromJsonValue<QString>(source["Container"]);
|
||||
m_audioCodec = Jellyfin::Support::fromJsonValue<QString>(source["AudioCodec"]);
|
||||
m_videoCodec = Jellyfin::Support::fromJsonValue<QString>(source["VideoCodec"]);
|
||||
m_type = Jellyfin::Support::fromJsonValue<DlnaProfileType>(source["Type"]);
|
||||
|
||||
}
|
||||
|
||||
QJsonObject DirectPlayProfile::toJson() {
|
||||
QJsonObject result;
|
||||
result["Container"] = Jellyfin::Support::toJsonValue<QString>(m_container);
|
||||
result["AudioCodec"] = Jellyfin::Support::toJsonValue<QString>(m_audioCodec);
|
||||
result["VideoCodec"] = Jellyfin::Support::toJsonValue<QString>(m_videoCodec);
|
||||
result["Type"] = Jellyfin::Support::toJsonValue<DlnaProfileType>(m_type);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
QString DirectPlayProfile::container() const { return m_container; }
|
||||
|
||||
void DirectPlayProfile::setContainer(QString newContainer) {
|
||||
m_container = newContainer;
|
||||
}
|
||||
bool DirectPlayProfile::containerNull() const {
|
||||
return m_container.isNull();
|
||||
}
|
||||
|
||||
void DirectPlayProfile::setContainerNull() {
|
||||
m_container.clear();
|
||||
|
||||
}
|
||||
QString DirectPlayProfile::audioCodec() const { return m_audioCodec; }
|
||||
|
||||
void DirectPlayProfile::setAudioCodec(QString newAudioCodec) {
|
||||
m_audioCodec = newAudioCodec;
|
||||
}
|
||||
bool DirectPlayProfile::audioCodecNull() const {
|
||||
return m_audioCodec.isNull();
|
||||
}
|
||||
|
||||
void DirectPlayProfile::setAudioCodecNull() {
|
||||
m_audioCodec.clear();
|
||||
|
||||
}
|
||||
QString DirectPlayProfile::videoCodec() const { return m_videoCodec; }
|
||||
|
||||
void DirectPlayProfile::setVideoCodec(QString newVideoCodec) {
|
||||
m_videoCodec = newVideoCodec;
|
||||
}
|
||||
bool DirectPlayProfile::videoCodecNull() const {
|
||||
return m_videoCodec.isNull();
|
||||
}
|
||||
|
||||
void DirectPlayProfile::setVideoCodecNull() {
|
||||
m_videoCodec.clear();
|
||||
|
||||
}
|
||||
DlnaProfileType DirectPlayProfile::type() const { return m_type; }
|
||||
|
||||
void DirectPlayProfile::setType(DlnaProfileType newType) {
|
||||
m_type = newType;
|
||||
}
|
||||
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using DirectPlayProfile = Jellyfin::DTO::DirectPlayProfile;
|
||||
|
||||
template <>
|
||||
DirectPlayProfile fromJsonValue<DirectPlayProfile>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return DirectPlayProfile::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
} // NS Jellyfin
|
||||
257
core/src/dto/displaypreferencesdto.cpp
Normal file
257
core/src/dto/displaypreferencesdto.cpp
Normal file
|
|
@ -0,0 +1,257 @@
|
|||
/*
|
||||
* Sailfin: a Jellyfin client written using Qt
|
||||
* Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
|
||||
* OVERWRITTEN AT SOME POINT!
|
||||
*
|
||||
* If there is a bug in this file, please fix the code generator used to generate this file found in
|
||||
* core/openapigenerator.d.
|
||||
*
|
||||
* This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
|
||||
* file with a newer file if needed instead of manually updating the files.
|
||||
*/
|
||||
|
||||
#include <JellyfinQt/dto/displaypreferencesdto.h>
|
||||
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
DisplayPreferencesDto::DisplayPreferencesDto() {}
|
||||
|
||||
DisplayPreferencesDto::DisplayPreferencesDto(const DisplayPreferencesDto &other) :
|
||||
|
||||
m_jellyfinId(other.m_jellyfinId),
|
||||
m_viewType(other.m_viewType),
|
||||
m_sortBy(other.m_sortBy),
|
||||
m_indexBy(other.m_indexBy),
|
||||
m_rememberIndexing(other.m_rememberIndexing),
|
||||
m_primaryImageHeight(other.m_primaryImageHeight),
|
||||
m_primaryImageWidth(other.m_primaryImageWidth),
|
||||
m_customPrefs(other.m_customPrefs),
|
||||
m_scrollDirection(other.m_scrollDirection),
|
||||
m_showBackdrop(other.m_showBackdrop),
|
||||
m_rememberSorting(other.m_rememberSorting),
|
||||
m_sortOrder(other.m_sortOrder),
|
||||
m_showSidebar(other.m_showSidebar),
|
||||
m_client(other.m_client){}
|
||||
|
||||
|
||||
void DisplayPreferencesDto::replaceData(DisplayPreferencesDto &other) {
|
||||
m_jellyfinId = other.m_jellyfinId;
|
||||
m_viewType = other.m_viewType;
|
||||
m_sortBy = other.m_sortBy;
|
||||
m_indexBy = other.m_indexBy;
|
||||
m_rememberIndexing = other.m_rememberIndexing;
|
||||
m_primaryImageHeight = other.m_primaryImageHeight;
|
||||
m_primaryImageWidth = other.m_primaryImageWidth;
|
||||
m_customPrefs = other.m_customPrefs;
|
||||
m_scrollDirection = other.m_scrollDirection;
|
||||
m_showBackdrop = other.m_showBackdrop;
|
||||
m_rememberSorting = other.m_rememberSorting;
|
||||
m_sortOrder = other.m_sortOrder;
|
||||
m_showSidebar = other.m_showSidebar;
|
||||
m_client = other.m_client;
|
||||
}
|
||||
|
||||
DisplayPreferencesDto DisplayPreferencesDto::fromJson(QJsonObject source) {
|
||||
DisplayPreferencesDto instance;
|
||||
instance.setFromJson(source);
|
||||
return instance;
|
||||
}
|
||||
|
||||
|
||||
void DisplayPreferencesDto::setFromJson(QJsonObject source) {
|
||||
m_jellyfinId = Jellyfin::Support::fromJsonValue<QString>(source["Id"]);
|
||||
m_viewType = Jellyfin::Support::fromJsonValue<QString>(source["ViewType"]);
|
||||
m_sortBy = Jellyfin::Support::fromJsonValue<QString>(source["SortBy"]);
|
||||
m_indexBy = Jellyfin::Support::fromJsonValue<QString>(source["IndexBy"]);
|
||||
m_rememberIndexing = Jellyfin::Support::fromJsonValue<bool>(source["RememberIndexing"]);
|
||||
m_primaryImageHeight = Jellyfin::Support::fromJsonValue<qint32>(source["PrimaryImageHeight"]);
|
||||
m_primaryImageWidth = Jellyfin::Support::fromJsonValue<qint32>(source["PrimaryImageWidth"]);
|
||||
m_customPrefs = Jellyfin::Support::fromJsonValue<std::optional<QJsonObject>>(source["CustomPrefs"]);
|
||||
m_scrollDirection = Jellyfin::Support::fromJsonValue<ScrollDirection>(source["ScrollDirection"]);
|
||||
m_showBackdrop = Jellyfin::Support::fromJsonValue<bool>(source["ShowBackdrop"]);
|
||||
m_rememberSorting = Jellyfin::Support::fromJsonValue<bool>(source["RememberSorting"]);
|
||||
m_sortOrder = Jellyfin::Support::fromJsonValue<SortOrder>(source["SortOrder"]);
|
||||
m_showSidebar = Jellyfin::Support::fromJsonValue<bool>(source["ShowSidebar"]);
|
||||
m_client = Jellyfin::Support::fromJsonValue<QString>(source["Client"]);
|
||||
|
||||
}
|
||||
|
||||
QJsonObject DisplayPreferencesDto::toJson() {
|
||||
QJsonObject result;
|
||||
result["Id"] = Jellyfin::Support::toJsonValue<QString>(m_jellyfinId);
|
||||
result["ViewType"] = Jellyfin::Support::toJsonValue<QString>(m_viewType);
|
||||
result["SortBy"] = Jellyfin::Support::toJsonValue<QString>(m_sortBy);
|
||||
result["IndexBy"] = Jellyfin::Support::toJsonValue<QString>(m_indexBy);
|
||||
result["RememberIndexing"] = Jellyfin::Support::toJsonValue<bool>(m_rememberIndexing);
|
||||
result["PrimaryImageHeight"] = Jellyfin::Support::toJsonValue<qint32>(m_primaryImageHeight);
|
||||
result["PrimaryImageWidth"] = Jellyfin::Support::toJsonValue<qint32>(m_primaryImageWidth);
|
||||
result["CustomPrefs"] = Jellyfin::Support::toJsonValue<std::optional<QJsonObject>>(m_customPrefs);
|
||||
result["ScrollDirection"] = Jellyfin::Support::toJsonValue<ScrollDirection>(m_scrollDirection);
|
||||
result["ShowBackdrop"] = Jellyfin::Support::toJsonValue<bool>(m_showBackdrop);
|
||||
result["RememberSorting"] = Jellyfin::Support::toJsonValue<bool>(m_rememberSorting);
|
||||
result["SortOrder"] = Jellyfin::Support::toJsonValue<SortOrder>(m_sortOrder);
|
||||
result["ShowSidebar"] = Jellyfin::Support::toJsonValue<bool>(m_showSidebar);
|
||||
result["Client"] = Jellyfin::Support::toJsonValue<QString>(m_client);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
QString DisplayPreferencesDto::jellyfinId() const { return m_jellyfinId; }
|
||||
|
||||
void DisplayPreferencesDto::setJellyfinId(QString newJellyfinId) {
|
||||
m_jellyfinId = newJellyfinId;
|
||||
}
|
||||
bool DisplayPreferencesDto::jellyfinIdNull() const {
|
||||
return m_jellyfinId.isNull();
|
||||
}
|
||||
|
||||
void DisplayPreferencesDto::setJellyfinIdNull() {
|
||||
m_jellyfinId.clear();
|
||||
|
||||
}
|
||||
QString DisplayPreferencesDto::viewType() const { return m_viewType; }
|
||||
|
||||
void DisplayPreferencesDto::setViewType(QString newViewType) {
|
||||
m_viewType = newViewType;
|
||||
}
|
||||
bool DisplayPreferencesDto::viewTypeNull() const {
|
||||
return m_viewType.isNull();
|
||||
}
|
||||
|
||||
void DisplayPreferencesDto::setViewTypeNull() {
|
||||
m_viewType.clear();
|
||||
|
||||
}
|
||||
QString DisplayPreferencesDto::sortBy() const { return m_sortBy; }
|
||||
|
||||
void DisplayPreferencesDto::setSortBy(QString newSortBy) {
|
||||
m_sortBy = newSortBy;
|
||||
}
|
||||
bool DisplayPreferencesDto::sortByNull() const {
|
||||
return m_sortBy.isNull();
|
||||
}
|
||||
|
||||
void DisplayPreferencesDto::setSortByNull() {
|
||||
m_sortBy.clear();
|
||||
|
||||
}
|
||||
QString DisplayPreferencesDto::indexBy() const { return m_indexBy; }
|
||||
|
||||
void DisplayPreferencesDto::setIndexBy(QString newIndexBy) {
|
||||
m_indexBy = newIndexBy;
|
||||
}
|
||||
bool DisplayPreferencesDto::indexByNull() const {
|
||||
return m_indexBy.isNull();
|
||||
}
|
||||
|
||||
void DisplayPreferencesDto::setIndexByNull() {
|
||||
m_indexBy.clear();
|
||||
|
||||
}
|
||||
bool DisplayPreferencesDto::rememberIndexing() const { return m_rememberIndexing; }
|
||||
|
||||
void DisplayPreferencesDto::setRememberIndexing(bool newRememberIndexing) {
|
||||
m_rememberIndexing = newRememberIndexing;
|
||||
}
|
||||
|
||||
qint32 DisplayPreferencesDto::primaryImageHeight() const { return m_primaryImageHeight; }
|
||||
|
||||
void DisplayPreferencesDto::setPrimaryImageHeight(qint32 newPrimaryImageHeight) {
|
||||
m_primaryImageHeight = newPrimaryImageHeight;
|
||||
}
|
||||
|
||||
qint32 DisplayPreferencesDto::primaryImageWidth() const { return m_primaryImageWidth; }
|
||||
|
||||
void DisplayPreferencesDto::setPrimaryImageWidth(qint32 newPrimaryImageWidth) {
|
||||
m_primaryImageWidth = newPrimaryImageWidth;
|
||||
}
|
||||
|
||||
std::optional<QJsonObject> DisplayPreferencesDto::customPrefs() const { return m_customPrefs; }
|
||||
|
||||
void DisplayPreferencesDto::setCustomPrefs(std::optional<QJsonObject> newCustomPrefs) {
|
||||
m_customPrefs = newCustomPrefs;
|
||||
}
|
||||
bool DisplayPreferencesDto::customPrefsNull() const {
|
||||
return !m_customPrefs.has_value();
|
||||
}
|
||||
|
||||
void DisplayPreferencesDto::setCustomPrefsNull() {
|
||||
m_customPrefs = std::nullopt;
|
||||
|
||||
}
|
||||
ScrollDirection DisplayPreferencesDto::scrollDirection() const { return m_scrollDirection; }
|
||||
|
||||
void DisplayPreferencesDto::setScrollDirection(ScrollDirection newScrollDirection) {
|
||||
m_scrollDirection = newScrollDirection;
|
||||
}
|
||||
|
||||
bool DisplayPreferencesDto::showBackdrop() const { return m_showBackdrop; }
|
||||
|
||||
void DisplayPreferencesDto::setShowBackdrop(bool newShowBackdrop) {
|
||||
m_showBackdrop = newShowBackdrop;
|
||||
}
|
||||
|
||||
bool DisplayPreferencesDto::rememberSorting() const { return m_rememberSorting; }
|
||||
|
||||
void DisplayPreferencesDto::setRememberSorting(bool newRememberSorting) {
|
||||
m_rememberSorting = newRememberSorting;
|
||||
}
|
||||
|
||||
SortOrder DisplayPreferencesDto::sortOrder() const { return m_sortOrder; }
|
||||
|
||||
void DisplayPreferencesDto::setSortOrder(SortOrder newSortOrder) {
|
||||
m_sortOrder = newSortOrder;
|
||||
}
|
||||
|
||||
bool DisplayPreferencesDto::showSidebar() const { return m_showSidebar; }
|
||||
|
||||
void DisplayPreferencesDto::setShowSidebar(bool newShowSidebar) {
|
||||
m_showSidebar = newShowSidebar;
|
||||
}
|
||||
|
||||
QString DisplayPreferencesDto::client() const { return m_client; }
|
||||
|
||||
void DisplayPreferencesDto::setClient(QString newClient) {
|
||||
m_client = newClient;
|
||||
}
|
||||
bool DisplayPreferencesDto::clientNull() const {
|
||||
return m_client.isNull();
|
||||
}
|
||||
|
||||
void DisplayPreferencesDto::setClientNull() {
|
||||
m_client.clear();
|
||||
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using DisplayPreferencesDto = Jellyfin::DTO::DisplayPreferencesDto;
|
||||
|
||||
template <>
|
||||
DisplayPreferencesDto fromJsonValue<DisplayPreferencesDto>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return DisplayPreferencesDto::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
} // NS Jellyfin
|
||||
63
core/src/dto/dlnaprofiletype.cpp
Normal file
63
core/src/dto/dlnaprofiletype.cpp
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
/*
|
||||
* Sailfin: a Jellyfin client written using Qt
|
||||
* Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
|
||||
* OVERWRITTEN AT SOME POINT!
|
||||
*
|
||||
* If there is a bug in this file, please fix the code generator used to generate this file found in
|
||||
* core/openapigenerator.d.
|
||||
*
|
||||
* This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
|
||||
* file with a newer file if needed instead of manually updating the files.
|
||||
*/
|
||||
|
||||
#include <JellyfinQt/dto/dlnaprofiletype.h>
|
||||
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
DlnaProfileTypeClass::DlnaProfileTypeClass() {}
|
||||
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using DlnaProfileType = Jellyfin::DTO::DlnaProfileType;
|
||||
|
||||
template <>
|
||||
DlnaProfileType fromJsonValue<DlnaProfileType>(const QJsonValue &source) {
|
||||
if (!source.isString()) return DlnaProfileType::EnumNotSet;
|
||||
|
||||
QString str = source.toString();
|
||||
if (str == QStringLiteral("Audio")) {
|
||||
return DlnaProfileType::Audio;
|
||||
}
|
||||
if (str == QStringLiteral("Video")) {
|
||||
return DlnaProfileType::Video;
|
||||
}
|
||||
if (str == QStringLiteral("Photo")) {
|
||||
return DlnaProfileType::Photo;
|
||||
}
|
||||
|
||||
return DlnaProfileType::EnumNotSet;
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
} // NS Jellyfin
|
||||
84
core/src/dto/dynamicdayofweek.cpp
Normal file
84
core/src/dto/dynamicdayofweek.cpp
Normal file
|
|
@ -0,0 +1,84 @@
|
|||
/*
|
||||
* Sailfin: a Jellyfin client written using Qt
|
||||
* Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
|
||||
* OVERWRITTEN AT SOME POINT!
|
||||
*
|
||||
* If there is a bug in this file, please fix the code generator used to generate this file found in
|
||||
* core/openapigenerator.d.
|
||||
*
|
||||
* This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
|
||||
* file with a newer file if needed instead of manually updating the files.
|
||||
*/
|
||||
|
||||
#include <JellyfinQt/dto/dynamicdayofweek.h>
|
||||
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
DynamicDayOfWeekClass::DynamicDayOfWeekClass() {}
|
||||
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using DynamicDayOfWeek = Jellyfin::DTO::DynamicDayOfWeek;
|
||||
|
||||
template <>
|
||||
DynamicDayOfWeek fromJsonValue<DynamicDayOfWeek>(const QJsonValue &source) {
|
||||
if (!source.isString()) return DynamicDayOfWeek::EnumNotSet;
|
||||
|
||||
QString str = source.toString();
|
||||
if (str == QStringLiteral("Sunday")) {
|
||||
return DynamicDayOfWeek::Sunday;
|
||||
}
|
||||
if (str == QStringLiteral("Monday")) {
|
||||
return DynamicDayOfWeek::Monday;
|
||||
}
|
||||
if (str == QStringLiteral("Tuesday")) {
|
||||
return DynamicDayOfWeek::Tuesday;
|
||||
}
|
||||
if (str == QStringLiteral("Wednesday")) {
|
||||
return DynamicDayOfWeek::Wednesday;
|
||||
}
|
||||
if (str == QStringLiteral("Thursday")) {
|
||||
return DynamicDayOfWeek::Thursday;
|
||||
}
|
||||
if (str == QStringLiteral("Friday")) {
|
||||
return DynamicDayOfWeek::Friday;
|
||||
}
|
||||
if (str == QStringLiteral("Saturday")) {
|
||||
return DynamicDayOfWeek::Saturday;
|
||||
}
|
||||
if (str == QStringLiteral("Everyday")) {
|
||||
return DynamicDayOfWeek::Everyday;
|
||||
}
|
||||
if (str == QStringLiteral("Weekday")) {
|
||||
return DynamicDayOfWeek::Weekday;
|
||||
}
|
||||
if (str == QStringLiteral("Weekend")) {
|
||||
return DynamicDayOfWeek::Weekend;
|
||||
}
|
||||
|
||||
return DynamicDayOfWeek::EnumNotSet;
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
} // NS Jellyfin
|
||||
60
core/src/dto/encodingcontext.cpp
Normal file
60
core/src/dto/encodingcontext.cpp
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
/*
|
||||
* Sailfin: a Jellyfin client written using Qt
|
||||
* Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
|
||||
* OVERWRITTEN AT SOME POINT!
|
||||
*
|
||||
* If there is a bug in this file, please fix the code generator used to generate this file found in
|
||||
* core/openapigenerator.d.
|
||||
*
|
||||
* This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
|
||||
* file with a newer file if needed instead of manually updating the files.
|
||||
*/
|
||||
|
||||
#include <JellyfinQt/dto/encodingcontext.h>
|
||||
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
EncodingContextClass::EncodingContextClass() {}
|
||||
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using EncodingContext = Jellyfin::DTO::EncodingContext;
|
||||
|
||||
template <>
|
||||
EncodingContext fromJsonValue<EncodingContext>(const QJsonValue &source) {
|
||||
if (!source.isString()) return EncodingContext::EnumNotSet;
|
||||
|
||||
QString str = source.toString();
|
||||
if (str == QStringLiteral("Streaming")) {
|
||||
return EncodingContext::Streaming;
|
||||
}
|
||||
if (str == QStringLiteral("Static")) {
|
||||
return EncodingContext::Static;
|
||||
}
|
||||
|
||||
return EncodingContext::EnumNotSet;
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
} // NS Jellyfin
|
||||
95
core/src/dto/endpointinfo.cpp
Normal file
95
core/src/dto/endpointinfo.cpp
Normal file
|
|
@ -0,0 +1,95 @@
|
|||
/*
|
||||
* Sailfin: a Jellyfin client written using Qt
|
||||
* Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
|
||||
* OVERWRITTEN AT SOME POINT!
|
||||
*
|
||||
* If there is a bug in this file, please fix the code generator used to generate this file found in
|
||||
* core/openapigenerator.d.
|
||||
*
|
||||
* This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
|
||||
* file with a newer file if needed instead of manually updating the files.
|
||||
*/
|
||||
|
||||
#include <JellyfinQt/dto/endpointinfo.h>
|
||||
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
EndPointInfo::EndPointInfo() {}
|
||||
|
||||
EndPointInfo::EndPointInfo(const EndPointInfo &other) :
|
||||
|
||||
m_isLocal(other.m_isLocal),
|
||||
m_isInNetwork(other.m_isInNetwork){}
|
||||
|
||||
|
||||
void EndPointInfo::replaceData(EndPointInfo &other) {
|
||||
m_isLocal = other.m_isLocal;
|
||||
m_isInNetwork = other.m_isInNetwork;
|
||||
}
|
||||
|
||||
EndPointInfo EndPointInfo::fromJson(QJsonObject source) {
|
||||
EndPointInfo instance;
|
||||
instance.setFromJson(source);
|
||||
return instance;
|
||||
}
|
||||
|
||||
|
||||
void EndPointInfo::setFromJson(QJsonObject source) {
|
||||
m_isLocal = Jellyfin::Support::fromJsonValue<bool>(source["IsLocal"]);
|
||||
m_isInNetwork = Jellyfin::Support::fromJsonValue<bool>(source["IsInNetwork"]);
|
||||
|
||||
}
|
||||
|
||||
QJsonObject EndPointInfo::toJson() {
|
||||
QJsonObject result;
|
||||
result["IsLocal"] = Jellyfin::Support::toJsonValue<bool>(m_isLocal);
|
||||
result["IsInNetwork"] = Jellyfin::Support::toJsonValue<bool>(m_isInNetwork);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
bool EndPointInfo::isLocal() const { return m_isLocal; }
|
||||
|
||||
void EndPointInfo::setIsLocal(bool newIsLocal) {
|
||||
m_isLocal = newIsLocal;
|
||||
}
|
||||
|
||||
bool EndPointInfo::isInNetwork() const { return m_isInNetwork; }
|
||||
|
||||
void EndPointInfo::setIsInNetwork(bool newIsInNetwork) {
|
||||
m_isInNetwork = newIsInNetwork;
|
||||
}
|
||||
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using EndPointInfo = Jellyfin::DTO::EndPointInfo;
|
||||
|
||||
template <>
|
||||
EndPointInfo fromJsonValue<EndPointInfo>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return EndPointInfo::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
} // NS Jellyfin
|
||||
136
core/src/dto/externalidinfo.cpp
Normal file
136
core/src/dto/externalidinfo.cpp
Normal file
|
|
@ -0,0 +1,136 @@
|
|||
/*
|
||||
* Sailfin: a Jellyfin client written using Qt
|
||||
* Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
|
||||
* OVERWRITTEN AT SOME POINT!
|
||||
*
|
||||
* If there is a bug in this file, please fix the code generator used to generate this file found in
|
||||
* core/openapigenerator.d.
|
||||
*
|
||||
* This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
|
||||
* file with a newer file if needed instead of manually updating the files.
|
||||
*/
|
||||
|
||||
#include <JellyfinQt/dto/externalidinfo.h>
|
||||
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
ExternalIdInfo::ExternalIdInfo() {}
|
||||
|
||||
ExternalIdInfo::ExternalIdInfo(const ExternalIdInfo &other) :
|
||||
|
||||
m_name(other.m_name),
|
||||
m_key(other.m_key),
|
||||
m_type(other.m_type),
|
||||
m_urlFormatString(other.m_urlFormatString){}
|
||||
|
||||
|
||||
void ExternalIdInfo::replaceData(ExternalIdInfo &other) {
|
||||
m_name = other.m_name;
|
||||
m_key = other.m_key;
|
||||
m_type = other.m_type;
|
||||
m_urlFormatString = other.m_urlFormatString;
|
||||
}
|
||||
|
||||
ExternalIdInfo ExternalIdInfo::fromJson(QJsonObject source) {
|
||||
ExternalIdInfo instance;
|
||||
instance.setFromJson(source);
|
||||
return instance;
|
||||
}
|
||||
|
||||
|
||||
void ExternalIdInfo::setFromJson(QJsonObject source) {
|
||||
m_name = Jellyfin::Support::fromJsonValue<QString>(source["Name"]);
|
||||
m_key = Jellyfin::Support::fromJsonValue<QString>(source["Key"]);
|
||||
m_type = Jellyfin::Support::fromJsonValue<ExternalIdMediaType>(source["Type"]);
|
||||
m_urlFormatString = Jellyfin::Support::fromJsonValue<QString>(source["UrlFormatString"]);
|
||||
|
||||
}
|
||||
|
||||
QJsonObject ExternalIdInfo::toJson() {
|
||||
QJsonObject result;
|
||||
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
||||
result["Key"] = Jellyfin::Support::toJsonValue<QString>(m_key);
|
||||
result["Type"] = Jellyfin::Support::toJsonValue<ExternalIdMediaType>(m_type);
|
||||
result["UrlFormatString"] = Jellyfin::Support::toJsonValue<QString>(m_urlFormatString);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
QString ExternalIdInfo::name() const { return m_name; }
|
||||
|
||||
void ExternalIdInfo::setName(QString newName) {
|
||||
m_name = newName;
|
||||
}
|
||||
bool ExternalIdInfo::nameNull() const {
|
||||
return m_name.isNull();
|
||||
}
|
||||
|
||||
void ExternalIdInfo::setNameNull() {
|
||||
m_name.clear();
|
||||
|
||||
}
|
||||
QString ExternalIdInfo::key() const { return m_key; }
|
||||
|
||||
void ExternalIdInfo::setKey(QString newKey) {
|
||||
m_key = newKey;
|
||||
}
|
||||
bool ExternalIdInfo::keyNull() const {
|
||||
return m_key.isNull();
|
||||
}
|
||||
|
||||
void ExternalIdInfo::setKeyNull() {
|
||||
m_key.clear();
|
||||
|
||||
}
|
||||
ExternalIdMediaType ExternalIdInfo::type() const { return m_type; }
|
||||
|
||||
void ExternalIdInfo::setType(ExternalIdMediaType newType) {
|
||||
m_type = newType;
|
||||
}
|
||||
|
||||
QString ExternalIdInfo::urlFormatString() const { return m_urlFormatString; }
|
||||
|
||||
void ExternalIdInfo::setUrlFormatString(QString newUrlFormatString) {
|
||||
m_urlFormatString = newUrlFormatString;
|
||||
}
|
||||
bool ExternalIdInfo::urlFormatStringNull() const {
|
||||
return m_urlFormatString.isNull();
|
||||
}
|
||||
|
||||
void ExternalIdInfo::setUrlFormatStringNull() {
|
||||
m_urlFormatString.clear();
|
||||
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using ExternalIdInfo = Jellyfin::DTO::ExternalIdInfo;
|
||||
|
||||
template <>
|
||||
ExternalIdInfo fromJsonValue<ExternalIdInfo>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return ExternalIdInfo::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
} // NS Jellyfin
|
||||
90
core/src/dto/externalidmediatype.cpp
Normal file
90
core/src/dto/externalidmediatype.cpp
Normal file
|
|
@ -0,0 +1,90 @@
|
|||
/*
|
||||
* Sailfin: a Jellyfin client written using Qt
|
||||
* Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
|
||||
* OVERWRITTEN AT SOME POINT!
|
||||
*
|
||||
* If there is a bug in this file, please fix the code generator used to generate this file found in
|
||||
* core/openapigenerator.d.
|
||||
*
|
||||
* This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
|
||||
* file with a newer file if needed instead of manually updating the files.
|
||||
*/
|
||||
|
||||
#include <JellyfinQt/dto/externalidmediatype.h>
|
||||
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
ExternalIdMediaTypeClass::ExternalIdMediaTypeClass() {}
|
||||
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using ExternalIdMediaType = Jellyfin::DTO::ExternalIdMediaType;
|
||||
|
||||
template <>
|
||||
ExternalIdMediaType fromJsonValue<ExternalIdMediaType>(const QJsonValue &source) {
|
||||
if (!source.isString()) return ExternalIdMediaType::EnumNotSet;
|
||||
|
||||
QString str = source.toString();
|
||||
if (str == QStringLiteral("Album")) {
|
||||
return ExternalIdMediaType::Album;
|
||||
}
|
||||
if (str == QStringLiteral("AlbumArtist")) {
|
||||
return ExternalIdMediaType::AlbumArtist;
|
||||
}
|
||||
if (str == QStringLiteral("Artist")) {
|
||||
return ExternalIdMediaType::Artist;
|
||||
}
|
||||
if (str == QStringLiteral("BoxSet")) {
|
||||
return ExternalIdMediaType::BoxSet;
|
||||
}
|
||||
if (str == QStringLiteral("Episode")) {
|
||||
return ExternalIdMediaType::Episode;
|
||||
}
|
||||
if (str == QStringLiteral("Movie")) {
|
||||
return ExternalIdMediaType::Movie;
|
||||
}
|
||||
if (str == QStringLiteral("OtherArtist")) {
|
||||
return ExternalIdMediaType::OtherArtist;
|
||||
}
|
||||
if (str == QStringLiteral("Person")) {
|
||||
return ExternalIdMediaType::Person;
|
||||
}
|
||||
if (str == QStringLiteral("ReleaseGroup")) {
|
||||
return ExternalIdMediaType::ReleaseGroup;
|
||||
}
|
||||
if (str == QStringLiteral("Season")) {
|
||||
return ExternalIdMediaType::Season;
|
||||
}
|
||||
if (str == QStringLiteral("Series")) {
|
||||
return ExternalIdMediaType::Series;
|
||||
}
|
||||
if (str == QStringLiteral("Track")) {
|
||||
return ExternalIdMediaType::Track;
|
||||
}
|
||||
|
||||
return ExternalIdMediaType::EnumNotSet;
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
} // NS Jellyfin
|
||||
109
core/src/dto/externalurl.cpp
Normal file
109
core/src/dto/externalurl.cpp
Normal file
|
|
@ -0,0 +1,109 @@
|
|||
/*
|
||||
* Sailfin: a Jellyfin client written using Qt
|
||||
* Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
|
||||
* OVERWRITTEN AT SOME POINT!
|
||||
*
|
||||
* If there is a bug in this file, please fix the code generator used to generate this file found in
|
||||
* core/openapigenerator.d.
|
||||
*
|
||||
* This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
|
||||
* file with a newer file if needed instead of manually updating the files.
|
||||
*/
|
||||
|
||||
#include <JellyfinQt/dto/externalurl.h>
|
||||
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
ExternalUrl::ExternalUrl() {}
|
||||
|
||||
ExternalUrl::ExternalUrl(const ExternalUrl &other) :
|
||||
|
||||
m_name(other.m_name),
|
||||
m_url(other.m_url){}
|
||||
|
||||
|
||||
void ExternalUrl::replaceData(ExternalUrl &other) {
|
||||
m_name = other.m_name;
|
||||
m_url = other.m_url;
|
||||
}
|
||||
|
||||
ExternalUrl ExternalUrl::fromJson(QJsonObject source) {
|
||||
ExternalUrl instance;
|
||||
instance.setFromJson(source);
|
||||
return instance;
|
||||
}
|
||||
|
||||
|
||||
void ExternalUrl::setFromJson(QJsonObject source) {
|
||||
m_name = Jellyfin::Support::fromJsonValue<QString>(source["Name"]);
|
||||
m_url = Jellyfin::Support::fromJsonValue<QString>(source["Url"]);
|
||||
|
||||
}
|
||||
|
||||
QJsonObject ExternalUrl::toJson() {
|
||||
QJsonObject result;
|
||||
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
||||
result["Url"] = Jellyfin::Support::toJsonValue<QString>(m_url);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
QString ExternalUrl::name() const { return m_name; }
|
||||
|
||||
void ExternalUrl::setName(QString newName) {
|
||||
m_name = newName;
|
||||
}
|
||||
bool ExternalUrl::nameNull() const {
|
||||
return m_name.isNull();
|
||||
}
|
||||
|
||||
void ExternalUrl::setNameNull() {
|
||||
m_name.clear();
|
||||
|
||||
}
|
||||
QString ExternalUrl::url() const { return m_url; }
|
||||
|
||||
void ExternalUrl::setUrl(QString newUrl) {
|
||||
m_url = newUrl;
|
||||
}
|
||||
bool ExternalUrl::urlNull() const {
|
||||
return m_url.isNull();
|
||||
}
|
||||
|
||||
void ExternalUrl::setUrlNull() {
|
||||
m_url.clear();
|
||||
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using ExternalUrl = Jellyfin::DTO::ExternalUrl;
|
||||
|
||||
template <>
|
||||
ExternalUrl fromJsonValue<ExternalUrl>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return ExternalUrl::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
} // NS Jellyfin
|
||||
66
core/src/dto/ffmpeglocation.cpp
Normal file
66
core/src/dto/ffmpeglocation.cpp
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
/*
|
||||
* Sailfin: a Jellyfin client written using Qt
|
||||
* Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
|
||||
* OVERWRITTEN AT SOME POINT!
|
||||
*
|
||||
* If there is a bug in this file, please fix the code generator used to generate this file found in
|
||||
* core/openapigenerator.d.
|
||||
*
|
||||
* This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
|
||||
* file with a newer file if needed instead of manually updating the files.
|
||||
*/
|
||||
|
||||
#include <JellyfinQt/dto/ffmpeglocation.h>
|
||||
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
FFmpegLocationClass::FFmpegLocationClass() {}
|
||||
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using FFmpegLocation = Jellyfin::DTO::FFmpegLocation;
|
||||
|
||||
template <>
|
||||
FFmpegLocation fromJsonValue<FFmpegLocation>(const QJsonValue &source) {
|
||||
if (!source.isString()) return FFmpegLocation::EnumNotSet;
|
||||
|
||||
QString str = source.toString();
|
||||
if (str == QStringLiteral("NotFound")) {
|
||||
return FFmpegLocation::NotFound;
|
||||
}
|
||||
if (str == QStringLiteral("SetByArgument")) {
|
||||
return FFmpegLocation::SetByArgument;
|
||||
}
|
||||
if (str == QStringLiteral("Custom")) {
|
||||
return FFmpegLocation::Custom;
|
||||
}
|
||||
if (str == QStringLiteral("System")) {
|
||||
return FFmpegLocation::System;
|
||||
}
|
||||
|
||||
return FFmpegLocation::EnumNotSet;
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
} // NS Jellyfin
|
||||
119
core/src/dto/filesystementryinfo.cpp
Normal file
119
core/src/dto/filesystementryinfo.cpp
Normal file
|
|
@ -0,0 +1,119 @@
|
|||
/*
|
||||
* Sailfin: a Jellyfin client written using Qt
|
||||
* Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
|
||||
* OVERWRITTEN AT SOME POINT!
|
||||
*
|
||||
* If there is a bug in this file, please fix the code generator used to generate this file found in
|
||||
* core/openapigenerator.d.
|
||||
*
|
||||
* This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
|
||||
* file with a newer file if needed instead of manually updating the files.
|
||||
*/
|
||||
|
||||
#include <JellyfinQt/dto/filesystementryinfo.h>
|
||||
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
FileSystemEntryInfo::FileSystemEntryInfo() {}
|
||||
|
||||
FileSystemEntryInfo::FileSystemEntryInfo(const FileSystemEntryInfo &other) :
|
||||
|
||||
m_name(other.m_name),
|
||||
m_path(other.m_path),
|
||||
m_type(other.m_type){}
|
||||
|
||||
|
||||
void FileSystemEntryInfo::replaceData(FileSystemEntryInfo &other) {
|
||||
m_name = other.m_name;
|
||||
m_path = other.m_path;
|
||||
m_type = other.m_type;
|
||||
}
|
||||
|
||||
FileSystemEntryInfo FileSystemEntryInfo::fromJson(QJsonObject source) {
|
||||
FileSystemEntryInfo instance;
|
||||
instance.setFromJson(source);
|
||||
return instance;
|
||||
}
|
||||
|
||||
|
||||
void FileSystemEntryInfo::setFromJson(QJsonObject source) {
|
||||
m_name = Jellyfin::Support::fromJsonValue<QString>(source["Name"]);
|
||||
m_path = Jellyfin::Support::fromJsonValue<QString>(source["Path"]);
|
||||
m_type = Jellyfin::Support::fromJsonValue<FileSystemEntryType>(source["Type"]);
|
||||
|
||||
}
|
||||
|
||||
QJsonObject FileSystemEntryInfo::toJson() {
|
||||
QJsonObject result;
|
||||
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
||||
result["Path"] = Jellyfin::Support::toJsonValue<QString>(m_path);
|
||||
result["Type"] = Jellyfin::Support::toJsonValue<FileSystemEntryType>(m_type);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
QString FileSystemEntryInfo::name() const { return m_name; }
|
||||
|
||||
void FileSystemEntryInfo::setName(QString newName) {
|
||||
m_name = newName;
|
||||
}
|
||||
bool FileSystemEntryInfo::nameNull() const {
|
||||
return m_name.isNull();
|
||||
}
|
||||
|
||||
void FileSystemEntryInfo::setNameNull() {
|
||||
m_name.clear();
|
||||
|
||||
}
|
||||
QString FileSystemEntryInfo::path() const { return m_path; }
|
||||
|
||||
void FileSystemEntryInfo::setPath(QString newPath) {
|
||||
m_path = newPath;
|
||||
}
|
||||
bool FileSystemEntryInfo::pathNull() const {
|
||||
return m_path.isNull();
|
||||
}
|
||||
|
||||
void FileSystemEntryInfo::setPathNull() {
|
||||
m_path.clear();
|
||||
|
||||
}
|
||||
FileSystemEntryType FileSystemEntryInfo::type() const { return m_type; }
|
||||
|
||||
void FileSystemEntryInfo::setType(FileSystemEntryType newType) {
|
||||
m_type = newType;
|
||||
}
|
||||
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using FileSystemEntryInfo = Jellyfin::DTO::FileSystemEntryInfo;
|
||||
|
||||
template <>
|
||||
FileSystemEntryInfo fromJsonValue<FileSystemEntryInfo>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return FileSystemEntryInfo::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
} // NS Jellyfin
|
||||
66
core/src/dto/filesystementrytype.cpp
Normal file
66
core/src/dto/filesystementrytype.cpp
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
/*
|
||||
* Sailfin: a Jellyfin client written using Qt
|
||||
* Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
|
||||
* OVERWRITTEN AT SOME POINT!
|
||||
*
|
||||
* If there is a bug in this file, please fix the code generator used to generate this file found in
|
||||
* core/openapigenerator.d.
|
||||
*
|
||||
* This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
|
||||
* file with a newer file if needed instead of manually updating the files.
|
||||
*/
|
||||
|
||||
#include <JellyfinQt/dto/filesystementrytype.h>
|
||||
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
FileSystemEntryTypeClass::FileSystemEntryTypeClass() {}
|
||||
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using FileSystemEntryType = Jellyfin::DTO::FileSystemEntryType;
|
||||
|
||||
template <>
|
||||
FileSystemEntryType fromJsonValue<FileSystemEntryType>(const QJsonValue &source) {
|
||||
if (!source.isString()) return FileSystemEntryType::EnumNotSet;
|
||||
|
||||
QString str = source.toString();
|
||||
if (str == QStringLiteral("File")) {
|
||||
return FileSystemEntryType::File;
|
||||
}
|
||||
if (str == QStringLiteral("Directory")) {
|
||||
return FileSystemEntryType::Directory;
|
||||
}
|
||||
if (str == QStringLiteral("NetworkComputer")) {
|
||||
return FileSystemEntryType::NetworkComputer;
|
||||
}
|
||||
if (str == QStringLiteral("NetworkShare")) {
|
||||
return FileSystemEntryType::NetworkShare;
|
||||
}
|
||||
|
||||
return FileSystemEntryType::EnumNotSet;
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
} // NS Jellyfin
|
||||
122
core/src/dto/fontfile.cpp
Normal file
122
core/src/dto/fontfile.cpp
Normal file
|
|
@ -0,0 +1,122 @@
|
|||
/*
|
||||
* Sailfin: a Jellyfin client written using Qt
|
||||
* Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
|
||||
* OVERWRITTEN AT SOME POINT!
|
||||
*
|
||||
* If there is a bug in this file, please fix the code generator used to generate this file found in
|
||||
* core/openapigenerator.d.
|
||||
*
|
||||
* This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
|
||||
* file with a newer file if needed instead of manually updating the files.
|
||||
*/
|
||||
|
||||
#include <JellyfinQt/dto/fontfile.h>
|
||||
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
FontFile::FontFile() {}
|
||||
|
||||
FontFile::FontFile(const FontFile &other) :
|
||||
|
||||
m_name(other.m_name),
|
||||
m_size(other.m_size),
|
||||
m_dateCreated(other.m_dateCreated),
|
||||
m_dateModified(other.m_dateModified){}
|
||||
|
||||
|
||||
void FontFile::replaceData(FontFile &other) {
|
||||
m_name = other.m_name;
|
||||
m_size = other.m_size;
|
||||
m_dateCreated = other.m_dateCreated;
|
||||
m_dateModified = other.m_dateModified;
|
||||
}
|
||||
|
||||
FontFile FontFile::fromJson(QJsonObject source) {
|
||||
FontFile instance;
|
||||
instance.setFromJson(source);
|
||||
return instance;
|
||||
}
|
||||
|
||||
|
||||
void FontFile::setFromJson(QJsonObject source) {
|
||||
m_name = Jellyfin::Support::fromJsonValue<QString>(source["Name"]);
|
||||
m_size = Jellyfin::Support::fromJsonValue<qint64>(source["Size"]);
|
||||
m_dateCreated = Jellyfin::Support::fromJsonValue<QDateTime>(source["DateCreated"]);
|
||||
m_dateModified = Jellyfin::Support::fromJsonValue<QDateTime>(source["DateModified"]);
|
||||
|
||||
}
|
||||
|
||||
QJsonObject FontFile::toJson() {
|
||||
QJsonObject result;
|
||||
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
||||
result["Size"] = Jellyfin::Support::toJsonValue<qint64>(m_size);
|
||||
result["DateCreated"] = Jellyfin::Support::toJsonValue<QDateTime>(m_dateCreated);
|
||||
result["DateModified"] = Jellyfin::Support::toJsonValue<QDateTime>(m_dateModified);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
QString FontFile::name() const { return m_name; }
|
||||
|
||||
void FontFile::setName(QString newName) {
|
||||
m_name = newName;
|
||||
}
|
||||
bool FontFile::nameNull() const {
|
||||
return m_name.isNull();
|
||||
}
|
||||
|
||||
void FontFile::setNameNull() {
|
||||
m_name.clear();
|
||||
|
||||
}
|
||||
qint64 FontFile::size() const { return m_size; }
|
||||
|
||||
void FontFile::setSize(qint64 newSize) {
|
||||
m_size = newSize;
|
||||
}
|
||||
|
||||
QDateTime FontFile::dateCreated() const { return m_dateCreated; }
|
||||
|
||||
void FontFile::setDateCreated(QDateTime newDateCreated) {
|
||||
m_dateCreated = newDateCreated;
|
||||
}
|
||||
|
||||
QDateTime FontFile::dateModified() const { return m_dateModified; }
|
||||
|
||||
void FontFile::setDateModified(QDateTime newDateModified) {
|
||||
m_dateModified = newDateModified;
|
||||
}
|
||||
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using FontFile = Jellyfin::DTO::FontFile;
|
||||
|
||||
template <>
|
||||
FontFile fromJsonValue<FontFile>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return FontFile::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
} // NS Jellyfin
|
||||
63
core/src/dto/forgotpasswordaction.cpp
Normal file
63
core/src/dto/forgotpasswordaction.cpp
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
/*
|
||||
* Sailfin: a Jellyfin client written using Qt
|
||||
* Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
|
||||
* OVERWRITTEN AT SOME POINT!
|
||||
*
|
||||
* If there is a bug in this file, please fix the code generator used to generate this file found in
|
||||
* core/openapigenerator.d.
|
||||
*
|
||||
* This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
|
||||
* file with a newer file if needed instead of manually updating the files.
|
||||
*/
|
||||
|
||||
#include <JellyfinQt/dto/forgotpasswordaction.h>
|
||||
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
ForgotPasswordActionClass::ForgotPasswordActionClass() {}
|
||||
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using ForgotPasswordAction = Jellyfin::DTO::ForgotPasswordAction;
|
||||
|
||||
template <>
|
||||
ForgotPasswordAction fromJsonValue<ForgotPasswordAction>(const QJsonValue &source) {
|
||||
if (!source.isString()) return ForgotPasswordAction::EnumNotSet;
|
||||
|
||||
QString str = source.toString();
|
||||
if (str == QStringLiteral("ContactAdmin")) {
|
||||
return ForgotPasswordAction::ContactAdmin;
|
||||
}
|
||||
if (str == QStringLiteral("PinCode")) {
|
||||
return ForgotPasswordAction::PinCode;
|
||||
}
|
||||
if (str == QStringLiteral("InNetworkRequired")) {
|
||||
return ForgotPasswordAction::InNetworkRequired;
|
||||
}
|
||||
|
||||
return ForgotPasswordAction::EnumNotSet;
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
} // NS Jellyfin
|
||||
85
core/src/dto/forgotpassworddto.cpp
Normal file
85
core/src/dto/forgotpassworddto.cpp
Normal file
|
|
@ -0,0 +1,85 @@
|
|||
/*
|
||||
* Sailfin: a Jellyfin client written using Qt
|
||||
* Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
|
||||
* OVERWRITTEN AT SOME POINT!
|
||||
*
|
||||
* If there is a bug in this file, please fix the code generator used to generate this file found in
|
||||
* core/openapigenerator.d.
|
||||
*
|
||||
* This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
|
||||
* file with a newer file if needed instead of manually updating the files.
|
||||
*/
|
||||
|
||||
#include <JellyfinQt/dto/forgotpassworddto.h>
|
||||
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
ForgotPasswordDto::ForgotPasswordDto() {}
|
||||
|
||||
ForgotPasswordDto::ForgotPasswordDto(const ForgotPasswordDto &other) :
|
||||
|
||||
m_enteredUsername(other.m_enteredUsername){}
|
||||
|
||||
|
||||
void ForgotPasswordDto::replaceData(ForgotPasswordDto &other) {
|
||||
m_enteredUsername = other.m_enteredUsername;
|
||||
}
|
||||
|
||||
ForgotPasswordDto ForgotPasswordDto::fromJson(QJsonObject source) {
|
||||
ForgotPasswordDto instance;
|
||||
instance.setFromJson(source);
|
||||
return instance;
|
||||
}
|
||||
|
||||
|
||||
void ForgotPasswordDto::setFromJson(QJsonObject source) {
|
||||
m_enteredUsername = Jellyfin::Support::fromJsonValue<QString>(source["EnteredUsername"]);
|
||||
|
||||
}
|
||||
|
||||
QJsonObject ForgotPasswordDto::toJson() {
|
||||
QJsonObject result;
|
||||
result["EnteredUsername"] = Jellyfin::Support::toJsonValue<QString>(m_enteredUsername);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
QString ForgotPasswordDto::enteredUsername() const { return m_enteredUsername; }
|
||||
|
||||
void ForgotPasswordDto::setEnteredUsername(QString newEnteredUsername) {
|
||||
m_enteredUsername = newEnteredUsername;
|
||||
}
|
||||
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using ForgotPasswordDto = Jellyfin::DTO::ForgotPasswordDto;
|
||||
|
||||
template <>
|
||||
ForgotPasswordDto fromJsonValue<ForgotPasswordDto>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return ForgotPasswordDto::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
} // NS Jellyfin
|
||||
119
core/src/dto/forgotpasswordresult.cpp
Normal file
119
core/src/dto/forgotpasswordresult.cpp
Normal file
|
|
@ -0,0 +1,119 @@
|
|||
/*
|
||||
* Sailfin: a Jellyfin client written using Qt
|
||||
* Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
|
||||
* OVERWRITTEN AT SOME POINT!
|
||||
*
|
||||
* If there is a bug in this file, please fix the code generator used to generate this file found in
|
||||
* core/openapigenerator.d.
|
||||
*
|
||||
* This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
|
||||
* file with a newer file if needed instead of manually updating the files.
|
||||
*/
|
||||
|
||||
#include <JellyfinQt/dto/forgotpasswordresult.h>
|
||||
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
ForgotPasswordResult::ForgotPasswordResult() {}
|
||||
|
||||
ForgotPasswordResult::ForgotPasswordResult(const ForgotPasswordResult &other) :
|
||||
|
||||
m_action(other.m_action),
|
||||
m_pinFile(other.m_pinFile),
|
||||
m_pinExpirationDate(other.m_pinExpirationDate){}
|
||||
|
||||
|
||||
void ForgotPasswordResult::replaceData(ForgotPasswordResult &other) {
|
||||
m_action = other.m_action;
|
||||
m_pinFile = other.m_pinFile;
|
||||
m_pinExpirationDate = other.m_pinExpirationDate;
|
||||
}
|
||||
|
||||
ForgotPasswordResult ForgotPasswordResult::fromJson(QJsonObject source) {
|
||||
ForgotPasswordResult instance;
|
||||
instance.setFromJson(source);
|
||||
return instance;
|
||||
}
|
||||
|
||||
|
||||
void ForgotPasswordResult::setFromJson(QJsonObject source) {
|
||||
m_action = Jellyfin::Support::fromJsonValue<ForgotPasswordAction>(source["Action"]);
|
||||
m_pinFile = Jellyfin::Support::fromJsonValue<QString>(source["PinFile"]);
|
||||
m_pinExpirationDate = Jellyfin::Support::fromJsonValue<QDateTime>(source["PinExpirationDate"]);
|
||||
|
||||
}
|
||||
|
||||
QJsonObject ForgotPasswordResult::toJson() {
|
||||
QJsonObject result;
|
||||
result["Action"] = Jellyfin::Support::toJsonValue<ForgotPasswordAction>(m_action);
|
||||
result["PinFile"] = Jellyfin::Support::toJsonValue<QString>(m_pinFile);
|
||||
result["PinExpirationDate"] = Jellyfin::Support::toJsonValue<QDateTime>(m_pinExpirationDate);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
ForgotPasswordAction ForgotPasswordResult::action() const { return m_action; }
|
||||
|
||||
void ForgotPasswordResult::setAction(ForgotPasswordAction newAction) {
|
||||
m_action = newAction;
|
||||
}
|
||||
|
||||
QString ForgotPasswordResult::pinFile() const { return m_pinFile; }
|
||||
|
||||
void ForgotPasswordResult::setPinFile(QString newPinFile) {
|
||||
m_pinFile = newPinFile;
|
||||
}
|
||||
bool ForgotPasswordResult::pinFileNull() const {
|
||||
return m_pinFile.isNull();
|
||||
}
|
||||
|
||||
void ForgotPasswordResult::setPinFileNull() {
|
||||
m_pinFile.clear();
|
||||
|
||||
}
|
||||
QDateTime ForgotPasswordResult::pinExpirationDate() const { return m_pinExpirationDate; }
|
||||
|
||||
void ForgotPasswordResult::setPinExpirationDate(QDateTime newPinExpirationDate) {
|
||||
m_pinExpirationDate = newPinExpirationDate;
|
||||
}
|
||||
bool ForgotPasswordResult::pinExpirationDateNull() const {
|
||||
return m_pinExpirationDate.isNull();
|
||||
}
|
||||
|
||||
void ForgotPasswordResult::setPinExpirationDateNull() {
|
||||
m_pinExpirationDate= QDateTime();
|
||||
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using ForgotPasswordResult = Jellyfin::DTO::ForgotPasswordResult;
|
||||
|
||||
template <>
|
||||
ForgotPasswordResult fromJsonValue<ForgotPasswordResult>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return ForgotPasswordResult::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
} // NS Jellyfin
|
||||
112
core/src/dto/generalcommand.cpp
Normal file
112
core/src/dto/generalcommand.cpp
Normal file
|
|
@ -0,0 +1,112 @@
|
|||
/*
|
||||
* Sailfin: a Jellyfin client written using Qt
|
||||
* Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
|
||||
* OVERWRITTEN AT SOME POINT!
|
||||
*
|
||||
* If there is a bug in this file, please fix the code generator used to generate this file found in
|
||||
* core/openapigenerator.d.
|
||||
*
|
||||
* This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
|
||||
* file with a newer file if needed instead of manually updating the files.
|
||||
*/
|
||||
|
||||
#include <JellyfinQt/dto/generalcommand.h>
|
||||
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
GeneralCommand::GeneralCommand() {}
|
||||
|
||||
GeneralCommand::GeneralCommand(const GeneralCommand &other) :
|
||||
|
||||
m_name(other.m_name),
|
||||
m_controllingUserId(other.m_controllingUserId),
|
||||
m_arguments(other.m_arguments){}
|
||||
|
||||
|
||||
void GeneralCommand::replaceData(GeneralCommand &other) {
|
||||
m_name = other.m_name;
|
||||
m_controllingUserId = other.m_controllingUserId;
|
||||
m_arguments = other.m_arguments;
|
||||
}
|
||||
|
||||
GeneralCommand GeneralCommand::fromJson(QJsonObject source) {
|
||||
GeneralCommand instance;
|
||||
instance.setFromJson(source);
|
||||
return instance;
|
||||
}
|
||||
|
||||
|
||||
void GeneralCommand::setFromJson(QJsonObject source) {
|
||||
m_name = Jellyfin::Support::fromJsonValue<GeneralCommandType>(source["Name"]);
|
||||
m_controllingUserId = Jellyfin::Support::fromJsonValue<QString>(source["ControllingUserId"]);
|
||||
m_arguments = Jellyfin::Support::fromJsonValue<std::optional<QJsonObject>>(source["Arguments"]);
|
||||
|
||||
}
|
||||
|
||||
QJsonObject GeneralCommand::toJson() {
|
||||
QJsonObject result;
|
||||
result["Name"] = Jellyfin::Support::toJsonValue<GeneralCommandType>(m_name);
|
||||
result["ControllingUserId"] = Jellyfin::Support::toJsonValue<QString>(m_controllingUserId);
|
||||
result["Arguments"] = Jellyfin::Support::toJsonValue<std::optional<QJsonObject>>(m_arguments);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
GeneralCommandType GeneralCommand::name() const { return m_name; }
|
||||
|
||||
void GeneralCommand::setName(GeneralCommandType newName) {
|
||||
m_name = newName;
|
||||
}
|
||||
|
||||
QString GeneralCommand::controllingUserId() const { return m_controllingUserId; }
|
||||
|
||||
void GeneralCommand::setControllingUserId(QString newControllingUserId) {
|
||||
m_controllingUserId = newControllingUserId;
|
||||
}
|
||||
|
||||
std::optional<QJsonObject> GeneralCommand::arguments() const { return m_arguments; }
|
||||
|
||||
void GeneralCommand::setArguments(std::optional<QJsonObject> newArguments) {
|
||||
m_arguments = newArguments;
|
||||
}
|
||||
bool GeneralCommand::argumentsNull() const {
|
||||
return !m_arguments.has_value();
|
||||
}
|
||||
|
||||
void GeneralCommand::setArgumentsNull() {
|
||||
m_arguments = std::nullopt;
|
||||
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using GeneralCommand = Jellyfin::DTO::GeneralCommand;
|
||||
|
||||
template <>
|
||||
GeneralCommand fromJsonValue<GeneralCommand>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return GeneralCommand::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
} // NS Jellyfin
|
||||
177
core/src/dto/generalcommandtype.cpp
Normal file
177
core/src/dto/generalcommandtype.cpp
Normal file
|
|
@ -0,0 +1,177 @@
|
|||
/*
|
||||
* Sailfin: a Jellyfin client written using Qt
|
||||
* Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
|
||||
* OVERWRITTEN AT SOME POINT!
|
||||
*
|
||||
* If there is a bug in this file, please fix the code generator used to generate this file found in
|
||||
* core/openapigenerator.d.
|
||||
*
|
||||
* This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
|
||||
* file with a newer file if needed instead of manually updating the files.
|
||||
*/
|
||||
|
||||
#include <JellyfinQt/dto/generalcommandtype.h>
|
||||
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
GeneralCommandTypeClass::GeneralCommandTypeClass() {}
|
||||
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using GeneralCommandType = Jellyfin::DTO::GeneralCommandType;
|
||||
|
||||
template <>
|
||||
GeneralCommandType fromJsonValue<GeneralCommandType>(const QJsonValue &source) {
|
||||
if (!source.isString()) return GeneralCommandType::EnumNotSet;
|
||||
|
||||
QString str = source.toString();
|
||||
if (str == QStringLiteral("MoveUp")) {
|
||||
return GeneralCommandType::MoveUp;
|
||||
}
|
||||
if (str == QStringLiteral("MoveDown")) {
|
||||
return GeneralCommandType::MoveDown;
|
||||
}
|
||||
if (str == QStringLiteral("MoveLeft")) {
|
||||
return GeneralCommandType::MoveLeft;
|
||||
}
|
||||
if (str == QStringLiteral("MoveRight")) {
|
||||
return GeneralCommandType::MoveRight;
|
||||
}
|
||||
if (str == QStringLiteral("PageUp")) {
|
||||
return GeneralCommandType::PageUp;
|
||||
}
|
||||
if (str == QStringLiteral("PageDown")) {
|
||||
return GeneralCommandType::PageDown;
|
||||
}
|
||||
if (str == QStringLiteral("PreviousLetter")) {
|
||||
return GeneralCommandType::PreviousLetter;
|
||||
}
|
||||
if (str == QStringLiteral("NextLetter")) {
|
||||
return GeneralCommandType::NextLetter;
|
||||
}
|
||||
if (str == QStringLiteral("ToggleOsd")) {
|
||||
return GeneralCommandType::ToggleOsd;
|
||||
}
|
||||
if (str == QStringLiteral("ToggleContextMenu")) {
|
||||
return GeneralCommandType::ToggleContextMenu;
|
||||
}
|
||||
if (str == QStringLiteral("Select")) {
|
||||
return GeneralCommandType::Select;
|
||||
}
|
||||
if (str == QStringLiteral("Back")) {
|
||||
return GeneralCommandType::Back;
|
||||
}
|
||||
if (str == QStringLiteral("TakeScreenshot")) {
|
||||
return GeneralCommandType::TakeScreenshot;
|
||||
}
|
||||
if (str == QStringLiteral("SendKey")) {
|
||||
return GeneralCommandType::SendKey;
|
||||
}
|
||||
if (str == QStringLiteral("SendString")) {
|
||||
return GeneralCommandType::SendString;
|
||||
}
|
||||
if (str == QStringLiteral("GoHome")) {
|
||||
return GeneralCommandType::GoHome;
|
||||
}
|
||||
if (str == QStringLiteral("GoToSettings")) {
|
||||
return GeneralCommandType::GoToSettings;
|
||||
}
|
||||
if (str == QStringLiteral("VolumeUp")) {
|
||||
return GeneralCommandType::VolumeUp;
|
||||
}
|
||||
if (str == QStringLiteral("VolumeDown")) {
|
||||
return GeneralCommandType::VolumeDown;
|
||||
}
|
||||
if (str == QStringLiteral("Mute")) {
|
||||
return GeneralCommandType::Mute;
|
||||
}
|
||||
if (str == QStringLiteral("Unmute")) {
|
||||
return GeneralCommandType::Unmute;
|
||||
}
|
||||
if (str == QStringLiteral("ToggleMute")) {
|
||||
return GeneralCommandType::ToggleMute;
|
||||
}
|
||||
if (str == QStringLiteral("SetVolume")) {
|
||||
return GeneralCommandType::SetVolume;
|
||||
}
|
||||
if (str == QStringLiteral("SetAudioStreamIndex")) {
|
||||
return GeneralCommandType::SetAudioStreamIndex;
|
||||
}
|
||||
if (str == QStringLiteral("SetSubtitleStreamIndex")) {
|
||||
return GeneralCommandType::SetSubtitleStreamIndex;
|
||||
}
|
||||
if (str == QStringLiteral("ToggleFullscreen")) {
|
||||
return GeneralCommandType::ToggleFullscreen;
|
||||
}
|
||||
if (str == QStringLiteral("DisplayContent")) {
|
||||
return GeneralCommandType::DisplayContent;
|
||||
}
|
||||
if (str == QStringLiteral("GoToSearch")) {
|
||||
return GeneralCommandType::GoToSearch;
|
||||
}
|
||||
if (str == QStringLiteral("DisplayMessage")) {
|
||||
return GeneralCommandType::DisplayMessage;
|
||||
}
|
||||
if (str == QStringLiteral("SetRepeatMode")) {
|
||||
return GeneralCommandType::SetRepeatMode;
|
||||
}
|
||||
if (str == QStringLiteral("ChannelUp")) {
|
||||
return GeneralCommandType::ChannelUp;
|
||||
}
|
||||
if (str == QStringLiteral("ChannelDown")) {
|
||||
return GeneralCommandType::ChannelDown;
|
||||
}
|
||||
if (str == QStringLiteral("Guide")) {
|
||||
return GeneralCommandType::Guide;
|
||||
}
|
||||
if (str == QStringLiteral("ToggleStats")) {
|
||||
return GeneralCommandType::ToggleStats;
|
||||
}
|
||||
if (str == QStringLiteral("PlayMediaSource")) {
|
||||
return GeneralCommandType::PlayMediaSource;
|
||||
}
|
||||
if (str == QStringLiteral("PlayTrailers")) {
|
||||
return GeneralCommandType::PlayTrailers;
|
||||
}
|
||||
if (str == QStringLiteral("SetShuffleQueue")) {
|
||||
return GeneralCommandType::SetShuffleQueue;
|
||||
}
|
||||
if (str == QStringLiteral("PlayState")) {
|
||||
return GeneralCommandType::PlayState;
|
||||
}
|
||||
if (str == QStringLiteral("PlayNext")) {
|
||||
return GeneralCommandType::PlayNext;
|
||||
}
|
||||
if (str == QStringLiteral("ToggleOsdMenu")) {
|
||||
return GeneralCommandType::ToggleOsdMenu;
|
||||
}
|
||||
if (str == QStringLiteral("Play")) {
|
||||
return GeneralCommandType::Play;
|
||||
}
|
||||
|
||||
return GeneralCommandType::EnumNotSet;
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
} // NS Jellyfin
|
||||
513
core/src/dto/getprogramsdto.cpp
Normal file
513
core/src/dto/getprogramsdto.cpp
Normal file
|
|
@ -0,0 +1,513 @@
|
|||
/*
|
||||
* Sailfin: a Jellyfin client written using Qt
|
||||
* Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
|
||||
* OVERWRITTEN AT SOME POINT!
|
||||
*
|
||||
* If there is a bug in this file, please fix the code generator used to generate this file found in
|
||||
* core/openapigenerator.d.
|
||||
*
|
||||
* This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
|
||||
* file with a newer file if needed instead of manually updating the files.
|
||||
*/
|
||||
|
||||
#include <JellyfinQt/dto/getprogramsdto.h>
|
||||
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
GetProgramsDto::GetProgramsDto() {}
|
||||
|
||||
GetProgramsDto::GetProgramsDto(const GetProgramsDto &other) :
|
||||
|
||||
m_channelIds(other.m_channelIds),
|
||||
m_userId(other.m_userId),
|
||||
m_minStartDate(other.m_minStartDate),
|
||||
m_hasAired(other.m_hasAired),
|
||||
m_isAiring(other.m_isAiring),
|
||||
m_maxStartDate(other.m_maxStartDate),
|
||||
m_minEndDate(other.m_minEndDate),
|
||||
m_maxEndDate(other.m_maxEndDate),
|
||||
m_isMovie(other.m_isMovie),
|
||||
m_isSeries(other.m_isSeries),
|
||||
m_isNews(other.m_isNews),
|
||||
m_isKids(other.m_isKids),
|
||||
m_isSports(other.m_isSports),
|
||||
m_startIndex(other.m_startIndex),
|
||||
m_limit(other.m_limit),
|
||||
m_sortBy(other.m_sortBy),
|
||||
m_sortOrder(other.m_sortOrder),
|
||||
m_genres(other.m_genres),
|
||||
m_genreIds(other.m_genreIds),
|
||||
m_enableImages(other.m_enableImages),
|
||||
m_enableTotalRecordCount(other.m_enableTotalRecordCount),
|
||||
m_imageTypeLimit(other.m_imageTypeLimit),
|
||||
m_enableImageTypes(other.m_enableImageTypes),
|
||||
m_enableUserData(other.m_enableUserData),
|
||||
m_seriesTimerId(other.m_seriesTimerId),
|
||||
m_librarySeriesId(other.m_librarySeriesId),
|
||||
m_fields(other.m_fields){}
|
||||
|
||||
|
||||
void GetProgramsDto::replaceData(GetProgramsDto &other) {
|
||||
m_channelIds = other.m_channelIds;
|
||||
m_userId = other.m_userId;
|
||||
m_minStartDate = other.m_minStartDate;
|
||||
m_hasAired = other.m_hasAired;
|
||||
m_isAiring = other.m_isAiring;
|
||||
m_maxStartDate = other.m_maxStartDate;
|
||||
m_minEndDate = other.m_minEndDate;
|
||||
m_maxEndDate = other.m_maxEndDate;
|
||||
m_isMovie = other.m_isMovie;
|
||||
m_isSeries = other.m_isSeries;
|
||||
m_isNews = other.m_isNews;
|
||||
m_isKids = other.m_isKids;
|
||||
m_isSports = other.m_isSports;
|
||||
m_startIndex = other.m_startIndex;
|
||||
m_limit = other.m_limit;
|
||||
m_sortBy = other.m_sortBy;
|
||||
m_sortOrder = other.m_sortOrder;
|
||||
m_genres = other.m_genres;
|
||||
m_genreIds = other.m_genreIds;
|
||||
m_enableImages = other.m_enableImages;
|
||||
m_enableTotalRecordCount = other.m_enableTotalRecordCount;
|
||||
m_imageTypeLimit = other.m_imageTypeLimit;
|
||||
m_enableImageTypes = other.m_enableImageTypes;
|
||||
m_enableUserData = other.m_enableUserData;
|
||||
m_seriesTimerId = other.m_seriesTimerId;
|
||||
m_librarySeriesId = other.m_librarySeriesId;
|
||||
m_fields = other.m_fields;
|
||||
}
|
||||
|
||||
GetProgramsDto GetProgramsDto::fromJson(QJsonObject source) {
|
||||
GetProgramsDto instance;
|
||||
instance.setFromJson(source);
|
||||
return instance;
|
||||
}
|
||||
|
||||
|
||||
void GetProgramsDto::setFromJson(QJsonObject source) {
|
||||
m_channelIds = Jellyfin::Support::fromJsonValue<QStringList>(source["ChannelIds"]);
|
||||
m_userId = Jellyfin::Support::fromJsonValue<QString>(source["UserId"]);
|
||||
m_minStartDate = Jellyfin::Support::fromJsonValue<QDateTime>(source["MinStartDate"]);
|
||||
m_hasAired = Jellyfin::Support::fromJsonValue<std::optional<bool>>(source["HasAired"]);
|
||||
m_isAiring = Jellyfin::Support::fromJsonValue<std::optional<bool>>(source["IsAiring"]);
|
||||
m_maxStartDate = Jellyfin::Support::fromJsonValue<QDateTime>(source["MaxStartDate"]);
|
||||
m_minEndDate = Jellyfin::Support::fromJsonValue<QDateTime>(source["MinEndDate"]);
|
||||
m_maxEndDate = Jellyfin::Support::fromJsonValue<QDateTime>(source["MaxEndDate"]);
|
||||
m_isMovie = Jellyfin::Support::fromJsonValue<std::optional<bool>>(source["IsMovie"]);
|
||||
m_isSeries = Jellyfin::Support::fromJsonValue<std::optional<bool>>(source["IsSeries"]);
|
||||
m_isNews = Jellyfin::Support::fromJsonValue<std::optional<bool>>(source["IsNews"]);
|
||||
m_isKids = Jellyfin::Support::fromJsonValue<std::optional<bool>>(source["IsKids"]);
|
||||
m_isSports = Jellyfin::Support::fromJsonValue<std::optional<bool>>(source["IsSports"]);
|
||||
m_startIndex = Jellyfin::Support::fromJsonValue<std::optional<qint32>>(source["StartIndex"]);
|
||||
m_limit = Jellyfin::Support::fromJsonValue<std::optional<qint32>>(source["Limit"]);
|
||||
m_sortBy = Jellyfin::Support::fromJsonValue<QString>(source["SortBy"]);
|
||||
m_sortOrder = Jellyfin::Support::fromJsonValue<QString>(source["SortOrder"]);
|
||||
m_genres = Jellyfin::Support::fromJsonValue<QStringList>(source["Genres"]);
|
||||
m_genreIds = Jellyfin::Support::fromJsonValue<QStringList>(source["GenreIds"]);
|
||||
m_enableImages = Jellyfin::Support::fromJsonValue<std::optional<bool>>(source["EnableImages"]);
|
||||
m_enableTotalRecordCount = Jellyfin::Support::fromJsonValue<bool>(source["EnableTotalRecordCount"]);
|
||||
m_imageTypeLimit = Jellyfin::Support::fromJsonValue<std::optional<qint32>>(source["ImageTypeLimit"]);
|
||||
m_enableImageTypes = Jellyfin::Support::fromJsonValue<QList<ImageType>>(source["EnableImageTypes"]);
|
||||
m_enableUserData = Jellyfin::Support::fromJsonValue<std::optional<bool>>(source["EnableUserData"]);
|
||||
m_seriesTimerId = Jellyfin::Support::fromJsonValue<QString>(source["SeriesTimerId"]);
|
||||
m_librarySeriesId = Jellyfin::Support::fromJsonValue<QString>(source["LibrarySeriesId"]);
|
||||
m_fields = Jellyfin::Support::fromJsonValue<QList<ItemFields>>(source["Fields"]);
|
||||
|
||||
}
|
||||
|
||||
QJsonObject GetProgramsDto::toJson() {
|
||||
QJsonObject result;
|
||||
result["ChannelIds"] = Jellyfin::Support::toJsonValue<QStringList>(m_channelIds);
|
||||
result["UserId"] = Jellyfin::Support::toJsonValue<QString>(m_userId);
|
||||
result["MinStartDate"] = Jellyfin::Support::toJsonValue<QDateTime>(m_minStartDate);
|
||||
result["HasAired"] = Jellyfin::Support::toJsonValue<std::optional<bool>>(m_hasAired);
|
||||
result["IsAiring"] = Jellyfin::Support::toJsonValue<std::optional<bool>>(m_isAiring);
|
||||
result["MaxStartDate"] = Jellyfin::Support::toJsonValue<QDateTime>(m_maxStartDate);
|
||||
result["MinEndDate"] = Jellyfin::Support::toJsonValue<QDateTime>(m_minEndDate);
|
||||
result["MaxEndDate"] = Jellyfin::Support::toJsonValue<QDateTime>(m_maxEndDate);
|
||||
result["IsMovie"] = Jellyfin::Support::toJsonValue<std::optional<bool>>(m_isMovie);
|
||||
result["IsSeries"] = Jellyfin::Support::toJsonValue<std::optional<bool>>(m_isSeries);
|
||||
result["IsNews"] = Jellyfin::Support::toJsonValue<std::optional<bool>>(m_isNews);
|
||||
result["IsKids"] = Jellyfin::Support::toJsonValue<std::optional<bool>>(m_isKids);
|
||||
result["IsSports"] = Jellyfin::Support::toJsonValue<std::optional<bool>>(m_isSports);
|
||||
result["StartIndex"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_startIndex);
|
||||
result["Limit"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_limit);
|
||||
result["SortBy"] = Jellyfin::Support::toJsonValue<QString>(m_sortBy);
|
||||
result["SortOrder"] = Jellyfin::Support::toJsonValue<QString>(m_sortOrder);
|
||||
result["Genres"] = Jellyfin::Support::toJsonValue<QStringList>(m_genres);
|
||||
result["GenreIds"] = Jellyfin::Support::toJsonValue<QStringList>(m_genreIds);
|
||||
result["EnableImages"] = Jellyfin::Support::toJsonValue<std::optional<bool>>(m_enableImages);
|
||||
result["EnableTotalRecordCount"] = Jellyfin::Support::toJsonValue<bool>(m_enableTotalRecordCount);
|
||||
result["ImageTypeLimit"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_imageTypeLimit);
|
||||
result["EnableImageTypes"] = Jellyfin::Support::toJsonValue<QList<ImageType>>(m_enableImageTypes);
|
||||
result["EnableUserData"] = Jellyfin::Support::toJsonValue<std::optional<bool>>(m_enableUserData);
|
||||
result["SeriesTimerId"] = Jellyfin::Support::toJsonValue<QString>(m_seriesTimerId);
|
||||
result["LibrarySeriesId"] = Jellyfin::Support::toJsonValue<QString>(m_librarySeriesId);
|
||||
result["Fields"] = Jellyfin::Support::toJsonValue<QList<ItemFields>>(m_fields);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
QStringList GetProgramsDto::channelIds() const { return m_channelIds; }
|
||||
|
||||
void GetProgramsDto::setChannelIds(QStringList newChannelIds) {
|
||||
m_channelIds = newChannelIds;
|
||||
}
|
||||
bool GetProgramsDto::channelIdsNull() const {
|
||||
return m_channelIds.size() == 0;
|
||||
}
|
||||
|
||||
void GetProgramsDto::setChannelIdsNull() {
|
||||
m_channelIds.clear();
|
||||
|
||||
}
|
||||
QString GetProgramsDto::userId() const { return m_userId; }
|
||||
|
||||
void GetProgramsDto::setUserId(QString newUserId) {
|
||||
m_userId = newUserId;
|
||||
}
|
||||
|
||||
QDateTime GetProgramsDto::minStartDate() const { return m_minStartDate; }
|
||||
|
||||
void GetProgramsDto::setMinStartDate(QDateTime newMinStartDate) {
|
||||
m_minStartDate = newMinStartDate;
|
||||
}
|
||||
bool GetProgramsDto::minStartDateNull() const {
|
||||
return m_minStartDate.isNull();
|
||||
}
|
||||
|
||||
void GetProgramsDto::setMinStartDateNull() {
|
||||
m_minStartDate= QDateTime();
|
||||
|
||||
}
|
||||
std::optional<bool> GetProgramsDto::hasAired() const { return m_hasAired; }
|
||||
|
||||
void GetProgramsDto::setHasAired(std::optional<bool> newHasAired) {
|
||||
m_hasAired = newHasAired;
|
||||
}
|
||||
bool GetProgramsDto::hasAiredNull() const {
|
||||
return !m_hasAired.has_value();
|
||||
}
|
||||
|
||||
void GetProgramsDto::setHasAiredNull() {
|
||||
m_hasAired = std::nullopt;
|
||||
|
||||
}
|
||||
std::optional<bool> GetProgramsDto::isAiring() const { return m_isAiring; }
|
||||
|
||||
void GetProgramsDto::setIsAiring(std::optional<bool> newIsAiring) {
|
||||
m_isAiring = newIsAiring;
|
||||
}
|
||||
bool GetProgramsDto::isAiringNull() const {
|
||||
return !m_isAiring.has_value();
|
||||
}
|
||||
|
||||
void GetProgramsDto::setIsAiringNull() {
|
||||
m_isAiring = std::nullopt;
|
||||
|
||||
}
|
||||
QDateTime GetProgramsDto::maxStartDate() const { return m_maxStartDate; }
|
||||
|
||||
void GetProgramsDto::setMaxStartDate(QDateTime newMaxStartDate) {
|
||||
m_maxStartDate = newMaxStartDate;
|
||||
}
|
||||
bool GetProgramsDto::maxStartDateNull() const {
|
||||
return m_maxStartDate.isNull();
|
||||
}
|
||||
|
||||
void GetProgramsDto::setMaxStartDateNull() {
|
||||
m_maxStartDate= QDateTime();
|
||||
|
||||
}
|
||||
QDateTime GetProgramsDto::minEndDate() const { return m_minEndDate; }
|
||||
|
||||
void GetProgramsDto::setMinEndDate(QDateTime newMinEndDate) {
|
||||
m_minEndDate = newMinEndDate;
|
||||
}
|
||||
bool GetProgramsDto::minEndDateNull() const {
|
||||
return m_minEndDate.isNull();
|
||||
}
|
||||
|
||||
void GetProgramsDto::setMinEndDateNull() {
|
||||
m_minEndDate= QDateTime();
|
||||
|
||||
}
|
||||
QDateTime GetProgramsDto::maxEndDate() const { return m_maxEndDate; }
|
||||
|
||||
void GetProgramsDto::setMaxEndDate(QDateTime newMaxEndDate) {
|
||||
m_maxEndDate = newMaxEndDate;
|
||||
}
|
||||
bool GetProgramsDto::maxEndDateNull() const {
|
||||
return m_maxEndDate.isNull();
|
||||
}
|
||||
|
||||
void GetProgramsDto::setMaxEndDateNull() {
|
||||
m_maxEndDate= QDateTime();
|
||||
|
||||
}
|
||||
std::optional<bool> GetProgramsDto::isMovie() const { return m_isMovie; }
|
||||
|
||||
void GetProgramsDto::setIsMovie(std::optional<bool> newIsMovie) {
|
||||
m_isMovie = newIsMovie;
|
||||
}
|
||||
bool GetProgramsDto::isMovieNull() const {
|
||||
return !m_isMovie.has_value();
|
||||
}
|
||||
|
||||
void GetProgramsDto::setIsMovieNull() {
|
||||
m_isMovie = std::nullopt;
|
||||
|
||||
}
|
||||
std::optional<bool> GetProgramsDto::isSeries() const { return m_isSeries; }
|
||||
|
||||
void GetProgramsDto::setIsSeries(std::optional<bool> newIsSeries) {
|
||||
m_isSeries = newIsSeries;
|
||||
}
|
||||
bool GetProgramsDto::isSeriesNull() const {
|
||||
return !m_isSeries.has_value();
|
||||
}
|
||||
|
||||
void GetProgramsDto::setIsSeriesNull() {
|
||||
m_isSeries = std::nullopt;
|
||||
|
||||
}
|
||||
std::optional<bool> GetProgramsDto::isNews() const { return m_isNews; }
|
||||
|
||||
void GetProgramsDto::setIsNews(std::optional<bool> newIsNews) {
|
||||
m_isNews = newIsNews;
|
||||
}
|
||||
bool GetProgramsDto::isNewsNull() const {
|
||||
return !m_isNews.has_value();
|
||||
}
|
||||
|
||||
void GetProgramsDto::setIsNewsNull() {
|
||||
m_isNews = std::nullopt;
|
||||
|
||||
}
|
||||
std::optional<bool> GetProgramsDto::isKids() const { return m_isKids; }
|
||||
|
||||
void GetProgramsDto::setIsKids(std::optional<bool> newIsKids) {
|
||||
m_isKids = newIsKids;
|
||||
}
|
||||
bool GetProgramsDto::isKidsNull() const {
|
||||
return !m_isKids.has_value();
|
||||
}
|
||||
|
||||
void GetProgramsDto::setIsKidsNull() {
|
||||
m_isKids = std::nullopt;
|
||||
|
||||
}
|
||||
std::optional<bool> GetProgramsDto::isSports() const { return m_isSports; }
|
||||
|
||||
void GetProgramsDto::setIsSports(std::optional<bool> newIsSports) {
|
||||
m_isSports = newIsSports;
|
||||
}
|
||||
bool GetProgramsDto::isSportsNull() const {
|
||||
return !m_isSports.has_value();
|
||||
}
|
||||
|
||||
void GetProgramsDto::setIsSportsNull() {
|
||||
m_isSports = std::nullopt;
|
||||
|
||||
}
|
||||
std::optional<qint32> GetProgramsDto::startIndex() const { return m_startIndex; }
|
||||
|
||||
void GetProgramsDto::setStartIndex(std::optional<qint32> newStartIndex) {
|
||||
m_startIndex = newStartIndex;
|
||||
}
|
||||
bool GetProgramsDto::startIndexNull() const {
|
||||
return !m_startIndex.has_value();
|
||||
}
|
||||
|
||||
void GetProgramsDto::setStartIndexNull() {
|
||||
m_startIndex = std::nullopt;
|
||||
|
||||
}
|
||||
std::optional<qint32> GetProgramsDto::limit() const { return m_limit; }
|
||||
|
||||
void GetProgramsDto::setLimit(std::optional<qint32> newLimit) {
|
||||
m_limit = newLimit;
|
||||
}
|
||||
bool GetProgramsDto::limitNull() const {
|
||||
return !m_limit.has_value();
|
||||
}
|
||||
|
||||
void GetProgramsDto::setLimitNull() {
|
||||
m_limit = std::nullopt;
|
||||
|
||||
}
|
||||
QString GetProgramsDto::sortBy() const { return m_sortBy; }
|
||||
|
||||
void GetProgramsDto::setSortBy(QString newSortBy) {
|
||||
m_sortBy = newSortBy;
|
||||
}
|
||||
bool GetProgramsDto::sortByNull() const {
|
||||
return m_sortBy.isNull();
|
||||
}
|
||||
|
||||
void GetProgramsDto::setSortByNull() {
|
||||
m_sortBy.clear();
|
||||
|
||||
}
|
||||
QString GetProgramsDto::sortOrder() const { return m_sortOrder; }
|
||||
|
||||
void GetProgramsDto::setSortOrder(QString newSortOrder) {
|
||||
m_sortOrder = newSortOrder;
|
||||
}
|
||||
bool GetProgramsDto::sortOrderNull() const {
|
||||
return m_sortOrder.isNull();
|
||||
}
|
||||
|
||||
void GetProgramsDto::setSortOrderNull() {
|
||||
m_sortOrder.clear();
|
||||
|
||||
}
|
||||
QStringList GetProgramsDto::genres() const { return m_genres; }
|
||||
|
||||
void GetProgramsDto::setGenres(QStringList newGenres) {
|
||||
m_genres = newGenres;
|
||||
}
|
||||
bool GetProgramsDto::genresNull() const {
|
||||
return m_genres.size() == 0;
|
||||
}
|
||||
|
||||
void GetProgramsDto::setGenresNull() {
|
||||
m_genres.clear();
|
||||
|
||||
}
|
||||
QStringList GetProgramsDto::genreIds() const { return m_genreIds; }
|
||||
|
||||
void GetProgramsDto::setGenreIds(QStringList newGenreIds) {
|
||||
m_genreIds = newGenreIds;
|
||||
}
|
||||
bool GetProgramsDto::genreIdsNull() const {
|
||||
return m_genreIds.size() == 0;
|
||||
}
|
||||
|
||||
void GetProgramsDto::setGenreIdsNull() {
|
||||
m_genreIds.clear();
|
||||
|
||||
}
|
||||
std::optional<bool> GetProgramsDto::enableImages() const { return m_enableImages; }
|
||||
|
||||
void GetProgramsDto::setEnableImages(std::optional<bool> newEnableImages) {
|
||||
m_enableImages = newEnableImages;
|
||||
}
|
||||
bool GetProgramsDto::enableImagesNull() const {
|
||||
return !m_enableImages.has_value();
|
||||
}
|
||||
|
||||
void GetProgramsDto::setEnableImagesNull() {
|
||||
m_enableImages = std::nullopt;
|
||||
|
||||
}
|
||||
bool GetProgramsDto::enableTotalRecordCount() const { return m_enableTotalRecordCount; }
|
||||
|
||||
void GetProgramsDto::setEnableTotalRecordCount(bool newEnableTotalRecordCount) {
|
||||
m_enableTotalRecordCount = newEnableTotalRecordCount;
|
||||
}
|
||||
|
||||
std::optional<qint32> GetProgramsDto::imageTypeLimit() const { return m_imageTypeLimit; }
|
||||
|
||||
void GetProgramsDto::setImageTypeLimit(std::optional<qint32> newImageTypeLimit) {
|
||||
m_imageTypeLimit = newImageTypeLimit;
|
||||
}
|
||||
bool GetProgramsDto::imageTypeLimitNull() const {
|
||||
return !m_imageTypeLimit.has_value();
|
||||
}
|
||||
|
||||
void GetProgramsDto::setImageTypeLimitNull() {
|
||||
m_imageTypeLimit = std::nullopt;
|
||||
|
||||
}
|
||||
QList<ImageType> GetProgramsDto::enableImageTypes() const { return m_enableImageTypes; }
|
||||
|
||||
void GetProgramsDto::setEnableImageTypes(QList<ImageType> newEnableImageTypes) {
|
||||
m_enableImageTypes = newEnableImageTypes;
|
||||
}
|
||||
bool GetProgramsDto::enableImageTypesNull() const {
|
||||
return m_enableImageTypes.size() == 0;
|
||||
}
|
||||
|
||||
void GetProgramsDto::setEnableImageTypesNull() {
|
||||
m_enableImageTypes.clear();
|
||||
|
||||
}
|
||||
std::optional<bool> GetProgramsDto::enableUserData() const { return m_enableUserData; }
|
||||
|
||||
void GetProgramsDto::setEnableUserData(std::optional<bool> newEnableUserData) {
|
||||
m_enableUserData = newEnableUserData;
|
||||
}
|
||||
bool GetProgramsDto::enableUserDataNull() const {
|
||||
return !m_enableUserData.has_value();
|
||||
}
|
||||
|
||||
void GetProgramsDto::setEnableUserDataNull() {
|
||||
m_enableUserData = std::nullopt;
|
||||
|
||||
}
|
||||
QString GetProgramsDto::seriesTimerId() const { return m_seriesTimerId; }
|
||||
|
||||
void GetProgramsDto::setSeriesTimerId(QString newSeriesTimerId) {
|
||||
m_seriesTimerId = newSeriesTimerId;
|
||||
}
|
||||
bool GetProgramsDto::seriesTimerIdNull() const {
|
||||
return m_seriesTimerId.isNull();
|
||||
}
|
||||
|
||||
void GetProgramsDto::setSeriesTimerIdNull() {
|
||||
m_seriesTimerId.clear();
|
||||
|
||||
}
|
||||
QString GetProgramsDto::librarySeriesId() const { return m_librarySeriesId; }
|
||||
|
||||
void GetProgramsDto::setLibrarySeriesId(QString newLibrarySeriesId) {
|
||||
m_librarySeriesId = newLibrarySeriesId;
|
||||
}
|
||||
|
||||
QList<ItemFields> GetProgramsDto::fields() const { return m_fields; }
|
||||
|
||||
void GetProgramsDto::setFields(QList<ItemFields> newFields) {
|
||||
m_fields = newFields;
|
||||
}
|
||||
bool GetProgramsDto::fieldsNull() const {
|
||||
return m_fields.size() == 0;
|
||||
}
|
||||
|
||||
void GetProgramsDto::setFieldsNull() {
|
||||
m_fields.clear();
|
||||
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using GetProgramsDto = Jellyfin::DTO::GetProgramsDto;
|
||||
|
||||
template <>
|
||||
GetProgramsDto fromJsonValue<GetProgramsDto>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return GetProgramsDto::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
} // NS Jellyfin
|
||||
139
core/src/dto/groupinfodto.cpp
Normal file
139
core/src/dto/groupinfodto.cpp
Normal file
|
|
@ -0,0 +1,139 @@
|
|||
/*
|
||||
* Sailfin: a Jellyfin client written using Qt
|
||||
* Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
|
||||
* OVERWRITTEN AT SOME POINT!
|
||||
*
|
||||
* If there is a bug in this file, please fix the code generator used to generate this file found in
|
||||
* core/openapigenerator.d.
|
||||
*
|
||||
* This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
|
||||
* file with a newer file if needed instead of manually updating the files.
|
||||
*/
|
||||
|
||||
#include <JellyfinQt/dto/groupinfodto.h>
|
||||
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
GroupInfoDto::GroupInfoDto() {}
|
||||
|
||||
GroupInfoDto::GroupInfoDto(const GroupInfoDto &other) :
|
||||
|
||||
m_groupId(other.m_groupId),
|
||||
m_groupName(other.m_groupName),
|
||||
m_state(other.m_state),
|
||||
m_participants(other.m_participants),
|
||||
m_lastUpdatedAt(other.m_lastUpdatedAt){}
|
||||
|
||||
|
||||
void GroupInfoDto::replaceData(GroupInfoDto &other) {
|
||||
m_groupId = other.m_groupId;
|
||||
m_groupName = other.m_groupName;
|
||||
m_state = other.m_state;
|
||||
m_participants = other.m_participants;
|
||||
m_lastUpdatedAt = other.m_lastUpdatedAt;
|
||||
}
|
||||
|
||||
GroupInfoDto GroupInfoDto::fromJson(QJsonObject source) {
|
||||
GroupInfoDto instance;
|
||||
instance.setFromJson(source);
|
||||
return instance;
|
||||
}
|
||||
|
||||
|
||||
void GroupInfoDto::setFromJson(QJsonObject source) {
|
||||
m_groupId = Jellyfin::Support::fromJsonValue<QString>(source["GroupId"]);
|
||||
m_groupName = Jellyfin::Support::fromJsonValue<QString>(source["GroupName"]);
|
||||
m_state = Jellyfin::Support::fromJsonValue<GroupStateType>(source["State"]);
|
||||
m_participants = Jellyfin::Support::fromJsonValue<QStringList>(source["Participants"]);
|
||||
m_lastUpdatedAt = Jellyfin::Support::fromJsonValue<QDateTime>(source["LastUpdatedAt"]);
|
||||
|
||||
}
|
||||
|
||||
QJsonObject GroupInfoDto::toJson() {
|
||||
QJsonObject result;
|
||||
result["GroupId"] = Jellyfin::Support::toJsonValue<QString>(m_groupId);
|
||||
result["GroupName"] = Jellyfin::Support::toJsonValue<QString>(m_groupName);
|
||||
result["State"] = Jellyfin::Support::toJsonValue<GroupStateType>(m_state);
|
||||
result["Participants"] = Jellyfin::Support::toJsonValue<QStringList>(m_participants);
|
||||
result["LastUpdatedAt"] = Jellyfin::Support::toJsonValue<QDateTime>(m_lastUpdatedAt);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
QString GroupInfoDto::groupId() const { return m_groupId; }
|
||||
|
||||
void GroupInfoDto::setGroupId(QString newGroupId) {
|
||||
m_groupId = newGroupId;
|
||||
}
|
||||
|
||||
QString GroupInfoDto::groupName() const { return m_groupName; }
|
||||
|
||||
void GroupInfoDto::setGroupName(QString newGroupName) {
|
||||
m_groupName = newGroupName;
|
||||
}
|
||||
bool GroupInfoDto::groupNameNull() const {
|
||||
return m_groupName.isNull();
|
||||
}
|
||||
|
||||
void GroupInfoDto::setGroupNameNull() {
|
||||
m_groupName.clear();
|
||||
|
||||
}
|
||||
GroupStateType GroupInfoDto::state() const { return m_state; }
|
||||
|
||||
void GroupInfoDto::setState(GroupStateType newState) {
|
||||
m_state = newState;
|
||||
}
|
||||
|
||||
QStringList GroupInfoDto::participants() const { return m_participants; }
|
||||
|
||||
void GroupInfoDto::setParticipants(QStringList newParticipants) {
|
||||
m_participants = newParticipants;
|
||||
}
|
||||
bool GroupInfoDto::participantsNull() const {
|
||||
return m_participants.size() == 0;
|
||||
}
|
||||
|
||||
void GroupInfoDto::setParticipantsNull() {
|
||||
m_participants.clear();
|
||||
|
||||
}
|
||||
QDateTime GroupInfoDto::lastUpdatedAt() const { return m_lastUpdatedAt; }
|
||||
|
||||
void GroupInfoDto::setLastUpdatedAt(QDateTime newLastUpdatedAt) {
|
||||
m_lastUpdatedAt = newLastUpdatedAt;
|
||||
}
|
||||
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using GroupInfoDto = Jellyfin::DTO::GroupInfoDto;
|
||||
|
||||
template <>
|
||||
GroupInfoDto fromJsonValue<GroupInfoDto>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return GroupInfoDto::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
} // NS Jellyfin
|
||||
60
core/src/dto/groupqueuemode.cpp
Normal file
60
core/src/dto/groupqueuemode.cpp
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
/*
|
||||
* Sailfin: a Jellyfin client written using Qt
|
||||
* Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
|
||||
* OVERWRITTEN AT SOME POINT!
|
||||
*
|
||||
* If there is a bug in this file, please fix the code generator used to generate this file found in
|
||||
* core/openapigenerator.d.
|
||||
*
|
||||
* This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
|
||||
* file with a newer file if needed instead of manually updating the files.
|
||||
*/
|
||||
|
||||
#include <JellyfinQt/dto/groupqueuemode.h>
|
||||
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
GroupQueueModeClass::GroupQueueModeClass() {}
|
||||
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using GroupQueueMode = Jellyfin::DTO::GroupQueueMode;
|
||||
|
||||
template <>
|
||||
GroupQueueMode fromJsonValue<GroupQueueMode>(const QJsonValue &source) {
|
||||
if (!source.isString()) return GroupQueueMode::EnumNotSet;
|
||||
|
||||
QString str = source.toString();
|
||||
if (str == QStringLiteral("Queue")) {
|
||||
return GroupQueueMode::Queue;
|
||||
}
|
||||
if (str == QStringLiteral("QueueNext")) {
|
||||
return GroupQueueMode::QueueNext;
|
||||
}
|
||||
|
||||
return GroupQueueMode::EnumNotSet;
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
} // NS Jellyfin
|
||||
63
core/src/dto/grouprepeatmode.cpp
Normal file
63
core/src/dto/grouprepeatmode.cpp
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
/*
|
||||
* Sailfin: a Jellyfin client written using Qt
|
||||
* Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
|
||||
* OVERWRITTEN AT SOME POINT!
|
||||
*
|
||||
* If there is a bug in this file, please fix the code generator used to generate this file found in
|
||||
* core/openapigenerator.d.
|
||||
*
|
||||
* This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
|
||||
* file with a newer file if needed instead of manually updating the files.
|
||||
*/
|
||||
|
||||
#include <JellyfinQt/dto/grouprepeatmode.h>
|
||||
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
GroupRepeatModeClass::GroupRepeatModeClass() {}
|
||||
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using GroupRepeatMode = Jellyfin::DTO::GroupRepeatMode;
|
||||
|
||||
template <>
|
||||
GroupRepeatMode fromJsonValue<GroupRepeatMode>(const QJsonValue &source) {
|
||||
if (!source.isString()) return GroupRepeatMode::EnumNotSet;
|
||||
|
||||
QString str = source.toString();
|
||||
if (str == QStringLiteral("RepeatOne")) {
|
||||
return GroupRepeatMode::RepeatOne;
|
||||
}
|
||||
if (str == QStringLiteral("RepeatAll")) {
|
||||
return GroupRepeatMode::RepeatAll;
|
||||
}
|
||||
if (str == QStringLiteral("RepeatNone")) {
|
||||
return GroupRepeatMode::RepeatNone;
|
||||
}
|
||||
|
||||
return GroupRepeatMode::EnumNotSet;
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
} // NS Jellyfin
|
||||
60
core/src/dto/groupshufflemode.cpp
Normal file
60
core/src/dto/groupshufflemode.cpp
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
/*
|
||||
* Sailfin: a Jellyfin client written using Qt
|
||||
* Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
|
||||
* OVERWRITTEN AT SOME POINT!
|
||||
*
|
||||
* If there is a bug in this file, please fix the code generator used to generate this file found in
|
||||
* core/openapigenerator.d.
|
||||
*
|
||||
* This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
|
||||
* file with a newer file if needed instead of manually updating the files.
|
||||
*/
|
||||
|
||||
#include <JellyfinQt/dto/groupshufflemode.h>
|
||||
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
GroupShuffleModeClass::GroupShuffleModeClass() {}
|
||||
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using GroupShuffleMode = Jellyfin::DTO::GroupShuffleMode;
|
||||
|
||||
template <>
|
||||
GroupShuffleMode fromJsonValue<GroupShuffleMode>(const QJsonValue &source) {
|
||||
if (!source.isString()) return GroupShuffleMode::EnumNotSet;
|
||||
|
||||
QString str = source.toString();
|
||||
if (str == QStringLiteral("Sorted")) {
|
||||
return GroupShuffleMode::Sorted;
|
||||
}
|
||||
if (str == QStringLiteral("Shuffle")) {
|
||||
return GroupShuffleMode::Shuffle;
|
||||
}
|
||||
|
||||
return GroupShuffleMode::EnumNotSet;
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
} // NS Jellyfin
|
||||
66
core/src/dto/groupstatetype.cpp
Normal file
66
core/src/dto/groupstatetype.cpp
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
/*
|
||||
* Sailfin: a Jellyfin client written using Qt
|
||||
* Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
|
||||
* OVERWRITTEN AT SOME POINT!
|
||||
*
|
||||
* If there is a bug in this file, please fix the code generator used to generate this file found in
|
||||
* core/openapigenerator.d.
|
||||
*
|
||||
* This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
|
||||
* file with a newer file if needed instead of manually updating the files.
|
||||
*/
|
||||
|
||||
#include <JellyfinQt/dto/groupstatetype.h>
|
||||
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
GroupStateTypeClass::GroupStateTypeClass() {}
|
||||
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using GroupStateType = Jellyfin::DTO::GroupStateType;
|
||||
|
||||
template <>
|
||||
GroupStateType fromJsonValue<GroupStateType>(const QJsonValue &source) {
|
||||
if (!source.isString()) return GroupStateType::EnumNotSet;
|
||||
|
||||
QString str = source.toString();
|
||||
if (str == QStringLiteral("Idle")) {
|
||||
return GroupStateType::Idle;
|
||||
}
|
||||
if (str == QStringLiteral("Waiting")) {
|
||||
return GroupStateType::Waiting;
|
||||
}
|
||||
if (str == QStringLiteral("Paused")) {
|
||||
return GroupStateType::Paused;
|
||||
}
|
||||
if (str == QStringLiteral("Playing")) {
|
||||
return GroupStateType::Playing;
|
||||
}
|
||||
|
||||
return GroupStateType::EnumNotSet;
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
} // NS Jellyfin
|
||||
87
core/src/dto/groupupdatetype.cpp
Normal file
87
core/src/dto/groupupdatetype.cpp
Normal file
|
|
@ -0,0 +1,87 @@
|
|||
/*
|
||||
* Sailfin: a Jellyfin client written using Qt
|
||||
* Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
|
||||
* OVERWRITTEN AT SOME POINT!
|
||||
*
|
||||
* If there is a bug in this file, please fix the code generator used to generate this file found in
|
||||
* core/openapigenerator.d.
|
||||
*
|
||||
* This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
|
||||
* file with a newer file if needed instead of manually updating the files.
|
||||
*/
|
||||
|
||||
#include <JellyfinQt/dto/groupupdatetype.h>
|
||||
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
GroupUpdateTypeClass::GroupUpdateTypeClass() {}
|
||||
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using GroupUpdateType = Jellyfin::DTO::GroupUpdateType;
|
||||
|
||||
template <>
|
||||
GroupUpdateType fromJsonValue<GroupUpdateType>(const QJsonValue &source) {
|
||||
if (!source.isString()) return GroupUpdateType::EnumNotSet;
|
||||
|
||||
QString str = source.toString();
|
||||
if (str == QStringLiteral("UserJoined")) {
|
||||
return GroupUpdateType::UserJoined;
|
||||
}
|
||||
if (str == QStringLiteral("UserLeft")) {
|
||||
return GroupUpdateType::UserLeft;
|
||||
}
|
||||
if (str == QStringLiteral("GroupJoined")) {
|
||||
return GroupUpdateType::GroupJoined;
|
||||
}
|
||||
if (str == QStringLiteral("GroupLeft")) {
|
||||
return GroupUpdateType::GroupLeft;
|
||||
}
|
||||
if (str == QStringLiteral("StateUpdate")) {
|
||||
return GroupUpdateType::StateUpdate;
|
||||
}
|
||||
if (str == QStringLiteral("PlayQueue")) {
|
||||
return GroupUpdateType::PlayQueue;
|
||||
}
|
||||
if (str == QStringLiteral("NotInGroup")) {
|
||||
return GroupUpdateType::NotInGroup;
|
||||
}
|
||||
if (str == QStringLiteral("GroupDoesNotExist")) {
|
||||
return GroupUpdateType::GroupDoesNotExist;
|
||||
}
|
||||
if (str == QStringLiteral("CreateGroupDenied")) {
|
||||
return GroupUpdateType::CreateGroupDenied;
|
||||
}
|
||||
if (str == QStringLiteral("JoinGroupDenied")) {
|
||||
return GroupUpdateType::JoinGroupDenied;
|
||||
}
|
||||
if (str == QStringLiteral("LibraryAccessDenied")) {
|
||||
return GroupUpdateType::LibraryAccessDenied;
|
||||
}
|
||||
|
||||
return GroupUpdateType::EnumNotSet;
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
} // NS Jellyfin
|
||||
95
core/src/dto/guideinfo.cpp
Normal file
95
core/src/dto/guideinfo.cpp
Normal file
|
|
@ -0,0 +1,95 @@
|
|||
/*
|
||||
* Sailfin: a Jellyfin client written using Qt
|
||||
* Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
|
||||
* OVERWRITTEN AT SOME POINT!
|
||||
*
|
||||
* If there is a bug in this file, please fix the code generator used to generate this file found in
|
||||
* core/openapigenerator.d.
|
||||
*
|
||||
* This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
|
||||
* file with a newer file if needed instead of manually updating the files.
|
||||
*/
|
||||
|
||||
#include <JellyfinQt/dto/guideinfo.h>
|
||||
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
GuideInfo::GuideInfo() {}
|
||||
|
||||
GuideInfo::GuideInfo(const GuideInfo &other) :
|
||||
|
||||
m_startDate(other.m_startDate),
|
||||
m_endDate(other.m_endDate){}
|
||||
|
||||
|
||||
void GuideInfo::replaceData(GuideInfo &other) {
|
||||
m_startDate = other.m_startDate;
|
||||
m_endDate = other.m_endDate;
|
||||
}
|
||||
|
||||
GuideInfo GuideInfo::fromJson(QJsonObject source) {
|
||||
GuideInfo instance;
|
||||
instance.setFromJson(source);
|
||||
return instance;
|
||||
}
|
||||
|
||||
|
||||
void GuideInfo::setFromJson(QJsonObject source) {
|
||||
m_startDate = Jellyfin::Support::fromJsonValue<QDateTime>(source["StartDate"]);
|
||||
m_endDate = Jellyfin::Support::fromJsonValue<QDateTime>(source["EndDate"]);
|
||||
|
||||
}
|
||||
|
||||
QJsonObject GuideInfo::toJson() {
|
||||
QJsonObject result;
|
||||
result["StartDate"] = Jellyfin::Support::toJsonValue<QDateTime>(m_startDate);
|
||||
result["EndDate"] = Jellyfin::Support::toJsonValue<QDateTime>(m_endDate);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
QDateTime GuideInfo::startDate() const { return m_startDate; }
|
||||
|
||||
void GuideInfo::setStartDate(QDateTime newStartDate) {
|
||||
m_startDate = newStartDate;
|
||||
}
|
||||
|
||||
QDateTime GuideInfo::endDate() const { return m_endDate; }
|
||||
|
||||
void GuideInfo::setEndDate(QDateTime newEndDate) {
|
||||
m_endDate = newEndDate;
|
||||
}
|
||||
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using GuideInfo = Jellyfin::DTO::GuideInfo;
|
||||
|
||||
template <>
|
||||
GuideInfo fromJsonValue<GuideInfo>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return GuideInfo::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
} // NS Jellyfin
|
||||
63
core/src/dto/headermatchtype.cpp
Normal file
63
core/src/dto/headermatchtype.cpp
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
/*
|
||||
* Sailfin: a Jellyfin client written using Qt
|
||||
* Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
|
||||
* OVERWRITTEN AT SOME POINT!
|
||||
*
|
||||
* If there is a bug in this file, please fix the code generator used to generate this file found in
|
||||
* core/openapigenerator.d.
|
||||
*
|
||||
* This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
|
||||
* file with a newer file if needed instead of manually updating the files.
|
||||
*/
|
||||
|
||||
#include <JellyfinQt/dto/headermatchtype.h>
|
||||
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
HeaderMatchTypeClass::HeaderMatchTypeClass() {}
|
||||
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using HeaderMatchType = Jellyfin::DTO::HeaderMatchType;
|
||||
|
||||
template <>
|
||||
HeaderMatchType fromJsonValue<HeaderMatchType>(const QJsonValue &source) {
|
||||
if (!source.isString()) return HeaderMatchType::EnumNotSet;
|
||||
|
||||
QString str = source.toString();
|
||||
if (str == QStringLiteral("Equals")) {
|
||||
return HeaderMatchType::Equals;
|
||||
}
|
||||
if (str == QStringLiteral("Regex")) {
|
||||
return HeaderMatchType::Regex;
|
||||
}
|
||||
if (str == QStringLiteral("Substring")) {
|
||||
return HeaderMatchType::Substring;
|
||||
}
|
||||
|
||||
return HeaderMatchType::EnumNotSet;
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
} // NS Jellyfin
|
||||
119
core/src/dto/httpheaderinfo.cpp
Normal file
119
core/src/dto/httpheaderinfo.cpp
Normal file
|
|
@ -0,0 +1,119 @@
|
|||
/*
|
||||
* Sailfin: a Jellyfin client written using Qt
|
||||
* Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
|
||||
* OVERWRITTEN AT SOME POINT!
|
||||
*
|
||||
* If there is a bug in this file, please fix the code generator used to generate this file found in
|
||||
* core/openapigenerator.d.
|
||||
*
|
||||
* This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
|
||||
* file with a newer file if needed instead of manually updating the files.
|
||||
*/
|
||||
|
||||
#include <JellyfinQt/dto/httpheaderinfo.h>
|
||||
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
HttpHeaderInfo::HttpHeaderInfo() {}
|
||||
|
||||
HttpHeaderInfo::HttpHeaderInfo(const HttpHeaderInfo &other) :
|
||||
|
||||
m_name(other.m_name),
|
||||
m_value(other.m_value),
|
||||
m_match(other.m_match){}
|
||||
|
||||
|
||||
void HttpHeaderInfo::replaceData(HttpHeaderInfo &other) {
|
||||
m_name = other.m_name;
|
||||
m_value = other.m_value;
|
||||
m_match = other.m_match;
|
||||
}
|
||||
|
||||
HttpHeaderInfo HttpHeaderInfo::fromJson(QJsonObject source) {
|
||||
HttpHeaderInfo instance;
|
||||
instance.setFromJson(source);
|
||||
return instance;
|
||||
}
|
||||
|
||||
|
||||
void HttpHeaderInfo::setFromJson(QJsonObject source) {
|
||||
m_name = Jellyfin::Support::fromJsonValue<QString>(source["Name"]);
|
||||
m_value = Jellyfin::Support::fromJsonValue<QString>(source["Value"]);
|
||||
m_match = Jellyfin::Support::fromJsonValue<HeaderMatchType>(source["Match"]);
|
||||
|
||||
}
|
||||
|
||||
QJsonObject HttpHeaderInfo::toJson() {
|
||||
QJsonObject result;
|
||||
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
||||
result["Value"] = Jellyfin::Support::toJsonValue<QString>(m_value);
|
||||
result["Match"] = Jellyfin::Support::toJsonValue<HeaderMatchType>(m_match);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
QString HttpHeaderInfo::name() const { return m_name; }
|
||||
|
||||
void HttpHeaderInfo::setName(QString newName) {
|
||||
m_name = newName;
|
||||
}
|
||||
bool HttpHeaderInfo::nameNull() const {
|
||||
return m_name.isNull();
|
||||
}
|
||||
|
||||
void HttpHeaderInfo::setNameNull() {
|
||||
m_name.clear();
|
||||
|
||||
}
|
||||
QString HttpHeaderInfo::value() const { return m_value; }
|
||||
|
||||
void HttpHeaderInfo::setValue(QString newValue) {
|
||||
m_value = newValue;
|
||||
}
|
||||
bool HttpHeaderInfo::valueNull() const {
|
||||
return m_value.isNull();
|
||||
}
|
||||
|
||||
void HttpHeaderInfo::setValueNull() {
|
||||
m_value.clear();
|
||||
|
||||
}
|
||||
HeaderMatchType HttpHeaderInfo::match() const { return m_match; }
|
||||
|
||||
void HttpHeaderInfo::setMatch(HeaderMatchType newMatch) {
|
||||
m_match = newMatch;
|
||||
}
|
||||
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using HttpHeaderInfo = Jellyfin::DTO::HttpHeaderInfo;
|
||||
|
||||
template <>
|
||||
HttpHeaderInfo fromJsonValue<HttpHeaderInfo>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return HttpHeaderInfo::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
} // NS Jellyfin
|
||||
85
core/src/dto/ignorewaitrequestdto.cpp
Normal file
85
core/src/dto/ignorewaitrequestdto.cpp
Normal file
|
|
@ -0,0 +1,85 @@
|
|||
/*
|
||||
* Sailfin: a Jellyfin client written using Qt
|
||||
* Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
|
||||
* OVERWRITTEN AT SOME POINT!
|
||||
*
|
||||
* If there is a bug in this file, please fix the code generator used to generate this file found in
|
||||
* core/openapigenerator.d.
|
||||
*
|
||||
* This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
|
||||
* file with a newer file if needed instead of manually updating the files.
|
||||
*/
|
||||
|
||||
#include <JellyfinQt/dto/ignorewaitrequestdto.h>
|
||||
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
IgnoreWaitRequestDto::IgnoreWaitRequestDto() {}
|
||||
|
||||
IgnoreWaitRequestDto::IgnoreWaitRequestDto(const IgnoreWaitRequestDto &other) :
|
||||
|
||||
m_ignoreWait(other.m_ignoreWait){}
|
||||
|
||||
|
||||
void IgnoreWaitRequestDto::replaceData(IgnoreWaitRequestDto &other) {
|
||||
m_ignoreWait = other.m_ignoreWait;
|
||||
}
|
||||
|
||||
IgnoreWaitRequestDto IgnoreWaitRequestDto::fromJson(QJsonObject source) {
|
||||
IgnoreWaitRequestDto instance;
|
||||
instance.setFromJson(source);
|
||||
return instance;
|
||||
}
|
||||
|
||||
|
||||
void IgnoreWaitRequestDto::setFromJson(QJsonObject source) {
|
||||
m_ignoreWait = Jellyfin::Support::fromJsonValue<bool>(source["IgnoreWait"]);
|
||||
|
||||
}
|
||||
|
||||
QJsonObject IgnoreWaitRequestDto::toJson() {
|
||||
QJsonObject result;
|
||||
result["IgnoreWait"] = Jellyfin::Support::toJsonValue<bool>(m_ignoreWait);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
bool IgnoreWaitRequestDto::ignoreWait() const { return m_ignoreWait; }
|
||||
|
||||
void IgnoreWaitRequestDto::setIgnoreWait(bool newIgnoreWait) {
|
||||
m_ignoreWait = newIgnoreWait;
|
||||
}
|
||||
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using IgnoreWaitRequestDto = Jellyfin::DTO::IgnoreWaitRequestDto;
|
||||
|
||||
template <>
|
||||
IgnoreWaitRequestDto fromJsonValue<IgnoreWaitRequestDto>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return IgnoreWaitRequestDto::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
} // NS Jellyfin
|
||||
153
core/src/dto/imagebynameinfo.cpp
Normal file
153
core/src/dto/imagebynameinfo.cpp
Normal file
|
|
@ -0,0 +1,153 @@
|
|||
/*
|
||||
* Sailfin: a Jellyfin client written using Qt
|
||||
* Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
|
||||
* OVERWRITTEN AT SOME POINT!
|
||||
*
|
||||
* If there is a bug in this file, please fix the code generator used to generate this file found in
|
||||
* core/openapigenerator.d.
|
||||
*
|
||||
* This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
|
||||
* file with a newer file if needed instead of manually updating the files.
|
||||
*/
|
||||
|
||||
#include <JellyfinQt/dto/imagebynameinfo.h>
|
||||
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
ImageByNameInfo::ImageByNameInfo() {}
|
||||
|
||||
ImageByNameInfo::ImageByNameInfo(const ImageByNameInfo &other) :
|
||||
|
||||
m_name(other.m_name),
|
||||
m_theme(other.m_theme),
|
||||
m_context(other.m_context),
|
||||
m_fileLength(other.m_fileLength),
|
||||
m_format(other.m_format){}
|
||||
|
||||
|
||||
void ImageByNameInfo::replaceData(ImageByNameInfo &other) {
|
||||
m_name = other.m_name;
|
||||
m_theme = other.m_theme;
|
||||
m_context = other.m_context;
|
||||
m_fileLength = other.m_fileLength;
|
||||
m_format = other.m_format;
|
||||
}
|
||||
|
||||
ImageByNameInfo ImageByNameInfo::fromJson(QJsonObject source) {
|
||||
ImageByNameInfo instance;
|
||||
instance.setFromJson(source);
|
||||
return instance;
|
||||
}
|
||||
|
||||
|
||||
void ImageByNameInfo::setFromJson(QJsonObject source) {
|
||||
m_name = Jellyfin::Support::fromJsonValue<QString>(source["Name"]);
|
||||
m_theme = Jellyfin::Support::fromJsonValue<QString>(source["Theme"]);
|
||||
m_context = Jellyfin::Support::fromJsonValue<QString>(source["Context"]);
|
||||
m_fileLength = Jellyfin::Support::fromJsonValue<qint64>(source["FileLength"]);
|
||||
m_format = Jellyfin::Support::fromJsonValue<QString>(source["Format"]);
|
||||
|
||||
}
|
||||
|
||||
QJsonObject ImageByNameInfo::toJson() {
|
||||
QJsonObject result;
|
||||
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
||||
result["Theme"] = Jellyfin::Support::toJsonValue<QString>(m_theme);
|
||||
result["Context"] = Jellyfin::Support::toJsonValue<QString>(m_context);
|
||||
result["FileLength"] = Jellyfin::Support::toJsonValue<qint64>(m_fileLength);
|
||||
result["Format"] = Jellyfin::Support::toJsonValue<QString>(m_format);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
QString ImageByNameInfo::name() const { return m_name; }
|
||||
|
||||
void ImageByNameInfo::setName(QString newName) {
|
||||
m_name = newName;
|
||||
}
|
||||
bool ImageByNameInfo::nameNull() const {
|
||||
return m_name.isNull();
|
||||
}
|
||||
|
||||
void ImageByNameInfo::setNameNull() {
|
||||
m_name.clear();
|
||||
|
||||
}
|
||||
QString ImageByNameInfo::theme() const { return m_theme; }
|
||||
|
||||
void ImageByNameInfo::setTheme(QString newTheme) {
|
||||
m_theme = newTheme;
|
||||
}
|
||||
bool ImageByNameInfo::themeNull() const {
|
||||
return m_theme.isNull();
|
||||
}
|
||||
|
||||
void ImageByNameInfo::setThemeNull() {
|
||||
m_theme.clear();
|
||||
|
||||
}
|
||||
QString ImageByNameInfo::context() const { return m_context; }
|
||||
|
||||
void ImageByNameInfo::setContext(QString newContext) {
|
||||
m_context = newContext;
|
||||
}
|
||||
bool ImageByNameInfo::contextNull() const {
|
||||
return m_context.isNull();
|
||||
}
|
||||
|
||||
void ImageByNameInfo::setContextNull() {
|
||||
m_context.clear();
|
||||
|
||||
}
|
||||
qint64 ImageByNameInfo::fileLength() const { return m_fileLength; }
|
||||
|
||||
void ImageByNameInfo::setFileLength(qint64 newFileLength) {
|
||||
m_fileLength = newFileLength;
|
||||
}
|
||||
|
||||
QString ImageByNameInfo::format() const { return m_format; }
|
||||
|
||||
void ImageByNameInfo::setFormat(QString newFormat) {
|
||||
m_format = newFormat;
|
||||
}
|
||||
bool ImageByNameInfo::formatNull() const {
|
||||
return m_format.isNull();
|
||||
}
|
||||
|
||||
void ImageByNameInfo::setFormatNull() {
|
||||
m_format.clear();
|
||||
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using ImageByNameInfo = Jellyfin::DTO::ImageByNameInfo;
|
||||
|
||||
template <>
|
||||
ImageByNameInfo fromJsonValue<ImageByNameInfo>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return ImageByNameInfo::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
} // NS Jellyfin
|
||||
69
core/src/dto/imageformat.cpp
Normal file
69
core/src/dto/imageformat.cpp
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
/*
|
||||
* Sailfin: a Jellyfin client written using Qt
|
||||
* Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
|
||||
* OVERWRITTEN AT SOME POINT!
|
||||
*
|
||||
* If there is a bug in this file, please fix the code generator used to generate this file found in
|
||||
* core/openapigenerator.d.
|
||||
*
|
||||
* This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
|
||||
* file with a newer file if needed instead of manually updating the files.
|
||||
*/
|
||||
|
||||
#include <JellyfinQt/dto/imageformat.h>
|
||||
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
ImageFormatClass::ImageFormatClass() {}
|
||||
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using ImageFormat = Jellyfin::DTO::ImageFormat;
|
||||
|
||||
template <>
|
||||
ImageFormat fromJsonValue<ImageFormat>(const QJsonValue &source) {
|
||||
if (!source.isString()) return ImageFormat::EnumNotSet;
|
||||
|
||||
QString str = source.toString();
|
||||
if (str == QStringLiteral("Bmp")) {
|
||||
return ImageFormat::Bmp;
|
||||
}
|
||||
if (str == QStringLiteral("Gif")) {
|
||||
return ImageFormat::Gif;
|
||||
}
|
||||
if (str == QStringLiteral("Jpg")) {
|
||||
return ImageFormat::Jpg;
|
||||
}
|
||||
if (str == QStringLiteral("Png")) {
|
||||
return ImageFormat::Png;
|
||||
}
|
||||
if (str == QStringLiteral("Webp")) {
|
||||
return ImageFormat::Webp;
|
||||
}
|
||||
|
||||
return ImageFormat::EnumNotSet;
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
} // NS Jellyfin
|
||||
197
core/src/dto/imageinfo.cpp
Normal file
197
core/src/dto/imageinfo.cpp
Normal file
|
|
@ -0,0 +1,197 @@
|
|||
/*
|
||||
* Sailfin: a Jellyfin client written using Qt
|
||||
* Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
|
||||
* OVERWRITTEN AT SOME POINT!
|
||||
*
|
||||
* If there is a bug in this file, please fix the code generator used to generate this file found in
|
||||
* core/openapigenerator.d.
|
||||
*
|
||||
* This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
|
||||
* file with a newer file if needed instead of manually updating the files.
|
||||
*/
|
||||
|
||||
#include <JellyfinQt/dto/imageinfo.h>
|
||||
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
ImageInfo::ImageInfo() {}
|
||||
|
||||
ImageInfo::ImageInfo(const ImageInfo &other) :
|
||||
|
||||
m_imageType(other.m_imageType),
|
||||
m_imageIndex(other.m_imageIndex),
|
||||
m_imageTag(other.m_imageTag),
|
||||
m_path(other.m_path),
|
||||
m_blurHash(other.m_blurHash),
|
||||
m_height(other.m_height),
|
||||
m_width(other.m_width),
|
||||
m_size(other.m_size){}
|
||||
|
||||
|
||||
void ImageInfo::replaceData(ImageInfo &other) {
|
||||
m_imageType = other.m_imageType;
|
||||
m_imageIndex = other.m_imageIndex;
|
||||
m_imageTag = other.m_imageTag;
|
||||
m_path = other.m_path;
|
||||
m_blurHash = other.m_blurHash;
|
||||
m_height = other.m_height;
|
||||
m_width = other.m_width;
|
||||
m_size = other.m_size;
|
||||
}
|
||||
|
||||
ImageInfo ImageInfo::fromJson(QJsonObject source) {
|
||||
ImageInfo instance;
|
||||
instance.setFromJson(source);
|
||||
return instance;
|
||||
}
|
||||
|
||||
|
||||
void ImageInfo::setFromJson(QJsonObject source) {
|
||||
m_imageType = Jellyfin::Support::fromJsonValue<ImageType>(source["ImageType"]);
|
||||
m_imageIndex = Jellyfin::Support::fromJsonValue<std::optional<qint32>>(source["ImageIndex"]);
|
||||
m_imageTag = Jellyfin::Support::fromJsonValue<QString>(source["ImageTag"]);
|
||||
m_path = Jellyfin::Support::fromJsonValue<QString>(source["Path"]);
|
||||
m_blurHash = Jellyfin::Support::fromJsonValue<QString>(source["BlurHash"]);
|
||||
m_height = Jellyfin::Support::fromJsonValue<std::optional<qint32>>(source["Height"]);
|
||||
m_width = Jellyfin::Support::fromJsonValue<std::optional<qint32>>(source["Width"]);
|
||||
m_size = Jellyfin::Support::fromJsonValue<qint64>(source["Size"]);
|
||||
|
||||
}
|
||||
|
||||
QJsonObject ImageInfo::toJson() {
|
||||
QJsonObject result;
|
||||
result["ImageType"] = Jellyfin::Support::toJsonValue<ImageType>(m_imageType);
|
||||
result["ImageIndex"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_imageIndex);
|
||||
result["ImageTag"] = Jellyfin::Support::toJsonValue<QString>(m_imageTag);
|
||||
result["Path"] = Jellyfin::Support::toJsonValue<QString>(m_path);
|
||||
result["BlurHash"] = Jellyfin::Support::toJsonValue<QString>(m_blurHash);
|
||||
result["Height"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_height);
|
||||
result["Width"] = Jellyfin::Support::toJsonValue<std::optional<qint32>>(m_width);
|
||||
result["Size"] = Jellyfin::Support::toJsonValue<qint64>(m_size);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
ImageType ImageInfo::imageType() const { return m_imageType; }
|
||||
|
||||
void ImageInfo::setImageType(ImageType newImageType) {
|
||||
m_imageType = newImageType;
|
||||
}
|
||||
|
||||
std::optional<qint32> ImageInfo::imageIndex() const { return m_imageIndex; }
|
||||
|
||||
void ImageInfo::setImageIndex(std::optional<qint32> newImageIndex) {
|
||||
m_imageIndex = newImageIndex;
|
||||
}
|
||||
bool ImageInfo::imageIndexNull() const {
|
||||
return !m_imageIndex.has_value();
|
||||
}
|
||||
|
||||
void ImageInfo::setImageIndexNull() {
|
||||
m_imageIndex = std::nullopt;
|
||||
|
||||
}
|
||||
QString ImageInfo::imageTag() const { return m_imageTag; }
|
||||
|
||||
void ImageInfo::setImageTag(QString newImageTag) {
|
||||
m_imageTag = newImageTag;
|
||||
}
|
||||
bool ImageInfo::imageTagNull() const {
|
||||
return m_imageTag.isNull();
|
||||
}
|
||||
|
||||
void ImageInfo::setImageTagNull() {
|
||||
m_imageTag.clear();
|
||||
|
||||
}
|
||||
QString ImageInfo::path() const { return m_path; }
|
||||
|
||||
void ImageInfo::setPath(QString newPath) {
|
||||
m_path = newPath;
|
||||
}
|
||||
bool ImageInfo::pathNull() const {
|
||||
return m_path.isNull();
|
||||
}
|
||||
|
||||
void ImageInfo::setPathNull() {
|
||||
m_path.clear();
|
||||
|
||||
}
|
||||
QString ImageInfo::blurHash() const { return m_blurHash; }
|
||||
|
||||
void ImageInfo::setBlurHash(QString newBlurHash) {
|
||||
m_blurHash = newBlurHash;
|
||||
}
|
||||
bool ImageInfo::blurHashNull() const {
|
||||
return m_blurHash.isNull();
|
||||
}
|
||||
|
||||
void ImageInfo::setBlurHashNull() {
|
||||
m_blurHash.clear();
|
||||
|
||||
}
|
||||
std::optional<qint32> ImageInfo::height() const { return m_height; }
|
||||
|
||||
void ImageInfo::setHeight(std::optional<qint32> newHeight) {
|
||||
m_height = newHeight;
|
||||
}
|
||||
bool ImageInfo::heightNull() const {
|
||||
return !m_height.has_value();
|
||||
}
|
||||
|
||||
void ImageInfo::setHeightNull() {
|
||||
m_height = std::nullopt;
|
||||
|
||||
}
|
||||
std::optional<qint32> ImageInfo::width() const { return m_width; }
|
||||
|
||||
void ImageInfo::setWidth(std::optional<qint32> newWidth) {
|
||||
m_width = newWidth;
|
||||
}
|
||||
bool ImageInfo::widthNull() const {
|
||||
return !m_width.has_value();
|
||||
}
|
||||
|
||||
void ImageInfo::setWidthNull() {
|
||||
m_width = std::nullopt;
|
||||
|
||||
}
|
||||
qint64 ImageInfo::size() const { return m_size; }
|
||||
|
||||
void ImageInfo::setSize(qint64 newSize) {
|
||||
m_size = newSize;
|
||||
}
|
||||
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using ImageInfo = Jellyfin::DTO::ImageInfo;
|
||||
|
||||
template <>
|
||||
ImageInfo fromJsonValue<ImageInfo>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return ImageInfo::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
} // NS Jellyfin
|
||||
105
core/src/dto/imageoption.cpp
Normal file
105
core/src/dto/imageoption.cpp
Normal file
|
|
@ -0,0 +1,105 @@
|
|||
/*
|
||||
* Sailfin: a Jellyfin client written using Qt
|
||||
* Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
|
||||
* OVERWRITTEN AT SOME POINT!
|
||||
*
|
||||
* If there is a bug in this file, please fix the code generator used to generate this file found in
|
||||
* core/openapigenerator.d.
|
||||
*
|
||||
* This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
|
||||
* file with a newer file if needed instead of manually updating the files.
|
||||
*/
|
||||
|
||||
#include <JellyfinQt/dto/imageoption.h>
|
||||
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
ImageOption::ImageOption() {}
|
||||
|
||||
ImageOption::ImageOption(const ImageOption &other) :
|
||||
|
||||
m_type(other.m_type),
|
||||
m_limit(other.m_limit),
|
||||
m_minWidth(other.m_minWidth){}
|
||||
|
||||
|
||||
void ImageOption::replaceData(ImageOption &other) {
|
||||
m_type = other.m_type;
|
||||
m_limit = other.m_limit;
|
||||
m_minWidth = other.m_minWidth;
|
||||
}
|
||||
|
||||
ImageOption ImageOption::fromJson(QJsonObject source) {
|
||||
ImageOption instance;
|
||||
instance.setFromJson(source);
|
||||
return instance;
|
||||
}
|
||||
|
||||
|
||||
void ImageOption::setFromJson(QJsonObject source) {
|
||||
m_type = Jellyfin::Support::fromJsonValue<ImageType>(source["Type"]);
|
||||
m_limit = Jellyfin::Support::fromJsonValue<qint32>(source["Limit"]);
|
||||
m_minWidth = Jellyfin::Support::fromJsonValue<qint32>(source["MinWidth"]);
|
||||
|
||||
}
|
||||
|
||||
QJsonObject ImageOption::toJson() {
|
||||
QJsonObject result;
|
||||
result["Type"] = Jellyfin::Support::toJsonValue<ImageType>(m_type);
|
||||
result["Limit"] = Jellyfin::Support::toJsonValue<qint32>(m_limit);
|
||||
result["MinWidth"] = Jellyfin::Support::toJsonValue<qint32>(m_minWidth);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
ImageType ImageOption::type() const { return m_type; }
|
||||
|
||||
void ImageOption::setType(ImageType newType) {
|
||||
m_type = newType;
|
||||
}
|
||||
|
||||
qint32 ImageOption::limit() const { return m_limit; }
|
||||
|
||||
void ImageOption::setLimit(qint32 newLimit) {
|
||||
m_limit = newLimit;
|
||||
}
|
||||
|
||||
qint32 ImageOption::minWidth() const { return m_minWidth; }
|
||||
|
||||
void ImageOption::setMinWidth(qint32 newMinWidth) {
|
||||
m_minWidth = newMinWidth;
|
||||
}
|
||||
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using ImageOption = Jellyfin::DTO::ImageOption;
|
||||
|
||||
template <>
|
||||
ImageOption fromJsonValue<ImageOption>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return ImageOption::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
} // NS Jellyfin
|
||||
78
core/src/dto/imageorientation.cpp
Normal file
78
core/src/dto/imageorientation.cpp
Normal file
|
|
@ -0,0 +1,78 @@
|
|||
/*
|
||||
* Sailfin: a Jellyfin client written using Qt
|
||||
* Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
|
||||
* OVERWRITTEN AT SOME POINT!
|
||||
*
|
||||
* If there is a bug in this file, please fix the code generator used to generate this file found in
|
||||
* core/openapigenerator.d.
|
||||
*
|
||||
* This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
|
||||
* file with a newer file if needed instead of manually updating the files.
|
||||
*/
|
||||
|
||||
#include <JellyfinQt/dto/imageorientation.h>
|
||||
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
ImageOrientationClass::ImageOrientationClass() {}
|
||||
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using ImageOrientation = Jellyfin::DTO::ImageOrientation;
|
||||
|
||||
template <>
|
||||
ImageOrientation fromJsonValue<ImageOrientation>(const QJsonValue &source) {
|
||||
if (!source.isString()) return ImageOrientation::EnumNotSet;
|
||||
|
||||
QString str = source.toString();
|
||||
if (str == QStringLiteral("TopLeft")) {
|
||||
return ImageOrientation::TopLeft;
|
||||
}
|
||||
if (str == QStringLiteral("TopRight")) {
|
||||
return ImageOrientation::TopRight;
|
||||
}
|
||||
if (str == QStringLiteral("BottomRight")) {
|
||||
return ImageOrientation::BottomRight;
|
||||
}
|
||||
if (str == QStringLiteral("BottomLeft")) {
|
||||
return ImageOrientation::BottomLeft;
|
||||
}
|
||||
if (str == QStringLiteral("LeftTop")) {
|
||||
return ImageOrientation::LeftTop;
|
||||
}
|
||||
if (str == QStringLiteral("RightTop")) {
|
||||
return ImageOrientation::RightTop;
|
||||
}
|
||||
if (str == QStringLiteral("RightBottom")) {
|
||||
return ImageOrientation::RightBottom;
|
||||
}
|
||||
if (str == QStringLiteral("LeftBottom")) {
|
||||
return ImageOrientation::LeftBottom;
|
||||
}
|
||||
|
||||
return ImageOrientation::EnumNotSet;
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
} // NS Jellyfin
|
||||
109
core/src/dto/imageproviderinfo.cpp
Normal file
109
core/src/dto/imageproviderinfo.cpp
Normal file
|
|
@ -0,0 +1,109 @@
|
|||
/*
|
||||
* Sailfin: a Jellyfin client written using Qt
|
||||
* Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
|
||||
* OVERWRITTEN AT SOME POINT!
|
||||
*
|
||||
* If there is a bug in this file, please fix the code generator used to generate this file found in
|
||||
* core/openapigenerator.d.
|
||||
*
|
||||
* This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
|
||||
* file with a newer file if needed instead of manually updating the files.
|
||||
*/
|
||||
|
||||
#include <JellyfinQt/dto/imageproviderinfo.h>
|
||||
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
ImageProviderInfo::ImageProviderInfo() {}
|
||||
|
||||
ImageProviderInfo::ImageProviderInfo(const ImageProviderInfo &other) :
|
||||
|
||||
m_name(other.m_name),
|
||||
m_supportedImages(other.m_supportedImages){}
|
||||
|
||||
|
||||
void ImageProviderInfo::replaceData(ImageProviderInfo &other) {
|
||||
m_name = other.m_name;
|
||||
m_supportedImages = other.m_supportedImages;
|
||||
}
|
||||
|
||||
ImageProviderInfo ImageProviderInfo::fromJson(QJsonObject source) {
|
||||
ImageProviderInfo instance;
|
||||
instance.setFromJson(source);
|
||||
return instance;
|
||||
}
|
||||
|
||||
|
||||
void ImageProviderInfo::setFromJson(QJsonObject source) {
|
||||
m_name = Jellyfin::Support::fromJsonValue<QString>(source["Name"]);
|
||||
m_supportedImages = Jellyfin::Support::fromJsonValue<QList<ImageType>>(source["SupportedImages"]);
|
||||
|
||||
}
|
||||
|
||||
QJsonObject ImageProviderInfo::toJson() {
|
||||
QJsonObject result;
|
||||
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
||||
result["SupportedImages"] = Jellyfin::Support::toJsonValue<QList<ImageType>>(m_supportedImages);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
QString ImageProviderInfo::name() const { return m_name; }
|
||||
|
||||
void ImageProviderInfo::setName(QString newName) {
|
||||
m_name = newName;
|
||||
}
|
||||
bool ImageProviderInfo::nameNull() const {
|
||||
return m_name.isNull();
|
||||
}
|
||||
|
||||
void ImageProviderInfo::setNameNull() {
|
||||
m_name.clear();
|
||||
|
||||
}
|
||||
QList<ImageType> ImageProviderInfo::supportedImages() const { return m_supportedImages; }
|
||||
|
||||
void ImageProviderInfo::setSupportedImages(QList<ImageType> newSupportedImages) {
|
||||
m_supportedImages = newSupportedImages;
|
||||
}
|
||||
bool ImageProviderInfo::supportedImagesNull() const {
|
||||
return m_supportedImages.size() == 0;
|
||||
}
|
||||
|
||||
void ImageProviderInfo::setSupportedImagesNull() {
|
||||
m_supportedImages.clear();
|
||||
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using ImageProviderInfo = Jellyfin::DTO::ImageProviderInfo;
|
||||
|
||||
template <>
|
||||
ImageProviderInfo fromJsonValue<ImageProviderInfo>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return ImageProviderInfo::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
} // NS Jellyfin
|
||||
60
core/src/dto/imagesavingconvention.cpp
Normal file
60
core/src/dto/imagesavingconvention.cpp
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
/*
|
||||
* Sailfin: a Jellyfin client written using Qt
|
||||
* Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
|
||||
* OVERWRITTEN AT SOME POINT!
|
||||
*
|
||||
* If there is a bug in this file, please fix the code generator used to generate this file found in
|
||||
* core/openapigenerator.d.
|
||||
*
|
||||
* This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
|
||||
* file with a newer file if needed instead of manually updating the files.
|
||||
*/
|
||||
|
||||
#include <JellyfinQt/dto/imagesavingconvention.h>
|
||||
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
ImageSavingConventionClass::ImageSavingConventionClass() {}
|
||||
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using ImageSavingConvention = Jellyfin::DTO::ImageSavingConvention;
|
||||
|
||||
template <>
|
||||
ImageSavingConvention fromJsonValue<ImageSavingConvention>(const QJsonValue &source) {
|
||||
if (!source.isString()) return ImageSavingConvention::EnumNotSet;
|
||||
|
||||
QString str = source.toString();
|
||||
if (str == QStringLiteral("Legacy")) {
|
||||
return ImageSavingConvention::Legacy;
|
||||
}
|
||||
if (str == QStringLiteral("Compatible")) {
|
||||
return ImageSavingConvention::Compatible;
|
||||
}
|
||||
|
||||
return ImageSavingConvention::EnumNotSet;
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
} // NS Jellyfin
|
||||
93
core/src/dto/imagetype.cpp
Normal file
93
core/src/dto/imagetype.cpp
Normal file
|
|
@ -0,0 +1,93 @@
|
|||
/*
|
||||
* Sailfin: a Jellyfin client written using Qt
|
||||
* Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
|
||||
* OVERWRITTEN AT SOME POINT!
|
||||
*
|
||||
* If there is a bug in this file, please fix the code generator used to generate this file found in
|
||||
* core/openapigenerator.d.
|
||||
*
|
||||
* This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
|
||||
* file with a newer file if needed instead of manually updating the files.
|
||||
*/
|
||||
|
||||
#include <JellyfinQt/dto/imagetype.h>
|
||||
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
ImageTypeClass::ImageTypeClass() {}
|
||||
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using ImageType = Jellyfin::DTO::ImageType;
|
||||
|
||||
template <>
|
||||
ImageType fromJsonValue<ImageType>(const QJsonValue &source) {
|
||||
if (!source.isString()) return ImageType::EnumNotSet;
|
||||
|
||||
QString str = source.toString();
|
||||
if (str == QStringLiteral("Primary")) {
|
||||
return ImageType::Primary;
|
||||
}
|
||||
if (str == QStringLiteral("Art")) {
|
||||
return ImageType::Art;
|
||||
}
|
||||
if (str == QStringLiteral("Backdrop")) {
|
||||
return ImageType::Backdrop;
|
||||
}
|
||||
if (str == QStringLiteral("Banner")) {
|
||||
return ImageType::Banner;
|
||||
}
|
||||
if (str == QStringLiteral("Logo")) {
|
||||
return ImageType::Logo;
|
||||
}
|
||||
if (str == QStringLiteral("Thumb")) {
|
||||
return ImageType::Thumb;
|
||||
}
|
||||
if (str == QStringLiteral("Disc")) {
|
||||
return ImageType::Disc;
|
||||
}
|
||||
if (str == QStringLiteral("Box")) {
|
||||
return ImageType::Box;
|
||||
}
|
||||
if (str == QStringLiteral("Screenshot")) {
|
||||
return ImageType::Screenshot;
|
||||
}
|
||||
if (str == QStringLiteral("Menu")) {
|
||||
return ImageType::Menu;
|
||||
}
|
||||
if (str == QStringLiteral("Chapter")) {
|
||||
return ImageType::Chapter;
|
||||
}
|
||||
if (str == QStringLiteral("BoxRear")) {
|
||||
return ImageType::BoxRear;
|
||||
}
|
||||
if (str == QStringLiteral("Profile")) {
|
||||
return ImageType::Profile;
|
||||
}
|
||||
|
||||
return ImageType::EnumNotSet;
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
} // NS Jellyfin
|
||||
163
core/src/dto/installationinfo.cpp
Normal file
163
core/src/dto/installationinfo.cpp
Normal file
|
|
@ -0,0 +1,163 @@
|
|||
/*
|
||||
* Sailfin: a Jellyfin client written using Qt
|
||||
* Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
|
||||
* OVERWRITTEN AT SOME POINT!
|
||||
*
|
||||
* If there is a bug in this file, please fix the code generator used to generate this file found in
|
||||
* core/openapigenerator.d.
|
||||
*
|
||||
* This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
|
||||
* file with a newer file if needed instead of manually updating the files.
|
||||
*/
|
||||
|
||||
#include <JellyfinQt/dto/installationinfo.h>
|
||||
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
InstallationInfo::InstallationInfo() {}
|
||||
|
||||
InstallationInfo::InstallationInfo(const InstallationInfo &other) :
|
||||
|
||||
m_guid(other.m_guid),
|
||||
m_name(other.m_name),
|
||||
m_version(other.m_version),
|
||||
m_changelog(other.m_changelog),
|
||||
m_sourceUrl(other.m_sourceUrl),
|
||||
m_checksum(other.m_checksum){}
|
||||
|
||||
|
||||
void InstallationInfo::replaceData(InstallationInfo &other) {
|
||||
m_guid = other.m_guid;
|
||||
m_name = other.m_name;
|
||||
m_version = other.m_version;
|
||||
m_changelog = other.m_changelog;
|
||||
m_sourceUrl = other.m_sourceUrl;
|
||||
m_checksum = other.m_checksum;
|
||||
}
|
||||
|
||||
InstallationInfo InstallationInfo::fromJson(QJsonObject source) {
|
||||
InstallationInfo instance;
|
||||
instance.setFromJson(source);
|
||||
return instance;
|
||||
}
|
||||
|
||||
|
||||
void InstallationInfo::setFromJson(QJsonObject source) {
|
||||
m_guid = Jellyfin::Support::fromJsonValue<QString>(source["Guid"]);
|
||||
m_name = Jellyfin::Support::fromJsonValue<QString>(source["Name"]);
|
||||
m_version = Jellyfin::Support::fromJsonValue<QSharedPointer<Version>>(source["Version"]);
|
||||
m_changelog = Jellyfin::Support::fromJsonValue<QString>(source["Changelog"]);
|
||||
m_sourceUrl = Jellyfin::Support::fromJsonValue<QString>(source["SourceUrl"]);
|
||||
m_checksum = Jellyfin::Support::fromJsonValue<QString>(source["Checksum"]);
|
||||
|
||||
}
|
||||
|
||||
QJsonObject InstallationInfo::toJson() {
|
||||
QJsonObject result;
|
||||
result["Guid"] = Jellyfin::Support::toJsonValue<QString>(m_guid);
|
||||
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
||||
result["Version"] = Jellyfin::Support::toJsonValue<QSharedPointer<Version>>(m_version);
|
||||
result["Changelog"] = Jellyfin::Support::toJsonValue<QString>(m_changelog);
|
||||
result["SourceUrl"] = Jellyfin::Support::toJsonValue<QString>(m_sourceUrl);
|
||||
result["Checksum"] = Jellyfin::Support::toJsonValue<QString>(m_checksum);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
QString InstallationInfo::guid() const { return m_guid; }
|
||||
|
||||
void InstallationInfo::setGuid(QString newGuid) {
|
||||
m_guid = newGuid;
|
||||
}
|
||||
|
||||
QString InstallationInfo::name() const { return m_name; }
|
||||
|
||||
void InstallationInfo::setName(QString newName) {
|
||||
m_name = newName;
|
||||
}
|
||||
bool InstallationInfo::nameNull() const {
|
||||
return m_name.isNull();
|
||||
}
|
||||
|
||||
void InstallationInfo::setNameNull() {
|
||||
m_name.clear();
|
||||
|
||||
}
|
||||
QSharedPointer<Version> InstallationInfo::version() const { return m_version; }
|
||||
|
||||
void InstallationInfo::setVersion(QSharedPointer<Version> newVersion) {
|
||||
m_version = newVersion;
|
||||
}
|
||||
|
||||
QString InstallationInfo::changelog() const { return m_changelog; }
|
||||
|
||||
void InstallationInfo::setChangelog(QString newChangelog) {
|
||||
m_changelog = newChangelog;
|
||||
}
|
||||
bool InstallationInfo::changelogNull() const {
|
||||
return m_changelog.isNull();
|
||||
}
|
||||
|
||||
void InstallationInfo::setChangelogNull() {
|
||||
m_changelog.clear();
|
||||
|
||||
}
|
||||
QString InstallationInfo::sourceUrl() const { return m_sourceUrl; }
|
||||
|
||||
void InstallationInfo::setSourceUrl(QString newSourceUrl) {
|
||||
m_sourceUrl = newSourceUrl;
|
||||
}
|
||||
bool InstallationInfo::sourceUrlNull() const {
|
||||
return m_sourceUrl.isNull();
|
||||
}
|
||||
|
||||
void InstallationInfo::setSourceUrlNull() {
|
||||
m_sourceUrl.clear();
|
||||
|
||||
}
|
||||
QString InstallationInfo::checksum() const { return m_checksum; }
|
||||
|
||||
void InstallationInfo::setChecksum(QString newChecksum) {
|
||||
m_checksum = newChecksum;
|
||||
}
|
||||
bool InstallationInfo::checksumNull() const {
|
||||
return m_checksum.isNull();
|
||||
}
|
||||
|
||||
void InstallationInfo::setChecksumNull() {
|
||||
m_checksum.clear();
|
||||
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using InstallationInfo = Jellyfin::DTO::InstallationInfo;
|
||||
|
||||
template <>
|
||||
InstallationInfo fromJsonValue<InstallationInfo>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return InstallationInfo::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
} // NS Jellyfin
|
||||
173
core/src/dto/iplugin.cpp
Normal file
173
core/src/dto/iplugin.cpp
Normal file
|
|
@ -0,0 +1,173 @@
|
|||
/*
|
||||
* Sailfin: a Jellyfin client written using Qt
|
||||
* Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
|
||||
* OVERWRITTEN AT SOME POINT!
|
||||
*
|
||||
* If there is a bug in this file, please fix the code generator used to generate this file found in
|
||||
* core/openapigenerator.d.
|
||||
*
|
||||
* This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
|
||||
* file with a newer file if needed instead of manually updating the files.
|
||||
*/
|
||||
|
||||
#include <JellyfinQt/dto/iplugin.h>
|
||||
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
IPlugin::IPlugin() {}
|
||||
|
||||
IPlugin::IPlugin(const IPlugin &other) :
|
||||
|
||||
m_name(other.m_name),
|
||||
m_description(other.m_description),
|
||||
m_jellyfinId(other.m_jellyfinId),
|
||||
m_version(other.m_version),
|
||||
m_assemblyFilePath(other.m_assemblyFilePath),
|
||||
m_canUninstall(other.m_canUninstall),
|
||||
m_dataFolderPath(other.m_dataFolderPath){}
|
||||
|
||||
|
||||
void IPlugin::replaceData(IPlugin &other) {
|
||||
m_name = other.m_name;
|
||||
m_description = other.m_description;
|
||||
m_jellyfinId = other.m_jellyfinId;
|
||||
m_version = other.m_version;
|
||||
m_assemblyFilePath = other.m_assemblyFilePath;
|
||||
m_canUninstall = other.m_canUninstall;
|
||||
m_dataFolderPath = other.m_dataFolderPath;
|
||||
}
|
||||
|
||||
IPlugin IPlugin::fromJson(QJsonObject source) {
|
||||
IPlugin instance;
|
||||
instance.setFromJson(source);
|
||||
return instance;
|
||||
}
|
||||
|
||||
|
||||
void IPlugin::setFromJson(QJsonObject source) {
|
||||
m_name = Jellyfin::Support::fromJsonValue<QString>(source["Name"]);
|
||||
m_description = Jellyfin::Support::fromJsonValue<QString>(source["Description"]);
|
||||
m_jellyfinId = Jellyfin::Support::fromJsonValue<QString>(source["Id"]);
|
||||
m_version = Jellyfin::Support::fromJsonValue<QSharedPointer<Version>>(source["Version"]);
|
||||
m_assemblyFilePath = Jellyfin::Support::fromJsonValue<QString>(source["AssemblyFilePath"]);
|
||||
m_canUninstall = Jellyfin::Support::fromJsonValue<bool>(source["CanUninstall"]);
|
||||
m_dataFolderPath = Jellyfin::Support::fromJsonValue<QString>(source["DataFolderPath"]);
|
||||
|
||||
}
|
||||
|
||||
QJsonObject IPlugin::toJson() {
|
||||
QJsonObject result;
|
||||
result["Name"] = Jellyfin::Support::toJsonValue<QString>(m_name);
|
||||
result["Description"] = Jellyfin::Support::toJsonValue<QString>(m_description);
|
||||
result["Id"] = Jellyfin::Support::toJsonValue<QString>(m_jellyfinId);
|
||||
result["Version"] = Jellyfin::Support::toJsonValue<QSharedPointer<Version>>(m_version);
|
||||
result["AssemblyFilePath"] = Jellyfin::Support::toJsonValue<QString>(m_assemblyFilePath);
|
||||
result["CanUninstall"] = Jellyfin::Support::toJsonValue<bool>(m_canUninstall);
|
||||
result["DataFolderPath"] = Jellyfin::Support::toJsonValue<QString>(m_dataFolderPath);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
QString IPlugin::name() const { return m_name; }
|
||||
|
||||
void IPlugin::setName(QString newName) {
|
||||
m_name = newName;
|
||||
}
|
||||
bool IPlugin::nameNull() const {
|
||||
return m_name.isNull();
|
||||
}
|
||||
|
||||
void IPlugin::setNameNull() {
|
||||
m_name.clear();
|
||||
|
||||
}
|
||||
QString IPlugin::description() const { return m_description; }
|
||||
|
||||
void IPlugin::setDescription(QString newDescription) {
|
||||
m_description = newDescription;
|
||||
}
|
||||
bool IPlugin::descriptionNull() const {
|
||||
return m_description.isNull();
|
||||
}
|
||||
|
||||
void IPlugin::setDescriptionNull() {
|
||||
m_description.clear();
|
||||
|
||||
}
|
||||
QString IPlugin::jellyfinId() const { return m_jellyfinId; }
|
||||
|
||||
void IPlugin::setJellyfinId(QString newJellyfinId) {
|
||||
m_jellyfinId = newJellyfinId;
|
||||
}
|
||||
|
||||
QSharedPointer<Version> IPlugin::version() const { return m_version; }
|
||||
|
||||
void IPlugin::setVersion(QSharedPointer<Version> newVersion) {
|
||||
m_version = newVersion;
|
||||
}
|
||||
|
||||
QString IPlugin::assemblyFilePath() const { return m_assemblyFilePath; }
|
||||
|
||||
void IPlugin::setAssemblyFilePath(QString newAssemblyFilePath) {
|
||||
m_assemblyFilePath = newAssemblyFilePath;
|
||||
}
|
||||
bool IPlugin::assemblyFilePathNull() const {
|
||||
return m_assemblyFilePath.isNull();
|
||||
}
|
||||
|
||||
void IPlugin::setAssemblyFilePathNull() {
|
||||
m_assemblyFilePath.clear();
|
||||
|
||||
}
|
||||
bool IPlugin::canUninstall() const { return m_canUninstall; }
|
||||
|
||||
void IPlugin::setCanUninstall(bool newCanUninstall) {
|
||||
m_canUninstall = newCanUninstall;
|
||||
}
|
||||
|
||||
QString IPlugin::dataFolderPath() const { return m_dataFolderPath; }
|
||||
|
||||
void IPlugin::setDataFolderPath(QString newDataFolderPath) {
|
||||
m_dataFolderPath = newDataFolderPath;
|
||||
}
|
||||
bool IPlugin::dataFolderPathNull() const {
|
||||
return m_dataFolderPath.isNull();
|
||||
}
|
||||
|
||||
void IPlugin::setDataFolderPathNull() {
|
||||
m_dataFolderPath.clear();
|
||||
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using IPlugin = Jellyfin::DTO::IPlugin;
|
||||
|
||||
template <>
|
||||
IPlugin fromJsonValue<IPlugin>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return IPlugin::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
} // NS Jellyfin
|
||||
60
core/src/dto/isotype.cpp
Normal file
60
core/src/dto/isotype.cpp
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
/*
|
||||
* Sailfin: a Jellyfin client written using Qt
|
||||
* Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
|
||||
* OVERWRITTEN AT SOME POINT!
|
||||
*
|
||||
* If there is a bug in this file, please fix the code generator used to generate this file found in
|
||||
* core/openapigenerator.d.
|
||||
*
|
||||
* This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
|
||||
* file with a newer file if needed instead of manually updating the files.
|
||||
*/
|
||||
|
||||
#include <JellyfinQt/dto/isotype.h>
|
||||
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
IsoTypeClass::IsoTypeClass() {}
|
||||
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using IsoType = Jellyfin::DTO::IsoType;
|
||||
|
||||
template <>
|
||||
IsoType fromJsonValue<IsoType>(const QJsonValue &source) {
|
||||
if (!source.isString()) return IsoType::EnumNotSet;
|
||||
|
||||
QString str = source.toString();
|
||||
if (str == QStringLiteral("Dvd")) {
|
||||
return IsoType::Dvd;
|
||||
}
|
||||
if (str == QStringLiteral("BluRay")) {
|
||||
return IsoType::BluRay;
|
||||
}
|
||||
|
||||
return IsoType::EnumNotSet;
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
} // NS Jellyfin
|
||||
195
core/src/dto/itemcounts.cpp
Normal file
195
core/src/dto/itemcounts.cpp
Normal file
|
|
@ -0,0 +1,195 @@
|
|||
/*
|
||||
* Sailfin: a Jellyfin client written using Qt
|
||||
* Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
|
||||
* OVERWRITTEN AT SOME POINT!
|
||||
*
|
||||
* If there is a bug in this file, please fix the code generator used to generate this file found in
|
||||
* core/openapigenerator.d.
|
||||
*
|
||||
* This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
|
||||
* file with a newer file if needed instead of manually updating the files.
|
||||
*/
|
||||
|
||||
#include <JellyfinQt/dto/itemcounts.h>
|
||||
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
ItemCounts::ItemCounts() {}
|
||||
|
||||
ItemCounts::ItemCounts(const ItemCounts &other) :
|
||||
|
||||
m_movieCount(other.m_movieCount),
|
||||
m_seriesCount(other.m_seriesCount),
|
||||
m_episodeCount(other.m_episodeCount),
|
||||
m_artistCount(other.m_artistCount),
|
||||
m_programCount(other.m_programCount),
|
||||
m_trailerCount(other.m_trailerCount),
|
||||
m_songCount(other.m_songCount),
|
||||
m_albumCount(other.m_albumCount),
|
||||
m_musicVideoCount(other.m_musicVideoCount),
|
||||
m_boxSetCount(other.m_boxSetCount),
|
||||
m_bookCount(other.m_bookCount),
|
||||
m_itemCount(other.m_itemCount){}
|
||||
|
||||
|
||||
void ItemCounts::replaceData(ItemCounts &other) {
|
||||
m_movieCount = other.m_movieCount;
|
||||
m_seriesCount = other.m_seriesCount;
|
||||
m_episodeCount = other.m_episodeCount;
|
||||
m_artistCount = other.m_artistCount;
|
||||
m_programCount = other.m_programCount;
|
||||
m_trailerCount = other.m_trailerCount;
|
||||
m_songCount = other.m_songCount;
|
||||
m_albumCount = other.m_albumCount;
|
||||
m_musicVideoCount = other.m_musicVideoCount;
|
||||
m_boxSetCount = other.m_boxSetCount;
|
||||
m_bookCount = other.m_bookCount;
|
||||
m_itemCount = other.m_itemCount;
|
||||
}
|
||||
|
||||
ItemCounts ItemCounts::fromJson(QJsonObject source) {
|
||||
ItemCounts instance;
|
||||
instance.setFromJson(source);
|
||||
return instance;
|
||||
}
|
||||
|
||||
|
||||
void ItemCounts::setFromJson(QJsonObject source) {
|
||||
m_movieCount = Jellyfin::Support::fromJsonValue<qint32>(source["MovieCount"]);
|
||||
m_seriesCount = Jellyfin::Support::fromJsonValue<qint32>(source["SeriesCount"]);
|
||||
m_episodeCount = Jellyfin::Support::fromJsonValue<qint32>(source["EpisodeCount"]);
|
||||
m_artistCount = Jellyfin::Support::fromJsonValue<qint32>(source["ArtistCount"]);
|
||||
m_programCount = Jellyfin::Support::fromJsonValue<qint32>(source["ProgramCount"]);
|
||||
m_trailerCount = Jellyfin::Support::fromJsonValue<qint32>(source["TrailerCount"]);
|
||||
m_songCount = Jellyfin::Support::fromJsonValue<qint32>(source["SongCount"]);
|
||||
m_albumCount = Jellyfin::Support::fromJsonValue<qint32>(source["AlbumCount"]);
|
||||
m_musicVideoCount = Jellyfin::Support::fromJsonValue<qint32>(source["MusicVideoCount"]);
|
||||
m_boxSetCount = Jellyfin::Support::fromJsonValue<qint32>(source["BoxSetCount"]);
|
||||
m_bookCount = Jellyfin::Support::fromJsonValue<qint32>(source["BookCount"]);
|
||||
m_itemCount = Jellyfin::Support::fromJsonValue<qint32>(source["ItemCount"]);
|
||||
|
||||
}
|
||||
|
||||
QJsonObject ItemCounts::toJson() {
|
||||
QJsonObject result;
|
||||
result["MovieCount"] = Jellyfin::Support::toJsonValue<qint32>(m_movieCount);
|
||||
result["SeriesCount"] = Jellyfin::Support::toJsonValue<qint32>(m_seriesCount);
|
||||
result["EpisodeCount"] = Jellyfin::Support::toJsonValue<qint32>(m_episodeCount);
|
||||
result["ArtistCount"] = Jellyfin::Support::toJsonValue<qint32>(m_artistCount);
|
||||
result["ProgramCount"] = Jellyfin::Support::toJsonValue<qint32>(m_programCount);
|
||||
result["TrailerCount"] = Jellyfin::Support::toJsonValue<qint32>(m_trailerCount);
|
||||
result["SongCount"] = Jellyfin::Support::toJsonValue<qint32>(m_songCount);
|
||||
result["AlbumCount"] = Jellyfin::Support::toJsonValue<qint32>(m_albumCount);
|
||||
result["MusicVideoCount"] = Jellyfin::Support::toJsonValue<qint32>(m_musicVideoCount);
|
||||
result["BoxSetCount"] = Jellyfin::Support::toJsonValue<qint32>(m_boxSetCount);
|
||||
result["BookCount"] = Jellyfin::Support::toJsonValue<qint32>(m_bookCount);
|
||||
result["ItemCount"] = Jellyfin::Support::toJsonValue<qint32>(m_itemCount);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
qint32 ItemCounts::movieCount() const { return m_movieCount; }
|
||||
|
||||
void ItemCounts::setMovieCount(qint32 newMovieCount) {
|
||||
m_movieCount = newMovieCount;
|
||||
}
|
||||
|
||||
qint32 ItemCounts::seriesCount() const { return m_seriesCount; }
|
||||
|
||||
void ItemCounts::setSeriesCount(qint32 newSeriesCount) {
|
||||
m_seriesCount = newSeriesCount;
|
||||
}
|
||||
|
||||
qint32 ItemCounts::episodeCount() const { return m_episodeCount; }
|
||||
|
||||
void ItemCounts::setEpisodeCount(qint32 newEpisodeCount) {
|
||||
m_episodeCount = newEpisodeCount;
|
||||
}
|
||||
|
||||
qint32 ItemCounts::artistCount() const { return m_artistCount; }
|
||||
|
||||
void ItemCounts::setArtistCount(qint32 newArtistCount) {
|
||||
m_artistCount = newArtistCount;
|
||||
}
|
||||
|
||||
qint32 ItemCounts::programCount() const { return m_programCount; }
|
||||
|
||||
void ItemCounts::setProgramCount(qint32 newProgramCount) {
|
||||
m_programCount = newProgramCount;
|
||||
}
|
||||
|
||||
qint32 ItemCounts::trailerCount() const { return m_trailerCount; }
|
||||
|
||||
void ItemCounts::setTrailerCount(qint32 newTrailerCount) {
|
||||
m_trailerCount = newTrailerCount;
|
||||
}
|
||||
|
||||
qint32 ItemCounts::songCount() const { return m_songCount; }
|
||||
|
||||
void ItemCounts::setSongCount(qint32 newSongCount) {
|
||||
m_songCount = newSongCount;
|
||||
}
|
||||
|
||||
qint32 ItemCounts::albumCount() const { return m_albumCount; }
|
||||
|
||||
void ItemCounts::setAlbumCount(qint32 newAlbumCount) {
|
||||
m_albumCount = newAlbumCount;
|
||||
}
|
||||
|
||||
qint32 ItemCounts::musicVideoCount() const { return m_musicVideoCount; }
|
||||
|
||||
void ItemCounts::setMusicVideoCount(qint32 newMusicVideoCount) {
|
||||
m_musicVideoCount = newMusicVideoCount;
|
||||
}
|
||||
|
||||
qint32 ItemCounts::boxSetCount() const { return m_boxSetCount; }
|
||||
|
||||
void ItemCounts::setBoxSetCount(qint32 newBoxSetCount) {
|
||||
m_boxSetCount = newBoxSetCount;
|
||||
}
|
||||
|
||||
qint32 ItemCounts::bookCount() const { return m_bookCount; }
|
||||
|
||||
void ItemCounts::setBookCount(qint32 newBookCount) {
|
||||
m_bookCount = newBookCount;
|
||||
}
|
||||
|
||||
qint32 ItemCounts::itemCount() const { return m_itemCount; }
|
||||
|
||||
void ItemCounts::setItemCount(qint32 newItemCount) {
|
||||
m_itemCount = newItemCount;
|
||||
}
|
||||
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using ItemCounts = Jellyfin::DTO::ItemCounts;
|
||||
|
||||
template <>
|
||||
ItemCounts fromJsonValue<ItemCounts>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return ItemCounts::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
} // NS Jellyfin
|
||||
237
core/src/dto/itemfields.cpp
Normal file
237
core/src/dto/itemfields.cpp
Normal file
|
|
@ -0,0 +1,237 @@
|
|||
/*
|
||||
* Sailfin: a Jellyfin client written using Qt
|
||||
* Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
|
||||
* OVERWRITTEN AT SOME POINT!
|
||||
*
|
||||
* If there is a bug in this file, please fix the code generator used to generate this file found in
|
||||
* core/openapigenerator.d.
|
||||
*
|
||||
* This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
|
||||
* file with a newer file if needed instead of manually updating the files.
|
||||
*/
|
||||
|
||||
#include <JellyfinQt/dto/itemfields.h>
|
||||
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
ItemFieldsClass::ItemFieldsClass() {}
|
||||
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using ItemFields = Jellyfin::DTO::ItemFields;
|
||||
|
||||
template <>
|
||||
ItemFields fromJsonValue<ItemFields>(const QJsonValue &source) {
|
||||
if (!source.isString()) return ItemFields::EnumNotSet;
|
||||
|
||||
QString str = source.toString();
|
||||
if (str == QStringLiteral("AirTime")) {
|
||||
return ItemFields::AirTime;
|
||||
}
|
||||
if (str == QStringLiteral("CanDelete")) {
|
||||
return ItemFields::CanDelete;
|
||||
}
|
||||
if (str == QStringLiteral("CanDownload")) {
|
||||
return ItemFields::CanDownload;
|
||||
}
|
||||
if (str == QStringLiteral("ChannelInfo")) {
|
||||
return ItemFields::ChannelInfo;
|
||||
}
|
||||
if (str == QStringLiteral("Chapters")) {
|
||||
return ItemFields::Chapters;
|
||||
}
|
||||
if (str == QStringLiteral("ChildCount")) {
|
||||
return ItemFields::ChildCount;
|
||||
}
|
||||
if (str == QStringLiteral("CumulativeRunTimeTicks")) {
|
||||
return ItemFields::CumulativeRunTimeTicks;
|
||||
}
|
||||
if (str == QStringLiteral("CustomRating")) {
|
||||
return ItemFields::CustomRating;
|
||||
}
|
||||
if (str == QStringLiteral("DateCreated")) {
|
||||
return ItemFields::DateCreated;
|
||||
}
|
||||
if (str == QStringLiteral("DateLastMediaAdded")) {
|
||||
return ItemFields::DateLastMediaAdded;
|
||||
}
|
||||
if (str == QStringLiteral("DisplayPreferencesId")) {
|
||||
return ItemFields::DisplayPreferencesId;
|
||||
}
|
||||
if (str == QStringLiteral("Etag")) {
|
||||
return ItemFields::Etag;
|
||||
}
|
||||
if (str == QStringLiteral("ExternalUrls")) {
|
||||
return ItemFields::ExternalUrls;
|
||||
}
|
||||
if (str == QStringLiteral("Genres")) {
|
||||
return ItemFields::Genres;
|
||||
}
|
||||
if (str == QStringLiteral("HomePageUrl")) {
|
||||
return ItemFields::HomePageUrl;
|
||||
}
|
||||
if (str == QStringLiteral("ItemCounts")) {
|
||||
return ItemFields::ItemCounts;
|
||||
}
|
||||
if (str == QStringLiteral("MediaSourceCount")) {
|
||||
return ItemFields::MediaSourceCount;
|
||||
}
|
||||
if (str == QStringLiteral("MediaSources")) {
|
||||
return ItemFields::MediaSources;
|
||||
}
|
||||
if (str == QStringLiteral("OriginalTitle")) {
|
||||
return ItemFields::OriginalTitle;
|
||||
}
|
||||
if (str == QStringLiteral("Overview")) {
|
||||
return ItemFields::Overview;
|
||||
}
|
||||
if (str == QStringLiteral("ParentId")) {
|
||||
return ItemFields::ParentId;
|
||||
}
|
||||
if (str == QStringLiteral("Path")) {
|
||||
return ItemFields::Path;
|
||||
}
|
||||
if (str == QStringLiteral("People")) {
|
||||
return ItemFields::People;
|
||||
}
|
||||
if (str == QStringLiteral("PlayAccess")) {
|
||||
return ItemFields::PlayAccess;
|
||||
}
|
||||
if (str == QStringLiteral("ProductionLocations")) {
|
||||
return ItemFields::ProductionLocations;
|
||||
}
|
||||
if (str == QStringLiteral("ProviderIds")) {
|
||||
return ItemFields::ProviderIds;
|
||||
}
|
||||
if (str == QStringLiteral("PrimaryImageAspectRatio")) {
|
||||
return ItemFields::PrimaryImageAspectRatio;
|
||||
}
|
||||
if (str == QStringLiteral("RecursiveItemCount")) {
|
||||
return ItemFields::RecursiveItemCount;
|
||||
}
|
||||
if (str == QStringLiteral("Settings")) {
|
||||
return ItemFields::Settings;
|
||||
}
|
||||
if (str == QStringLiteral("ScreenshotImageTags")) {
|
||||
return ItemFields::ScreenshotImageTags;
|
||||
}
|
||||
if (str == QStringLiteral("SeriesPrimaryImage")) {
|
||||
return ItemFields::SeriesPrimaryImage;
|
||||
}
|
||||
if (str == QStringLiteral("SeriesStudio")) {
|
||||
return ItemFields::SeriesStudio;
|
||||
}
|
||||
if (str == QStringLiteral("SortName")) {
|
||||
return ItemFields::SortName;
|
||||
}
|
||||
if (str == QStringLiteral("SpecialEpisodeNumbers")) {
|
||||
return ItemFields::SpecialEpisodeNumbers;
|
||||
}
|
||||
if (str == QStringLiteral("Studios")) {
|
||||
return ItemFields::Studios;
|
||||
}
|
||||
if (str == QStringLiteral("BasicSyncInfo")) {
|
||||
return ItemFields::BasicSyncInfo;
|
||||
}
|
||||
if (str == QStringLiteral("SyncInfo")) {
|
||||
return ItemFields::SyncInfo;
|
||||
}
|
||||
if (str == QStringLiteral("Taglines")) {
|
||||
return ItemFields::Taglines;
|
||||
}
|
||||
if (str == QStringLiteral("Tags")) {
|
||||
return ItemFields::Tags;
|
||||
}
|
||||
if (str == QStringLiteral("RemoteTrailers")) {
|
||||
return ItemFields::RemoteTrailers;
|
||||
}
|
||||
if (str == QStringLiteral("MediaStreams")) {
|
||||
return ItemFields::MediaStreams;
|
||||
}
|
||||
if (str == QStringLiteral("SeasonUserData")) {
|
||||
return ItemFields::SeasonUserData;
|
||||
}
|
||||
if (str == QStringLiteral("ServiceName")) {
|
||||
return ItemFields::ServiceName;
|
||||
}
|
||||
if (str == QStringLiteral("ThemeSongIds")) {
|
||||
return ItemFields::ThemeSongIds;
|
||||
}
|
||||
if (str == QStringLiteral("ThemeVideoIds")) {
|
||||
return ItemFields::ThemeVideoIds;
|
||||
}
|
||||
if (str == QStringLiteral("ExternalEtag")) {
|
||||
return ItemFields::ExternalEtag;
|
||||
}
|
||||
if (str == QStringLiteral("PresentationUniqueKey")) {
|
||||
return ItemFields::PresentationUniqueKey;
|
||||
}
|
||||
if (str == QStringLiteral("InheritedParentalRatingValue")) {
|
||||
return ItemFields::InheritedParentalRatingValue;
|
||||
}
|
||||
if (str == QStringLiteral("ExternalSeriesId")) {
|
||||
return ItemFields::ExternalSeriesId;
|
||||
}
|
||||
if (str == QStringLiteral("SeriesPresentationUniqueKey")) {
|
||||
return ItemFields::SeriesPresentationUniqueKey;
|
||||
}
|
||||
if (str == QStringLiteral("DateLastRefreshed")) {
|
||||
return ItemFields::DateLastRefreshed;
|
||||
}
|
||||
if (str == QStringLiteral("DateLastSaved")) {
|
||||
return ItemFields::DateLastSaved;
|
||||
}
|
||||
if (str == QStringLiteral("RefreshState")) {
|
||||
return ItemFields::RefreshState;
|
||||
}
|
||||
if (str == QStringLiteral("ChannelImage")) {
|
||||
return ItemFields::ChannelImage;
|
||||
}
|
||||
if (str == QStringLiteral("EnableMediaSourceDisplay")) {
|
||||
return ItemFields::EnableMediaSourceDisplay;
|
||||
}
|
||||
if (str == QStringLiteral("Width")) {
|
||||
return ItemFields::Width;
|
||||
}
|
||||
if (str == QStringLiteral("Height")) {
|
||||
return ItemFields::Height;
|
||||
}
|
||||
if (str == QStringLiteral("ExtraIds")) {
|
||||
return ItemFields::ExtraIds;
|
||||
}
|
||||
if (str == QStringLiteral("LocalTrailerCount")) {
|
||||
return ItemFields::LocalTrailerCount;
|
||||
}
|
||||
if (str == QStringLiteral("IsHD")) {
|
||||
return ItemFields::IsHD;
|
||||
}
|
||||
if (str == QStringLiteral("SpecialFeatureCount")) {
|
||||
return ItemFields::SpecialFeatureCount;
|
||||
}
|
||||
|
||||
return ItemFields::EnumNotSet;
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
} // NS Jellyfin
|
||||
81
core/src/dto/itemfilter.cpp
Normal file
81
core/src/dto/itemfilter.cpp
Normal file
|
|
@ -0,0 +1,81 @@
|
|||
/*
|
||||
* Sailfin: a Jellyfin client written using Qt
|
||||
* Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
|
||||
* OVERWRITTEN AT SOME POINT!
|
||||
*
|
||||
* If there is a bug in this file, please fix the code generator used to generate this file found in
|
||||
* core/openapigenerator.d.
|
||||
*
|
||||
* This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
|
||||
* file with a newer file if needed instead of manually updating the files.
|
||||
*/
|
||||
|
||||
#include <JellyfinQt/dto/itemfilter.h>
|
||||
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
ItemFilterClass::ItemFilterClass() {}
|
||||
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using ItemFilter = Jellyfin::DTO::ItemFilter;
|
||||
|
||||
template <>
|
||||
ItemFilter fromJsonValue<ItemFilter>(const QJsonValue &source) {
|
||||
if (!source.isString()) return ItemFilter::EnumNotSet;
|
||||
|
||||
QString str = source.toString();
|
||||
if (str == QStringLiteral("IsFolder")) {
|
||||
return ItemFilter::IsFolder;
|
||||
}
|
||||
if (str == QStringLiteral("IsNotFolder")) {
|
||||
return ItemFilter::IsNotFolder;
|
||||
}
|
||||
if (str == QStringLiteral("IsUnplayed")) {
|
||||
return ItemFilter::IsUnplayed;
|
||||
}
|
||||
if (str == QStringLiteral("IsPlayed")) {
|
||||
return ItemFilter::IsPlayed;
|
||||
}
|
||||
if (str == QStringLiteral("IsFavorite")) {
|
||||
return ItemFilter::IsFavorite;
|
||||
}
|
||||
if (str == QStringLiteral("IsResumable")) {
|
||||
return ItemFilter::IsResumable;
|
||||
}
|
||||
if (str == QStringLiteral("Likes")) {
|
||||
return ItemFilter::Likes;
|
||||
}
|
||||
if (str == QStringLiteral("Dislikes")) {
|
||||
return ItemFilter::Dislikes;
|
||||
}
|
||||
if (str == QStringLiteral("IsFavoriteOrLikes")) {
|
||||
return ItemFilter::IsFavoriteOrLikes;
|
||||
}
|
||||
|
||||
return ItemFilter::EnumNotSet;
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
} // NS Jellyfin
|
||||
85
core/src/dto/joingrouprequestdto.cpp
Normal file
85
core/src/dto/joingrouprequestdto.cpp
Normal file
|
|
@ -0,0 +1,85 @@
|
|||
/*
|
||||
* Sailfin: a Jellyfin client written using Qt
|
||||
* Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
|
||||
* OVERWRITTEN AT SOME POINT!
|
||||
*
|
||||
* If there is a bug in this file, please fix the code generator used to generate this file found in
|
||||
* core/openapigenerator.d.
|
||||
*
|
||||
* This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
|
||||
* file with a newer file if needed instead of manually updating the files.
|
||||
*/
|
||||
|
||||
#include <JellyfinQt/dto/joingrouprequestdto.h>
|
||||
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
JoinGroupRequestDto::JoinGroupRequestDto() {}
|
||||
|
||||
JoinGroupRequestDto::JoinGroupRequestDto(const JoinGroupRequestDto &other) :
|
||||
|
||||
m_groupId(other.m_groupId){}
|
||||
|
||||
|
||||
void JoinGroupRequestDto::replaceData(JoinGroupRequestDto &other) {
|
||||
m_groupId = other.m_groupId;
|
||||
}
|
||||
|
||||
JoinGroupRequestDto JoinGroupRequestDto::fromJson(QJsonObject source) {
|
||||
JoinGroupRequestDto instance;
|
||||
instance.setFromJson(source);
|
||||
return instance;
|
||||
}
|
||||
|
||||
|
||||
void JoinGroupRequestDto::setFromJson(QJsonObject source) {
|
||||
m_groupId = Jellyfin::Support::fromJsonValue<QString>(source["GroupId"]);
|
||||
|
||||
}
|
||||
|
||||
QJsonObject JoinGroupRequestDto::toJson() {
|
||||
QJsonObject result;
|
||||
result["GroupId"] = Jellyfin::Support::toJsonValue<QString>(m_groupId);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
QString JoinGroupRequestDto::groupId() const { return m_groupId; }
|
||||
|
||||
void JoinGroupRequestDto::setGroupId(QString newGroupId) {
|
||||
m_groupId = newGroupId;
|
||||
}
|
||||
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using JoinGroupRequestDto = Jellyfin::DTO::JoinGroupRequestDto;
|
||||
|
||||
template <>
|
||||
JoinGroupRequestDto fromJsonValue<JoinGroupRequestDto>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return JoinGroupRequestDto::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
} // NS Jellyfin
|
||||
66
core/src/dto/keepuntil.cpp
Normal file
66
core/src/dto/keepuntil.cpp
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
/*
|
||||
* Sailfin: a Jellyfin client written using Qt
|
||||
* Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
|
||||
* OVERWRITTEN AT SOME POINT!
|
||||
*
|
||||
* If there is a bug in this file, please fix the code generator used to generate this file found in
|
||||
* core/openapigenerator.d.
|
||||
*
|
||||
* This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
|
||||
* file with a newer file if needed instead of manually updating the files.
|
||||
*/
|
||||
|
||||
#include <JellyfinQt/dto/keepuntil.h>
|
||||
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
KeepUntilClass::KeepUntilClass() {}
|
||||
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using KeepUntil = Jellyfin::DTO::KeepUntil;
|
||||
|
||||
template <>
|
||||
KeepUntil fromJsonValue<KeepUntil>(const QJsonValue &source) {
|
||||
if (!source.isString()) return KeepUntil::EnumNotSet;
|
||||
|
||||
QString str = source.toString();
|
||||
if (str == QStringLiteral("UntilDeleted")) {
|
||||
return KeepUntil::UntilDeleted;
|
||||
}
|
||||
if (str == QStringLiteral("UntilSpaceNeeded")) {
|
||||
return KeepUntil::UntilSpaceNeeded;
|
||||
}
|
||||
if (str == QStringLiteral("UntilWatched")) {
|
||||
return KeepUntil::UntilWatched;
|
||||
}
|
||||
if (str == QStringLiteral("UntilDate")) {
|
||||
return KeepUntil::UntilDate;
|
||||
}
|
||||
|
||||
return KeepUntil::EnumNotSet;
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
} // NS Jellyfin
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue