1
0
Fork 0
mirror of https://github.com/HenkKalkwater/harbour-sailfin.git synced 2024-11-22 09:15:18 +00:00

WIP: HttpLoader seems to work, Model still borked

This commit is contained in:
Chris Josten 2021-03-28 04:00:00 +02:00
parent e421adf733
commit 729e343661
1412 changed files with 13967 additions and 33794 deletions

View file

@ -5,6 +5,7 @@ include(GeneratedSources.cmake)
set(JellyfinQt_SOURCES
# src/DTO/dto.cpp
src/model/deviceprofile.cpp
src/model/item.cpp
src/support/jsonconv.cpp
src/support/loader.cpp
@ -15,7 +16,6 @@ set(JellyfinQt_SOURCES
src/apiclient.cpp
src/apimodel.cpp
src/credentialmanager.cpp
src/deviceprofile.cpp
src/eventbus.cpp
src/jellyfin.cpp
src/jsonhelper.cpp
@ -25,6 +25,7 @@ set(JellyfinQt_SOURCES
list(APPEND JellyfinQt_SOURCES ${openapi_SOURCES})
set(JellyfinQt_HEADERS
include/JellyfinQt/model/deviceprofile.h
include/JellyfinQt/model/item.h
include/JellyfinQt/support/jsonconv.h
include/JellyfinQt/support/loader.h
@ -36,23 +37,26 @@ set(JellyfinQt_HEADERS
include/JellyfinQt/apiclient.h
include/JellyfinQt/apimodel.h
include/JellyfinQt/credentialmanager.h
include/JellyfinQt/deviceprofile.h
include/JellyfinQt/eventbus.h
include/JellyfinQt/jellyfin.h
include/JellyfinQt/jsonhelper.h
include/JellyfinQt/serverdiscoverymodel.h
include/JellyfinQt/websocket.h)
list(APPEND JellyfinQt_SOURCES ${openapi_HEADERS})
list(APPEND JellyfinQt_HEADERS ${openapi_HEADERS})
add_definitions(-DSAILFIN_VERSION=\"${SAILFIN_VERSION}\")
if (PLATFORM_SAILFISHOS)
add_definitions(-DPLATFORM_SAILFISHOS=1)
endif()
add_library(JellyfinQt ${JellyfinQt_SOURCES} ${JellyfinQt_HEADERS})
if(${CMAKE_VERSION} VERSION_GREATER "3.16.0")
# target_precompile_headers(JellyfinQt PRIVATE ${JellyfinQt_HEADERS})
endif()
target_include_directories(JellyfinQt PUBLIC "include")
target_link_libraries(JellyfinQt PUBLIC Qt5::Core Qt5::Multimedia Qt5::Network Qt5::Qml Qt5::WebSockets)
set_target_properties(JellyfinQt PROPERTIES CXX_VISIBILITY_PRESET default)

View file

@ -14,4 +14,17 @@ private:
explicit {{className}}Class();
};
typedef {{className}}Class::Value {{className}};
using {{className}} = {{className}}Class::Value;
} // NS DTO
namespace Support {
using {{className}} = Jellyfin::DTO::{{className}};
template <>
{{className}} fromJsonValue(const QJsonValue &source, convertType<{{className}}>);
template <>
QJsonValue toJsonValue(const {{className}} &source, convertType<{{className}}>);

View file

@ -1,6 +1,5 @@
{{className}}Class::{{className}}Class() {}
} // NS DTO
namespace Support {
@ -9,7 +8,7 @@ using {{className}} = Jellyfin::DTO::{{className}};
template <>
{{className}} fromJsonValue<{{className}}>(const QJsonValue &source) {
{{className}} fromJsonValue(const QJsonValue &source, convertType<{{className}}>) {
if (!source.isString()) return {{className}}::EnumNotSet;
QString str = source.toString();
@ -23,3 +22,19 @@ template <>
return {{className}}::EnumNotSet;
}
template <>
QJsonValue toJsonValue(const {{className}} &source, convertType<{{className}}>) {
switch(source) {
{{#each values as |value|}}
case {{className}}::{{value}}:
return QStringLiteral("{{value}}");
{{/each}}
case {{className}}::EnumNotSet: // Fallthrough
default:
return QJsonValue();
}
}

View file

@ -1,4 +1,7 @@
{{#if endpoint.hasSuccessResponse}}
using namespace {{dtoNamespace}};
{{#if endpoint.description.length > 0}}
/**
* @brief {{endpoint.description}}
@ -6,7 +9,8 @@
*/
{{/if}}
class {{className}}Loader : public {{supportNamespace}}::HttpLoader<{{dtoNamespace}}::{{endpoint.resultType}}, {{endpoint.parameterType}}> {
class {{className}}Loader : public {{supportNamespace}}::HttpLoader<{{endpoint.resultType}}, {{endpoint.parameterType}}> {
public:
explicit {{className}}Loader(ApiClient *apiClient = nullptr);

View file

@ -1,7 +1,9 @@
{{#if endpoint.hasSuccessResponse}}
using namespace {{dtoNamespace}};
{{className}}Loader::{{className}}Loader(ApiClient *apiClient)
: {{supportNamespace}}::HttpLoader<{{dtoNamespace}}::{{endpoint.resultType}}, {{endpoint.parameterType}}>(apiClient) {}
: {{supportNamespace}}::HttpLoader<{{endpoint.resultType}}, {{endpoint.parameterType}}>(apiClient) {}
QString {{className}}Loader::path(const {{endpoint.parameterType}} &params) const {
Q_UNUSED(params) // Might be overzealous, but I don't like theses kind of warnings
@ -15,7 +17,7 @@ QUrlQuery {{className}}Loader::query(const {{endpoint.parameterType}} &params) c
QUrlQuery result;
{{#each endpoint.requiredQueryParameters as |p|}}
result.addQueryItem("{{p.name}}", params.{{p.type.name}}());
result.addQueryItem("{{p.name}}", Support::toString<{{p.type.typeNameWithQualifiers}}>(params.{{p.type.name}}()));
{{/each}}
@ -23,7 +25,7 @@ QUrlQuery {{className}}Loader::query(const {{endpoint.parameterType}} &params) c
{{#each endpoint.optionalQueryParameters as |p|}}
if (!params.{{p.type.name}}Null()) {
result.addQueryItem("{{p.name}}", Support::toString(params.{{p.type.name}}()));
result.addQueryItem("{{p.name}}", Support::toString<{{p.type.typeNameWithQualifiers}}>(params.{{p.type.name}}()));
}
{{/each}}

View file

@ -19,7 +19,7 @@ public:
static {{className}} fromJson(QJsonObject source);
void setFromJson(QJsonObject source);
QJsonObject toJson();
QJsonObject toJson() const;
// Properties
@ -61,3 +61,16 @@ protected:
{{/each}}
};
} // NS DTO
namespace Support {
using {{className}} = Jellyfin::DTO::{{className}};
template <>
{{className}} fromJsonValue(const QJsonValue &source, convertType<{{className}}>);
template<>
QJsonValue toJsonValue(const {{className}} &source, convertType<{{className}}>);

View file

@ -41,7 +41,7 @@ void {{className}}::setFromJson(QJsonObject source) {
}
QJsonObject {{className}}::toJson() {
QJsonObject {{className}}::toJson() const {
QJsonObject result;
{{#each properties as |property|}}
@ -83,7 +83,12 @@ using {{className}} = Jellyfin::DTO::{{className}};
template <>
{{className}} fromJsonValue<{{className}}>(const QJsonValue &source) {
if (!source.isObject()) throw new ParseException("Expected JSON Object");
{{className}} fromJsonValue(const QJsonValue &source, convertType<{{className}}>) {
if (!source.isObject()) throw ParseException("Expected JSON Object");
return {{className}}::fromJson(source.toObject());
}
template<>
QJsonValue toJsonValue(const {{className}} &source, convertType<{{className}}>) {
return source.toJson();
}

View file

@ -38,16 +38,13 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#include <QUrlQuery>
#include "dto/generalcommandtype.h"
#include "support/jsonconv.h"
#include "credentialmanager.h"
#include "deviceprofile.h"
#include "model/deviceprofile.h"
#include "eventbus.h"
#include "websocket.h"
namespace Jellyfin {
class MediaSource;
class WebSocket;
class PlaybackManager;
class WebSocket;
namespace DTO {
class UserItemDataDto; // Keep it as an opaque pointer
@ -124,6 +121,7 @@ public:
UNEXPECTED_STATUS,
INVALID_PASSWORD
};
Q_ENUM(ApiError)
const QString &baseUrl() const { return this->m_baseUrl; }
const QString &userId() const { return m_userId; }

View file

@ -91,6 +91,11 @@ public:
ModelStatus status() const { return m_status; }
/**
* @brief Clears and reloads the model
*/
Q_INVOKABLE virtual void reload() {};
// QQmlParserStatus interface
virtual void classBegin() override;
virtual void componentComplete() override;
@ -103,19 +108,33 @@ signals:
void limitChanged(int newLimit);
void autoReloadChanged(bool newAutoReload);
/**
* @brief Emitted when the model should clear itself
*/
void modelShouldClear();
/**
* Emitted when new items are loaded.
*/
void itemsLoaded();
void reloadWanted();
protected slots:
virtual void futureReady() = 0;
protected:
// Is this object being parsed by the QML engine
bool m_isBeingParsed = false;
ApiClient *m_apiClient = nullptr;
bool m_autoReload = true;
bool m_needsAuthentication = true;
// Query/record controlling properties
int m_limit = -1;
int m_startIndex = 0;
int m_totalRecordCount = 0;
const int DEFAULT_LIMIT = 100;
void emitModelShouldClear() { emit modelShouldClear(); }
void emitItemsLoaded() { emit itemsLoaded(); }
ModelStatus m_status = ModelStatus::Uninitialised;
void setStatus(ModelStatus newStatus) {
@ -127,6 +146,7 @@ protected:
}
}
}
virtual bool canReload() const;
};
/**
@ -137,37 +157,56 @@ template <class T>
class ModelLoader : public BaseModelLoader {
public:
ModelLoader(QObject *parent = nullptr)
: BaseModelLoader(parent) {}
QList<T> reload() {
m_startIndex = 0;
m_totalRecordCount = -1;
return loadMore();
: BaseModelLoader(parent) {
}
QList<T> loadMore() {
if (m_startIndex == 0) {
this->setStatus(ModelStatus::Loading);
} else {
this->setStatus(ModelStatus::LoadingMore);
void reload() override {
if (!canReload()) {
qDebug() << "Cannot yet reload ApiModel: canReload() returned false.";
return;
}
std::pair<QList<T>, int> result;
try {
result = loadMore(m_startIndex, m_limit);
} catch(Support::LoadException &e) {
qWarning() << "Exception while loading in ModelLoader: " << e.what();
return QList<T>();
m_startIndex = 0;
m_totalRecordCount = -1;
this->setStatus(ModelStatus::Loading);
emitModelShouldClear();
loadMore(0, -1);
}
void loadMore() {
if (!canReload()) {
qDebug() << "Cannot yet reload ApiModel: canReload() returned false.";
return;
}
m_startIndex += result.first.size();
m_totalRecordCount = result.second;
return result.first;
this->setStatus(ModelStatus::LoadingMore);
loadMore(m_startIndex, m_limit);
}
virtual bool canLoadMore() const {
return m_totalRecordCount == -1 || m_startIndex < m_totalRecordCount;
}
/**
* @brief Holds the result. Moves it result to the caller and therefore can be only called once
* when the itemsLoaded is emitted.
* @return pair containing the items loaded and the integer containing the starting offset. A starting
* offset of -1 means an error has occurred.
*/
std::pair<QList<T>, int> &&result() { return std::move(m_result); }
protected:
virtual std::pair<QList<T>, int> loadMore(int offset, int limit) = 0;
/**
* @brief Loads data from the given offset with a maximum count of limit.
* The itemsLoaded() signal is emitted when new data is ready. Call
* getLoadedItems to retrieve the loaded items.
*
* @param offset The offset to start loading items from
* @param limit The maximum amount of items to load.
*/
virtual void loadMore(int offset, int limit) = 0;
void updatePosition(int startIndex, int totalRecordCount) {
m_startIndex = startIndex;
m_totalRecordCount = totalRecordCount;
}
std::pair<QList<T>, int> m_result;
};
/**
@ -210,54 +249,66 @@ void setRequestStartIndex(P &parameters, int startIndex) {
template <class T, class D, class R, class P>
class LoaderModelLoader : public ModelLoader<T> {
public:
explicit LoaderModelLoader(Support::Loader<R, P> loader, QObject *parent = nullptr)
: ModelLoader<T>(parent), m_loader(loader) { }
explicit LoaderModelLoader(Support::Loader<R, P> *loader, QObject *parent = nullptr)
: ModelLoader<T>(parent), m_loader(QScopedPointer<Support::Loader<R, P>>(loader)) {
QObject::connect(&m_futureWatcher, &QFutureWatcher<QList<T>>::finished, this, &BaseModelLoader::futureReady);
}
protected:
std::pair<QList<T>, int> loadMore(int offset, int limit) override {
QMutexLocker(&this->m_mutex);
void loadMore(int offset, int limit) override {
// This method should only be callable on one thread.
// If futureWatcher's future is running, this method should not be called again.
if (m_futureWatcher.isRunning()) return;
// Set an invalid result.
this->m_result = { QList<T>(), -1 };
// We never want to set this while the loader is running, hence the Mutex and setting it here
// instead when Loader::setApiClient is called.
this->m_loader.setApiClient(this->m_apiClient);
try {
setRequestStartIndex<P>(this->m_parameters, offset);
setRequestLimit(this->m_parameters, limit);
R result;
try {
std::optional<R> optResult = m_loader.load(this->m_parameters);
if (!optResult.has_value()) {
this->setStatus(ModelStatus::Error);
return {QList<T>(), -1};
}
result = optResult.value();
} catch (Support::LoadException e) {
this->setStatus(ModelStatus::Error);
return {QList<T>(), -1};
}
this->m_loader->setApiClient(this->m_apiClient);
setRequestStartIndex<P>(this->m_parameters, offset);
setRequestLimit<P>(this->m_parameters, limit);
QList<D> records = extractRecords<D, R>(result);
int totalRecordCount = extractTotalRecordCount<R>(result);
// If totalRecordCount < 0, it is not supported for this endpoint
if (totalRecordCount < 0) {
totalRecordCount = records.size();
}
QList<T> models;
models.reserve(records.size());
// Convert the DTOs into models
for (int i = 0; i < records.size(); i++) {
models[i] = T(records[i], m_loader.apiClient());
}
this->setStatus(ModelStatus::Ready);
return { models, totalRecordCount};
} catch (Support::LoadException e) {
//this->setErrorString(QString(e.what()));
this->setStatus(ModelStatus::Error);
return {QList<T>(), -1};
}
this->m_loader->setParameters(this->m_parameters);
this->m_loader->prepareLoad();
QFuture<std::optional<R>> future = QtConcurrent::run(this->m_loader.data(), &Support::Loader<R, P>::load);
this->m_futureWatcher.setFuture(future);
}
Support::Loader<R, P> m_loader;
QScopedPointer<Support::Loader<R, P>> m_loader;
QMutex m_mutex;
P m_parameters;
QFutureWatcher<std::optional<R>> m_futureWatcher;
void futureReady() override {
R result;
try {
std::optional<R> optResult = m_futureWatcher.result();
if (!optResult.has_value()) {
this->setStatus(ModelStatus::Error);
}
result = optResult.value();
} catch (Support::LoadException e) {
qWarning() << "Exception while loading: " << e.what();
this->setStatus(ModelStatus::Error);
}
QList<D> records = extractRecords<D, R>(result);
int totalRecordCount = extractTotalRecordCount<R>(result);
// If totalRecordCount < 0, it is not supported for this endpoint
if (totalRecordCount < 0) {
totalRecordCount = records.size();
}
QList<T> models;
models.reserve(records.size());
// Convert the DTOs into models
for (int i = 0; i < records.size(); i++) {
models[i] = T(records[i], m_loader->apiClient());
}
this->setStatus(ModelStatus::Ready);
this->m_result = { models, totalRecordCount};
this->emitItemsLoaded();
}
};
class BaseApiModel : public QAbstractListModel {
@ -270,12 +321,22 @@ public:
virtual BaseModelLoader *loader() const = 0;
virtual void setLoader(BaseModelLoader *newLoader) {
Q_UNUSED(newLoader);
connect(newLoader, &BaseModelLoader::reloadWanted, this, &BaseApiModel::reload);
connect(newLoader, &BaseModelLoader::modelShouldClear, this, &BaseApiModel::clear);
connect(newLoader, &BaseModelLoader::itemsLoaded, this, &BaseApiModel::loadingFinished);
emit loaderChanged();
};
void disconnectOldLoader(BaseModelLoader *oldLoader) {
if (oldLoader != nullptr) {
// Disconnect all signals
disconnect(oldLoader, nullptr, this, nullptr);
}
}
public slots:
virtual void reload();
virtual void reload() = 0;
virtual void clear() = 0;
protected slots:
virtual void loadingFinished() = 0;
signals:
void loaderChanged();
};
@ -341,8 +402,6 @@ public:
*/
explicit ApiModel(QObject *parent = nullptr)
: BaseApiModel(parent) {
m_futureWatcherConnection = connect(&m_futureWatcher, &QFutureWatcher<QList<T>>::finished,
[&](){ futureFinished(); });
}
// Standard QAbstractItemModel overrides
@ -376,11 +435,20 @@ public:
};
void removeAt(int index) {
Q_ASSERT(index < size());
this->beginRemoveRows(QModelIndex(), index, index);
m_array.removeAt(index);
this->endRemoveRows();
}
void removeUntilEnd(int from) {
this->beginRemoveRows(QModelIndex(), from , m_array.size());
while (m_array.size() != from) {
m_array.removeLast();
}
this->endRemoveRows();
}
void removeOne(T &object) {
int idx = m_array.indexOf(object);
if (idx >= 0) {
@ -388,6 +456,12 @@ public:
}
}
void clear() override {
this->beginResetModel();
m_array.clear();
this->endResetModel();
}
// From AbstractListModel, gets implemented in ApiModel<T>
//virtual QHash<int, QByteArray> roleNames() const override = 0;
/*virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override = 0;*/
@ -399,8 +473,7 @@ public:
virtual void fetchMore(const QModelIndex &parent) override {
if (parent.isValid()) return;
if (m_loader != nullptr) {
QFuture<QList<T>> result = QtConcurrent::run(m_loader, &ModelLoader<T>::loadMore);
m_futureWatcher.setFuture(result);
m_loader->loadMore();
}
}
@ -411,9 +484,10 @@ public:
void setLoader(BaseModelLoader *newLoader) {
ModelLoader<T> *castedLoader = dynamic_cast<ModelLoader<T> *>(newLoader);
if (castedLoader != nullptr) {
m_loader = castedLoader;
// Hacky way to emit a signal
BaseApiModel::setLoader(newLoader);
BaseApiModel::disconnectOldLoader(m_loader);
m_loader = castedLoader;
} else {
qWarning() << "Somehow set a BaseModelLoader on ApiModel instead of a ModelLoader<T>";
}
@ -421,23 +495,28 @@ public:
void reload() override {
if (m_loader != nullptr) {
QFuture<QList<T>> result = QtConcurrent::run(m_loader, &ModelLoader<T>::reload);
m_futureWatcher.setFuture(result);
m_loader->reload();
}
}
protected:
// Model-specific properties.
QList<T> m_array;
ModelLoader<T> *m_loader;
QFutureWatcher<QList<T>> m_futureWatcher;
ModelLoader<T> *m_loader = nullptr;
void futureFinished() {
try {
QList<T> result = m_futureWatcher.result();
append(result);
} catch (QUnhandledException &e) {
qWarning() << "Unhandled exception while waiting for a future: " << e.what();
void loadingFinished() override {
Q_ASSERT(m_loader != nullptr);
std::pair<QList<T>, int> result = m_loader->result();
if (result.second == -1) {
clear();
} else if (result.second == m_array.size()) {
append(result.first);
} else if (result.second < m_array.size()){
removeUntilEnd(result.second);
append(result.first);
} else {
// result.second > m_array.size()
qWarning() << "Retrieved data from loader at position bigger than size()";
}
}
private:

View file

@ -38,6 +38,10 @@
#include "JellyfinQt/dto/dynamicdayofweek.h"
#include "JellyfinQt/support/jsonconv.h"
namespace Jellyfin {
// Forward declaration
class ApiClient;
}
namespace Jellyfin {
namespace DTO {
@ -54,7 +58,7 @@ public:
static AccessSchedule fromJson(QJsonObject source);
void setFromJson(QJsonObject source);
QJsonObject toJson();
QJsonObject toJson() const;
// Properties
/**
@ -107,6 +111,18 @@ protected:
double m_endHour;
};
} // NS DTO
namespace Support {
using AccessSchedule = Jellyfin::DTO::AccessSchedule;
template <>
AccessSchedule fromJsonValue(const QJsonValue &source, convertType<AccessSchedule>);
template<>
QJsonValue toJsonValue(const AccessSchedule &source, convertType<AccessSchedule>);
} // NS DTO
} // NS Jellyfin

View file

@ -39,6 +39,10 @@
#include "JellyfinQt/dto/loglevel.h"
#include "JellyfinQt/support/jsonconv.h"
namespace Jellyfin {
// Forward declaration
class ApiClient;
}
namespace Jellyfin {
namespace DTO {
@ -55,7 +59,7 @@ public:
static ActivityLogEntry fromJson(QJsonObject source);
void setFromJson(QJsonObject source);
QJsonObject toJson();
QJsonObject toJson() const;
// Properties
/**
@ -170,6 +174,18 @@ protected:
LogLevel m_severity;
};
} // NS DTO
namespace Support {
using ActivityLogEntry = Jellyfin::DTO::ActivityLogEntry;
template <>
ActivityLogEntry fromJsonValue(const QJsonValue &source, convertType<ActivityLogEntry>);
template<>
QJsonValue toJsonValue(const ActivityLogEntry &source, convertType<ActivityLogEntry>);
} // NS DTO
} // NS Jellyfin

View file

@ -39,6 +39,10 @@
#include "JellyfinQt/dto/activitylogentry.h"
#include "JellyfinQt/support/jsonconv.h"
namespace Jellyfin {
// Forward declaration
class ApiClient;
}
namespace Jellyfin {
namespace DTO {
@ -55,7 +59,7 @@ public:
static ActivityLogEntryQueryResult fromJson(QJsonObject source);
void setFromJson(QJsonObject source);
QJsonObject toJson();
QJsonObject toJson() const;
// Properties
/**
@ -94,6 +98,18 @@ protected:
qint32 m_startIndex;
};
} // NS DTO
namespace Support {
using ActivityLogEntryQueryResult = Jellyfin::DTO::ActivityLogEntryQueryResult;
template <>
ActivityLogEntryQueryResult fromJsonValue(const QJsonValue &source, convertType<ActivityLogEntryQueryResult>);
template<>
QJsonValue toJsonValue(const ActivityLogEntryQueryResult &source, convertType<ActivityLogEntryQueryResult>);
} // NS DTO
} // NS Jellyfin

View file

@ -38,6 +38,10 @@
#include "JellyfinQt/dto/libraryoptions.h"
#include "JellyfinQt/support/jsonconv.h"
namespace Jellyfin {
// Forward declaration
class ApiClient;
}
namespace Jellyfin {
namespace DTO {
@ -54,7 +58,7 @@ public:
static AddVirtualFolderDto fromJson(QJsonObject source);
void setFromJson(QJsonObject source);
QJsonObject toJson();
QJsonObject toJson() const;
// Properties
@ -67,6 +71,18 @@ protected:
QSharedPointer<LibraryOptions> m_libraryOptions = nullptr;
};
} // NS DTO
namespace Support {
using AddVirtualFolderDto = Jellyfin::DTO::AddVirtualFolderDto;
template <>
AddVirtualFolderDto fromJsonValue(const QJsonValue &source, convertType<AddVirtualFolderDto>);
template<>
QJsonValue toJsonValue(const AddVirtualFolderDto &source, convertType<AddVirtualFolderDto>);
} // NS DTO
} // NS Jellyfin

View file

@ -41,6 +41,10 @@
#include "JellyfinQt/dto/songinfo.h"
#include "JellyfinQt/support/jsonconv.h"
namespace Jellyfin {
// Forward declaration
class ApiClient;
}
namespace Jellyfin {
namespace DTO {
@ -57,7 +61,7 @@ public:
static AlbumInfo fromJson(QJsonObject source);
void setFromJson(QJsonObject source);
QJsonObject toJson();
QJsonObject toJson() const;
// Properties
/**
@ -107,11 +111,11 @@ public:
/**
* @brief Gets or sets the provider ids.
*/
std::optional<QJsonObject> providerIds() const;
QJsonObject providerIds() const;
/**
* @brief Gets or sets the provider ids.
*/
void setProviderIds(std::optional<QJsonObject> newProviderIds);
void setProviderIds(QJsonObject newProviderIds);
bool providerIdsNull() const;
void setProviderIdsNull();
@ -166,11 +170,11 @@ public:
/**
* @brief Gets or sets the artist provider ids.
*/
std::optional<QJsonObject> artistProviderIds() const;
QJsonObject artistProviderIds() const;
/**
* @brief Gets or sets the artist provider ids.
*/
void setArtistProviderIds(std::optional<QJsonObject> newArtistProviderIds);
void setArtistProviderIds(QJsonObject newArtistProviderIds);
bool artistProviderIdsNull() const;
void setArtistProviderIdsNull();
@ -187,17 +191,29 @@ protected:
QString m_path;
QString m_metadataLanguage;
QString m_metadataCountryCode;
std::optional<QJsonObject> m_providerIds = std::nullopt;
QJsonObject m_providerIds;
std::optional<qint32> m_year = std::nullopt;
std::optional<qint32> m_indexNumber = std::nullopt;
std::optional<qint32> m_parentIndexNumber = std::nullopt;
QDateTime m_premiereDate;
bool m_isAutomated;
QStringList m_albumArtists;
std::optional<QJsonObject> m_artistProviderIds = std::nullopt;
QJsonObject m_artistProviderIds;
QList<SongInfo> m_songInfos;
};
} // NS DTO
namespace Support {
using AlbumInfo = Jellyfin::DTO::AlbumInfo;
template <>
AlbumInfo fromJsonValue(const QJsonValue &source, convertType<AlbumInfo>);
template<>
QJsonValue toJsonValue(const AlbumInfo &source, convertType<AlbumInfo>);
} // NS DTO
} // NS Jellyfin

View file

@ -39,6 +39,10 @@
#include "JellyfinQt/dto/albuminfo.h"
#include "JellyfinQt/support/jsonconv.h"
namespace Jellyfin {
// Forward declaration
class ApiClient;
}
namespace Jellyfin {
namespace DTO {
@ -55,7 +59,7 @@ public:
static AlbumInfoRemoteSearchQuery fromJson(QJsonObject source);
void setFromJson(QJsonObject source);
QJsonObject toJson();
QJsonObject toJson() const;
// Properties
@ -96,6 +100,18 @@ protected:
bool m_includeDisabledProviders;
};
} // NS DTO
namespace Support {
using AlbumInfoRemoteSearchQuery = Jellyfin::DTO::AlbumInfoRemoteSearchQuery;
template <>
AlbumInfoRemoteSearchQuery fromJsonValue(const QJsonValue &source, convertType<AlbumInfoRemoteSearchQuery>);
template<>
QJsonValue toJsonValue(const AlbumInfoRemoteSearchQuery &source, convertType<AlbumInfoRemoteSearchQuery>);
} // NS DTO
} // NS Jellyfin

View file

@ -38,6 +38,10 @@
#include "JellyfinQt/dto/thememediaresult.h"
#include "JellyfinQt/support/jsonconv.h"
namespace Jellyfin {
// Forward declaration
class ApiClient;
}
namespace Jellyfin {
namespace DTO {
@ -54,7 +58,7 @@ public:
static AllThemeMediaResult fromJson(QJsonObject source);
void setFromJson(QJsonObject source);
QJsonObject toJson();
QJsonObject toJson() const;
// Properties
@ -79,6 +83,18 @@ protected:
QSharedPointer<ThemeMediaResult> m_soundtrackSongsResult = nullptr;
};
} // NS DTO
namespace Support {
using AllThemeMediaResult = Jellyfin::DTO::AllThemeMediaResult;
template <>
AllThemeMediaResult fromJsonValue(const QJsonValue &source, convertType<AllThemeMediaResult>);
template<>
QJsonValue toJsonValue(const AllThemeMediaResult &source, convertType<AllThemeMediaResult>);
} // NS DTO
} // NS Jellyfin

View file

@ -36,6 +36,10 @@
#include "JellyfinQt/support/jsonconv.h"
namespace Jellyfin {
// Forward declaration
class ApiClient;
}
namespace Jellyfin {
namespace DTO {
@ -55,7 +59,19 @@ private:
explicit ArchitectureClass();
};
typedef ArchitectureClass::Value Architecture;
using Architecture = ArchitectureClass::Value;
} // NS DTO
namespace Support {
using Architecture = Jellyfin::DTO::Architecture;
template <>
Architecture fromJsonValue(const QJsonValue &source, convertType<Architecture>);
template <>
QJsonValue toJsonValue(const Architecture &source, convertType<Architecture>);
} // NS DTO
} // NS Jellyfin

View file

@ -41,6 +41,10 @@
#include "JellyfinQt/dto/songinfo.h"
#include "JellyfinQt/support/jsonconv.h"
namespace Jellyfin {
// Forward declaration
class ApiClient;
}
namespace Jellyfin {
namespace DTO {
@ -57,7 +61,7 @@ public:
static ArtistInfo fromJson(QJsonObject source);
void setFromJson(QJsonObject source);
QJsonObject toJson();
QJsonObject toJson() const;
// Properties
/**
@ -107,11 +111,11 @@ public:
/**
* @brief Gets or sets the provider ids.
*/
std::optional<QJsonObject> providerIds() const;
QJsonObject providerIds() const;
/**
* @brief Gets or sets the provider ids.
*/
void setProviderIds(std::optional<QJsonObject> newProviderIds);
void setProviderIds(QJsonObject newProviderIds);
bool providerIdsNull() const;
void setProviderIdsNull();
@ -165,7 +169,7 @@ protected:
QString m_path;
QString m_metadataLanguage;
QString m_metadataCountryCode;
std::optional<QJsonObject> m_providerIds = std::nullopt;
QJsonObject m_providerIds;
std::optional<qint32> m_year = std::nullopt;
std::optional<qint32> m_indexNumber = std::nullopt;
std::optional<qint32> m_parentIndexNumber = std::nullopt;
@ -174,6 +178,18 @@ protected:
QList<SongInfo> m_songInfos;
};
} // NS DTO
namespace Support {
using ArtistInfo = Jellyfin::DTO::ArtistInfo;
template <>
ArtistInfo fromJsonValue(const QJsonValue &source, convertType<ArtistInfo>);
template<>
QJsonValue toJsonValue(const ArtistInfo &source, convertType<ArtistInfo>);
} // NS DTO
} // NS Jellyfin

View file

@ -39,6 +39,10 @@
#include "JellyfinQt/dto/artistinfo.h"
#include "JellyfinQt/support/jsonconv.h"
namespace Jellyfin {
// Forward declaration
class ApiClient;
}
namespace Jellyfin {
namespace DTO {
@ -55,7 +59,7 @@ public:
static ArtistInfoRemoteSearchQuery fromJson(QJsonObject source);
void setFromJson(QJsonObject source);
QJsonObject toJson();
QJsonObject toJson() const;
// Properties
@ -96,6 +100,18 @@ protected:
bool m_includeDisabledProviders;
};
} // NS DTO
namespace Support {
using ArtistInfoRemoteSearchQuery = Jellyfin::DTO::ArtistInfoRemoteSearchQuery;
template <>
ArtistInfoRemoteSearchQuery fromJsonValue(const QJsonValue &source, convertType<ArtistInfoRemoteSearchQuery>);
template<>
QJsonValue toJsonValue(const ArtistInfoRemoteSearchQuery &source, convertType<ArtistInfoRemoteSearchQuery>);
} // NS DTO
} // NS Jellyfin

View file

@ -37,6 +37,10 @@
#include "JellyfinQt/support/jsonconv.h"
namespace Jellyfin {
// Forward declaration
class ApiClient;
}
namespace Jellyfin {
namespace DTO {
@ -53,7 +57,7 @@ public:
static AuthenticateUserByName fromJson(QJsonObject source);
void setFromJson(QJsonObject source);
QJsonObject toJson();
QJsonObject toJson() const;
// Properties
/**
@ -96,6 +100,18 @@ protected:
QString m_password;
};
} // NS DTO
namespace Support {
using AuthenticateUserByName = Jellyfin::DTO::AuthenticateUserByName;
template <>
AuthenticateUserByName fromJsonValue(const QJsonValue &source, convertType<AuthenticateUserByName>);
template<>
QJsonValue toJsonValue(const AuthenticateUserByName &source, convertType<AuthenticateUserByName>);
} // NS DTO
} // NS Jellyfin

View file

@ -38,6 +38,10 @@
#include "JellyfinQt/support/jsonconv.h"
namespace Jellyfin {
// Forward declaration
class ApiClient;
}
namespace Jellyfin {
namespace DTO {
@ -54,7 +58,7 @@ public:
static AuthenticationInfo fromJson(QJsonObject source);
void setFromJson(QJsonObject source);
QJsonObject toJson();
QJsonObject toJson() const;
// Properties
/**
@ -187,6 +191,18 @@ protected:
QString m_userName;
};
} // NS DTO
namespace Support {
using AuthenticationInfo = Jellyfin::DTO::AuthenticationInfo;
template <>
AuthenticationInfo fromJsonValue(const QJsonValue &source, convertType<AuthenticationInfo>);
template<>
QJsonValue toJsonValue(const AuthenticationInfo &source, convertType<AuthenticationInfo>);
} // NS DTO
} // NS Jellyfin

View file

@ -39,6 +39,10 @@
#include "JellyfinQt/dto/authenticationinfo.h"
#include "JellyfinQt/support/jsonconv.h"
namespace Jellyfin {
// Forward declaration
class ApiClient;
}
namespace Jellyfin {
namespace DTO {
@ -55,7 +59,7 @@ public:
static AuthenticationInfoQueryResult fromJson(QJsonObject source);
void setFromJson(QJsonObject source);
QJsonObject toJson();
QJsonObject toJson() const;
// Properties
/**
@ -94,6 +98,18 @@ protected:
qint32 m_startIndex;
};
} // NS DTO
namespace Support {
using AuthenticationInfoQueryResult = Jellyfin::DTO::AuthenticationInfoQueryResult;
template <>
AuthenticationInfoQueryResult fromJsonValue(const QJsonValue &source, convertType<AuthenticationInfoQueryResult>);
template<>
QJsonValue toJsonValue(const AuthenticationInfoQueryResult &source, convertType<AuthenticationInfoQueryResult>);
} // NS DTO
} // NS Jellyfin

View file

@ -40,6 +40,10 @@
#include "JellyfinQt/dto/userdto.h"
#include "JellyfinQt/support/jsonconv.h"
namespace Jellyfin {
// Forward declaration
class ApiClient;
}
namespace Jellyfin {
namespace DTO {
@ -56,7 +60,7 @@ public:
static AuthenticationResult fromJson(QJsonObject source);
void setFromJson(QJsonObject source);
QJsonObject toJson();
QJsonObject toJson() const;
// Properties
@ -91,6 +95,18 @@ protected:
QString m_serverId;
};
} // NS DTO
namespace Support {
using AuthenticationResult = Jellyfin::DTO::AuthenticationResult;
template <>
AuthenticationResult fromJsonValue(const QJsonValue &source, convertType<AuthenticationResult>);
template<>
QJsonValue toJsonValue(const AuthenticationResult &source, convertType<AuthenticationResult>);
} // NS DTO
} // NS Jellyfin

View file

@ -41,6 +41,10 @@
#include "JellyfinQt/dto/mediaurl.h"
#include "JellyfinQt/support/jsonconv.h"
namespace Jellyfin {
// Forward declaration
class ApiClient;
}
namespace Jellyfin {
namespace DTO {
@ -57,7 +61,7 @@ public:
static BaseItem fromJson(QJsonObject source);
void setFromJson(QJsonObject source);
QJsonObject toJson();
QJsonObject toJson() const;
// Properties
@ -144,6 +148,18 @@ protected:
bool m_supportsExternalTransfer;
};
} // NS DTO
namespace Support {
using BaseItem = Jellyfin::DTO::BaseItem;
template <>
BaseItem fromJsonValue(const QJsonValue &source, convertType<BaseItem>);
template<>
QJsonValue toJsonValue(const BaseItem &source, convertType<BaseItem>);
} // NS DTO
} // NS Jellyfin

View file

@ -59,6 +59,10 @@
#include "JellyfinQt/dto/videotype.h"
#include "JellyfinQt/support/jsonconv.h"
namespace Jellyfin {
// Forward declaration
class ApiClient;
}
namespace Jellyfin {
namespace DTO {
@ -75,7 +79,7 @@ public:
static BaseItemDto fromJson(QJsonObject source);
void setFromJson(QJsonObject source);
QJsonObject toJson();
QJsonObject toJson() const;
// Properties
/**
@ -549,11 +553,11 @@ public:
/**
* @brief Gets or sets the provider ids.
*/
std::optional<QJsonObject> providerIds() const;
QJsonObject providerIds() const;
/**
* @brief Gets or sets the provider ids.
*/
void setProviderIds(std::optional<QJsonObject> newProviderIds);
void setProviderIds(QJsonObject newProviderIds);
bool providerIdsNull() const;
void setProviderIdsNull();
@ -969,11 +973,11 @@ public:
/**
* @brief Gets or sets the image tags.
*/
std::optional<QJsonObject> imageTags() const;
QJsonObject imageTags() const;
/**
* @brief Gets or sets the image tags.
*/
void setImageTags(std::optional<QJsonObject> newImageTags);
void setImageTags(QJsonObject newImageTags);
bool imageTagsNull() const;
void setImageTagsNull();
@ -1047,12 +1051,12 @@ public:
* @brief Gets or sets the blurhashes for the image tags.
Maps image type to dictionary mapping image tag to blurhash value.
*/
std::optional<QJsonObject> imageBlurHashes() const;
QJsonObject imageBlurHashes() const;
/**
* @brief Gets or sets the blurhashes for the image tags.
Maps image type to dictionary mapping image tag to blurhash value.
*/
void setImageBlurHashes(std::optional<QJsonObject> newImageBlurHashes);
void setImageBlurHashes(QJsonObject newImageBlurHashes);
bool imageBlurHashesNull() const;
void setImageBlurHashesNull();
@ -1595,7 +1599,7 @@ protected:
std::optional<qint32> m_indexNumberEnd = std::nullopt;
std::optional<qint32> m_parentIndexNumber = std::nullopt;
QList<MediaUrl> m_remoteTrailers;
std::optional<QJsonObject> m_providerIds = std::nullopt;
QJsonObject m_providerIds;
std::optional<bool> m_isHD = std::nullopt;
std::optional<bool> m_isFolder = std::nullopt;
QString m_parentId;
@ -1635,14 +1639,14 @@ protected:
VideoType m_videoType;
std::optional<qint32> m_partCount = std::nullopt;
std::optional<qint32> m_mediaSourceCount = std::nullopt;
std::optional<QJsonObject> m_imageTags = std::nullopt;
QJsonObject m_imageTags;
QStringList m_backdropImageTags;
QStringList m_screenshotImageTags;
QString m_parentLogoImageTag;
QString m_parentArtItemId;
QString m_parentArtImageTag;
QString m_seriesThumbImageTag;
std::optional<QJsonObject> m_imageBlurHashes = std::nullopt;
QJsonObject m_imageBlurHashes;
QString m_seriesStudio;
QString m_parentThumbItemId;
QString m_parentThumbImageTag;
@ -1698,6 +1702,18 @@ protected:
QSharedPointer<BaseItemDto> m_currentProgram = nullptr;
};
} // NS DTO
namespace Support {
using BaseItemDto = Jellyfin::DTO::BaseItemDto;
template <>
BaseItemDto fromJsonValue(const QJsonValue &source, convertType<BaseItemDto>);
template<>
QJsonValue toJsonValue(const BaseItemDto &source, convertType<BaseItemDto>);
} // NS DTO
} // NS Jellyfin

View file

@ -39,6 +39,10 @@
#include "JellyfinQt/dto/baseitemdto.h"
#include "JellyfinQt/support/jsonconv.h"
namespace Jellyfin {
// Forward declaration
class ApiClient;
}
namespace Jellyfin {
namespace DTO {
@ -55,7 +59,7 @@ public:
static BaseItemDtoQueryResult fromJson(QJsonObject source);
void setFromJson(QJsonObject source);
QJsonObject toJson();
QJsonObject toJson() const;
// Properties
/**
@ -94,6 +98,18 @@ protected:
qint32 m_startIndex;
};
} // NS DTO
namespace Support {
using BaseItemDtoQueryResult = Jellyfin::DTO::BaseItemDtoQueryResult;
template <>
BaseItemDtoQueryResult fromJsonValue(const QJsonValue &source, convertType<BaseItemDtoQueryResult>);
template<>
QJsonValue toJsonValue(const BaseItemDtoQueryResult &source, convertType<BaseItemDtoQueryResult>);
} // NS DTO
} // NS Jellyfin

View file

@ -37,6 +37,10 @@
#include "JellyfinQt/support/jsonconv.h"
namespace Jellyfin {
// Forward declaration
class ApiClient;
}
namespace Jellyfin {
namespace DTO {
@ -53,7 +57,7 @@ public:
static BaseItemPerson fromJson(QJsonObject source);
void setFromJson(QJsonObject source);
QJsonObject toJson();
QJsonObject toJson() const;
// Properties
/**
@ -114,11 +118,11 @@ public:
/**
* @brief Gets or sets the primary image blurhash.
*/
std::optional<QJsonObject> imageBlurHashes() const;
QJsonObject imageBlurHashes() const;
/**
* @brief Gets or sets the primary image blurhash.
*/
void setImageBlurHashes(std::optional<QJsonObject> newImageBlurHashes);
void setImageBlurHashes(QJsonObject newImageBlurHashes);
bool imageBlurHashesNull() const;
void setImageBlurHashesNull();
@ -129,9 +133,21 @@ protected:
QString m_role;
QString m_type;
QString m_primaryImageTag;
std::optional<QJsonObject> m_imageBlurHashes = std::nullopt;
QJsonObject m_imageBlurHashes;
};
} // NS DTO
namespace Support {
using BaseItemPerson = Jellyfin::DTO::BaseItemPerson;
template <>
BaseItemPerson fromJsonValue(const QJsonValue &source, convertType<BaseItemPerson>);
template<>
QJsonValue toJsonValue(const BaseItemPerson &source, convertType<BaseItemPerson>);
} // NS DTO
} // NS Jellyfin

View file

@ -32,6 +32,10 @@
#include <QJsonObject>
namespace Jellyfin {
// Forward declaration
class ApiClient;
}
namespace Jellyfin {
namespace DTO {

View file

@ -38,6 +38,10 @@
#include "JellyfinQt/support/jsonconv.h"
namespace Jellyfin {
// Forward declaration
class ApiClient;
}
namespace Jellyfin {
namespace DTO {
@ -54,7 +58,7 @@ public:
static BookInfo fromJson(QJsonObject source);
void setFromJson(QJsonObject source);
QJsonObject toJson();
QJsonObject toJson() const;
// Properties
/**
@ -104,11 +108,11 @@ public:
/**
* @brief Gets or sets the provider ids.
*/
std::optional<QJsonObject> providerIds() const;
QJsonObject providerIds() const;
/**
* @brief Gets or sets the provider ids.
*/
void setProviderIds(std::optional<QJsonObject> newProviderIds);
void setProviderIds(QJsonObject newProviderIds);
bool providerIdsNull() const;
void setProviderIdsNull();
@ -162,7 +166,7 @@ protected:
QString m_path;
QString m_metadataLanguage;
QString m_metadataCountryCode;
std::optional<QJsonObject> m_providerIds = std::nullopt;
QJsonObject m_providerIds;
std::optional<qint32> m_year = std::nullopt;
std::optional<qint32> m_indexNumber = std::nullopt;
std::optional<qint32> m_parentIndexNumber = std::nullopt;
@ -171,6 +175,18 @@ protected:
QString m_seriesName;
};
} // NS DTO
namespace Support {
using BookInfo = Jellyfin::DTO::BookInfo;
template <>
BookInfo fromJsonValue(const QJsonValue &source, convertType<BookInfo>);
template<>
QJsonValue toJsonValue(const BookInfo &source, convertType<BookInfo>);
} // NS DTO
} // NS Jellyfin

View file

@ -39,6 +39,10 @@
#include "JellyfinQt/dto/bookinfo.h"
#include "JellyfinQt/support/jsonconv.h"
namespace Jellyfin {
// Forward declaration
class ApiClient;
}
namespace Jellyfin {
namespace DTO {
@ -55,7 +59,7 @@ public:
static BookInfoRemoteSearchQuery fromJson(QJsonObject source);
void setFromJson(QJsonObject source);
QJsonObject toJson();
QJsonObject toJson() const;
// Properties
@ -96,6 +100,18 @@ protected:
bool m_includeDisabledProviders;
};
} // NS DTO
namespace Support {
using BookInfoRemoteSearchQuery = Jellyfin::DTO::BookInfoRemoteSearchQuery;
template <>
BookInfoRemoteSearchQuery fromJsonValue(const QJsonValue &source, convertType<BookInfoRemoteSearchQuery>);
template<>
QJsonValue toJsonValue(const BookInfoRemoteSearchQuery &source, convertType<BookInfoRemoteSearchQuery>);
} // NS DTO
} // NS Jellyfin

View file

@ -38,6 +38,10 @@
#include "JellyfinQt/support/jsonconv.h"
namespace Jellyfin {
// Forward declaration
class ApiClient;
}
namespace Jellyfin {
namespace DTO {
@ -54,7 +58,7 @@ public:
static BoxSetInfo fromJson(QJsonObject source);
void setFromJson(QJsonObject source);
QJsonObject toJson();
QJsonObject toJson() const;
// Properties
/**
@ -104,11 +108,11 @@ public:
/**
* @brief Gets or sets the provider ids.
*/
std::optional<QJsonObject> providerIds() const;
QJsonObject providerIds() const;
/**
* @brief Gets or sets the provider ids.
*/
void setProviderIds(std::optional<QJsonObject> newProviderIds);
void setProviderIds(QJsonObject newProviderIds);
bool providerIdsNull() const;
void setProviderIdsNull();
@ -155,7 +159,7 @@ protected:
QString m_path;
QString m_metadataLanguage;
QString m_metadataCountryCode;
std::optional<QJsonObject> m_providerIds = std::nullopt;
QJsonObject m_providerIds;
std::optional<qint32> m_year = std::nullopt;
std::optional<qint32> m_indexNumber = std::nullopt;
std::optional<qint32> m_parentIndexNumber = std::nullopt;
@ -163,6 +167,18 @@ protected:
bool m_isAutomated;
};
} // NS DTO
namespace Support {
using BoxSetInfo = Jellyfin::DTO::BoxSetInfo;
template <>
BoxSetInfo fromJsonValue(const QJsonValue &source, convertType<BoxSetInfo>);
template<>
QJsonValue toJsonValue(const BoxSetInfo &source, convertType<BoxSetInfo>);
} // NS DTO
} // NS Jellyfin

View file

@ -39,6 +39,10 @@
#include "JellyfinQt/dto/boxsetinfo.h"
#include "JellyfinQt/support/jsonconv.h"
namespace Jellyfin {
// Forward declaration
class ApiClient;
}
namespace Jellyfin {
namespace DTO {
@ -55,7 +59,7 @@ public:
static BoxSetInfoRemoteSearchQuery fromJson(QJsonObject source);
void setFromJson(QJsonObject source);
QJsonObject toJson();
QJsonObject toJson() const;
// Properties
@ -96,6 +100,18 @@ protected:
bool m_includeDisabledProviders;
};
} // NS DTO
namespace Support {
using BoxSetInfoRemoteSearchQuery = Jellyfin::DTO::BoxSetInfoRemoteSearchQuery;
template <>
BoxSetInfoRemoteSearchQuery fromJsonValue(const QJsonValue &source, convertType<BoxSetInfoRemoteSearchQuery>);
template<>
QJsonValue toJsonValue(const BoxSetInfoRemoteSearchQuery &source, convertType<BoxSetInfoRemoteSearchQuery>);
} // NS DTO
} // NS Jellyfin

View file

@ -37,6 +37,10 @@
#include "JellyfinQt/support/jsonconv.h"
namespace Jellyfin {
// Forward declaration
class ApiClient;
}
namespace Jellyfin {
namespace DTO {
@ -53,7 +57,7 @@ public:
static BrandingOptions fromJson(QJsonObject source);
void setFromJson(QJsonObject source);
QJsonObject toJson();
QJsonObject toJson() const;
// Properties
/**
@ -84,6 +88,18 @@ protected:
QString m_customCss;
};
} // NS DTO
namespace Support {
using BrandingOptions = Jellyfin::DTO::BrandingOptions;
template <>
BrandingOptions fromJsonValue(const QJsonValue &source, convertType<BrandingOptions>);
template<>
QJsonValue toJsonValue(const BrandingOptions &source, convertType<BrandingOptions>);
} // NS DTO
} // NS Jellyfin

View file

@ -38,6 +38,10 @@
#include "JellyfinQt/support/jsonconv.h"
namespace Jellyfin {
// Forward declaration
class ApiClient;
}
namespace Jellyfin {
namespace DTO {
@ -54,7 +58,7 @@ public:
static BufferRequestDto fromJson(QJsonObject source);
void setFromJson(QJsonObject source);
QJsonObject toJson();
QJsonObject toJson() const;
// Properties
/**
@ -101,6 +105,18 @@ protected:
QString m_playlistItemId;
};
} // NS DTO
namespace Support {
using BufferRequestDto = Jellyfin::DTO::BufferRequestDto;
template <>
BufferRequestDto fromJsonValue(const QJsonValue &source, convertType<BufferRequestDto>);
template<>
QJsonValue toJsonValue(const BufferRequestDto &source, convertType<BufferRequestDto>);
} // NS DTO
} // NS Jellyfin

View file

@ -42,6 +42,10 @@
#include "JellyfinQt/dto/channelmediatype.h"
#include "JellyfinQt/support/jsonconv.h"
namespace Jellyfin {
// Forward declaration
class ApiClient;
}
namespace Jellyfin {
namespace DTO {
@ -58,7 +62,7 @@ public:
static ChannelFeatures fromJson(QJsonObject source);
void setFromJson(QJsonObject source);
QJsonObject toJson();
QJsonObject toJson() const;
// Properties
/**
@ -199,6 +203,18 @@ protected:
bool m_supportsContentDownloading;
};
} // NS DTO
namespace Support {
using ChannelFeatures = Jellyfin::DTO::ChannelFeatures;
template <>
ChannelFeatures fromJsonValue(const QJsonValue &source, convertType<ChannelFeatures>);
template<>
QJsonValue toJsonValue(const ChannelFeatures &source, convertType<ChannelFeatures>);
} // NS DTO
} // NS Jellyfin

View file

@ -36,6 +36,10 @@
#include "JellyfinQt/support/jsonconv.h"
namespace Jellyfin {
// Forward declaration
class ApiClient;
}
namespace Jellyfin {
namespace DTO {
@ -57,7 +61,19 @@ private:
explicit ChannelItemSortFieldClass();
};
typedef ChannelItemSortFieldClass::Value ChannelItemSortField;
using ChannelItemSortField = ChannelItemSortFieldClass::Value;
} // NS DTO
namespace Support {
using ChannelItemSortField = Jellyfin::DTO::ChannelItemSortField;
template <>
ChannelItemSortField fromJsonValue(const QJsonValue &source, convertType<ChannelItemSortField>);
template <>
QJsonValue toJsonValue(const ChannelItemSortField &source, convertType<ChannelItemSortField>);
} // NS DTO
} // NS Jellyfin

View file

@ -42,6 +42,10 @@
#include "JellyfinQt/dto/tunerchannelmapping.h"
#include "JellyfinQt/support/jsonconv.h"
namespace Jellyfin {
// Forward declaration
class ApiClient;
}
namespace Jellyfin {
namespace DTO {
@ -58,7 +62,7 @@ public:
static ChannelMappingOptionsDto fromJson(QJsonObject source);
void setFromJson(QJsonObject source);
QJsonObject toJson();
QJsonObject toJson() const;
// Properties
/**
@ -113,6 +117,18 @@ protected:
QString m_providerName;
};
} // NS DTO
namespace Support {
using ChannelMappingOptionsDto = Jellyfin::DTO::ChannelMappingOptionsDto;
template <>
ChannelMappingOptionsDto fromJsonValue(const QJsonValue &source, convertType<ChannelMappingOptionsDto>);
template<>
QJsonValue toJsonValue(const ChannelMappingOptionsDto &source, convertType<ChannelMappingOptionsDto>);
} // NS DTO
} // NS Jellyfin

View file

@ -36,6 +36,10 @@
#include "JellyfinQt/support/jsonconv.h"
namespace Jellyfin {
// Forward declaration
class ApiClient;
}
namespace Jellyfin {
namespace DTO {
@ -58,7 +62,19 @@ private:
explicit ChannelMediaContentTypeClass();
};
typedef ChannelMediaContentTypeClass::Value ChannelMediaContentType;
using ChannelMediaContentType = ChannelMediaContentTypeClass::Value;
} // NS DTO
namespace Support {
using ChannelMediaContentType = Jellyfin::DTO::ChannelMediaContentType;
template <>
ChannelMediaContentType fromJsonValue(const QJsonValue &source, convertType<ChannelMediaContentType>);
template <>
QJsonValue toJsonValue(const ChannelMediaContentType &source, convertType<ChannelMediaContentType>);
} // NS DTO
} // NS Jellyfin

View file

@ -36,6 +36,10 @@
#include "JellyfinQt/support/jsonconv.h"
namespace Jellyfin {
// Forward declaration
class ApiClient;
}
namespace Jellyfin {
namespace DTO {
@ -53,7 +57,19 @@ private:
explicit ChannelMediaTypeClass();
};
typedef ChannelMediaTypeClass::Value ChannelMediaType;
using ChannelMediaType = ChannelMediaTypeClass::Value;
} // NS DTO
namespace Support {
using ChannelMediaType = Jellyfin::DTO::ChannelMediaType;
template <>
ChannelMediaType fromJsonValue(const QJsonValue &source, convertType<ChannelMediaType>);
template <>
QJsonValue toJsonValue(const ChannelMediaType &source, convertType<ChannelMediaType>);
} // NS DTO
} // NS Jellyfin

View file

@ -36,6 +36,10 @@
#include "JellyfinQt/support/jsonconv.h"
namespace Jellyfin {
// Forward declaration
class ApiClient;
}
namespace Jellyfin {
namespace DTO {
@ -52,7 +56,19 @@ private:
explicit ChannelTypeClass();
};
typedef ChannelTypeClass::Value ChannelType;
using ChannelType = ChannelTypeClass::Value;
} // NS DTO
namespace Support {
using ChannelType = Jellyfin::DTO::ChannelType;
template <>
ChannelType fromJsonValue(const QJsonValue &source, convertType<ChannelType>);
template <>
QJsonValue toJsonValue(const ChannelType &source, convertType<ChannelType>);
} // NS DTO
} // NS Jellyfin

View file

@ -38,6 +38,10 @@
#include "JellyfinQt/support/jsonconv.h"
namespace Jellyfin {
// Forward declaration
class ApiClient;
}
namespace Jellyfin {
namespace DTO {
@ -54,7 +58,7 @@ public:
static ChapterInfo fromJson(QJsonObject source);
void setFromJson(QJsonObject source);
QJsonObject toJson();
QJsonObject toJson() const;
// Properties
/**
@ -109,6 +113,18 @@ protected:
QString m_imageTag;
};
} // NS DTO
namespace Support {
using ChapterInfo = Jellyfin::DTO::ChapterInfo;
template <>
ChapterInfo fromJsonValue(const QJsonValue &source, convertType<ChapterInfo>);
template<>
QJsonValue toJsonValue(const ChapterInfo &source, convertType<ChapterInfo>);
} // NS DTO
} // NS Jellyfin

View file

@ -42,6 +42,10 @@
#include "JellyfinQt/dto/generalcommandtype.h"
#include "JellyfinQt/support/jsonconv.h"
namespace Jellyfin {
// Forward declaration
class ApiClient;
}
namespace Jellyfin {
namespace DTO {
@ -58,7 +62,7 @@ public:
static ClientCapabilities fromJson(QJsonObject source);
void setFromJson(QJsonObject source);
QJsonObject toJson();
QJsonObject toJson() const;
// Properties
@ -135,6 +139,18 @@ protected:
QString m_iconUrl;
};
} // NS DTO
namespace Support {
using ClientCapabilities = Jellyfin::DTO::ClientCapabilities;
template <>
ClientCapabilities fromJsonValue(const QJsonValue &source, convertType<ClientCapabilities>);
template<>
QJsonValue toJsonValue(const ClientCapabilities &source, convertType<ClientCapabilities>);
} // NS DTO
} // NS Jellyfin

View file

@ -42,6 +42,10 @@
#include "JellyfinQt/dto/generalcommandtype.h"
#include "JellyfinQt/support/jsonconv.h"
namespace Jellyfin {
// Forward declaration
class ApiClient;
}
namespace Jellyfin {
namespace DTO {
@ -58,7 +62,7 @@ public:
static ClientCapabilitiesDto fromJson(QJsonObject source);
void setFromJson(QJsonObject source);
QJsonObject toJson();
QJsonObject toJson() const;
// Properties
/**
@ -171,6 +175,18 @@ protected:
QString m_iconUrl;
};
} // NS DTO
namespace Support {
using ClientCapabilitiesDto = Jellyfin::DTO::ClientCapabilitiesDto;
template <>
ClientCapabilitiesDto fromJsonValue(const QJsonValue &source, convertType<ClientCapabilitiesDto>);
template<>
QJsonValue toJsonValue(const ClientCapabilitiesDto &source, convertType<ClientCapabilitiesDto>);
} // NS DTO
} // NS Jellyfin

View file

@ -41,6 +41,10 @@
#include "JellyfinQt/dto/profilecondition.h"
#include "JellyfinQt/support/jsonconv.h"
namespace Jellyfin {
// Forward declaration
class ApiClient;
}
namespace Jellyfin {
namespace DTO {
@ -57,7 +61,7 @@ public:
static CodecProfile fromJson(QJsonObject source);
void setFromJson(QJsonObject source);
QJsonObject toJson();
QJsonObject toJson() const;
// Properties
@ -102,6 +106,18 @@ protected:
QString m_container;
};
} // NS DTO
namespace Support {
using CodecProfile = Jellyfin::DTO::CodecProfile;
template <>
CodecProfile fromJsonValue(const QJsonValue &source, convertType<CodecProfile>);
template<>
QJsonValue toJsonValue(const CodecProfile &source, convertType<CodecProfile>);
} // NS DTO
} // NS Jellyfin

View file

@ -36,6 +36,10 @@
#include "JellyfinQt/support/jsonconv.h"
namespace Jellyfin {
// Forward declaration
class ApiClient;
}
namespace Jellyfin {
namespace DTO {
@ -53,7 +57,19 @@ private:
explicit CodecTypeClass();
};
typedef CodecTypeClass::Value CodecType;
using CodecType = CodecTypeClass::Value;
} // NS DTO
namespace Support {
using CodecType = Jellyfin::DTO::CodecType;
template <>
CodecType fromJsonValue(const QJsonValue &source, convertType<CodecType>);
template <>
QJsonValue toJsonValue(const CodecType &source, convertType<CodecType>);
} // NS DTO
} // NS Jellyfin

View file

@ -37,6 +37,10 @@
#include "JellyfinQt/support/jsonconv.h"
namespace Jellyfin {
// Forward declaration
class ApiClient;
}
namespace Jellyfin {
namespace DTO {
@ -53,7 +57,7 @@ public:
static CollectionCreationResult fromJson(QJsonObject source);
void setFromJson(QJsonObject source);
QJsonObject toJson();
QJsonObject toJson() const;
// Properties
@ -66,6 +70,18 @@ protected:
QString m_jellyfinId;
};
} // NS DTO
namespace Support {
using CollectionCreationResult = Jellyfin::DTO::CollectionCreationResult;
template <>
CollectionCreationResult fromJsonValue(const QJsonValue &source, convertType<CollectionCreationResult>);
template<>
QJsonValue toJsonValue(const CollectionCreationResult &source, convertType<CollectionCreationResult>);
} // NS DTO
} // NS Jellyfin

View file

@ -38,6 +38,10 @@
#include "JellyfinQt/dto/configurationpagetype.h"
#include "JellyfinQt/support/jsonconv.h"
namespace Jellyfin {
// Forward declaration
class ApiClient;
}
namespace Jellyfin {
namespace DTO {
@ -54,7 +58,7 @@ public:
static ConfigurationPageInfo fromJson(QJsonObject source);
void setFromJson(QJsonObject source);
QJsonObject toJson();
QJsonObject toJson() const;
// Properties
/**
@ -137,6 +141,18 @@ protected:
QString m_pluginId;
};
} // NS DTO
namespace Support {
using ConfigurationPageInfo = Jellyfin::DTO::ConfigurationPageInfo;
template <>
ConfigurationPageInfo fromJsonValue(const QJsonValue &source, convertType<ConfigurationPageInfo>);
template<>
QJsonValue toJsonValue(const ConfigurationPageInfo &source, convertType<ConfigurationPageInfo>);
} // NS DTO
} // NS Jellyfin

View file

@ -36,6 +36,10 @@
#include "JellyfinQt/support/jsonconv.h"
namespace Jellyfin {
// Forward declaration
class ApiClient;
}
namespace Jellyfin {
namespace DTO {
@ -52,7 +56,19 @@ private:
explicit ConfigurationPageTypeClass();
};
typedef ConfigurationPageTypeClass::Value ConfigurationPageType;
using ConfigurationPageType = ConfigurationPageTypeClass::Value;
} // NS DTO
namespace Support {
using ConfigurationPageType = Jellyfin::DTO::ConfigurationPageType;
template <>
ConfigurationPageType fromJsonValue(const QJsonValue &source, convertType<ConfigurationPageType>);
template <>
QJsonValue toJsonValue(const ConfigurationPageType &source, convertType<ConfigurationPageType>);
} // NS DTO
} // NS Jellyfin

View file

@ -41,6 +41,10 @@
#include "JellyfinQt/dto/profilecondition.h"
#include "JellyfinQt/support/jsonconv.h"
namespace Jellyfin {
// Forward declaration
class ApiClient;
}
namespace Jellyfin {
namespace DTO {
@ -57,7 +61,7 @@ public:
static ContainerProfile fromJson(QJsonObject source);
void setFromJson(QJsonObject source);
QJsonObject toJson();
QJsonObject toJson() const;
// Properties
@ -86,6 +90,18 @@ protected:
QString m_container;
};
} // NS DTO
namespace Support {
using ContainerProfile = Jellyfin::DTO::ContainerProfile;
template <>
ContainerProfile fromJsonValue(const QJsonValue &source, convertType<ContainerProfile>);
template<>
QJsonValue toJsonValue(const ContainerProfile &source, convertType<ContainerProfile>);
} // NS DTO
} // NS Jellyfin

View file

@ -37,6 +37,10 @@
#include "JellyfinQt/support/jsonconv.h"
namespace Jellyfin {
// Forward declaration
class ApiClient;
}
namespace Jellyfin {
namespace DTO {
@ -53,13 +57,13 @@ public:
static ControlResponse fromJson(QJsonObject source);
void setFromJson(QJsonObject source);
QJsonObject toJson();
QJsonObject toJson() const;
// Properties
std::optional<QJsonObject> headers() const;
QJsonObject headers() const;
void setHeaders(std::optional<QJsonObject> newHeaders);
void setHeaders(QJsonObject newHeaders);
bool headersNull() const;
void setHeadersNull();
@ -77,11 +81,23 @@ public:
protected:
std::optional<QJsonObject> m_headers = std::nullopt;
QJsonObject m_headers;
QString m_xml;
bool m_isSuccessful;
};
} // NS DTO
namespace Support {
using ControlResponse = Jellyfin::DTO::ControlResponse;
template <>
ControlResponse fromJsonValue(const QJsonValue &source, convertType<ControlResponse>);
template<>
QJsonValue toJsonValue(const ControlResponse &source, convertType<ControlResponse>);
} // NS DTO
} // NS Jellyfin

View file

@ -37,6 +37,10 @@
#include "JellyfinQt/support/jsonconv.h"
namespace Jellyfin {
// Forward declaration
class ApiClient;
}
namespace Jellyfin {
namespace DTO {
@ -53,7 +57,7 @@ public:
static CountryInfo fromJson(QJsonObject source);
void setFromJson(QJsonObject source);
QJsonObject toJson();
QJsonObject toJson() const;
// Properties
/**
@ -108,6 +112,18 @@ protected:
QString m_threeLetterISORegionName;
};
} // NS DTO
namespace Support {
using CountryInfo = Jellyfin::DTO::CountryInfo;
template <>
CountryInfo fromJsonValue(const QJsonValue &source, convertType<CountryInfo>);
template<>
QJsonValue toJsonValue(const CountryInfo &source, convertType<CountryInfo>);
} // NS DTO
} // NS Jellyfin

View file

@ -39,6 +39,10 @@
#include "JellyfinQt/support/jsonconv.h"
namespace Jellyfin {
// Forward declaration
class ApiClient;
}
namespace Jellyfin {
namespace DTO {
@ -55,7 +59,7 @@ public:
static CreatePlaylistDto fromJson(QJsonObject source);
void setFromJson(QJsonObject source);
QJsonObject toJson();
QJsonObject toJson() const;
// Properties
/**
@ -110,6 +114,18 @@ protected:
QString m_mediaType;
};
} // NS DTO
namespace Support {
using CreatePlaylistDto = Jellyfin::DTO::CreatePlaylistDto;
template <>
CreatePlaylistDto fromJsonValue(const QJsonValue &source, convertType<CreatePlaylistDto>);
template<>
QJsonValue toJsonValue(const CreatePlaylistDto &source, convertType<CreatePlaylistDto>);
} // NS DTO
} // NS Jellyfin

View file

@ -37,6 +37,10 @@
#include "JellyfinQt/support/jsonconv.h"
namespace Jellyfin {
// Forward declaration
class ApiClient;
}
namespace Jellyfin {
namespace DTO {
@ -53,7 +57,7 @@ public:
static CreateUserByName fromJson(QJsonObject source);
void setFromJson(QJsonObject source);
QJsonObject toJson();
QJsonObject toJson() const;
// Properties
/**
@ -84,6 +88,18 @@ protected:
QString m_password;
};
} // NS DTO
namespace Support {
using CreateUserByName = Jellyfin::DTO::CreateUserByName;
template <>
CreateUserByName fromJsonValue(const QJsonValue &source, convertType<CreateUserByName>);
template<>
QJsonValue toJsonValue(const CreateUserByName &source, convertType<CreateUserByName>);
} // NS DTO
} // NS Jellyfin

View file

@ -39,6 +39,10 @@
#include "JellyfinQt/support/jsonconv.h"
namespace Jellyfin {
// Forward declaration
class ApiClient;
}
namespace Jellyfin {
namespace DTO {
@ -55,7 +59,7 @@ public:
static CultureDto fromJson(QJsonObject source);
void setFromJson(QJsonObject source);
QJsonObject toJson();
QJsonObject toJson() const;
// Properties
/**
@ -118,6 +122,18 @@ protected:
QStringList m_threeLetterISOLanguageNames;
};
} // NS DTO
namespace Support {
using CultureDto = Jellyfin::DTO::CultureDto;
template <>
CultureDto fromJsonValue(const QJsonValue &source, convertType<CultureDto>);
template<>
QJsonValue toJsonValue(const CultureDto &source, convertType<CultureDto>);
} // NS DTO
} // NS Jellyfin

View file

@ -36,6 +36,10 @@
#include "JellyfinQt/support/jsonconv.h"
namespace Jellyfin {
// Forward declaration
class ApiClient;
}
namespace Jellyfin {
namespace DTO {
@ -57,7 +61,19 @@ private:
explicit DayOfWeekClass();
};
typedef DayOfWeekClass::Value DayOfWeek;
using DayOfWeek = DayOfWeekClass::Value;
} // NS DTO
namespace Support {
using DayOfWeek = Jellyfin::DTO::DayOfWeek;
template <>
DayOfWeek fromJsonValue(const QJsonValue &source, convertType<DayOfWeek>);
template <>
QJsonValue toJsonValue(const DayOfWeek &source, convertType<DayOfWeek>);
} // NS DTO
} // NS Jellyfin

View file

@ -36,6 +36,10 @@
#include "JellyfinQt/support/jsonconv.h"
namespace Jellyfin {
// Forward declaration
class ApiClient;
}
namespace Jellyfin {
namespace DTO {
@ -53,7 +57,19 @@ private:
explicit DayPatternClass();
};
typedef DayPatternClass::Value DayPattern;
using DayPattern = DayPatternClass::Value;
} // NS DTO
namespace Support {
using DayPattern = Jellyfin::DTO::DayPattern;
template <>
DayPattern fromJsonValue(const QJsonValue &source, convertType<DayPattern>);
template <>
QJsonValue toJsonValue(const DayPattern &source, convertType<DayPattern>);
} // NS DTO
} // NS Jellyfin

View file

@ -37,6 +37,10 @@
#include "JellyfinQt/support/jsonconv.h"
namespace Jellyfin {
// Forward declaration
class ApiClient;
}
namespace Jellyfin {
namespace DTO {
@ -53,7 +57,7 @@ public:
static DefaultDirectoryBrowserInfoDto fromJson(QJsonObject source);
void setFromJson(QJsonObject source);
QJsonObject toJson();
QJsonObject toJson() const;
// Properties
/**
@ -72,6 +76,18 @@ protected:
QString m_path;
};
} // NS DTO
namespace Support {
using DefaultDirectoryBrowserInfoDto = Jellyfin::DTO::DefaultDirectoryBrowserInfoDto;
template <>
DefaultDirectoryBrowserInfoDto fromJsonValue(const QJsonValue &source, convertType<DefaultDirectoryBrowserInfoDto>);
template<>
QJsonValue toJsonValue(const DefaultDirectoryBrowserInfoDto &source, convertType<DefaultDirectoryBrowserInfoDto>);
} // NS DTO
} // NS Jellyfin

View file

@ -40,6 +40,10 @@
#include "JellyfinQt/dto/httpheaderinfo.h"
#include "JellyfinQt/support/jsonconv.h"
namespace Jellyfin {
// Forward declaration
class ApiClient;
}
namespace Jellyfin {
namespace DTO {
@ -56,7 +60,7 @@ public:
static DeviceIdentification fromJson(QJsonObject source);
void setFromJson(QJsonObject source);
QJsonObject toJson();
QJsonObject toJson() const;
// Properties
/**
@ -171,6 +175,18 @@ protected:
QList<HttpHeaderInfo> m_headers;
};
} // NS DTO
namespace Support {
using DeviceIdentification = Jellyfin::DTO::DeviceIdentification;
template <>
DeviceIdentification fromJsonValue(const QJsonValue &source, convertType<DeviceIdentification>);
template<>
QJsonValue toJsonValue(const DeviceIdentification &source, convertType<DeviceIdentification>);
} // NS DTO
} // NS Jellyfin

View file

@ -40,6 +40,10 @@
#include "JellyfinQt/dto/clientcapabilities.h"
#include "JellyfinQt/support/jsonconv.h"
namespace Jellyfin {
// Forward declaration
class ApiClient;
}
namespace Jellyfin {
namespace DTO {
@ -56,7 +60,7 @@ public:
static DeviceInfo fromJson(QJsonObject source);
void setFromJson(QJsonObject source);
QJsonObject toJson();
QJsonObject toJson() const;
// Properties
@ -153,6 +157,18 @@ protected:
QString m_iconUrl;
};
} // NS DTO
namespace Support {
using DeviceInfo = Jellyfin::DTO::DeviceInfo;
template <>
DeviceInfo fromJsonValue(const QJsonValue &source, convertType<DeviceInfo>);
template<>
QJsonValue toJsonValue(const DeviceInfo &source, convertType<DeviceInfo>);
} // NS DTO
} // NS Jellyfin

View file

@ -39,6 +39,10 @@
#include "JellyfinQt/dto/deviceinfo.h"
#include "JellyfinQt/support/jsonconv.h"
namespace Jellyfin {
// Forward declaration
class ApiClient;
}
namespace Jellyfin {
namespace DTO {
@ -55,7 +59,7 @@ public:
static DeviceInfoQueryResult fromJson(QJsonObject source);
void setFromJson(QJsonObject source);
QJsonObject toJson();
QJsonObject toJson() const;
// Properties
/**
@ -94,6 +98,18 @@ protected:
qint32 m_startIndex;
};
} // NS DTO
namespace Support {
using DeviceInfoQueryResult = Jellyfin::DTO::DeviceInfoQueryResult;
template <>
DeviceInfoQueryResult fromJsonValue(const QJsonValue &source, convertType<DeviceInfoQueryResult>);
template<>
QJsonValue toJsonValue(const DeviceInfoQueryResult &source, convertType<DeviceInfoQueryResult>);
} // NS DTO
} // NS Jellyfin

View file

@ -37,6 +37,10 @@
#include "JellyfinQt/support/jsonconv.h"
namespace Jellyfin {
// Forward declaration
class ApiClient;
}
namespace Jellyfin {
namespace DTO {
@ -53,7 +57,7 @@ public:
static DeviceOptions fromJson(QJsonObject source);
void setFromJson(QJsonObject source);
QJsonObject toJson();
QJsonObject toJson() const;
// Properties
@ -68,6 +72,18 @@ protected:
QString m_customName;
};
} // NS DTO
namespace Support {
using DeviceOptions = Jellyfin::DTO::DeviceOptions;
template <>
DeviceOptions fromJsonValue(const QJsonValue &source, convertType<DeviceOptions>);
template<>
QJsonValue toJsonValue(const DeviceOptions &source, convertType<DeviceOptions>);
} // NS DTO
} // NS Jellyfin

View file

@ -48,6 +48,10 @@
#include "JellyfinQt/dto/xmlattribute.h"
#include "JellyfinQt/support/jsonconv.h"
namespace Jellyfin {
// Forward declaration
class ApiClient;
}
namespace Jellyfin {
namespace DTO {
@ -64,7 +68,7 @@ public:
static DeviceProfile fromJson(QJsonObject source);
void setFromJson(QJsonObject source);
QJsonObject toJson();
QJsonObject toJson() const;
// Properties
/**
@ -513,6 +517,18 @@ protected:
QList<SubtitleProfile> m_subtitleProfiles;
};
} // NS DTO
namespace Support {
using DeviceProfile = Jellyfin::DTO::DeviceProfile;
template <>
DeviceProfile fromJsonValue(const QJsonValue &source, convertType<DeviceProfile>);
template<>
QJsonValue toJsonValue(const DeviceProfile &source, convertType<DeviceProfile>);
} // NS DTO
} // NS Jellyfin

View file

@ -38,6 +38,10 @@
#include "JellyfinQt/dto/deviceprofiletype.h"
#include "JellyfinQt/support/jsonconv.h"
namespace Jellyfin {
// Forward declaration
class ApiClient;
}
namespace Jellyfin {
namespace DTO {
@ -54,7 +58,7 @@ public:
static DeviceProfileInfo fromJson(QJsonObject source);
void setFromJson(QJsonObject source);
QJsonObject toJson();
QJsonObject toJson() const;
// Properties
/**
@ -91,6 +95,18 @@ protected:
DeviceProfileType m_type;
};
} // NS DTO
namespace Support {
using DeviceProfileInfo = Jellyfin::DTO::DeviceProfileInfo;
template <>
DeviceProfileInfo fromJsonValue(const QJsonValue &source, convertType<DeviceProfileInfo>);
template<>
QJsonValue toJsonValue(const DeviceProfileInfo &source, convertType<DeviceProfileInfo>);
} // NS DTO
} // NS Jellyfin

View file

@ -36,6 +36,10 @@
#include "JellyfinQt/support/jsonconv.h"
namespace Jellyfin {
// Forward declaration
class ApiClient;
}
namespace Jellyfin {
namespace DTO {
@ -52,7 +56,19 @@ private:
explicit DeviceProfileTypeClass();
};
typedef DeviceProfileTypeClass::Value DeviceProfileType;
using DeviceProfileType = DeviceProfileTypeClass::Value;
} // NS DTO
namespace Support {
using DeviceProfileType = Jellyfin::DTO::DeviceProfileType;
template <>
DeviceProfileType fromJsonValue(const QJsonValue &source, convertType<DeviceProfileType>);
template <>
QJsonValue toJsonValue(const DeviceProfileType &source, convertType<DeviceProfileType>);
} // NS DTO
} // NS Jellyfin

View file

@ -38,6 +38,10 @@
#include "JellyfinQt/dto/dlnaprofiletype.h"
#include "JellyfinQt/support/jsonconv.h"
namespace Jellyfin {
// Forward declaration
class ApiClient;
}
namespace Jellyfin {
namespace DTO {
@ -54,7 +58,7 @@ public:
static DirectPlayProfile fromJson(QJsonObject source);
void setFromJson(QJsonObject source);
QJsonObject toJson();
QJsonObject toJson() const;
// Properties
@ -91,6 +95,18 @@ protected:
DlnaProfileType m_type;
};
} // NS DTO
namespace Support {
using DirectPlayProfile = Jellyfin::DTO::DirectPlayProfile;
template <>
DirectPlayProfile fromJsonValue(const QJsonValue &source, convertType<DirectPlayProfile>);
template<>
QJsonValue toJsonValue(const DirectPlayProfile &source, convertType<DirectPlayProfile>);
} // NS DTO
} // NS Jellyfin

View file

@ -39,6 +39,10 @@
#include "JellyfinQt/dto/sortorder.h"
#include "JellyfinQt/support/jsonconv.h"
namespace Jellyfin {
// Forward declaration
class ApiClient;
}
namespace Jellyfin {
namespace DTO {
@ -55,7 +59,7 @@ public:
static DisplayPreferencesDto fromJson(QJsonObject source);
void setFromJson(QJsonObject source);
QJsonObject toJson();
QJsonObject toJson() const;
// Properties
/**
@ -132,11 +136,11 @@ public:
/**
* @brief Gets or sets the custom prefs.
*/
std::optional<QJsonObject> customPrefs() const;
QJsonObject customPrefs() const;
/**
* @brief Gets or sets the custom prefs.
*/
void setCustomPrefs(std::optional<QJsonObject> newCustomPrefs);
void setCustomPrefs(QJsonObject newCustomPrefs);
bool customPrefsNull() const;
void setCustomPrefsNull();
@ -197,7 +201,7 @@ protected:
bool m_rememberIndexing;
qint32 m_primaryImageHeight;
qint32 m_primaryImageWidth;
std::optional<QJsonObject> m_customPrefs = std::nullopt;
QJsonObject m_customPrefs;
ScrollDirection m_scrollDirection;
bool m_showBackdrop;
bool m_rememberSorting;
@ -206,6 +210,18 @@ protected:
QString m_client;
};
} // NS DTO
namespace Support {
using DisplayPreferencesDto = Jellyfin::DTO::DisplayPreferencesDto;
template <>
DisplayPreferencesDto fromJsonValue(const QJsonValue &source, convertType<DisplayPreferencesDto>);
template<>
QJsonValue toJsonValue(const DisplayPreferencesDto &source, convertType<DisplayPreferencesDto>);
} // NS DTO
} // NS Jellyfin

View file

@ -36,6 +36,10 @@
#include "JellyfinQt/support/jsonconv.h"
namespace Jellyfin {
// Forward declaration
class ApiClient;
}
namespace Jellyfin {
namespace DTO {
@ -53,7 +57,19 @@ private:
explicit DlnaProfileTypeClass();
};
typedef DlnaProfileTypeClass::Value DlnaProfileType;
using DlnaProfileType = DlnaProfileTypeClass::Value;
} // NS DTO
namespace Support {
using DlnaProfileType = Jellyfin::DTO::DlnaProfileType;
template <>
DlnaProfileType fromJsonValue(const QJsonValue &source, convertType<DlnaProfileType>);
template <>
QJsonValue toJsonValue(const DlnaProfileType &source, convertType<DlnaProfileType>);
} // NS DTO
} // NS Jellyfin

View file

@ -36,6 +36,10 @@
#include "JellyfinQt/support/jsonconv.h"
namespace Jellyfin {
// Forward declaration
class ApiClient;
}
namespace Jellyfin {
namespace DTO {
@ -60,7 +64,19 @@ private:
explicit DynamicDayOfWeekClass();
};
typedef DynamicDayOfWeekClass::Value DynamicDayOfWeek;
using DynamicDayOfWeek = DynamicDayOfWeekClass::Value;
} // NS DTO
namespace Support {
using DynamicDayOfWeek = Jellyfin::DTO::DynamicDayOfWeek;
template <>
DynamicDayOfWeek fromJsonValue(const QJsonValue &source, convertType<DynamicDayOfWeek>);
template <>
QJsonValue toJsonValue(const DynamicDayOfWeek &source, convertType<DynamicDayOfWeek>);
} // NS DTO
} // NS Jellyfin

View file

@ -36,6 +36,10 @@
#include "JellyfinQt/support/jsonconv.h"
namespace Jellyfin {
// Forward declaration
class ApiClient;
}
namespace Jellyfin {
namespace DTO {
@ -52,7 +56,19 @@ private:
explicit EncodingContextClass();
};
typedef EncodingContextClass::Value EncodingContext;
using EncodingContext = EncodingContextClass::Value;
} // NS DTO
namespace Support {
using EncodingContext = Jellyfin::DTO::EncodingContext;
template <>
EncodingContext fromJsonValue(const QJsonValue &source, convertType<EncodingContext>);
template <>
QJsonValue toJsonValue(const EncodingContext &source, convertType<EncodingContext>);
} // NS DTO
} // NS Jellyfin

View file

@ -36,6 +36,10 @@
#include "JellyfinQt/support/jsonconv.h"
namespace Jellyfin {
// Forward declaration
class ApiClient;
}
namespace Jellyfin {
namespace DTO {
@ -52,7 +56,7 @@ public:
static EndPointInfo fromJson(QJsonObject source);
void setFromJson(QJsonObject source);
QJsonObject toJson();
QJsonObject toJson() const;
// Properties
@ -71,6 +75,18 @@ protected:
bool m_isInNetwork;
};
} // NS DTO
namespace Support {
using EndPointInfo = Jellyfin::DTO::EndPointInfo;
template <>
EndPointInfo fromJsonValue(const QJsonValue &source, convertType<EndPointInfo>);
template<>
QJsonValue toJsonValue(const EndPointInfo &source, convertType<EndPointInfo>);
} // NS DTO
} // NS Jellyfin

View file

@ -38,6 +38,10 @@
#include "JellyfinQt/dto/externalidmediatype.h"
#include "JellyfinQt/support/jsonconv.h"
namespace Jellyfin {
// Forward declaration
class ApiClient;
}
namespace Jellyfin {
namespace DTO {
@ -54,7 +58,7 @@ public:
static ExternalIdInfo fromJson(QJsonObject source);
void setFromJson(QJsonObject source);
QJsonObject toJson();
QJsonObject toJson() const;
// Properties
/**
@ -103,6 +107,18 @@ protected:
QString m_urlFormatString;
};
} // NS DTO
namespace Support {
using ExternalIdInfo = Jellyfin::DTO::ExternalIdInfo;
template <>
ExternalIdInfo fromJsonValue(const QJsonValue &source, convertType<ExternalIdInfo>);
template<>
QJsonValue toJsonValue(const ExternalIdInfo &source, convertType<ExternalIdInfo>);
} // NS DTO
} // NS Jellyfin

View file

@ -36,6 +36,10 @@
#include "JellyfinQt/support/jsonconv.h"
namespace Jellyfin {
// Forward declaration
class ApiClient;
}
namespace Jellyfin {
namespace DTO {
@ -62,7 +66,19 @@ private:
explicit ExternalIdMediaTypeClass();
};
typedef ExternalIdMediaTypeClass::Value ExternalIdMediaType;
using ExternalIdMediaType = ExternalIdMediaTypeClass::Value;
} // NS DTO
namespace Support {
using ExternalIdMediaType = Jellyfin::DTO::ExternalIdMediaType;
template <>
ExternalIdMediaType fromJsonValue(const QJsonValue &source, convertType<ExternalIdMediaType>);
template <>
QJsonValue toJsonValue(const ExternalIdMediaType &source, convertType<ExternalIdMediaType>);
} // NS DTO
} // NS Jellyfin

View file

@ -37,6 +37,10 @@
#include "JellyfinQt/support/jsonconv.h"
namespace Jellyfin {
// Forward declaration
class ApiClient;
}
namespace Jellyfin {
namespace DTO {
@ -53,7 +57,7 @@ public:
static ExternalUrl fromJson(QJsonObject source);
void setFromJson(QJsonObject source);
QJsonObject toJson();
QJsonObject toJson() const;
// Properties
/**
@ -84,6 +88,18 @@ protected:
QString m_url;
};
} // NS DTO
namespace Support {
using ExternalUrl = Jellyfin::DTO::ExternalUrl;
template <>
ExternalUrl fromJsonValue(const QJsonValue &source, convertType<ExternalUrl>);
template<>
QJsonValue toJsonValue(const ExternalUrl &source, convertType<ExternalUrl>);
} // NS DTO
} // NS Jellyfin

View file

@ -36,6 +36,10 @@
#include "JellyfinQt/support/jsonconv.h"
namespace Jellyfin {
// Forward declaration
class ApiClient;
}
namespace Jellyfin {
namespace DTO {
@ -54,7 +58,19 @@ private:
explicit FFmpegLocationClass();
};
typedef FFmpegLocationClass::Value FFmpegLocation;
using FFmpegLocation = FFmpegLocationClass::Value;
} // NS DTO
namespace Support {
using FFmpegLocation = Jellyfin::DTO::FFmpegLocation;
template <>
FFmpegLocation fromJsonValue(const QJsonValue &source, convertType<FFmpegLocation>);
template <>
QJsonValue toJsonValue(const FFmpegLocation &source, convertType<FFmpegLocation>);
} // NS DTO
} // NS Jellyfin

View file

@ -38,6 +38,10 @@
#include "JellyfinQt/dto/filesystementrytype.h"
#include "JellyfinQt/support/jsonconv.h"
namespace Jellyfin {
// Forward declaration
class ApiClient;
}
namespace Jellyfin {
namespace DTO {
@ -54,7 +58,7 @@ public:
static FileSystemEntryInfo fromJson(QJsonObject source);
void setFromJson(QJsonObject source);
QJsonObject toJson();
QJsonObject toJson() const;
// Properties
/**
@ -91,6 +95,18 @@ protected:
FileSystemEntryType m_type;
};
} // NS DTO
namespace Support {
using FileSystemEntryInfo = Jellyfin::DTO::FileSystemEntryInfo;
template <>
FileSystemEntryInfo fromJsonValue(const QJsonValue &source, convertType<FileSystemEntryInfo>);
template<>
QJsonValue toJsonValue(const FileSystemEntryInfo &source, convertType<FileSystemEntryInfo>);
} // NS DTO
} // NS Jellyfin

View file

@ -36,6 +36,10 @@
#include "JellyfinQt/support/jsonconv.h"
namespace Jellyfin {
// Forward declaration
class ApiClient;
}
namespace Jellyfin {
namespace DTO {
@ -54,7 +58,19 @@ private:
explicit FileSystemEntryTypeClass();
};
typedef FileSystemEntryTypeClass::Value FileSystemEntryType;
using FileSystemEntryType = FileSystemEntryTypeClass::Value;
} // NS DTO
namespace Support {
using FileSystemEntryType = Jellyfin::DTO::FileSystemEntryType;
template <>
FileSystemEntryType fromJsonValue(const QJsonValue &source, convertType<FileSystemEntryType>);
template <>
QJsonValue toJsonValue(const FileSystemEntryType &source, convertType<FileSystemEntryType>);
} // NS DTO
} // NS Jellyfin

View file

@ -38,6 +38,10 @@
#include "JellyfinQt/support/jsonconv.h"
namespace Jellyfin {
// Forward declaration
class ApiClient;
}
namespace Jellyfin {
namespace DTO {
@ -54,7 +58,7 @@ public:
static FontFile fromJson(QJsonObject source);
void setFromJson(QJsonObject source);
QJsonObject toJson();
QJsonObject toJson() const;
// Properties
/**
@ -103,6 +107,18 @@ protected:
QDateTime m_dateModified;
};
} // NS DTO
namespace Support {
using FontFile = Jellyfin::DTO::FontFile;
template <>
FontFile fromJsonValue(const QJsonValue &source, convertType<FontFile>);
template<>
QJsonValue toJsonValue(const FontFile &source, convertType<FontFile>);
} // NS DTO
} // NS Jellyfin

View file

@ -36,6 +36,10 @@
#include "JellyfinQt/support/jsonconv.h"
namespace Jellyfin {
// Forward declaration
class ApiClient;
}
namespace Jellyfin {
namespace DTO {
@ -53,7 +57,19 @@ private:
explicit ForgotPasswordActionClass();
};
typedef ForgotPasswordActionClass::Value ForgotPasswordAction;
using ForgotPasswordAction = ForgotPasswordActionClass::Value;
} // NS DTO
namespace Support {
using ForgotPasswordAction = Jellyfin::DTO::ForgotPasswordAction;
template <>
ForgotPasswordAction fromJsonValue(const QJsonValue &source, convertType<ForgotPasswordAction>);
template <>
QJsonValue toJsonValue(const ForgotPasswordAction &source, convertType<ForgotPasswordAction>);
} // NS DTO
} // NS Jellyfin

View file

@ -37,6 +37,10 @@
#include "JellyfinQt/support/jsonconv.h"
namespace Jellyfin {
// Forward declaration
class ApiClient;
}
namespace Jellyfin {
namespace DTO {
@ -53,7 +57,7 @@ public:
static ForgotPasswordDto fromJson(QJsonObject source);
void setFromJson(QJsonObject source);
QJsonObject toJson();
QJsonObject toJson() const;
// Properties
/**
@ -70,6 +74,18 @@ protected:
QString m_enteredUsername;
};
} // NS DTO
namespace Support {
using ForgotPasswordDto = Jellyfin::DTO::ForgotPasswordDto;
template <>
ForgotPasswordDto fromJsonValue(const QJsonValue &source, convertType<ForgotPasswordDto>);
template<>
QJsonValue toJsonValue(const ForgotPasswordDto &source, convertType<ForgotPasswordDto>);
} // NS DTO
} // NS Jellyfin

View file

@ -39,6 +39,10 @@
#include "JellyfinQt/dto/forgotpasswordaction.h"
#include "JellyfinQt/support/jsonconv.h"
namespace Jellyfin {
// Forward declaration
class ApiClient;
}
namespace Jellyfin {
namespace DTO {
@ -55,7 +59,7 @@ public:
static ForgotPasswordResult fromJson(QJsonObject source);
void setFromJson(QJsonObject source);
QJsonObject toJson();
QJsonObject toJson() const;
// Properties
@ -92,6 +96,18 @@ protected:
QDateTime m_pinExpirationDate;
};
} // NS DTO
namespace Support {
using ForgotPasswordResult = Jellyfin::DTO::ForgotPasswordResult;
template <>
ForgotPasswordResult fromJsonValue(const QJsonValue &source, convertType<ForgotPasswordResult>);
template<>
QJsonValue toJsonValue(const ForgotPasswordResult &source, convertType<ForgotPasswordResult>);
} // NS DTO
} // NS Jellyfin

View file

@ -38,6 +38,10 @@
#include "JellyfinQt/dto/generalcommandtype.h"
#include "JellyfinQt/support/jsonconv.h"
namespace Jellyfin {
// Forward declaration
class ApiClient;
}
namespace Jellyfin {
namespace DTO {
@ -54,7 +58,7 @@ public:
static GeneralCommand fromJson(QJsonObject source);
void setFromJson(QJsonObject source);
QJsonObject toJson();
QJsonObject toJson() const;
// Properties
@ -68,9 +72,9 @@ public:
void setControllingUserId(QString newControllingUserId);
std::optional<QJsonObject> arguments() const;
QJsonObject arguments() const;
void setArguments(std::optional<QJsonObject> newArguments);
void setArguments(QJsonObject newArguments);
bool argumentsNull() const;
void setArgumentsNull();
@ -78,9 +82,21 @@ public:
protected:
GeneralCommandType m_name;
QString m_controllingUserId;
std::optional<QJsonObject> m_arguments = std::nullopt;
QJsonObject m_arguments;
};
} // NS DTO
namespace Support {
using GeneralCommand = Jellyfin::DTO::GeneralCommand;
template <>
GeneralCommand fromJsonValue(const QJsonValue &source, convertType<GeneralCommand>);
template<>
QJsonValue toJsonValue(const GeneralCommand &source, convertType<GeneralCommand>);
} // NS DTO
} // NS Jellyfin

View file

@ -36,6 +36,10 @@
#include "JellyfinQt/support/jsonconv.h"
namespace Jellyfin {
// Forward declaration
class ApiClient;
}
namespace Jellyfin {
namespace DTO {
@ -91,7 +95,19 @@ private:
explicit GeneralCommandTypeClass();
};
typedef GeneralCommandTypeClass::Value GeneralCommandType;
using GeneralCommandType = GeneralCommandTypeClass::Value;
} // NS DTO
namespace Support {
using GeneralCommandType = Jellyfin::DTO::GeneralCommandType;
template <>
GeneralCommandType fromJsonValue(const QJsonValue &source, convertType<GeneralCommandType>);
template <>
QJsonValue toJsonValue(const GeneralCommandType &source, convertType<GeneralCommandType>);
} // NS DTO
} // NS Jellyfin

View file

@ -42,6 +42,10 @@
#include "JellyfinQt/dto/itemfields.h"
#include "JellyfinQt/support/jsonconv.h"
namespace Jellyfin {
// Forward declaration
class ApiClient;
}
namespace Jellyfin {
namespace DTO {
@ -58,7 +62,7 @@ public:
static GetProgramsDto fromJson(QJsonObject source);
void setFromJson(QJsonObject source);
QJsonObject toJson();
QJsonObject toJson() const;
// Properties
/**
@ -425,6 +429,18 @@ protected:
QList<ItemFields> m_fields;
};
} // NS DTO
namespace Support {
using GetProgramsDto = Jellyfin::DTO::GetProgramsDto;
template <>
GetProgramsDto fromJsonValue(const QJsonValue &source, convertType<GetProgramsDto>);
template<>
QJsonValue toJsonValue(const GetProgramsDto &source, convertType<GetProgramsDto>);
} // NS DTO
} // NS Jellyfin

View file

@ -41,6 +41,10 @@
#include "JellyfinQt/dto/groupstatetype.h"
#include "JellyfinQt/support/jsonconv.h"
namespace Jellyfin {
// Forward declaration
class ApiClient;
}
namespace Jellyfin {
namespace DTO {
@ -57,7 +61,7 @@ public:
static GroupInfoDto fromJson(QJsonObject source);
void setFromJson(QJsonObject source);
QJsonObject toJson();
QJsonObject toJson() const;
// Properties
/**
@ -114,6 +118,18 @@ protected:
QDateTime m_lastUpdatedAt;
};
} // NS DTO
namespace Support {
using GroupInfoDto = Jellyfin::DTO::GroupInfoDto;
template <>
GroupInfoDto fromJsonValue(const QJsonValue &source, convertType<GroupInfoDto>);
template<>
QJsonValue toJsonValue(const GroupInfoDto &source, convertType<GroupInfoDto>);
} // NS DTO
} // NS Jellyfin

View file

@ -36,6 +36,10 @@
#include "JellyfinQt/support/jsonconv.h"
namespace Jellyfin {
// Forward declaration
class ApiClient;
}
namespace Jellyfin {
namespace DTO {
@ -52,7 +56,19 @@ private:
explicit GroupQueueModeClass();
};
typedef GroupQueueModeClass::Value GroupQueueMode;
using GroupQueueMode = GroupQueueModeClass::Value;
} // NS DTO
namespace Support {
using GroupQueueMode = Jellyfin::DTO::GroupQueueMode;
template <>
GroupQueueMode fromJsonValue(const QJsonValue &source, convertType<GroupQueueMode>);
template <>
QJsonValue toJsonValue(const GroupQueueMode &source, convertType<GroupQueueMode>);
} // NS DTO
} // NS Jellyfin

View file

@ -36,6 +36,10 @@
#include "JellyfinQt/support/jsonconv.h"
namespace Jellyfin {
// Forward declaration
class ApiClient;
}
namespace Jellyfin {
namespace DTO {
@ -53,7 +57,19 @@ private:
explicit GroupRepeatModeClass();
};
typedef GroupRepeatModeClass::Value GroupRepeatMode;
using GroupRepeatMode = GroupRepeatModeClass::Value;
} // NS DTO
namespace Support {
using GroupRepeatMode = Jellyfin::DTO::GroupRepeatMode;
template <>
GroupRepeatMode fromJsonValue(const QJsonValue &source, convertType<GroupRepeatMode>);
template <>
QJsonValue toJsonValue(const GroupRepeatMode &source, convertType<GroupRepeatMode>);
} // NS DTO
} // NS Jellyfin

View file

@ -36,6 +36,10 @@
#include "JellyfinQt/support/jsonconv.h"
namespace Jellyfin {
// Forward declaration
class ApiClient;
}
namespace Jellyfin {
namespace DTO {
@ -52,7 +56,19 @@ private:
explicit GroupShuffleModeClass();
};
typedef GroupShuffleModeClass::Value GroupShuffleMode;
using GroupShuffleMode = GroupShuffleModeClass::Value;
} // NS DTO
namespace Support {
using GroupShuffleMode = Jellyfin::DTO::GroupShuffleMode;
template <>
GroupShuffleMode fromJsonValue(const QJsonValue &source, convertType<GroupShuffleMode>);
template <>
QJsonValue toJsonValue(const GroupShuffleMode &source, convertType<GroupShuffleMode>);
} // NS DTO
} // NS Jellyfin

View file

@ -36,6 +36,10 @@
#include "JellyfinQt/support/jsonconv.h"
namespace Jellyfin {
// Forward declaration
class ApiClient;
}
namespace Jellyfin {
namespace DTO {
@ -54,7 +58,19 @@ private:
explicit GroupStateTypeClass();
};
typedef GroupStateTypeClass::Value GroupStateType;
using GroupStateType = GroupStateTypeClass::Value;
} // NS DTO
namespace Support {
using GroupStateType = Jellyfin::DTO::GroupStateType;
template <>
GroupStateType fromJsonValue(const QJsonValue &source, convertType<GroupStateType>);
template <>
QJsonValue toJsonValue(const GroupStateType &source, convertType<GroupStateType>);
} // NS DTO
} // NS Jellyfin

View file

@ -36,6 +36,10 @@
#include "JellyfinQt/support/jsonconv.h"
namespace Jellyfin {
// Forward declaration
class ApiClient;
}
namespace Jellyfin {
namespace DTO {
@ -61,7 +65,19 @@ private:
explicit GroupUpdateTypeClass();
};
typedef GroupUpdateTypeClass::Value GroupUpdateType;
using GroupUpdateType = GroupUpdateTypeClass::Value;
} // NS DTO
namespace Support {
using GroupUpdateType = Jellyfin::DTO::GroupUpdateType;
template <>
GroupUpdateType fromJsonValue(const QJsonValue &source, convertType<GroupUpdateType>);
template <>
QJsonValue toJsonValue(const GroupUpdateType &source, convertType<GroupUpdateType>);
} // NS DTO
} // NS Jellyfin

View file

@ -37,6 +37,10 @@
#include "JellyfinQt/support/jsonconv.h"
namespace Jellyfin {
// Forward declaration
class ApiClient;
}
namespace Jellyfin {
namespace DTO {
@ -53,7 +57,7 @@ public:
static GuideInfo fromJson(QJsonObject source);
void setFromJson(QJsonObject source);
QJsonObject toJson();
QJsonObject toJson() const;
// Properties
/**
@ -80,6 +84,18 @@ protected:
QDateTime m_endDate;
};
} // NS DTO
namespace Support {
using GuideInfo = Jellyfin::DTO::GuideInfo;
template <>
GuideInfo fromJsonValue(const QJsonValue &source, convertType<GuideInfo>);
template<>
QJsonValue toJsonValue(const GuideInfo &source, convertType<GuideInfo>);
} // NS DTO
} // NS Jellyfin

View file

@ -36,6 +36,10 @@
#include "JellyfinQt/support/jsonconv.h"
namespace Jellyfin {
// Forward declaration
class ApiClient;
}
namespace Jellyfin {
namespace DTO {
@ -53,7 +57,19 @@ private:
explicit HeaderMatchTypeClass();
};
typedef HeaderMatchTypeClass::Value HeaderMatchType;
using HeaderMatchType = HeaderMatchTypeClass::Value;
} // NS DTO
namespace Support {
using HeaderMatchType = Jellyfin::DTO::HeaderMatchType;
template <>
HeaderMatchType fromJsonValue(const QJsonValue &source, convertType<HeaderMatchType>);
template <>
QJsonValue toJsonValue(const HeaderMatchType &source, convertType<HeaderMatchType>);
} // NS DTO
} // NS Jellyfin

View file

@ -38,6 +38,10 @@
#include "JellyfinQt/dto/headermatchtype.h"
#include "JellyfinQt/support/jsonconv.h"
namespace Jellyfin {
// Forward declaration
class ApiClient;
}
namespace Jellyfin {
namespace DTO {
@ -54,7 +58,7 @@ public:
static HttpHeaderInfo fromJson(QJsonObject source);
void setFromJson(QJsonObject source);
QJsonObject toJson();
QJsonObject toJson() const;
// Properties
@ -83,6 +87,18 @@ protected:
HeaderMatchType m_match;
};
} // NS DTO
namespace Support {
using HttpHeaderInfo = Jellyfin::DTO::HttpHeaderInfo;
template <>
HttpHeaderInfo fromJsonValue(const QJsonValue &source, convertType<HttpHeaderInfo>);
template<>
QJsonValue toJsonValue(const HttpHeaderInfo &source, convertType<HttpHeaderInfo>);
} // NS DTO
} // NS Jellyfin

View file

@ -36,6 +36,10 @@
#include "JellyfinQt/support/jsonconv.h"
namespace Jellyfin {
// Forward declaration
class ApiClient;
}
namespace Jellyfin {
namespace DTO {
@ -52,7 +56,7 @@ public:
static IgnoreWaitRequestDto fromJson(QJsonObject source);
void setFromJson(QJsonObject source);
QJsonObject toJson();
QJsonObject toJson() const;
// Properties
/**
@ -69,6 +73,18 @@ protected:
bool m_ignoreWait;
};
} // NS DTO
namespace Support {
using IgnoreWaitRequestDto = Jellyfin::DTO::IgnoreWaitRequestDto;
template <>
IgnoreWaitRequestDto fromJsonValue(const QJsonValue &source, convertType<IgnoreWaitRequestDto>);
template<>
QJsonValue toJsonValue(const IgnoreWaitRequestDto &source, convertType<IgnoreWaitRequestDto>);
} // NS DTO
} // NS Jellyfin

View file

@ -37,6 +37,10 @@
#include "JellyfinQt/support/jsonconv.h"
namespace Jellyfin {
// Forward declaration
class ApiClient;
}
namespace Jellyfin {
namespace DTO {
@ -53,7 +57,7 @@ public:
static ImageByNameInfo fromJson(QJsonObject source);
void setFromJson(QJsonObject source);
QJsonObject toJson();
QJsonObject toJson() const;
// Properties
/**
@ -118,6 +122,18 @@ protected:
QString m_format;
};
} // NS DTO
namespace Support {
using ImageByNameInfo = Jellyfin::DTO::ImageByNameInfo;
template <>
ImageByNameInfo fromJsonValue(const QJsonValue &source, convertType<ImageByNameInfo>);
template<>
QJsonValue toJsonValue(const ImageByNameInfo &source, convertType<ImageByNameInfo>);
} // NS DTO
} // NS Jellyfin

View file

@ -36,6 +36,10 @@
#include "JellyfinQt/support/jsonconv.h"
namespace Jellyfin {
// Forward declaration
class ApiClient;
}
namespace Jellyfin {
namespace DTO {
@ -55,7 +59,19 @@ private:
explicit ImageFormatClass();
};
typedef ImageFormatClass::Value ImageFormat;
using ImageFormat = ImageFormatClass::Value;
} // NS DTO
namespace Support {
using ImageFormat = Jellyfin::DTO::ImageFormat;
template <>
ImageFormat fromJsonValue(const QJsonValue &source, convertType<ImageFormat>);
template <>
QJsonValue toJsonValue(const ImageFormat &source, convertType<ImageFormat>);
} // NS DTO
} // NS Jellyfin

View file

@ -38,6 +38,10 @@
#include "JellyfinQt/dto/imagetype.h"
#include "JellyfinQt/support/jsonconv.h"
namespace Jellyfin {
// Forward declaration
class ApiClient;
}
namespace Jellyfin {
namespace DTO {
@ -54,7 +58,7 @@ public:
static ImageInfo fromJson(QJsonObject source);
void setFromJson(QJsonObject source);
QJsonObject toJson();
QJsonObject toJson() const;
// Properties
@ -149,6 +153,18 @@ protected:
qint64 m_size;
};
} // NS DTO
namespace Support {
using ImageInfo = Jellyfin::DTO::ImageInfo;
template <>
ImageInfo fromJsonValue(const QJsonValue &source, convertType<ImageInfo>);
template<>
QJsonValue toJsonValue(const ImageInfo &source, convertType<ImageInfo>);
} // NS DTO
} // NS Jellyfin

View file

@ -37,6 +37,10 @@
#include "JellyfinQt/dto/imagetype.h"
#include "JellyfinQt/support/jsonconv.h"
namespace Jellyfin {
// Forward declaration
class ApiClient;
}
namespace Jellyfin {
namespace DTO {
@ -53,7 +57,7 @@ public:
static ImageOption fromJson(QJsonObject source);
void setFromJson(QJsonObject source);
QJsonObject toJson();
QJsonObject toJson() const;
// Properties
@ -86,6 +90,18 @@ protected:
qint32 m_minWidth;
};
} // NS DTO
namespace Support {
using ImageOption = Jellyfin::DTO::ImageOption;
template <>
ImageOption fromJsonValue(const QJsonValue &source, convertType<ImageOption>);
template<>
QJsonValue toJsonValue(const ImageOption &source, convertType<ImageOption>);
} // NS DTO
} // NS Jellyfin

View file

@ -36,6 +36,10 @@
#include "JellyfinQt/support/jsonconv.h"
namespace Jellyfin {
// Forward declaration
class ApiClient;
}
namespace Jellyfin {
namespace DTO {
@ -58,7 +62,19 @@ private:
explicit ImageOrientationClass();
};
typedef ImageOrientationClass::Value ImageOrientation;
using ImageOrientation = ImageOrientationClass::Value;
} // NS DTO
namespace Support {
using ImageOrientation = Jellyfin::DTO::ImageOrientation;
template <>
ImageOrientation fromJsonValue(const QJsonValue &source, convertType<ImageOrientation>);
template <>
QJsonValue toJsonValue(const ImageOrientation &source, convertType<ImageOrientation>);
} // NS DTO
} // NS Jellyfin

View file

@ -40,6 +40,10 @@
#include "JellyfinQt/dto/imagetype.h"
#include "JellyfinQt/support/jsonconv.h"
namespace Jellyfin {
// Forward declaration
class ApiClient;
}
namespace Jellyfin {
namespace DTO {
@ -56,7 +60,7 @@ public:
static ImageProviderInfo fromJson(QJsonObject source);
void setFromJson(QJsonObject source);
QJsonObject toJson();
QJsonObject toJson() const;
// Properties
/**
@ -87,6 +91,18 @@ protected:
QList<ImageType> m_supportedImages;
};
} // NS DTO
namespace Support {
using ImageProviderInfo = Jellyfin::DTO::ImageProviderInfo;
template <>
ImageProviderInfo fromJsonValue(const QJsonValue &source, convertType<ImageProviderInfo>);
template<>
QJsonValue toJsonValue(const ImageProviderInfo &source, convertType<ImageProviderInfo>);
} // NS DTO
} // NS Jellyfin

View file

@ -36,6 +36,10 @@
#include "JellyfinQt/support/jsonconv.h"
namespace Jellyfin {
// Forward declaration
class ApiClient;
}
namespace Jellyfin {
namespace DTO {
@ -52,7 +56,19 @@ private:
explicit ImageSavingConventionClass();
};
typedef ImageSavingConventionClass::Value ImageSavingConvention;
using ImageSavingConvention = ImageSavingConventionClass::Value;
} // NS DTO
namespace Support {
using ImageSavingConvention = Jellyfin::DTO::ImageSavingConvention;
template <>
ImageSavingConvention fromJsonValue(const QJsonValue &source, convertType<ImageSavingConvention>);
template <>
QJsonValue toJsonValue(const ImageSavingConvention &source, convertType<ImageSavingConvention>);
} // NS DTO
} // NS Jellyfin

Some files were not shown because too many files have changed in this diff Show more