1
0
Fork 0
mirror of https://github.com/HenkKalkwater/harbour-sailfin.git synced 2024-11-25 02:15:17 +00:00

Slight improvements to the OpenAPI generator

This commit is contained in:
Chris Josten 2021-02-21 00:26:18 +01:00
parent 0bd9042ef3
commit 4ed6a8a42d
4 changed files with 662 additions and 6 deletions

View file

@ -2,6 +2,8 @@ project(jellyfin-qt VERSION 0.1.0)
find_package(Qt5 5.6 COMPONENTS Multimedia Network Qml WebSockets REQUIRED) find_package(Qt5 5.6 COMPONENTS Multimedia Network Qml WebSockets REQUIRED)
include(GNUInstallDirs) include(GNUInstallDirs)
include(GeneratedSources.cmake)
set(jellyfin-qt_SOURCES set(jellyfin-qt_SOURCES
src/DTO/dto.cpp src/DTO/dto.cpp
src/DTO/item.cpp src/DTO/item.cpp
@ -20,6 +22,8 @@ set(jellyfin-qt_SOURCES
src/serverdiscoverymodel.cpp src/serverdiscoverymodel.cpp
src/websocket.cpp) src/websocket.cpp)
list(APPEND jellyfin-qt_SOURCES openapi_HEADERS)
set(jellyfin-qt_HEADERS set(jellyfin-qt_HEADERS
include/JellyfinQt/DTO/dto.h include/JellyfinQt/DTO/dto.h
include/JellyfinQt/DTO/item.h include/JellyfinQt/DTO/item.h
@ -37,6 +41,8 @@ set(jellyfin-qt_HEADERS
include/JellyfinQt/playbackmanager.h include/JellyfinQt/playbackmanager.h
include/JellyfinQt/serverdiscoverymodel.h include/JellyfinQt/serverdiscoverymodel.h
include/JellyfinQt/websocket.h) include/JellyfinQt/websocket.h)
list(APPEND jellyfin-qt_SOURCES openapi_SOURCES)
add_definitions(-DSAILFIN_VERSION=\"${SAILFIN_VERSION}\") add_definitions(-DSAILFIN_VERSION=\"${SAILFIN_VERSION}\")
if (PLATFORM_SAILFISHOS) if (PLATFORM_SAILFISHOS)

563
core/GeneratedSources.cmake Normal file
View file

@ -0,0 +1,563 @@
cmake_minimum_required(VERSION 3.0)
#[[
/*
* 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.
*/
]]
set(openapi_HEADERS
generated/include/JellyfinQt/DTO/loglevel.h
generated/include/JellyfinQt/DTO/activitylogentry.h
generated/include/JellyfinQt/DTO/activitylogentryqueryresult.h
generated/include/JellyfinQt/DTO/authenticationinfo.h
generated/include/JellyfinQt/DTO/authenticationinfoqueryresult.h
generated/include/JellyfinQt/DTO/itemfields.h
generated/include/JellyfinQt/DTO/itemfilter.h
generated/include/JellyfinQt/DTO/imagetype.h
generated/include/JellyfinQt/DTO/video3dformat.h
generated/include/JellyfinQt/DTO/externalurl.h
generated/include/JellyfinQt/DTO/mediaprotocol.h
generated/include/JellyfinQt/DTO/mediasourcetype.h
generated/include/JellyfinQt/DTO/videotype.h
generated/include/JellyfinQt/DTO/isotype.h
generated/include/JellyfinQt/DTO/mediastreamtype.h
generated/include/JellyfinQt/DTO/subtitledeliverymethod.h
generated/include/JellyfinQt/DTO/mediastream.h
generated/include/JellyfinQt/DTO/mediaattachment.h
generated/include/JellyfinQt/DTO/transportstreamtimestamp.h
generated/include/JellyfinQt/DTO/mediasourceinfo.h
generated/include/JellyfinQt/DTO/playaccess.h
generated/include/JellyfinQt/DTO/mediaurl.h
generated/include/JellyfinQt/DTO/baseitemperson.h
generated/include/JellyfinQt/DTO/nameguidpair.h
generated/include/JellyfinQt/DTO/useritemdatadto.h
generated/include/JellyfinQt/DTO/dayofweek.h
generated/include/JellyfinQt/DTO/chapterinfo.h
generated/include/JellyfinQt/DTO/locationtype.h
generated/include/JellyfinQt/DTO/metadatafield.h
generated/include/JellyfinQt/DTO/imageorientation.h
generated/include/JellyfinQt/DTO/channeltype.h
generated/include/JellyfinQt/DTO/programaudio.h
generated/include/JellyfinQt/DTO/baseitemdto.h
generated/include/JellyfinQt/DTO/baseitemdtoqueryresult.h
generated/include/JellyfinQt/DTO/encodingcontext.h
generated/include/JellyfinQt/DTO/brandingoptions.h
generated/include/JellyfinQt/DTO/channelmediatype.h
generated/include/JellyfinQt/DTO/channelmediacontenttype.h
generated/include/JellyfinQt/DTO/channelitemsortfield.h
generated/include/JellyfinQt/DTO/channelfeatures.h
generated/include/JellyfinQt/DTO/collectioncreationresult.h
generated/include/JellyfinQt/DTO/version.h
generated/include/JellyfinQt/DTO/imagesavingconvention.h
generated/include/JellyfinQt/DTO/metadataoptions.h
generated/include/JellyfinQt/DTO/namevaluepair.h
generated/include/JellyfinQt/DTO/repositoryinfo.h
generated/include/JellyfinQt/DTO/pathsubstitution.h
generated/include/JellyfinQt/DTO/serverconfiguration.h
generated/include/JellyfinQt/DTO/mediaencoderpathdto.h
generated/include/JellyfinQt/DTO/problemdetails.h
generated/include/JellyfinQt/DTO/configurationpagetype.h
generated/include/JellyfinQt/DTO/configurationpageinfo.h
generated/include/JellyfinQt/DTO/generalcommandtype.h
generated/include/JellyfinQt/DTO/headermatchtype.h
generated/include/JellyfinQt/DTO/httpheaderinfo.h
generated/include/JellyfinQt/DTO/deviceidentification.h
generated/include/JellyfinQt/DTO/xmlattribute.h
generated/include/JellyfinQt/DTO/dlnaprofiletype.h
generated/include/JellyfinQt/DTO/directplayprofile.h
generated/include/JellyfinQt/DTO/transcodeseekinfo.h
generated/include/JellyfinQt/DTO/transcodingprofile.h
generated/include/JellyfinQt/DTO/profileconditiontype.h
generated/include/JellyfinQt/DTO/profileconditionvalue.h
generated/include/JellyfinQt/DTO/profilecondition.h
generated/include/JellyfinQt/DTO/containerprofile.h
generated/include/JellyfinQt/DTO/codectype.h
generated/include/JellyfinQt/DTO/codecprofile.h
generated/include/JellyfinQt/DTO/responseprofile.h
generated/include/JellyfinQt/DTO/subtitleprofile.h
generated/include/JellyfinQt/DTO/deviceprofile.h
generated/include/JellyfinQt/DTO/clientcapabilities.h
generated/include/JellyfinQt/DTO/deviceinfo.h
generated/include/JellyfinQt/DTO/deviceinfoqueryresult.h
generated/include/JellyfinQt/DTO/deviceoptions.h
generated/include/JellyfinQt/DTO/scrolldirection.h
generated/include/JellyfinQt/DTO/sortorder.h
generated/include/JellyfinQt/DTO/displaypreferencesdto.h
generated/include/JellyfinQt/DTO/deviceprofiletype.h
generated/include/JellyfinQt/DTO/deviceprofileinfo.h
generated/include/JellyfinQt/DTO/controlresponse.h
generated/include/JellyfinQt/DTO/defaultdirectorybrowserinfodto.h
generated/include/JellyfinQt/DTO/filesystementrytype.h
generated/include/JellyfinQt/DTO/filesystementryinfo.h
generated/include/JellyfinQt/DTO/validatepathdto.h
generated/include/JellyfinQt/DTO/queryfilterslegacy.h
generated/include/JellyfinQt/DTO/queryfilters.h
generated/include/JellyfinQt/DTO/imageformat.h
generated/include/JellyfinQt/DTO/imageinfo.h
generated/include/JellyfinQt/DTO/imagebynameinfo.h
generated/include/JellyfinQt/DTO/externalidmediatype.h
generated/include/JellyfinQt/DTO/externalidinfo.h
generated/include/JellyfinQt/DTO/remotesearchresult.h
generated/include/JellyfinQt/DTO/bookinfo.h
generated/include/JellyfinQt/DTO/bookinforemotesearchquery.h
generated/include/JellyfinQt/DTO/boxsetinfo.h
generated/include/JellyfinQt/DTO/boxsetinforemotesearchquery.h
generated/include/JellyfinQt/DTO/movieinfo.h
generated/include/JellyfinQt/DTO/movieinforemotesearchquery.h
generated/include/JellyfinQt/DTO/songinfo.h
generated/include/JellyfinQt/DTO/albuminfo.h
generated/include/JellyfinQt/DTO/albuminforemotesearchquery.h
generated/include/JellyfinQt/DTO/artistinfo.h
generated/include/JellyfinQt/DTO/artistinforemotesearchquery.h
generated/include/JellyfinQt/DTO/musicvideoinfo.h
generated/include/JellyfinQt/DTO/musicvideoinforemotesearchquery.h
generated/include/JellyfinQt/DTO/personlookupinfo.h
generated/include/JellyfinQt/DTO/personlookupinforemotesearchquery.h
generated/include/JellyfinQt/DTO/seriesinfo.h
generated/include/JellyfinQt/DTO/seriesinforemotesearchquery.h
generated/include/JellyfinQt/DTO/trailerinfo.h
generated/include/JellyfinQt/DTO/trailerinforemotesearchquery.h
generated/include/JellyfinQt/DTO/metadatarefreshmode.h
generated/include/JellyfinQt/DTO/seriesstatus.h
generated/include/JellyfinQt/DTO/parentalrating.h
generated/include/JellyfinQt/DTO/countryinfo.h
generated/include/JellyfinQt/DTO/culturedto.h
generated/include/JellyfinQt/DTO/metadataeditorinfo.h
generated/include/JellyfinQt/DTO/thememediaresult.h
generated/include/JellyfinQt/DTO/allthememediaresult.h
generated/include/JellyfinQt/DTO/itemcounts.h
generated/include/JellyfinQt/DTO/libraryoptioninfodto.h
generated/include/JellyfinQt/DTO/imageoption.h
generated/include/JellyfinQt/DTO/librarytypeoptionsdto.h
generated/include/JellyfinQt/DTO/libraryoptionsresultdto.h
generated/include/JellyfinQt/DTO/mediaupdateinfodto.h
generated/include/JellyfinQt/DTO/mediapathinfo.h
generated/include/JellyfinQt/DTO/typeoptions.h
generated/include/JellyfinQt/DTO/libraryoptions.h
generated/include/JellyfinQt/DTO/virtualfolderinfo.h
generated/include/JellyfinQt/DTO/addvirtualfolderdto.h
generated/include/JellyfinQt/DTO/updatelibraryoptionsdto.h
generated/include/JellyfinQt/DTO/mediapathdto.h
generated/include/JellyfinQt/DTO/tunerchannelmapping.h
generated/include/JellyfinQt/DTO/nameidpair.h
generated/include/JellyfinQt/DTO/channelmappingoptionsdto.h
generated/include/JellyfinQt/DTO/setchannelmappingdto.h
generated/include/JellyfinQt/DTO/guideinfo.h
generated/include/JellyfinQt/DTO/livetvservicestatus.h
generated/include/JellyfinQt/DTO/livetvserviceinfo.h
generated/include/JellyfinQt/DTO/livetvinfo.h
generated/include/JellyfinQt/DTO/listingsproviderinfo.h
generated/include/JellyfinQt/DTO/getprogramsdto.h
generated/include/JellyfinQt/DTO/recordingstatus.h
generated/include/JellyfinQt/DTO/keepuntil.h
generated/include/JellyfinQt/DTO/daypattern.h
generated/include/JellyfinQt/DTO/seriestimerinfodto.h
generated/include/JellyfinQt/DTO/seriestimerinfodtoqueryresult.h
generated/include/JellyfinQt/DTO/timerinfodto.h
generated/include/JellyfinQt/DTO/timerinfodtoqueryresult.h
generated/include/JellyfinQt/DTO/tunerhostinfo.h
generated/include/JellyfinQt/DTO/localizationoption.h
generated/include/JellyfinQt/DTO/playbackerrorcode.h
generated/include/JellyfinQt/DTO/playbackinforesponse.h
generated/include/JellyfinQt/DTO/playbackinfodto.h
generated/include/JellyfinQt/DTO/openlivestreamdto.h
generated/include/JellyfinQt/DTO/livestreamresponse.h
generated/include/JellyfinQt/DTO/recommendationtype.h
generated/include/JellyfinQt/DTO/recommendationdto.h
generated/include/JellyfinQt/DTO/notificationlevel.h
generated/include/JellyfinQt/DTO/notificationdto.h
generated/include/JellyfinQt/DTO/notificationresultdto.h
generated/include/JellyfinQt/DTO/notificationssummarydto.h
generated/include/JellyfinQt/DTO/notificationtypeinfo.h
generated/include/JellyfinQt/DTO/versioninfo.h
generated/include/JellyfinQt/DTO/packageinfo.h
generated/include/JellyfinQt/DTO/createplaylistdto.h
generated/include/JellyfinQt/DTO/playlistcreationresult.h
generated/include/JellyfinQt/DTO/playmethod.h
generated/include/JellyfinQt/DTO/repeatmode.h
generated/include/JellyfinQt/DTO/queueitem.h
generated/include/JellyfinQt/DTO/playbackstartinfo.h
generated/include/JellyfinQt/DTO/playbackprogressinfo.h
generated/include/JellyfinQt/DTO/playbackstopinfo.h
generated/include/JellyfinQt/DTO/pluginstatus.h
generated/include/JellyfinQt/DTO/plugininfo.h
generated/include/JellyfinQt/DTO/basepluginconfiguration.h
generated/include/JellyfinQt/DTO/pluginsecurityinfo.h
generated/include/JellyfinQt/DTO/quickconnectstate.h
generated/include/JellyfinQt/DTO/quickconnectresult.h
generated/include/JellyfinQt/DTO/ratingtype.h
generated/include/JellyfinQt/DTO/remoteimageinfo.h
generated/include/JellyfinQt/DTO/remoteimageresult.h
generated/include/JellyfinQt/DTO/imageproviderinfo.h
generated/include/JellyfinQt/DTO/taskstate.h
generated/include/JellyfinQt/DTO/taskcompletionstatus.h
generated/include/JellyfinQt/DTO/taskresult.h
generated/include/JellyfinQt/DTO/tasktriggerinfo.h
generated/include/JellyfinQt/DTO/taskinfo.h
generated/include/JellyfinQt/DTO/searchhint.h
generated/include/JellyfinQt/DTO/searchhintresult.h
generated/include/JellyfinQt/DTO/playerstateinfo.h
generated/include/JellyfinQt/DTO/sessionuserinfo.h
generated/include/JellyfinQt/DTO/baseitem.h
generated/include/JellyfinQt/DTO/transcodereason.h
generated/include/JellyfinQt/DTO/transcodinginfo.h
generated/include/JellyfinQt/DTO/sessioninfo.h
generated/include/JellyfinQt/DTO/generalcommand.h
generated/include/JellyfinQt/DTO/playcommand.h
generated/include/JellyfinQt/DTO/playstatecommand.h
generated/include/JellyfinQt/DTO/clientcapabilitiesdto.h
generated/include/JellyfinQt/DTO/startupconfigurationdto.h
generated/include/JellyfinQt/DTO/startupuserdto.h
generated/include/JellyfinQt/DTO/startupremoteaccessdto.h
generated/include/JellyfinQt/DTO/fontfile.h
generated/include/JellyfinQt/DTO/remotesubtitleinfo.h
generated/include/JellyfinQt/DTO/uploadsubtitledto.h
generated/include/JellyfinQt/DTO/bufferrequestdto.h
generated/include/JellyfinQt/DTO/joingrouprequestdto.h
generated/include/JellyfinQt/DTO/groupstatetype.h
generated/include/JellyfinQt/DTO/groupinfodto.h
generated/include/JellyfinQt/DTO/moveplaylistitemrequestdto.h
generated/include/JellyfinQt/DTO/newgrouprequestdto.h
generated/include/JellyfinQt/DTO/nextitemrequestdto.h
generated/include/JellyfinQt/DTO/pingrequestdto.h
generated/include/JellyfinQt/DTO/previousitemrequestdto.h
generated/include/JellyfinQt/DTO/groupqueuemode.h
generated/include/JellyfinQt/DTO/queuerequestdto.h
generated/include/JellyfinQt/DTO/readyrequestdto.h
generated/include/JellyfinQt/DTO/removefromplaylistrequestdto.h
generated/include/JellyfinQt/DTO/seekrequestdto.h
generated/include/JellyfinQt/DTO/ignorewaitrequestdto.h
generated/include/JellyfinQt/DTO/playrequestdto.h
generated/include/JellyfinQt/DTO/setplaylistitemrequestdto.h
generated/include/JellyfinQt/DTO/grouprepeatmode.h
generated/include/JellyfinQt/DTO/setrepeatmoderequestdto.h
generated/include/JellyfinQt/DTO/groupshufflemode.h
generated/include/JellyfinQt/DTO/setshufflemoderequestdto.h
generated/include/JellyfinQt/DTO/endpointinfo.h
generated/include/JellyfinQt/DTO/installationinfo.h
generated/include/JellyfinQt/DTO/ffmpeglocation.h
generated/include/JellyfinQt/DTO/architecture.h
generated/include/JellyfinQt/DTO/systeminfo.h
generated/include/JellyfinQt/DTO/publicsysteminfo.h
generated/include/JellyfinQt/DTO/logfile.h
generated/include/JellyfinQt/DTO/wakeonlaninfo.h
generated/include/JellyfinQt/DTO/utctimeresponse.h
generated/include/JellyfinQt/DTO/subtitleplaybackmode.h
generated/include/JellyfinQt/DTO/userconfiguration.h
generated/include/JellyfinQt/DTO/dynamicdayofweek.h
generated/include/JellyfinQt/DTO/accessschedule.h
generated/include/JellyfinQt/DTO/unrateditem.h
generated/include/JellyfinQt/DTO/syncplayuseraccesstype.h
generated/include/JellyfinQt/DTO/userpolicy.h
generated/include/JellyfinQt/DTO/userdto.h
generated/include/JellyfinQt/DTO/authenticationresult.h
generated/include/JellyfinQt/DTO/updateusereasypassword.h
generated/include/JellyfinQt/DTO/updateuserpassword.h
generated/include/JellyfinQt/DTO/authenticateuserbyname.h
generated/include/JellyfinQt/DTO/quickconnectdto.h
generated/include/JellyfinQt/DTO/forgotpassworddto.h
generated/include/JellyfinQt/DTO/forgotpasswordaction.h
generated/include/JellyfinQt/DTO/forgotpasswordresult.h
generated/include/JellyfinQt/DTO/pinredeemresult.h
generated/include/JellyfinQt/DTO/createuserbyname.h
generated/include/JellyfinQt/DTO/specialviewoptiondto.h
generated/include/JellyfinQt/DTO/libraryupdateinfo.h
generated/include/JellyfinQt/DTO/iplugin.h
generated/include/JellyfinQt/DTO/playrequest.h
generated/include/JellyfinQt/DTO/playstaterequest.h
generated/include/JellyfinQt/DTO/timereventinfo.h
generated/include/JellyfinQt/DTO/sendcommandtype.h
generated/include/JellyfinQt/DTO/sendcommand.h
generated/include/JellyfinQt/DTO/groupupdatetype.h
generated/include/JellyfinQt/DTO/objectgroupupdate.h
set(openapi_SOURCES
generated/src/DTO/loglevel.cpp
generated/src/DTO/activitylogentry.cpp
generated/src/DTO/activitylogentryqueryresult.cpp
generated/src/DTO/authenticationinfo.cpp
generated/src/DTO/authenticationinfoqueryresult.cpp
generated/src/DTO/itemfields.cpp
generated/src/DTO/itemfilter.cpp
generated/src/DTO/imagetype.cpp
generated/src/DTO/video3dformat.cpp
generated/src/DTO/externalurl.cpp
generated/src/DTO/mediaprotocol.cpp
generated/src/DTO/mediasourcetype.cpp
generated/src/DTO/videotype.cpp
generated/src/DTO/isotype.cpp
generated/src/DTO/mediastreamtype.cpp
generated/src/DTO/subtitledeliverymethod.cpp
generated/src/DTO/mediastream.cpp
generated/src/DTO/mediaattachment.cpp
generated/src/DTO/transportstreamtimestamp.cpp
generated/src/DTO/mediasourceinfo.cpp
generated/src/DTO/playaccess.cpp
generated/src/DTO/mediaurl.cpp
generated/src/DTO/baseitemperson.cpp
generated/src/DTO/nameguidpair.cpp
generated/src/DTO/useritemdatadto.cpp
generated/src/DTO/dayofweek.cpp
generated/src/DTO/chapterinfo.cpp
generated/src/DTO/locationtype.cpp
generated/src/DTO/metadatafield.cpp
generated/src/DTO/imageorientation.cpp
generated/src/DTO/channeltype.cpp
generated/src/DTO/programaudio.cpp
generated/src/DTO/baseitemdto.cpp
generated/src/DTO/baseitemdtoqueryresult.cpp
generated/src/DTO/encodingcontext.cpp
generated/src/DTO/brandingoptions.cpp
generated/src/DTO/channelmediatype.cpp
generated/src/DTO/channelmediacontenttype.cpp
generated/src/DTO/channelitemsortfield.cpp
generated/src/DTO/channelfeatures.cpp
generated/src/DTO/collectioncreationresult.cpp
generated/src/DTO/version.cpp
generated/src/DTO/imagesavingconvention.cpp
generated/src/DTO/metadataoptions.cpp
generated/src/DTO/namevaluepair.cpp
generated/src/DTO/repositoryinfo.cpp
generated/src/DTO/pathsubstitution.cpp
generated/src/DTO/serverconfiguration.cpp
generated/src/DTO/mediaencoderpathdto.cpp
generated/src/DTO/problemdetails.cpp
generated/src/DTO/configurationpagetype.cpp
generated/src/DTO/configurationpageinfo.cpp
generated/src/DTO/generalcommandtype.cpp
generated/src/DTO/headermatchtype.cpp
generated/src/DTO/httpheaderinfo.cpp
generated/src/DTO/deviceidentification.cpp
generated/src/DTO/xmlattribute.cpp
generated/src/DTO/dlnaprofiletype.cpp
generated/src/DTO/directplayprofile.cpp
generated/src/DTO/transcodeseekinfo.cpp
generated/src/DTO/transcodingprofile.cpp
generated/src/DTO/profileconditiontype.cpp
generated/src/DTO/profileconditionvalue.cpp
generated/src/DTO/profilecondition.cpp
generated/src/DTO/containerprofile.cpp
generated/src/DTO/codectype.cpp
generated/src/DTO/codecprofile.cpp
generated/src/DTO/responseprofile.cpp
generated/src/DTO/subtitleprofile.cpp
generated/src/DTO/deviceprofile.cpp
generated/src/DTO/clientcapabilities.cpp
generated/src/DTO/deviceinfo.cpp
generated/src/DTO/deviceinfoqueryresult.cpp
generated/src/DTO/deviceoptions.cpp
generated/src/DTO/scrolldirection.cpp
generated/src/DTO/sortorder.cpp
generated/src/DTO/displaypreferencesdto.cpp
generated/src/DTO/deviceprofiletype.cpp
generated/src/DTO/deviceprofileinfo.cpp
generated/src/DTO/controlresponse.cpp
generated/src/DTO/defaultdirectorybrowserinfodto.cpp
generated/src/DTO/filesystementrytype.cpp
generated/src/DTO/filesystementryinfo.cpp
generated/src/DTO/validatepathdto.cpp
generated/src/DTO/queryfilterslegacy.cpp
generated/src/DTO/queryfilters.cpp
generated/src/DTO/imageformat.cpp
generated/src/DTO/imageinfo.cpp
generated/src/DTO/imagebynameinfo.cpp
generated/src/DTO/externalidmediatype.cpp
generated/src/DTO/externalidinfo.cpp
generated/src/DTO/remotesearchresult.cpp
generated/src/DTO/bookinfo.cpp
generated/src/DTO/bookinforemotesearchquery.cpp
generated/src/DTO/boxsetinfo.cpp
generated/src/DTO/boxsetinforemotesearchquery.cpp
generated/src/DTO/movieinfo.cpp
generated/src/DTO/movieinforemotesearchquery.cpp
generated/src/DTO/songinfo.cpp
generated/src/DTO/albuminfo.cpp
generated/src/DTO/albuminforemotesearchquery.cpp
generated/src/DTO/artistinfo.cpp
generated/src/DTO/artistinforemotesearchquery.cpp
generated/src/DTO/musicvideoinfo.cpp
generated/src/DTO/musicvideoinforemotesearchquery.cpp
generated/src/DTO/personlookupinfo.cpp
generated/src/DTO/personlookupinforemotesearchquery.cpp
generated/src/DTO/seriesinfo.cpp
generated/src/DTO/seriesinforemotesearchquery.cpp
generated/src/DTO/trailerinfo.cpp
generated/src/DTO/trailerinforemotesearchquery.cpp
generated/src/DTO/metadatarefreshmode.cpp
generated/src/DTO/seriesstatus.cpp
generated/src/DTO/parentalrating.cpp
generated/src/DTO/countryinfo.cpp
generated/src/DTO/culturedto.cpp
generated/src/DTO/metadataeditorinfo.cpp
generated/src/DTO/thememediaresult.cpp
generated/src/DTO/allthememediaresult.cpp
generated/src/DTO/itemcounts.cpp
generated/src/DTO/libraryoptioninfodto.cpp
generated/src/DTO/imageoption.cpp
generated/src/DTO/librarytypeoptionsdto.cpp
generated/src/DTO/libraryoptionsresultdto.cpp
generated/src/DTO/mediaupdateinfodto.cpp
generated/src/DTO/mediapathinfo.cpp
generated/src/DTO/typeoptions.cpp
generated/src/DTO/libraryoptions.cpp
generated/src/DTO/virtualfolderinfo.cpp
generated/src/DTO/addvirtualfolderdto.cpp
generated/src/DTO/updatelibraryoptionsdto.cpp
generated/src/DTO/mediapathdto.cpp
generated/src/DTO/tunerchannelmapping.cpp
generated/src/DTO/nameidpair.cpp
generated/src/DTO/channelmappingoptionsdto.cpp
generated/src/DTO/setchannelmappingdto.cpp
generated/src/DTO/guideinfo.cpp
generated/src/DTO/livetvservicestatus.cpp
generated/src/DTO/livetvserviceinfo.cpp
generated/src/DTO/livetvinfo.cpp
generated/src/DTO/listingsproviderinfo.cpp
generated/src/DTO/getprogramsdto.cpp
generated/src/DTO/recordingstatus.cpp
generated/src/DTO/keepuntil.cpp
generated/src/DTO/daypattern.cpp
generated/src/DTO/seriestimerinfodto.cpp
generated/src/DTO/seriestimerinfodtoqueryresult.cpp
generated/src/DTO/timerinfodto.cpp
generated/src/DTO/timerinfodtoqueryresult.cpp
generated/src/DTO/tunerhostinfo.cpp
generated/src/DTO/localizationoption.cpp
generated/src/DTO/playbackerrorcode.cpp
generated/src/DTO/playbackinforesponse.cpp
generated/src/DTO/playbackinfodto.cpp
generated/src/DTO/openlivestreamdto.cpp
generated/src/DTO/livestreamresponse.cpp
generated/src/DTO/recommendationtype.cpp
generated/src/DTO/recommendationdto.cpp
generated/src/DTO/notificationlevel.cpp
generated/src/DTO/notificationdto.cpp
generated/src/DTO/notificationresultdto.cpp
generated/src/DTO/notificationssummarydto.cpp
generated/src/DTO/notificationtypeinfo.cpp
generated/src/DTO/versioninfo.cpp
generated/src/DTO/packageinfo.cpp
generated/src/DTO/createplaylistdto.cpp
generated/src/DTO/playlistcreationresult.cpp
generated/src/DTO/playmethod.cpp
generated/src/DTO/repeatmode.cpp
generated/src/DTO/queueitem.cpp
generated/src/DTO/playbackstartinfo.cpp
generated/src/DTO/playbackprogressinfo.cpp
generated/src/DTO/playbackstopinfo.cpp
generated/src/DTO/pluginstatus.cpp
generated/src/DTO/plugininfo.cpp
generated/src/DTO/basepluginconfiguration.cpp
generated/src/DTO/pluginsecurityinfo.cpp
generated/src/DTO/quickconnectstate.cpp
generated/src/DTO/quickconnectresult.cpp
generated/src/DTO/ratingtype.cpp
generated/src/DTO/remoteimageinfo.cpp
generated/src/DTO/remoteimageresult.cpp
generated/src/DTO/imageproviderinfo.cpp
generated/src/DTO/taskstate.cpp
generated/src/DTO/taskcompletionstatus.cpp
generated/src/DTO/taskresult.cpp
generated/src/DTO/tasktriggerinfo.cpp
generated/src/DTO/taskinfo.cpp
generated/src/DTO/searchhint.cpp
generated/src/DTO/searchhintresult.cpp
generated/src/DTO/playerstateinfo.cpp
generated/src/DTO/sessionuserinfo.cpp
generated/src/DTO/baseitem.cpp
generated/src/DTO/transcodereason.cpp
generated/src/DTO/transcodinginfo.cpp
generated/src/DTO/sessioninfo.cpp
generated/src/DTO/generalcommand.cpp
generated/src/DTO/playcommand.cpp
generated/src/DTO/playstatecommand.cpp
generated/src/DTO/clientcapabilitiesdto.cpp
generated/src/DTO/startupconfigurationdto.cpp
generated/src/DTO/startupuserdto.cpp
generated/src/DTO/startupremoteaccessdto.cpp
generated/src/DTO/fontfile.cpp
generated/src/DTO/remotesubtitleinfo.cpp
generated/src/DTO/uploadsubtitledto.cpp
generated/src/DTO/bufferrequestdto.cpp
generated/src/DTO/joingrouprequestdto.cpp
generated/src/DTO/groupstatetype.cpp
generated/src/DTO/groupinfodto.cpp
generated/src/DTO/moveplaylistitemrequestdto.cpp
generated/src/DTO/newgrouprequestdto.cpp
generated/src/DTO/nextitemrequestdto.cpp
generated/src/DTO/pingrequestdto.cpp
generated/src/DTO/previousitemrequestdto.cpp
generated/src/DTO/groupqueuemode.cpp
generated/src/DTO/queuerequestdto.cpp
generated/src/DTO/readyrequestdto.cpp
generated/src/DTO/removefromplaylistrequestdto.cpp
generated/src/DTO/seekrequestdto.cpp
generated/src/DTO/ignorewaitrequestdto.cpp
generated/src/DTO/playrequestdto.cpp
generated/src/DTO/setplaylistitemrequestdto.cpp
generated/src/DTO/grouprepeatmode.cpp
generated/src/DTO/setrepeatmoderequestdto.cpp
generated/src/DTO/groupshufflemode.cpp
generated/src/DTO/setshufflemoderequestdto.cpp
generated/src/DTO/endpointinfo.cpp
generated/src/DTO/installationinfo.cpp
generated/src/DTO/ffmpeglocation.cpp
generated/src/DTO/architecture.cpp
generated/src/DTO/systeminfo.cpp
generated/src/DTO/publicsysteminfo.cpp
generated/src/DTO/logfile.cpp
generated/src/DTO/wakeonlaninfo.cpp
generated/src/DTO/utctimeresponse.cpp
generated/src/DTO/subtitleplaybackmode.cpp
generated/src/DTO/userconfiguration.cpp
generated/src/DTO/dynamicdayofweek.cpp
generated/src/DTO/accessschedule.cpp
generated/src/DTO/unrateditem.cpp
generated/src/DTO/syncplayuseraccesstype.cpp
generated/src/DTO/userpolicy.cpp
generated/src/DTO/userdto.cpp
generated/src/DTO/authenticationresult.cpp
generated/src/DTO/updateusereasypassword.cpp
generated/src/DTO/updateuserpassword.cpp
generated/src/DTO/authenticateuserbyname.cpp
generated/src/DTO/quickconnectdto.cpp
generated/src/DTO/forgotpassworddto.cpp
generated/src/DTO/forgotpasswordaction.cpp
generated/src/DTO/forgotpasswordresult.cpp
generated/src/DTO/pinredeemresult.cpp
generated/src/DTO/createuserbyname.cpp
generated/src/DTO/specialviewoptiondto.cpp
generated/src/DTO/libraryupdateinfo.cpp
generated/src/DTO/iplugin.cpp
generated/src/DTO/playrequest.cpp
generated/src/DTO/playstaterequest.cpp
generated/src/DTO/timereventinfo.cpp
generated/src/DTO/sendcommandtype.cpp
generated/src/DTO/sendcommand.cpp
generated/src/DTO/groupupdatetype.cpp
generated/src/DTO/objectgroupupdate.cpp

9
core/README.md Normal file
View file

@ -0,0 +1,9 @@
# Jellyfin-Qt
This folder contains the core library containing most of the non-interface UI logic and platform-independent parts.
## Code generation.
Parts of the code (notably the data models) are generated from the OpenApi description provided by the
Jellyfin server. The code generator uses [the D programming language](https://dlang.org/)
and expects to be run through [DMD](https://github.com/dlang/dub). Make sure both a D compiler and DMD are installed.
Afterwards, on Unix-like systems, marking the "script" as executable and running it should be enough. On Windows,
one probably needs to run `dub.exe openapigenerator.d`, but I haven't verified it myself.

View file

@ -3,6 +3,28 @@
name "openapigenerator.d" name "openapigenerator.d"
dependency "dyaml" version="~>0.8.0" dependency "dyaml" version="~>0.8.0"
+/ +/
// The following copyright string also applies to this file.
string COPYRIGHT = q"EOL
/*
* 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
*/
EOL";
import std.algorithm; import std.algorithm;
import std.array; import std.array;
import std.file : mkdirRecurse; import std.file : mkdirRecurse;
@ -15,11 +37,32 @@ import std.uni;
import dyaml; import dyaml;
// CODE GENERATION SETTINGS static this() {
CasePolicy OPENAPI_CASING = CasePolicy.PASCAL; COPYRIGHT ~= q"EOS
/*
* 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.
*/
EOS";
}
// CODE GENERATION SETTINGS
// File name of the CMake file this generated should generate.
string CMAKE_INCLUDE_FILE = "GeneratedSources.cmake";
string CMAKE_VAR_PREFIX = "openapi";
string[] CPP_NAMESPACE = ["Jellyfin", "DTO"];
string INCLUDE_PREFIX = "JellyfinQt/DTO"; string INCLUDE_PREFIX = "JellyfinQt/DTO";
string SRC_PREFIX = "DTO";
CasePolicy OPENAPI_CASING = CasePolicy.PASCAL;
string[] CPP_NAMESPACE = ["Jellyfin", "DTO"];
CasePolicy CPP_FILENAME_CASING = CasePolicy.LOWER; CasePolicy CPP_FILENAME_CASING = CasePolicy.LOWER;
CasePolicy CPP_CLASS_CASING = CasePolicy.PASCAL; CasePolicy CPP_CLASS_CASING = CasePolicy.PASCAL;
CasePolicy CPP_CLASS_MEMBER_CASING = CasePolicy.CAMEL; CasePolicy CPP_CLASS_MEMBER_CASING = CasePolicy.CAMEL;
@ -28,8 +71,10 @@ string CPP_CLASS_MEMBER_PREFIX = "m_";
CasePolicy CPP_CLASS_METHOD_CASING = CasePolicy.CAMEL; CasePolicy CPP_CLASS_METHOD_CASING = CasePolicy.CAMEL;
bool GENERATE_PROPERTIES = true; bool GENERATE_PROPERTIES = true;
// Implementation
string outputDirectory = "generated"; string outputDirectory = "generated";
// END CODE GENERATION SETTINGS.
// Implementation
enum CasePolicy { enum CasePolicy {
KEEP, // Do not modify KEEP, // Do not modify
@ -63,18 +108,49 @@ void realMain(string[] args) {
if (args.length >= 3) outputDirectory = args[2]; if (args.length >= 3) outputDirectory = args[2];
mkdirRecurse(buildPath(outputDirectory, "include", INCLUDE_PREFIX)); mkdirRecurse(buildPath(outputDirectory, "include", INCLUDE_PREFIX));
mkdirRecurse(buildPath(outputDirectory, "src")); mkdirRecurse(buildPath(outputDirectory, "src", SRC_PREFIX));
Node root = Loader.fromFile(schemeFile).load(); Node root = Loader.fromFile(schemeFile).load();
Appender!(string[]) headerFiles, implementationFiles;
foreach(ref string key, ref const Node scheme; root["components"]["schemas"]) { foreach(ref string key, ref const Node scheme; root["components"]["schemas"]) {
generateFileForSchema(key, scheme, root["components"]["schemas"]); generateFileForSchema(key, scheme, root["components"]["schemas"]);
string fileBase = key.applyCasePolicy(OPENAPI_CASING, CPP_FILENAME_CASING);
headerFiles ~= [buildPath(outputDirectory, "include", INCLUDE_PREFIX, fileBase ~ ".h")];
implementationFiles ~= [buildPath(outputDirectory, "src", SRC_PREFIX, fileBase ~ ".cpp")];
} }
writeCMakeFile(headerFiles[], implementationFiles[]);
}
void writeCMakeFile(string[] headerFiles, string[] implementationFiles) {
File output = File(buildPath(outputDirectory, "..", CMAKE_INCLUDE_FILE), "w+");
output.writeln("cmake_minimum_required(VERSION 3.0)");
// Peek laziness: wrapping a C++ comment inside a CMake block comment because I couldn't be
// donkey'd to do otherwise.
output.writeln("#[[");
output.writeln(COPYRIGHT);
output.writeln("]]");
output.writef("set(%s_HEADERS", CMAKE_VAR_PREFIX);
foreach (headerFile; headerFiles) {
output.writeln();
output.writef("\t%s", headerFile);
}
output.writeln();
output.writeln();
output.writef("set(%s_SOURCES", CMAKE_VAR_PREFIX);
foreach (implementationFile; implementationFiles) {
output.writeln();
output.writef("\t%s", implementationFile);
}
output.writeln();
} }
void generateFileForSchema(ref string name, ref const Node scheme, Node allSchemas) { void generateFileForSchema(ref string name, ref const Node scheme, Node allSchemas) {
string fileBase = name.applyCasePolicy(OPENAPI_CASING, CPP_FILENAME_CASING); string fileBase = name.applyCasePolicy(OPENAPI_CASING, CPP_FILENAME_CASING);
File headerFile = File(buildPath(outputDirectory, "include", INCLUDE_PREFIX, fileBase ~ ".h"), "w+"); File headerFile = File(buildPath(outputDirectory, "include", INCLUDE_PREFIX, fileBase ~ ".h"), "w+");
File implementationFile = File(buildPath(outputDirectory, "src", fileBase ~ ".cpp"), "w+"); File implementationFile = File(buildPath(outputDirectory, "src", SRC_PREFIX, fileBase ~ ".cpp"), "w+");
if ("enum" in scheme) { if ("enum" in scheme) {
string[1] imports = ["QObject"]; string[1] imports = ["QObject"];
@ -329,6 +405,7 @@ void writeEnumImplementation(File output, string name) {
// Common // Common
void writeHeaderPreamble(File output, string className, string[] imports = []) { void writeHeaderPreamble(File output, string className, string[] imports = []) {
output.writeln(COPYRIGHT);
string guard = guardName(CPP_NAMESPACE, className); string guard = guardName(CPP_NAMESPACE, className);
output.writefln("#ifndef %s", guard); output.writefln("#ifndef %s", guard);
output.writefln("#define %s", guard); output.writefln("#define %s", guard);
@ -356,6 +433,7 @@ void writeHeaderPostamble(File output, string className) {
} }
void writeImplementationPreamble(File output, string className, string[] imports = []) { void writeImplementationPreamble(File output, string className, string[] imports = []) {
output.writeln(COPYRIGHT);
output.writefln("#include <%s>", buildPath(INCLUDE_PREFIX, className.applyCasePolicy(OPENAPI_CASING, CasePolicy.LOWER) ~ ".h")); output.writefln("#include <%s>", buildPath(INCLUDE_PREFIX, className.applyCasePolicy(OPENAPI_CASING, CasePolicy.LOWER) ~ ".h"));
output.writeln(); output.writeln();