/* * 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_MEDIASOURCEINFO_H #define JELLYFIN_DTO_MEDIASOURCEINFO_H #include #include #include #include #include #include #include "JellyfinQt/dto/isotype.h" #include "JellyfinQt/dto/mediaattachment.h" #include "JellyfinQt/dto/mediaprotocol.h" #include "JellyfinQt/dto/mediasourcetype.h" #include "JellyfinQt/dto/mediastream.h" #include "JellyfinQt/dto/transportstreamtimestamp.h" #include "JellyfinQt/dto/video3dformat.h" #include "JellyfinQt/dto/videotype.h" #include "JellyfinQt/support/jsonconv.h" namespace Jellyfin { // Forward declaration class ApiClient; } namespace Jellyfin { namespace DTO { class MediaSourceInfo { public: MediaSourceInfo(); MediaSourceInfo(const MediaSourceInfo &other); /** * Replaces the data being hold by this class with that of the other. */ void replaceData(MediaSourceInfo &other); static MediaSourceInfo fromJson(QJsonObject source); void setFromJson(QJsonObject source); QJsonObject toJson() const; // Properties MediaProtocol protocol() const; void setProtocol(MediaProtocol newProtocol); QString jellyfinId() const; void setJellyfinId(QString newJellyfinId); bool jellyfinIdNull() const; void setJellyfinIdNull(); QString path() const; void setPath(QString newPath); bool pathNull() const; void setPathNull(); QString encoderPath() const; void setEncoderPath(QString newEncoderPath); bool encoderPathNull() const; void setEncoderPathNull(); MediaProtocol encoderProtocol() const; void setEncoderProtocol(MediaProtocol newEncoderProtocol); MediaSourceType type() const; void setType(MediaSourceType newType); QString container() const; void setContainer(QString newContainer); bool containerNull() const; void setContainerNull(); std::optional size() const; void setSize(std::optional newSize); bool sizeNull() const; void setSizeNull(); QString name() const; void setName(QString newName); bool nameNull() const; void setNameNull(); /** * @brief Differentiate internet url vs local network. */ bool isRemote() const; /** * @brief Differentiate internet url vs local network. */ void setIsRemote(bool newIsRemote); QString eTag() const; void setETag(QString newETag); bool eTagNull() const; void setETagNull(); std::optional runTimeTicks() const; void setRunTimeTicks(std::optional newRunTimeTicks); bool runTimeTicksNull() const; void setRunTimeTicksNull(); bool readAtNativeFramerate() const; void setReadAtNativeFramerate(bool newReadAtNativeFramerate); bool ignoreDts() const; void setIgnoreDts(bool newIgnoreDts); bool ignoreIndex() const; void setIgnoreIndex(bool newIgnoreIndex); bool genPtsInput() const; void setGenPtsInput(bool newGenPtsInput); bool supportsTranscoding() const; void setSupportsTranscoding(bool newSupportsTranscoding); bool supportsDirectStream() const; void setSupportsDirectStream(bool newSupportsDirectStream); bool supportsDirectPlay() const; void setSupportsDirectPlay(bool newSupportsDirectPlay); bool isInfiniteStream() const; void setIsInfiniteStream(bool newIsInfiniteStream); bool requiresOpening() const; void setRequiresOpening(bool newRequiresOpening); QString openToken() const; void setOpenToken(QString newOpenToken); bool openTokenNull() const; void setOpenTokenNull(); bool requiresClosing() const; void setRequiresClosing(bool newRequiresClosing); QString liveStreamId() const; void setLiveStreamId(QString newLiveStreamId); bool liveStreamIdNull() const; void setLiveStreamIdNull(); std::optional bufferMs() const; void setBufferMs(std::optional newBufferMs); bool bufferMsNull() const; void setBufferMsNull(); bool requiresLooping() const; void setRequiresLooping(bool newRequiresLooping); bool supportsProbing() const; void setSupportsProbing(bool newSupportsProbing); VideoType videoType() const; void setVideoType(VideoType newVideoType); IsoType isoType() const; void setIsoType(IsoType newIsoType); Video3DFormat video3DFormat() const; void setVideo3DFormat(Video3DFormat newVideo3DFormat); QList mediaStreams() const; void setMediaStreams(QList newMediaStreams); bool mediaStreamsNull() const; void setMediaStreamsNull(); QList mediaAttachments() const; void setMediaAttachments(QList newMediaAttachments); bool mediaAttachmentsNull() const; void setMediaAttachmentsNull(); QStringList formats() const; void setFormats(QStringList newFormats); bool formatsNull() const; void setFormatsNull(); std::optional bitrate() const; void setBitrate(std::optional newBitrate); bool bitrateNull() const; void setBitrateNull(); TransportStreamTimestamp timestamp() const; void setTimestamp(TransportStreamTimestamp newTimestamp); QJsonObject requiredHttpHeaders() const; void setRequiredHttpHeaders(QJsonObject newRequiredHttpHeaders); bool requiredHttpHeadersNull() const; void setRequiredHttpHeadersNull(); QString transcodingUrl() const; void setTranscodingUrl(QString newTranscodingUrl); bool transcodingUrlNull() const; void setTranscodingUrlNull(); QString transcodingSubProtocol() const; void setTranscodingSubProtocol(QString newTranscodingSubProtocol); bool transcodingSubProtocolNull() const; void setTranscodingSubProtocolNull(); QString transcodingContainer() const; void setTranscodingContainer(QString newTranscodingContainer); bool transcodingContainerNull() const; void setTranscodingContainerNull(); std::optional analyzeDurationMs() const; void setAnalyzeDurationMs(std::optional newAnalyzeDurationMs); bool analyzeDurationMsNull() const; void setAnalyzeDurationMsNull(); std::optional defaultAudioStreamIndex() const; void setDefaultAudioStreamIndex(std::optional newDefaultAudioStreamIndex); bool defaultAudioStreamIndexNull() const; void setDefaultAudioStreamIndexNull(); std::optional defaultSubtitleStreamIndex() const; void setDefaultSubtitleStreamIndex(std::optional newDefaultSubtitleStreamIndex); bool defaultSubtitleStreamIndexNull() const; void setDefaultSubtitleStreamIndexNull(); protected: MediaProtocol m_protocol; QString m_jellyfinId; QString m_path; QString m_encoderPath; MediaProtocol m_encoderProtocol; MediaSourceType m_type; QString m_container; std::optional m_size = std::nullopt; QString m_name; bool m_isRemote; QString m_eTag; std::optional m_runTimeTicks = std::nullopt; bool m_readAtNativeFramerate; bool m_ignoreDts; bool m_ignoreIndex; bool m_genPtsInput; bool m_supportsTranscoding; bool m_supportsDirectStream; bool m_supportsDirectPlay; bool m_isInfiniteStream; bool m_requiresOpening; QString m_openToken; bool m_requiresClosing; QString m_liveStreamId; std::optional m_bufferMs = std::nullopt; bool m_requiresLooping; bool m_supportsProbing; VideoType m_videoType; IsoType m_isoType; Video3DFormat m_video3DFormat; QList m_mediaStreams; QList m_mediaAttachments; QStringList m_formats; std::optional m_bitrate = std::nullopt; TransportStreamTimestamp m_timestamp; QJsonObject m_requiredHttpHeaders; QString m_transcodingUrl; QString m_transcodingSubProtocol; QString m_transcodingContainer; std::optional m_analyzeDurationMs = std::nullopt; std::optional m_defaultAudioStreamIndex = std::nullopt; std::optional m_defaultSubtitleStreamIndex = std::nullopt; }; } // NS DTO namespace Support { using MediaSourceInfo = Jellyfin::DTO::MediaSourceInfo; template <> MediaSourceInfo fromJsonValue(const QJsonValue &source, convertType); template<> QJsonValue toJsonValue(const MediaSourceInfo &source, convertType); } // NS DTO } // NS Jellyfin #endif // JELLYFIN_DTO_MEDIASOURCEINFO_H