/* * 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. */ #ifndef JELLYFIN_DTO_DEVICEPROFILE_H #define JELLYFIN_DTO_DEVICEPROFILE_H #include #include #include #include #include #include #include "JellyfinQt/dto/codecprofile.h" #include "JellyfinQt/dto/containerprofile.h" #include "JellyfinQt/dto/directplayprofile.h" #include "JellyfinQt/dto/subtitleprofile.h" #include "JellyfinQt/dto/transcodingprofile.h" #include "JellyfinQt/support/jsonconv.h" namespace Jellyfin { // Forward declaration class ApiClient; } namespace Jellyfin { namespace DTO { class DeviceProfile { public: DeviceProfile( QList directPlayProfiles, QList transcodingProfiles, QList containerProfiles, QList codecProfiles, QList subtitleProfiles ); DeviceProfile(const DeviceProfile &other); /** * Replaces the data being hold by this class with that of the other. */ void replaceData(DeviceProfile &other); static DeviceProfile fromJson(QJsonObject source); void setFromJson(QJsonObject source); QJsonObject toJson() const; // Properties /** * @brief Gets or sets the name of this device profile. User profiles must have a unique name. */ QString name() const; /** * @brief Gets or sets the name of this device profile. User profiles must have a unique name. */ void setName(QString newName); bool nameNull() const; void setNameNull(); /** * @brief Gets or sets the unique internal identifier. */ QString jellyfinId() const; /** * @brief Gets or sets the unique internal identifier. */ void setJellyfinId(QString newJellyfinId); bool jellyfinIdNull() const; void setJellyfinIdNull(); /** * @brief Gets or sets the maximum allowed bitrate for all streamed content. */ std::optional maxStreamingBitrate() const; /** * @brief Gets or sets the maximum allowed bitrate for all streamed content. */ void setMaxStreamingBitrate(std::optional newMaxStreamingBitrate); bool maxStreamingBitrateNull() const; void setMaxStreamingBitrateNull(); /** * @brief Gets or sets the maximum allowed bitrate for statically streamed content (= direct played files). */ std::optional maxStaticBitrate() const; /** * @brief Gets or sets the maximum allowed bitrate for statically streamed content (= direct played files). */ void setMaxStaticBitrate(std::optional newMaxStaticBitrate); bool maxStaticBitrateNull() const; void setMaxStaticBitrateNull(); /** * @brief Gets or sets the maximum allowed bitrate for transcoded music streams. */ std::optional musicStreamingTranscodingBitrate() const; /** * @brief Gets or sets the maximum allowed bitrate for transcoded music streams. */ void setMusicStreamingTranscodingBitrate(std::optional newMusicStreamingTranscodingBitrate); bool musicStreamingTranscodingBitrateNull() const; void setMusicStreamingTranscodingBitrateNull(); /** * @brief Gets or sets the maximum allowed bitrate for statically streamed (= direct played) music files. */ std::optional maxStaticMusicBitrate() const; /** * @brief Gets or sets the maximum allowed bitrate for statically streamed (= direct played) music files. */ void setMaxStaticMusicBitrate(std::optional newMaxStaticMusicBitrate); bool maxStaticMusicBitrateNull() const; void setMaxStaticMusicBitrateNull(); /** * @brief Gets or sets the direct play profiles. */ QList directPlayProfiles() const; /** * @brief Gets or sets the direct play profiles. */ void setDirectPlayProfiles(QList newDirectPlayProfiles); /** * @brief Gets or sets the transcoding profiles. */ QList transcodingProfiles() const; /** * @brief Gets or sets the transcoding profiles. */ void setTranscodingProfiles(QList newTranscodingProfiles); /** * @brief Gets or sets the container profiles. Failing to meet these optional conditions causes transcoding to occur. */ QList containerProfiles() const; /** * @brief Gets or sets the container profiles. Failing to meet these optional conditions causes transcoding to occur. */ void setContainerProfiles(QList newContainerProfiles); /** * @brief Gets or sets the codec profiles. */ QList codecProfiles() const; /** * @brief Gets or sets the codec profiles. */ void setCodecProfiles(QList newCodecProfiles); /** * @brief Gets or sets the subtitle profiles. */ QList subtitleProfiles() const; /** * @brief Gets or sets the subtitle profiles. */ void setSubtitleProfiles(QList newSubtitleProfiles); protected: QString m_name; QString m_jellyfinId; std::optional m_maxStreamingBitrate = std::nullopt; std::optional m_maxStaticBitrate = std::nullopt; std::optional m_musicStreamingTranscodingBitrate = std::nullopt; std::optional m_maxStaticMusicBitrate = std::nullopt; QList m_directPlayProfiles; QList m_transcodingProfiles; QList m_containerProfiles; QList m_codecProfiles; QList m_subtitleProfiles; private: // Private constructor which generates an invalid object, for use withing DeviceProfile::fromJson(); DeviceProfile(); }; } // NS DTO namespace Support { using DeviceProfile = Jellyfin::DTO::DeviceProfile; template <> DeviceProfile fromJsonValue(const QJsonValue &source, convertType); template<> QJsonValue toJsonValue(const DeviceProfile &source, convertType); } // NS DTO } // NS Jellyfin #endif // JELLYFIN_DTO_DEVICEPROFILE_H