mirror of
https://github.com/HenkKalkwater/harbour-sailfin.git
synced 2024-05-18 20:02:43 +00:00
Compare commits
147 commits
Author | SHA1 | Date | |
---|---|---|---|
Chris Josten | 5328e63e2c | ||
Chris Josten | 19efba457c | ||
Chris Josten | fbe8f5631c | ||
Chris Josten | 22046a654a | ||
Chris Josten | 7bf7b4039a | ||
Chris Josten | 982e5c2825 | ||
Chris Josten | 0329f31db0 | ||
Chris Josten | 720a1ed5ff | ||
Chris Josten | c5541b0b16 | ||
Chris Josten | 5e62fe7624 | ||
Chris Josten | a35d8026be | ||
Chris Josten | 3c02985990 | ||
Chris Josten | a66434afa8 | ||
Chris Josten | 13786f01c9 | ||
Chris Josten | 5cd0b10b73 | ||
Chris Josten | bb45637d0b | ||
Chris Josten | 3fb373a8ef | ||
Chris Josten | f0328e2c80 | ||
Chris Josten | 9266f65c2f | ||
Chris Josten | 1b27847c94 | ||
Chris Josten | 6ed623d0f8 | ||
Chris Josten | d7910faed5 | ||
8b81fae67f | |||
8b94a2dd30 | |||
Chris Josten | 61a7eaf52e | ||
Chris Josten | 7c6d8486de | ||
Chris Josten | 3783de9ce7 | ||
Chris Josten | 7a7ddc7717 | ||
Chris Josten | 77cb5d5957 | ||
Chris Josten | b257fe60aa | ||
Chris Josten | b1bd15f2c1 | ||
Chris Josten | c72c10bad4 | ||
Chris Josten | f91e9f88e7 | ||
Chris Josten | b8933ddca4 | ||
Chris Josten | 0fafb19c7d | ||
Chris Josten | 3f9661ccb5 | ||
Chris Josten | fb81913eab | ||
Chris Josten | dc9c3ea1b8 | ||
Chris Josten | 0c0b91dc4b | ||
Chris Josten | 2398cc2997 | ||
Chris Josten | 985a65154a | ||
Chris Josten | 4a178ee227 | ||
Chris Josten | c1e402f411 | ||
Chris Josten | 818443dbae | ||
Chris Josten | eecebc4ec6 | ||
Chris Josten | ade8866303 | ||
Chris Josten | dd34e1a087 | ||
Chris Josten | 7ae204bf87 | ||
Chris Josten | 62d9b9a73c | ||
Chris Josten | f34f3484f3 | ||
Chris Josten | 69ddb18046 | ||
Chris Josten | 748e5bdf13 | ||
Chris Josten | cab5f20469 | ||
Chris Josten | deada4f635 | ||
Chris Josten | 852e3e928f | ||
Chris Josten | 90db983c30 | ||
Chris Josten | 1e795ae8b6 | ||
Chris Josten | b5f22ec52a | ||
Chris Josten | 17400a97e4 | ||
Chris Josten | af99b39722 | ||
Chris Josten | 40d8a58a5a | ||
Chris Josten | 5d521ee189 | ||
Chris Josten | 2a3bd51def | ||
Chris Josten | 7c21eb425d | ||
caf72af999 | |||
60bc90c5fa | |||
357ac89330 | |||
Chris Josten | 8a9cb73686 | ||
Chris Josten | 14c9de0aac | ||
Chris Josten | 6bfe783bec | ||
Chris Josten | 64ad37707c | ||
Chris Josten | f5fc33c002 | ||
Chris Josten | 7ae46b6013 | ||
Chris Josten | 1283c4ca66 | ||
Chris Josten | a9f5cce3c5 | ||
Chris Josten | 5e91a3b5b1 | ||
Chris Josten | 47903797b0 | ||
Chris Josten | 96ecd8e7d8 | ||
Chris Josten | 1453cbbc63 | ||
Chris Josten | a89834044c | ||
Chris Josten | 03bc3f795a | ||
Chris Josten | 54235f298e | ||
Chris Josten | 757327ceac | ||
Chris Josten | 5ee2869db9 | ||
Chris Josten | 1aae311b9b | ||
Chris Josten | 5a24bdee59 | ||
Chris Josten | 7f39da0b95 | ||
Chris Josten | 2bd9d66841 | ||
Chris Josten | 4bbc86d31c | ||
Chris Josten | f028e38b7a | ||
Chris Josten | 75474e1793 | ||
Chris Josten | f09593c245 | ||
Chris Josten | e04ec364c1 | ||
Chris Josten | bb1e3ea21d | ||
Chris Josten | 7b6c272aa9 | ||
Chris Josten | df1e134821 | ||
Chris Josten | 242ccc90c1 | ||
Chris Josten | 86672be051 | ||
Chris Josten | fbc154fb56 | ||
Chris Josten | 228f81984b | ||
Chris Josten | 9abee12658 | ||
Chris Josten | 89fef6d7f4 | ||
Chris Josten | 729e343661 | ||
Chris Josten | e421adf733 | ||
Chris Josten | 76a49868b9 | ||
Chris Josten | d9bb22f367 | ||
Chris Josten | f670ea22ab | ||
Chris Josten | 2fbafdf450 | ||
Chris Josten | 6d8aa373f0 | ||
Chris Josten | 9643482ae1 | ||
Chris Josten | 3e6b22e084 | ||
Chris Josten | 2360b261f7 | ||
Chris Josten | b9b08ab384 | ||
Chris Josten | 0358418926 | ||
Chris Josten | 05f79197eb | ||
Chris Josten | 96e19548d7 | ||
Chris Josten | 3cd1fd3e23 | ||
Chris Josten | 56d7c1486e | ||
Chris Josten | 17d4b2c24b | ||
Chris Josten | fb60cf13de | ||
Chris Josten | 40d8793bd8 | ||
Chris Josten | 4ed6a8a42d | ||
Chris Josten | 0bd9042ef3 | ||
Chris Josten | f7bca333c8 | ||
Chris Josten | 895731ae38 | ||
Chris Josten | b345a1c650 | ||
Chris Josten | e4e35c03d4 | ||
Chris Josten | 4453492204 | ||
Chris Josten | 8552e08a12 | ||
Chris Josten | c1b0bddd10 | ||
Chris Josten | 306693fa04 | ||
Chris Josten | b699f6e74d | ||
Chris Josten | 7e77abc173 | ||
Chris Josten | a244c27b1a | ||
Chris Josten | 5ddd5e8e2e | ||
Chris Josten | eda4994aac | ||
Chris Josten | 382af84846 | ||
Chris Josten | 3389a11508 | ||
Chris Josten | 5bdc8ee83d | ||
Chris Josten | 79d378c9ed | ||
Chris Josten | bb2f6f3a3e | ||
Chris Josten | 80cbf56225 | ||
Chris Josten | a172b6d914 | ||
Chris Josten | 040aeb1a40 | ||
Chris Josten | a29ab3dff4 | ||
Chris Josten | 727e50cae1 | ||
Chris Josten | 228bcfb685 |
13
.github/FUNDING.yml
vendored
Normal file
13
.github/FUNDING.yml
vendored
Normal file
|
@ -0,0 +1,13 @@
|
|||
# These are supported funding model platforms
|
||||
|
||||
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
|
||||
patreon: # Replace with a single Patreon username
|
||||
open_collective: # Replace with a single Open Collective username
|
||||
ko_fi: # Replace with a single Ko-fi username
|
||||
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
||||
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
||||
liberapay: heartfin # Replace with a single Liberapay username
|
||||
issuehunt: # Replace with a single IssueHunt username
|
||||
otechie: # Replace with a single Otechie username
|
||||
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
|
||||
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
|
40
.github/workflows/doxygen.yaml
vendored
Normal file
40
.github/workflows/doxygen.yaml
vendored
Normal file
|
@ -0,0 +1,40 @@
|
|||
name: doxygen
|
||||
run-name: Generate and deploy Doxygen documentation
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- "master"
|
||||
workflow_dispatch: {}
|
||||
permissions:
|
||||
contents: read
|
||||
pages: write
|
||||
id-token: write
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: true
|
||||
- name: Configure pages
|
||||
uses: actions/configure-pages@v3
|
||||
- name: Install the doxyqml filter
|
||||
run: pip install doxyqml
|
||||
- name: Doxygen
|
||||
uses: mattnotmitt/doxygen-action@edge
|
||||
- name: Upload GitHub pages artifact
|
||||
uses: "actions/upload-pages-artifact@v2"
|
||||
with:
|
||||
path: "doxygen/html/"
|
||||
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
environment:
|
||||
name: github-pages
|
||||
url: ${{ steps.deployment.outputs.page_url }}
|
||||
steps:
|
||||
- name: Deploy to GitHub Pages
|
||||
id: deployment
|
||||
uses: "actions/deploy-pages@v2"
|
6
.gitignore
vendored
6
.gitignore
vendored
|
@ -4,6 +4,10 @@ rpm/*.spec
|
|||
# Build folders
|
||||
build/
|
||||
build-*/
|
||||
.dub/
|
||||
doxygen/
|
||||
|
||||
# IDE files
|
||||
harbour-sailfin.pro.user
|
||||
*.user
|
||||
CMakeLists.txt.user.*
|
||||
compile_commands.json
|
||||
|
|
41
.gitlab-ci.yml
Normal file
41
.gitlab-ci.yml
Normal file
|
@ -0,0 +1,41 @@
|
|||
variables: &variables
|
||||
SFOS_VERSION: 4.1.0.24
|
||||
BUILD_PATH: /home/mersdk/harbour-sailfin
|
||||
|
||||
stages:
|
||||
- lint
|
||||
- build
|
||||
|
||||
image: coderus/sailfishos-platform-sdk:$SFOS_VERSION
|
||||
default:
|
||||
before_script:
|
||||
- cp -a . $BUILD_PATH && cd $BUILD_PATH
|
||||
|
||||
lint:sfos:qmllint:
|
||||
stage: lint
|
||||
script:
|
||||
- sudo zypper --non-interactive install qt5-qtdeclarative-devel-tools
|
||||
- cd sailfish/qml
|
||||
# Find all files ending in .qml or .js and pass them as arguments to qmllint
|
||||
- find -type f \( -name \*.qml -o -name \*.js \) -exec /usr/lib/qt5/bin/qmllint \{\} +
|
||||
allow_failure: true
|
||||
|
||||
.build:sfos: &build
|
||||
stage: build
|
||||
artifacts:
|
||||
paths:
|
||||
- $BUILD_PATH/RPMS/
|
||||
script:
|
||||
- mb2 -t SailfishOS-$SFOS_VERSION-$MER_ARCH build
|
||||
|
||||
build:sfos:armv7hl:
|
||||
variables:
|
||||
<<: *variables
|
||||
MER_ARCH: armv7hl
|
||||
<<: *build
|
||||
|
||||
build:sfos:aarch64:
|
||||
variables:
|
||||
<<: *variables
|
||||
MER_ARCH: aarch64
|
||||
<<: *build
|
6
.gitmodules
vendored
6
.gitmodules
vendored
|
@ -0,0 +1,6 @@
|
|||
[submodule "core/doc/doxygen-awesome-css"]
|
||||
path = core/doc/doxygen-awesome-css
|
||||
url = https://github.com/jothepro/doxygen-awesome-css.git
|
||||
[submodule "3rdparty/doxygen-awesome-css"]
|
||||
path = 3rdparty/doxygen-awesome-css
|
||||
url = https://github.com/jothepro/doxygen-awesome-css.git
|
1
3rdparty/doxygen-awesome-css
vendored
Submodule
1
3rdparty/doxygen-awesome-css
vendored
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 5b27b3a747ca1e559fa54149762cca0bad6036fb
|
37
CMakeLists.txt
Normal file
37
CMakeLists.txt
Normal file
|
@ -0,0 +1,37 @@
|
|||
cmake_minimum_required(VERSION 3.11)
|
||||
project(harbour-sailfin)
|
||||
set (CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/")
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
cmake_policy(SET CMP0048 NEW)
|
||||
|
||||
# Options
|
||||
option(PLATFORM_SAILFISHOS "Build SailfishOS version of application" OFF)
|
||||
option(PLATFORM_QTQUICK "Build QtQuick version of application" ON)
|
||||
option(FREEDESKTOP_INTEGRATION "Integration with various FreeDesktop.org standards, such as MPRIS" ON)
|
||||
option(BUILD_PRECOMPILED_HEADERS "Build with precompiled headers for faster compile times when doing a full rebuild, at the cost of slower incremental builds whenever a header file is changed" OFF)
|
||||
option(USE_MLITE "Build with mlite (MeeGo lite library), only available on Linux-based platforms. Used to store settings using DConf." OFF)
|
||||
|
||||
if (NOT SAILFIN_VERSION)
|
||||
set(SAILFIN_VERSION "1.0.0")
|
||||
endif()
|
||||
|
||||
if(PLATFORM_SAILFISHOS)
|
||||
# Hardcode this less?
|
||||
set(CMAKE_INSTALL_LIBDIR "${CMAKE_INSTALL_PREFIX}/share/harbour-sailfin/nl/netsoj/chris/Jellyfin")
|
||||
set(USE_MLITE ON)
|
||||
endif()
|
||||
|
||||
if (PLATFORM_SAILFISHOS)
|
||||
set(CMAKE_BUILD_SHARED_LIBS NO)
|
||||
endif()
|
||||
add_subdirectory(core)
|
||||
|
||||
if(PLATFORM_SAILFISHOS)
|
||||
add_subdirectory(sailfish)
|
||||
elseif(PLATFORM_QTQUICK)
|
||||
add_subdirectory(qtquick)
|
||||
endif()
|
||||
|
||||
include(FeatureSummary)
|
||||
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)
|
48
README.md
48
README.md
|
@ -1,5 +1,51 @@
|
|||
# Sailfin
|
||||
Sailfin is a Sailfish OS client for Jellyfin, a media server, written in C++ and qml.
|
||||
[!["Chat via Matrix"](https://img.shields.io/matrix/sailfin:netsoj.nl?label=Chat%20via%20Matrix&logo=matrix&server_fqdn=meetriks.netsoj.nl&style=for-the-badge)](https://matrix.to/#/#sailfin:netsoj.nl)
|
||||
Sailfin is a [Sailfish OS](https://sailfishos.org) client for [Jellyfin](https://jellyfin.org), a media server, written in C++ and qml.
|
||||
|
||||
## Download
|
||||
This application can be found on [OpenRepos.net](https://openrepos.net/content/ahappyhuman/sailfin)
|
||||
|
||||
## Screenshots (running on Sailfish OS)
|
||||
<img alt="Screenshot showing the library root" src="graphics/screenshot-sailfish-1.png" width="33%" /> <img alt="Screenshot showing TV show page" src="graphics/screenshot-sailfish-2.png" width="33%" />
|
||||
|
||||
## Contributing
|
||||
Please [see this page for how the Jellyfin Qt library works](https://heartfin.github.io/harbour-sailfin/guides.html).
|
||||
and [see this page for contribution guidelines](https://heartfin.github.io/harbour-sailfin/contributing.html).
|
||||
|
||||
## Code layout
|
||||
```
|
||||
├── 3rdparty 3rd-party libraries
|
||||
├── cmake Additional CMake modules
|
||||
│
|
||||
├── core The core Qt library named Jellyfin-Qt
|
||||
│ ├── codegen Template files for code generation based on the OpenAPI spec
|
||||
│ ├── dbus DBus interface description files
|
||||
│ ├── doc Extra documentation files for the generated documentation
|
||||
│ ├── include Publically includable files
|
||||
│ ├── qrc Resources for the library
|
||||
│ └── src C++ source code
|
||||
│
|
||||
├── graphics Source graphics files, meant to be edited
|
||||
│ └── qtquick-theme Custom graphics for the QtQuick theme
|
||||
│
|
||||
├── qtquick QtQuick application for testing, based on the core library
|
||||
│ ├── assets Custom assets
|
||||
│ ├── qml QML UI files
|
||||
│ ├── SailfinStyle QtQuick theme files
|
||||
│ └── src C++ code
|
||||
│
|
||||
├── rpm Files for packaging the application
|
||||
│
|
||||
└── sailfish The Sailfish OS app based on the core library
|
||||
├── icons Launcher icons
|
||||
├── qml QML UI files
|
||||
│ ├── components Reusable QML components
|
||||
│ ├── cover Cover pages
|
||||
│ ├── licenses Licence texts for libraries
|
||||
│ └── pages Application pages
|
||||
├── src C++ source code
|
||||
└── translations UI translation files
|
||||
```
|
||||
|
||||
## License
|
||||
This application is licensed under the LGPLv2.1 license, although you may opt to choose a newer version of the LGPL if you want so.
|
||||
|
|
39
cmake/FindSailfishApp.cmake
Normal file
39
cmake/FindSailfishApp.cmake
Normal file
|
@ -0,0 +1,39 @@
|
|||
# - Try to find libsailfishapp
|
||||
# Once done this will define
|
||||
# SailfishApp_FOUND - System has libsailfishapp
|
||||
# SailfishApp_INCLUDE_DIRS - The libsailfishapp include directories
|
||||
# SailfishApp_LIBRARIES - The libraries needed to use libsailfishapp
|
||||
# SailfishApp_DEFINITIONS - Compiler switches required for using libsailfishapp
|
||||
|
||||
find_package(PkgConfig)
|
||||
pkg_check_modules(PC_SailfishApp QUIET sailfishapp)
|
||||
set(SailfishApp_DEFINITIONS ${PC_SailfishApp_CFLAGS_OTHER})
|
||||
|
||||
find_path(SailfishApp_INCLUDE_DIR sailfishapp.h
|
||||
HINTS ${PC_SailfishApp_INCLUDEDIR} ${PC_SailfishApp_INCLUDE_DIRS}
|
||||
PATH_SUFFIXES sailfishapp )
|
||||
|
||||
find_library(SailfishApp_LIBRARY NAMES sailfishapp libsailfishapp
|
||||
HINTS ${PC_SailfishApp_LIBDIR} ${PC_SailfishApp_LIBRARY_DIRS} )
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
# handle the QUIETLY and REQUIRED arguments and set LIBSailfishApp_FOUND to TRUE
|
||||
# if all listed variables are TRUE
|
||||
set(SailfishApp_VERSION ${PC_SAILFISHAPP_VERSION})
|
||||
find_package_handle_standard_args(SailfishApp
|
||||
FOUND_VAR SailfishApp_FOUND
|
||||
REQUIRED_VARS
|
||||
SailfishApp_LIBRARY
|
||||
SailfishApp_INCLUDE_DIR
|
||||
VERSION_VAR SailfishApp_VERSION)
|
||||
|
||||
if(SailfishApp_FOUND AND NOT TARGET Foo::Foo)
|
||||
add_library(SailfishApp::SailfishApp UNKNOWN IMPORTED)
|
||||
set_target_properties(SailfishApp::SailfishApp PROPERTIES
|
||||
IMPORTED_LOCATION "${SailfishApp_LIBRARY}"
|
||||
INTERFACE_COMPILE_OPTIONS "${PC_SailfishApp_CFLAGS_OTHER}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${SailfishApp_INCLUDE_DIR}"
|
||||
)
|
||||
endif()
|
||||
|
||||
mark_as_advanced(SailfishApp_INCLUDE_DIR SailfishApp_LIBRARY )
|
39
cmake/Findmlite5.cmake
Normal file
39
cmake/Findmlite5.cmake
Normal file
|
@ -0,0 +1,39 @@
|
|||
# - Try to find mlite5
|
||||
# Once done this will define
|
||||
# mlite5_FOUND - System has mlite5
|
||||
# mlite5_INCLUDE_DIRS - The mlite5 include directories
|
||||
# mlite5_LIBRARIES - The libraries needed to use mlite5
|
||||
# mlite5_DEFINITIONS - Compiler switches required for using mlite5
|
||||
|
||||
find_package(PkgConfig)
|
||||
pkg_check_modules(PC_mlite5 QUIET mlite5)
|
||||
set(mlite5_DEFINITIONS ${PC_mlite5_CFLAGS_OTHER})
|
||||
|
||||
find_path(mlite5_INCLUDE_DIR mlite-global.h
|
||||
HINTS ${PC_mlite5_INCLUDEDIR} ${PC_mlite5_INCLUDE_DIRS}
|
||||
PATH_SUFFIXES sailfishapp )
|
||||
|
||||
find_library(mlite5_LIBRARY NAMES mlite5 mlite libmlite libmlite5
|
||||
HINTS ${PC_mlite5_LIBDIR} ${PC_mlite5_LIBRARY_DIRS} )
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
# handle the QUIETLY and REQUIRED arguments and set LIBmlite5_FOUND to TRUE
|
||||
# if all listed variables are TRUE
|
||||
set(mlite5_VERSION ${PC_mlite5_VERSION})
|
||||
find_package_handle_standard_args(mlite5
|
||||
FOUND_VAR mlite5_FOUND
|
||||
REQUIRED_VARS
|
||||
mlite5_LIBRARY
|
||||
mlite5_INCLUDE_DIR
|
||||
VERSION_VAR mlite5_VERSION)
|
||||
|
||||
if(mlite5_FOUND AND NOT TARGET Foo::Foo)
|
||||
add_library(mlite5::mlite5 UNKNOWN IMPORTED)
|
||||
set_target_properties(mlite5::mlite5 PROPERTIES
|
||||
IMPORTED_LOCATION "${mlite5_LIBRARY}"
|
||||
INTERFACE_COMPILE_OPTIONS "${PC_mlite5_CFLAGS_OTHER}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${mlite5_INCLUDE_DIR}"
|
||||
)
|
||||
endif()
|
||||
|
||||
mark_as_advanced(mlite5_INCLUDE_DIR mlite5_LIBRARY )
|
110
cmake/QmlPlugin.cmake
Normal file
110
cmake/QmlPlugin.cmake
Normal file
|
@ -0,0 +1,110 @@
|
|||
include(CMakeParseArguments)
|
||||
|
||||
### Finds where to qmlplugindump binary is installed
|
||||
### Requires that 'qmake' directory is in PATH
|
||||
function(FindQmlPluginDump)
|
||||
execute_process(
|
||||
COMMAND qmake -query QT_INSTALL_BINS
|
||||
OUTPUT_VARIABLE QT_BIN_DIR
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
set(QMLPLUGINDUMP_BIN ${QT_BIN_DIR}/qmlplugindump PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
### Sets QT_INSTALL_QML to the directory where QML Plugins should be installed
|
||||
function(FindQtInstallQml)
|
||||
execute_process(
|
||||
COMMAND qmake -query QT_INSTALL_QML
|
||||
OUTPUT_VARIABLE PROC_RESULT
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
set(QT_INSTALL_QML ${PROC_RESULT} PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
function(add_qmlplugin TARGET)
|
||||
set(options NO_AUTORCC NO_AUTOMOC)
|
||||
set(oneValueArgs URI VERSION BINARY_DIR)
|
||||
set(multiValueArgs SOURCES QMLFILES)
|
||||
cmake_parse_arguments(QMLPLUGIN "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
|
||||
|
||||
### At least TARGET, URI and VERSION must be specified
|
||||
if(NOT QMLPLUGIN_URI OR NOT QMLPLUGIN_VERSION)
|
||||
message(WARNING "TARGET, URI and VERSION must be set, no files generated")
|
||||
return()
|
||||
endif()
|
||||
|
||||
### Depending on project hierarchy, one might want to specify a custom binary dir
|
||||
if(NOT QMLPLUGIN_BINARY_DIR)
|
||||
set(QMLPLUGIN_BINARY_DIR ${CMAKE_BINARY_DIR})
|
||||
endif()
|
||||
|
||||
### Source files
|
||||
add_library(${TARGET} SHARED
|
||||
${QMLPLUGIN_SOURCES}
|
||||
)
|
||||
|
||||
### QML files, just to make them visible in the editor
|
||||
add_custom_target("${TARGET}-qmlfiles" SOURCES ${QMLPLUGIN_QMLFILES})
|
||||
|
||||
### No AutoMOC or AutoRCC
|
||||
if(QMLPLUGIN_NO_AUTORCC)
|
||||
set_target_properties(${TARGET} PROPERTIES AUTOMOC OFF)
|
||||
else()
|
||||
set_target_properties(${TARGET} PROPERTIES AUTOMOC ON)
|
||||
endif()
|
||||
if(QMLPLUGIN_NO_AUTOMOC)
|
||||
set_target_properties(${TARGET} PROPERTIES AUTOMOC OFF)
|
||||
else()
|
||||
set_target_properties(${TARGET} PROPERTIES AUTOMOC ON)
|
||||
endif()
|
||||
|
||||
### Find location of qmlplugindump (stored in QMLPLUGINDUMP_BIN)
|
||||
FindQmlPluginDump()
|
||||
### Find where to install QML Plugins (stored in QT_INSTALL_QML)
|
||||
FindQtInstallQml()
|
||||
|
||||
set(COPY_QMLDIR_COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_LIST_DIR}/qmldir $<TARGET_FILE_DIR:${TARGET}>/qmldir)
|
||||
set(COPY_QMLFILES_COMMAND ${CMAKE_COMMAND} -E copy ${QMLPLUGIN_QMLFILES} $<TARGET_FILE_DIR:${TARGET}>)
|
||||
set(GENERATE_QMLTYPES_COMMAND ${QMLPLUGINDUMP_BIN} -nonrelocatable ${QMLPLUGIN_URI} ${QMLPLUGIN_VERSION} ${QMLPLUGIN_BINARY_DIR} > ${CMAKE_CURRENT_BINARY_DIR}/plugin.qmltypes)
|
||||
|
||||
### Copy qmldir from project source to binary dir
|
||||
add_custom_command(
|
||||
TARGET ${TARGET}
|
||||
POST_BUILD
|
||||
COMMAND ${COPY_QMLDIR_COMMAND}
|
||||
COMMENT "Copying qmldir to binary directory"
|
||||
)
|
||||
|
||||
### Copy QML-files from project source to binary dir
|
||||
if(QMLPLUGIN_QMLFILES)
|
||||
add_custom_command(
|
||||
TARGET ${TARGET}
|
||||
POST_BUILD
|
||||
COMMAND ${COPY_QMLFILES_COMMAND}
|
||||
COMMENT "Copying QML files to binary directory"
|
||||
)
|
||||
endif()
|
||||
|
||||
### Create command to generate plugin.qmltypes after build
|
||||
add_custom_command(
|
||||
TARGET ${TARGET}
|
||||
POST_BUILD
|
||||
COMMAND ${GENERATE_QMLTYPES_COMMAND}
|
||||
COMMENT "Generating plugin.qmltypes"
|
||||
)
|
||||
|
||||
string(REPLACE "." "/" QMLPLUGIN_INSTALL_URI ${QMLPLUGIN_URI})
|
||||
|
||||
### Install library
|
||||
install(TARGETS ${TARGET}
|
||||
DESTINATION ${QT_INSTALL_QML}/${QMLPLUGIN_INSTALL_URI}
|
||||
)
|
||||
|
||||
### Install aditional files
|
||||
install(FILES
|
||||
${CMAKE_CURRENT_BINARY_DIR}/qmldir
|
||||
${CMAKE_CURRENT_BINARY_DIR}/plugin.qmltypes
|
||||
${QMLPLUGIN_QMLFILES}
|
||||
DESTINATION ${QT_INSTALL_QML}/${QMLPLUGIN_INSTALL_URI}
|
||||
)
|
||||
endfunction()
|
169
core/CMakeLists.txt
Normal file
169
core/CMakeLists.txt
Normal file
|
@ -0,0 +1,169 @@
|
|||
project(jellyfin-qt VERSION 0.1.0)
|
||||
find_package(Qt5 5.6 COMPONENTS Multimedia Network Qml WebSockets REQUIRED)
|
||||
|
||||
if (FREEDESKTOP_INTEGRATION)
|
||||
find_package(Qt5 5.6 COMPONENTS DBus REQUIRED)
|
||||
endif()
|
||||
|
||||
if (USE_MLITE)
|
||||
find_package(mlite5 REQUIRED)
|
||||
endif()
|
||||
|
||||
include(GNUInstallDirs)
|
||||
include(GeneratedSources.cmake)
|
||||
|
||||
set(JellyfinQt_SOURCES
|
||||
src/model/controllablesession.cpp
|
||||
src/model/deviceprofile.cpp
|
||||
src/model/item.cpp
|
||||
src/model/player.cpp
|
||||
src/model/playbackmanager.cpp
|
||||
src/model/playbackreporter.cpp
|
||||
src/model/playlist.cpp
|
||||
src/model/remotejellyfinplayback.cpp
|
||||
src/model/shuffle.cpp
|
||||
src/model/user.cpp
|
||||
|
||||
src/support/jsonconv.cpp
|
||||
src/support/loader.cpp
|
||||
src/support/parseexception.cpp
|
||||
src/viewmodel/item.cpp
|
||||
src/viewmodel/itemmodel.cpp
|
||||
src/viewmodel/loader.cpp
|
||||
src/viewmodel/mediastream.cpp
|
||||
src/viewmodel/modelstatus.cpp
|
||||
src/viewmodel/playbackmanager.cpp
|
||||
src/viewmodel/playlist.cpp
|
||||
src/viewmodel/remotedevice.cpp
|
||||
src/viewmodel/settings.cpp
|
||||
src/viewmodel/userdata.cpp
|
||||
src/viewmodel/usermodel.cpp
|
||||
src/viewmodel/user.cpp
|
||||
src/apiclient.cpp
|
||||
src/apimodel.cpp
|
||||
src/credentialmanager.cpp
|
||||
src/eventbus.cpp
|
||||
src/jellyfin.cpp
|
||||
src/jsonhelper.cpp
|
||||
src/qobjectsettingswrapper.cpp
|
||||
src/serverdiscoverymodel.cpp
|
||||
src/websocket.cpp)
|
||||
|
||||
list(APPEND JellyfinQt_SOURCES ${openapi_SOURCES})
|
||||
|
||||
set(JellyfinQt_HEADERS
|
||||
include/JellyfinQt/model/controllablesession.h
|
||||
include/JellyfinQt/model/deviceprofile.h
|
||||
include/JellyfinQt/model/item.h
|
||||
include/JellyfinQt/model/player.h
|
||||
include/JellyfinQt/model/playbackmanager.h
|
||||
include/JellyfinQt/model/playbackreporter.h
|
||||
include/JellyfinQt/model/playlist.h
|
||||
include/JellyfinQt/model/remotejellyfinplayback.h
|
||||
include/JellyfinQt/model/shuffle.h
|
||||
include/JellyfinQt/model/user.h
|
||||
include/JellyfinQt/support/jsonconv.h
|
||||
include/JellyfinQt/support/jsonconvimpl.h
|
||||
include/JellyfinQt/support/loader.h
|
||||
include/JellyfinQt/support/parseexception.h
|
||||
include/JellyfinQt/viewmodel/item.h
|
||||
include/JellyfinQt/viewmodel/itemmodel.h
|
||||
include/JellyfinQt/viewmodel/loader.h
|
||||
include/JellyfinQt/viewmodel/mediastream.h
|
||||
include/JellyfinQt/viewmodel/modelstatus.h
|
||||
include/JellyfinQt/viewmodel/propertyhelper.h
|
||||
include/JellyfinQt/viewmodel/playbackmanager.h
|
||||
include/JellyfinQt/viewmodel/platformmediacontrol.h
|
||||
include/JellyfinQt/viewmodel/playlist.h
|
||||
include/JellyfinQt/viewmodel/remotedevice.h
|
||||
include/JellyfinQt/viewmodel/settings.h
|
||||
include/JellyfinQt/viewmodel/userdata.h
|
||||
include/JellyfinQt/viewmodel/usermodel.h
|
||||
include/JellyfinQt/viewmodel/user.h
|
||||
include/JellyfinQt/viewmodel/utils.h
|
||||
include/JellyfinQt/apiclient.h
|
||||
include/JellyfinQt/apimodel.h
|
||||
include/JellyfinQt/credentialmanager.h
|
||||
include/JellyfinQt/eventbus.h
|
||||
include/JellyfinQt/jellyfin.h
|
||||
include/JellyfinQt/jsonhelper.h
|
||||
include/JellyfinQt/qobjectsettingswrapper.h
|
||||
include/JellyfinQt/serverdiscoverymodel.h
|
||||
include/JellyfinQt/websocket.h)
|
||||
|
||||
if (FREEDESKTOP_INTEGRATION)
|
||||
list(APPEND JellyfinQt_SOURCES
|
||||
src/platform/freedesktop/mediaplayer2.cpp
|
||||
src/platform/freedesktop/mediaplayer2player.cpp
|
||||
src/viewmodel/platformmediacontrol_freedesktop.cpp)
|
||||
list(APPEND JellyfinQt_HEADERS
|
||||
include/JellyfinQt/platform/freedesktop/mediaplayer2.h
|
||||
include/JellyfinQt/platform/freedesktop/mediaplayer2player.h)
|
||||
else()
|
||||
list(APPEND JellyfinQt_SOURCES
|
||||
src/viewmodel/platformmediacontrol_stub.cpp)
|
||||
endif()
|
||||
|
||||
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} qmldir JellyfinQt.qmltypes)
|
||||
|
||||
if(${CMAKE_VERSION} VERSION_GREATER "3.16.0")
|
||||
if(BUILD_PRECOMPILED_HEADERS)
|
||||
target_precompile_headers(JellyfinQt PRIVATE ${JellyfinQt_HEADERS})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
target_include_directories(JellyfinQt PUBLIC "include")
|
||||
target_link_libraries(JellyfinQt PUBLIC Qt5::Core Qt5::Multimedia Qt5::Network Qt5::Qml Qt5::WebSockets)
|
||||
|
||||
if (FREEDESKTOP_INTEGRATION)
|
||||
target_link_libraries(JellyfinQt PUBLIC Qt5::DBus)
|
||||
endif()
|
||||
|
||||
if (USE_MLITE)
|
||||
add_definitions(-DUSE_MLITE)
|
||||
target_link_libraries(JellyfinQt PUBLIC mlite5::mlite5)
|
||||
endif()
|
||||
|
||||
set_target_properties(JellyfinQt PROPERTIES CXX_VISIBILITY_PRESET default)
|
||||
install(TARGETS JellyfinQt
|
||||
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
||||
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
||||
INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}"
|
||||
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")
|
||||
|
||||
add_custom_target(qmltypes
|
||||
COMMAND qmlplugindump -nonrelocatable nl.netsoj.chris.Jellyfin 1.0 > $$PWD/JellyfinQt.qmltypes)
|
||||
|
||||
add_custom_command(
|
||||
TARGET JellyfinQt
|
||||
POST_BUILD
|
||||
COMMAND
|
||||
${CMAKE_COMMAND} -E copy
|
||||
${CMAKE_CURRENT_LIST_DIR}/qmldir
|
||||
$<TARGET_FILE_DIR:JellyfinQt>/qmldir
|
||||
)
|
||||
|
||||
add_custom_command(
|
||||
TARGET JellyfinQt
|
||||
POST_BUILD
|
||||
COMMAND
|
||||
${CMAKE_COMMAND} -E copy
|
||||
${CMAKE_CURRENT_LIST_DIR}/JellyfinQt.qmltypes
|
||||
$<TARGET_FILE_DIR:JellyfinQt>/JellyfinQt.qmltypes
|
||||
)
|
||||
|
||||
|
||||
set(QML_IMPORT_PATH $<TARGET_FILE_DIR:JellyfinQt> CACHE PATH "")
|
||||
install(FILES $<TARGET_FILE_DIR:JellyfinQt>/qmldir DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
|
||||
export(TARGETS JellyfinQt FILE JellyfinQtConfig.cmake)
|
685
core/GeneratedSources.cmake
Normal file
685
core/GeneratedSources.cmake
Normal file
|
@ -0,0 +1,685 @@
|
|||
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
|
||||
./include/JellyfinQt/dto/loglevel.h
|
||||
./include/JellyfinQt/dto/activitylogentry.h
|
||||
./include/JellyfinQt/dto/activitylogentryqueryresult.h
|
||||
./include/JellyfinQt/dto/authenticationinfo.h
|
||||
./include/JellyfinQt/dto/authenticationinfoqueryresult.h
|
||||
./include/JellyfinQt/dto/itemfields.h
|
||||
./include/JellyfinQt/dto/itemfilter.h
|
||||
./include/JellyfinQt/dto/imagetype.h
|
||||
./include/JellyfinQt/dto/video3dformat.h
|
||||
./include/JellyfinQt/dto/externalurl.h
|
||||
./include/JellyfinQt/dto/mediaprotocol.h
|
||||
./include/JellyfinQt/dto/mediasourcetype.h
|
||||
./include/JellyfinQt/dto/videotype.h
|
||||
./include/JellyfinQt/dto/isotype.h
|
||||
./include/JellyfinQt/dto/mediastreamtype.h
|
||||
./include/JellyfinQt/dto/subtitledeliverymethod.h
|
||||
./include/JellyfinQt/dto/mediastream.h
|
||||
./include/JellyfinQt/dto/mediaattachment.h
|
||||
./include/JellyfinQt/dto/transportstreamtimestamp.h
|
||||
./include/JellyfinQt/dto/mediasourceinfo.h
|
||||
./include/JellyfinQt/dto/playaccess.h
|
||||
./include/JellyfinQt/dto/mediaurl.h
|
||||
./include/JellyfinQt/dto/baseitemperson.h
|
||||
./include/JellyfinQt/dto/nameguidpair.h
|
||||
./include/JellyfinQt/dto/useritemdatadto.h
|
||||
./include/JellyfinQt/dto/dayofweek.h
|
||||
./include/JellyfinQt/dto/chapterinfo.h
|
||||
./include/JellyfinQt/dto/locationtype.h
|
||||
./include/JellyfinQt/dto/metadatafield.h
|
||||
./include/JellyfinQt/dto/imageorientation.h
|
||||
./include/JellyfinQt/dto/channeltype.h
|
||||
./include/JellyfinQt/dto/programaudio.h
|
||||
./include/JellyfinQt/dto/baseitemdto.h
|
||||
./include/JellyfinQt/dto/baseitemdtoqueryresult.h
|
||||
./include/JellyfinQt/dto/encodingcontext.h
|
||||
./include/JellyfinQt/dto/brandingoptions.h
|
||||
./include/JellyfinQt/dto/channelmediatype.h
|
||||
./include/JellyfinQt/dto/channelmediacontenttype.h
|
||||
./include/JellyfinQt/dto/channelitemsortfield.h
|
||||
./include/JellyfinQt/dto/channelfeatures.h
|
||||
./include/JellyfinQt/dto/collectioncreationresult.h
|
||||
./include/JellyfinQt/dto/version.h
|
||||
./include/JellyfinQt/dto/imagesavingconvention.h
|
||||
./include/JellyfinQt/dto/metadataoptions.h
|
||||
./include/JellyfinQt/dto/namevaluepair.h
|
||||
./include/JellyfinQt/dto/repositoryinfo.h
|
||||
./include/JellyfinQt/dto/pathsubstitution.h
|
||||
./include/JellyfinQt/dto/serverconfiguration.h
|
||||
./include/JellyfinQt/dto/mediaencoderpathdto.h
|
||||
./include/JellyfinQt/dto/problemdetails.h
|
||||
./include/JellyfinQt/dto/configurationpagetype.h
|
||||
./include/JellyfinQt/dto/configurationpageinfo.h
|
||||
./include/JellyfinQt/dto/generalcommandtype.h
|
||||
./include/JellyfinQt/dto/headermatchtype.h
|
||||
./include/JellyfinQt/dto/httpheaderinfo.h
|
||||
./include/JellyfinQt/dto/deviceidentification.h
|
||||
./include/JellyfinQt/dto/xmlattribute.h
|
||||
./include/JellyfinQt/dto/dlnaprofiletype.h
|
||||
./include/JellyfinQt/dto/directplayprofile.h
|
||||
./include/JellyfinQt/dto/transcodeseekinfo.h
|
||||
./include/JellyfinQt/dto/transcodingprofile.h
|
||||
./include/JellyfinQt/dto/profileconditiontype.h
|
||||
./include/JellyfinQt/dto/profileconditionvalue.h
|
||||
./include/JellyfinQt/dto/profilecondition.h
|
||||
./include/JellyfinQt/dto/containerprofile.h
|
||||
./include/JellyfinQt/dto/codectype.h
|
||||
./include/JellyfinQt/dto/codecprofile.h
|
||||
./include/JellyfinQt/dto/responseprofile.h
|
||||
./include/JellyfinQt/dto/subtitleprofile.h
|
||||
./include/JellyfinQt/dto/deviceprofile.h
|
||||
./include/JellyfinQt/dto/clientcapabilities.h
|
||||
./include/JellyfinQt/dto/deviceinfo.h
|
||||
./include/JellyfinQt/dto/deviceinfoqueryresult.h
|
||||
./include/JellyfinQt/dto/deviceoptions.h
|
||||
./include/JellyfinQt/dto/scrolldirection.h
|
||||
./include/JellyfinQt/dto/sortorder.h
|
||||
./include/JellyfinQt/dto/displaypreferencesdto.h
|
||||
./include/JellyfinQt/dto/deviceprofiletype.h
|
||||
./include/JellyfinQt/dto/deviceprofileinfo.h
|
||||
./include/JellyfinQt/dto/controlresponse.h
|
||||
./include/JellyfinQt/dto/defaultdirectorybrowserinfodto.h
|
||||
./include/JellyfinQt/dto/filesystementrytype.h
|
||||
./include/JellyfinQt/dto/filesystementryinfo.h
|
||||
./include/JellyfinQt/dto/validatepathdto.h
|
||||
./include/JellyfinQt/dto/queryfilterslegacy.h
|
||||
./include/JellyfinQt/dto/queryfilters.h
|
||||
./include/JellyfinQt/dto/imageformat.h
|
||||
./include/JellyfinQt/dto/imageinfo.h
|
||||
./include/JellyfinQt/dto/imagebynameinfo.h
|
||||
./include/JellyfinQt/dto/externalidmediatype.h
|
||||
./include/JellyfinQt/dto/externalidinfo.h
|
||||
./include/JellyfinQt/dto/remotesearchresult.h
|
||||
./include/JellyfinQt/dto/bookinfo.h
|
||||
./include/JellyfinQt/dto/bookinforemotesearchquery.h
|
||||
./include/JellyfinQt/dto/boxsetinfo.h
|
||||
./include/JellyfinQt/dto/boxsetinforemotesearchquery.h
|
||||
./include/JellyfinQt/dto/movieinfo.h
|
||||
./include/JellyfinQt/dto/movieinforemotesearchquery.h
|
||||
./include/JellyfinQt/dto/songinfo.h
|
||||
./include/JellyfinQt/dto/albuminfo.h
|
||||
./include/JellyfinQt/dto/albuminforemotesearchquery.h
|
||||
./include/JellyfinQt/dto/artistinfo.h
|
||||
./include/JellyfinQt/dto/artistinforemotesearchquery.h
|
||||
./include/JellyfinQt/dto/musicvideoinfo.h
|
||||
./include/JellyfinQt/dto/musicvideoinforemotesearchquery.h
|
||||
./include/JellyfinQt/dto/personlookupinfo.h
|
||||
./include/JellyfinQt/dto/personlookupinforemotesearchquery.h
|
||||
./include/JellyfinQt/dto/seriesinfo.h
|
||||
./include/JellyfinQt/dto/seriesinforemotesearchquery.h
|
||||
./include/JellyfinQt/dto/trailerinfo.h
|
||||
./include/JellyfinQt/dto/trailerinforemotesearchquery.h
|
||||
./include/JellyfinQt/dto/metadatarefreshmode.h
|
||||
./include/JellyfinQt/dto/seriesstatus.h
|
||||
./include/JellyfinQt/dto/parentalrating.h
|
||||
./include/JellyfinQt/dto/countryinfo.h
|
||||
./include/JellyfinQt/dto/culturedto.h
|
||||
./include/JellyfinQt/dto/metadataeditorinfo.h
|
||||
./include/JellyfinQt/dto/thememediaresult.h
|
||||
./include/JellyfinQt/dto/allthememediaresult.h
|
||||
./include/JellyfinQt/dto/itemcounts.h
|
||||
./include/JellyfinQt/dto/libraryoptioninfodto.h
|
||||
./include/JellyfinQt/dto/imageoption.h
|
||||
./include/JellyfinQt/dto/librarytypeoptionsdto.h
|
||||
./include/JellyfinQt/dto/libraryoptionsresultdto.h
|
||||
./include/JellyfinQt/dto/mediaupdateinfodto.h
|
||||
./include/JellyfinQt/dto/mediapathinfo.h
|
||||
./include/JellyfinQt/dto/typeoptions.h
|
||||
./include/JellyfinQt/dto/libraryoptions.h
|
||||
./include/JellyfinQt/dto/virtualfolderinfo.h
|
||||
./include/JellyfinQt/dto/addvirtualfolderdto.h
|
||||
./include/JellyfinQt/dto/updatelibraryoptionsdto.h
|
||||
./include/JellyfinQt/dto/mediapathdto.h
|
||||
./include/JellyfinQt/dto/tunerchannelmapping.h
|
||||
./include/JellyfinQt/dto/nameidpair.h
|
||||
./include/JellyfinQt/dto/channelmappingoptionsdto.h
|
||||
./include/JellyfinQt/dto/setchannelmappingdto.h
|
||||
./include/JellyfinQt/dto/guideinfo.h
|
||||
./include/JellyfinQt/dto/livetvservicestatus.h
|
||||
./include/JellyfinQt/dto/livetvserviceinfo.h
|
||||
./include/JellyfinQt/dto/livetvinfo.h
|
||||
./include/JellyfinQt/dto/listingsproviderinfo.h
|
||||
./include/JellyfinQt/dto/getprogramsdto.h
|
||||
./include/JellyfinQt/dto/recordingstatus.h
|
||||
./include/JellyfinQt/dto/keepuntil.h
|
||||
./include/JellyfinQt/dto/daypattern.h
|
||||
./include/JellyfinQt/dto/seriestimerinfodto.h
|
||||
./include/JellyfinQt/dto/seriestimerinfodtoqueryresult.h
|
||||
./include/JellyfinQt/dto/timerinfodto.h
|
||||
./include/JellyfinQt/dto/timerinfodtoqueryresult.h
|
||||
./include/JellyfinQt/dto/tunerhostinfo.h
|
||||
./include/JellyfinQt/dto/localizationoption.h
|
||||
./include/JellyfinQt/dto/playbackerrorcode.h
|
||||
./include/JellyfinQt/dto/playbackinforesponse.h
|
||||
./include/JellyfinQt/dto/playbackinfodto.h
|
||||
./include/JellyfinQt/dto/openlivestreamdto.h
|
||||
./include/JellyfinQt/dto/livestreamresponse.h
|
||||
./include/JellyfinQt/dto/recommendationtype.h
|
||||
./include/JellyfinQt/dto/recommendationdto.h
|
||||
./include/JellyfinQt/dto/notificationlevel.h
|
||||
./include/JellyfinQt/dto/notificationdto.h
|
||||
./include/JellyfinQt/dto/notificationresultdto.h
|
||||
./include/JellyfinQt/dto/notificationssummarydto.h
|
||||
./include/JellyfinQt/dto/notificationtypeinfo.h
|
||||
./include/JellyfinQt/dto/versioninfo.h
|
||||
./include/JellyfinQt/dto/packageinfo.h
|
||||
./include/JellyfinQt/dto/createplaylistdto.h
|
||||
./include/JellyfinQt/dto/playlistcreationresult.h
|
||||
./include/JellyfinQt/dto/playmethod.h
|
||||
./include/JellyfinQt/dto/repeatmode.h
|
||||
./include/JellyfinQt/dto/queueitem.h
|
||||
./include/JellyfinQt/dto/playbackstartinfo.h
|
||||
./include/JellyfinQt/dto/playbackprogressinfo.h
|
||||
./include/JellyfinQt/dto/playbackstopinfo.h
|
||||
./include/JellyfinQt/dto/pluginstatus.h
|
||||
./include/JellyfinQt/dto/plugininfo.h
|
||||
./include/JellyfinQt/dto/basepluginconfiguration.h
|
||||
./include/JellyfinQt/dto/pluginsecurityinfo.h
|
||||
./include/JellyfinQt/dto/quickconnectstate.h
|
||||
./include/JellyfinQt/dto/quickconnectresult.h
|
||||
./include/JellyfinQt/dto/ratingtype.h
|
||||
./include/JellyfinQt/dto/remoteimageinfo.h
|
||||
./include/JellyfinQt/dto/remoteimageresult.h
|
||||
./include/JellyfinQt/dto/imageproviderinfo.h
|
||||
./include/JellyfinQt/dto/taskstate.h
|
||||
./include/JellyfinQt/dto/taskcompletionstatus.h
|
||||
./include/JellyfinQt/dto/taskresult.h
|
||||
./include/JellyfinQt/dto/tasktriggerinfo.h
|
||||
./include/JellyfinQt/dto/taskinfo.h
|
||||
./include/JellyfinQt/dto/searchhint.h
|
||||
./include/JellyfinQt/dto/searchhintresult.h
|
||||
./include/JellyfinQt/dto/playerstateinfo.h
|
||||
./include/JellyfinQt/dto/sessionuserinfo.h
|
||||
./include/JellyfinQt/dto/baseitem.h
|
||||
./include/JellyfinQt/dto/transcodereason.h
|
||||
./include/JellyfinQt/dto/transcodinginfo.h
|
||||
./include/JellyfinQt/dto/sessioninfo.h
|
||||
./include/JellyfinQt/dto/generalcommand.h
|
||||
./include/JellyfinQt/dto/playcommand.h
|
||||
./include/JellyfinQt/dto/playstatecommand.h
|
||||
./include/JellyfinQt/dto/clientcapabilitiesdto.h
|
||||
./include/JellyfinQt/dto/startupconfigurationdto.h
|
||||
./include/JellyfinQt/dto/startupuserdto.h
|
||||
./include/JellyfinQt/dto/startupremoteaccessdto.h
|
||||
./include/JellyfinQt/dto/fontfile.h
|
||||
./include/JellyfinQt/dto/remotesubtitleinfo.h
|
||||
./include/JellyfinQt/dto/uploadsubtitledto.h
|
||||
./include/JellyfinQt/dto/bufferrequestdto.h
|
||||
./include/JellyfinQt/dto/joingrouprequestdto.h
|
||||
./include/JellyfinQt/dto/groupstatetype.h
|
||||
./include/JellyfinQt/dto/groupinfodto.h
|
||||
./include/JellyfinQt/dto/moveplaylistitemrequestdto.h
|
||||
./include/JellyfinQt/dto/newgrouprequestdto.h
|
||||
./include/JellyfinQt/dto/nextitemrequestdto.h
|
||||
./include/JellyfinQt/dto/pingrequestdto.h
|
||||
./include/JellyfinQt/dto/previousitemrequestdto.h
|
||||
./include/JellyfinQt/dto/groupqueuemode.h
|
||||
./include/JellyfinQt/dto/queuerequestdto.h
|
||||
./include/JellyfinQt/dto/readyrequestdto.h
|
||||
./include/JellyfinQt/dto/removefromplaylistrequestdto.h
|
||||
./include/JellyfinQt/dto/seekrequestdto.h
|
||||
./include/JellyfinQt/dto/ignorewaitrequestdto.h
|
||||
./include/JellyfinQt/dto/playrequestdto.h
|
||||
./include/JellyfinQt/dto/setplaylistitemrequestdto.h
|
||||
./include/JellyfinQt/dto/grouprepeatmode.h
|
||||
./include/JellyfinQt/dto/setrepeatmoderequestdto.h
|
||||
./include/JellyfinQt/dto/groupshufflemode.h
|
||||
./include/JellyfinQt/dto/setshufflemoderequestdto.h
|
||||
./include/JellyfinQt/dto/endpointinfo.h
|
||||
./include/JellyfinQt/dto/installationinfo.h
|
||||
./include/JellyfinQt/dto/ffmpeglocation.h
|
||||
./include/JellyfinQt/dto/architecture.h
|
||||
./include/JellyfinQt/dto/systeminfo.h
|
||||
./include/JellyfinQt/dto/publicsysteminfo.h
|
||||
./include/JellyfinQt/dto/logfile.h
|
||||
./include/JellyfinQt/dto/wakeonlaninfo.h
|
||||
./include/JellyfinQt/dto/utctimeresponse.h
|
||||
./include/JellyfinQt/dto/subtitleplaybackmode.h
|
||||
./include/JellyfinQt/dto/userconfiguration.h
|
||||
./include/JellyfinQt/dto/dynamicdayofweek.h
|
||||
./include/JellyfinQt/dto/accessschedule.h
|
||||
./include/JellyfinQt/dto/unrateditem.h
|
||||
./include/JellyfinQt/dto/syncplayuseraccesstype.h
|
||||
./include/JellyfinQt/dto/userpolicy.h
|
||||
./include/JellyfinQt/dto/userdto.h
|
||||
./include/JellyfinQt/dto/authenticationresult.h
|
||||
./include/JellyfinQt/dto/updateusereasypassword.h
|
||||
./include/JellyfinQt/dto/updateuserpassword.h
|
||||
./include/JellyfinQt/dto/authenticateuserbyname.h
|
||||
./include/JellyfinQt/dto/quickconnectdto.h
|
||||
./include/JellyfinQt/dto/forgotpassworddto.h
|
||||
./include/JellyfinQt/dto/forgotpasswordaction.h
|
||||
./include/JellyfinQt/dto/forgotpasswordresult.h
|
||||
./include/JellyfinQt/dto/pinredeemresult.h
|
||||
./include/JellyfinQt/dto/createuserbyname.h
|
||||
./include/JellyfinQt/dto/specialviewoptiondto.h
|
||||
./include/JellyfinQt/dto/libraryupdateinfo.h
|
||||
./include/JellyfinQt/dto/iplugin.h
|
||||
./include/JellyfinQt/dto/playrequest.h
|
||||
./include/JellyfinQt/dto/playstaterequest.h
|
||||
./include/JellyfinQt/dto/timereventinfo.h
|
||||
./include/JellyfinQt/dto/sendcommandtype.h
|
||||
./include/JellyfinQt/dto/sendcommand.h
|
||||
./include/JellyfinQt/dto/groupupdatetype.h
|
||||
./include/JellyfinQt/dto/objectgroupupdate.h
|
||||
./include/JellyfinQt/loader/http/subtitle.h
|
||||
./include/JellyfinQt/loader/http/activitylog.h
|
||||
./include/JellyfinQt/loader/http/library.h
|
||||
./include/JellyfinQt/loader/http/items.h
|
||||
./include/JellyfinQt/loader/http/dynamichls.h
|
||||
./include/JellyfinQt/loader/http/videoattachments.h
|
||||
./include/JellyfinQt/loader/http/itemupdate.h
|
||||
./include/JellyfinQt/loader/http/audio.h
|
||||
./include/JellyfinQt/loader/http/persons.h
|
||||
./include/JellyfinQt/loader/http/collection.h
|
||||
./include/JellyfinQt/loader/http/dlnaserver.h
|
||||
./include/JellyfinQt/loader/http/movies.h
|
||||
./include/JellyfinQt/loader/http/dashboard.h
|
||||
./include/JellyfinQt/loader/http/hlssegment.h
|
||||
./include/JellyfinQt/loader/http/branding.h
|
||||
./include/JellyfinQt/loader/http/startup.h
|
||||
./include/JellyfinQt/loader/http/channels.h
|
||||
./include/JellyfinQt/loader/http/localization.h
|
||||
./include/JellyfinQt/loader/http/videohls.h
|
||||
./include/JellyfinQt/loader/http/itemlookup.h
|
||||
./include/JellyfinQt/loader/http/system.h
|
||||
./include/JellyfinQt/loader/http/mediainfo.h
|
||||
./include/JellyfinQt/loader/http/genres.h
|
||||
./include/JellyfinQt/loader/http/syncplay.h
|
||||
./include/JellyfinQt/loader/http/universalaudio.h
|
||||
./include/JellyfinQt/loader/http/suggestions.h
|
||||
./include/JellyfinQt/loader/http/itemrefresh.h
|
||||
./include/JellyfinQt/loader/http/scheduledtasks.h
|
||||
./include/JellyfinQt/loader/http/imagebyname.h
|
||||
./include/JellyfinQt/loader/http/musicgenres.h
|
||||
./include/JellyfinQt/loader/http/user.h
|
||||
./include/JellyfinQt/loader/http/playlists.h
|
||||
./include/JellyfinQt/loader/http/userviews.h
|
||||
./include/JellyfinQt/loader/http/studios.h
|
||||
./include/JellyfinQt/loader/http/years.h
|
||||
./include/JellyfinQt/loader/http/trailers.h
|
||||
./include/JellyfinQt/loader/http/image.h
|
||||
./include/JellyfinQt/loader/http/librarystructure.h
|
||||
./include/JellyfinQt/loader/http/notifications.h
|
||||
./include/JellyfinQt/loader/http/videos.h
|
||||
./include/JellyfinQt/loader/http/package.h
|
||||
./include/JellyfinQt/loader/http/artists.h
|
||||
./include/JellyfinQt/loader/http/playstate.h
|
||||
./include/JellyfinQt/loader/http/quickconnect.h
|
||||
./include/JellyfinQt/loader/http/remoteimage.h
|
||||
./include/JellyfinQt/loader/http/userlibrary.h
|
||||
./include/JellyfinQt/loader/http/dlna.h
|
||||
./include/JellyfinQt/loader/http/configuration.h
|
||||
./include/JellyfinQt/loader/http/livetv.h
|
||||
./include/JellyfinQt/loader/http/timesync.h
|
||||
./include/JellyfinQt/loader/http/session.h
|
||||
./include/JellyfinQt/loader/http/displaypreferences.h
|
||||
./include/JellyfinQt/loader/http/instantmix.h
|
||||
./include/JellyfinQt/loader/http/apikey.h
|
||||
./include/JellyfinQt/loader/http/devices.h
|
||||
./include/JellyfinQt/loader/http/filter.h
|
||||
./include/JellyfinQt/loader/http/tvshows.h
|
||||
./include/JellyfinQt/loader/http/plugins.h
|
||||
./include/JellyfinQt/loader/http/environment.h
|
||||
./include/JellyfinQt/loader/http/search.h
|
||||
./include/JellyfinQt/loader/requesttypes.h)
|
||||
|
||||
set(openapi_SOURCES
|
||||
./src/dto/loglevel.cpp
|
||||
./src/dto/activitylogentry.cpp
|
||||
./src/dto/activitylogentryqueryresult.cpp
|
||||
./src/dto/authenticationinfo.cpp
|
||||
./src/dto/authenticationinfoqueryresult.cpp
|
||||
./src/dto/itemfields.cpp
|
||||
./src/dto/itemfilter.cpp
|
||||
./src/dto/imagetype.cpp
|
||||
./src/dto/video3dformat.cpp
|
||||
./src/dto/externalurl.cpp
|
||||
./src/dto/mediaprotocol.cpp
|
||||
./src/dto/mediasourcetype.cpp
|
||||
./src/dto/videotype.cpp
|
||||
./src/dto/isotype.cpp
|
||||
./src/dto/mediastreamtype.cpp
|
||||
./src/dto/subtitledeliverymethod.cpp
|
||||
./src/dto/mediastream.cpp
|
||||
./src/dto/mediaattachment.cpp
|
||||
./src/dto/transportstreamtimestamp.cpp
|
||||
./src/dto/mediasourceinfo.cpp
|
||||
./src/dto/playaccess.cpp
|
||||
./src/dto/mediaurl.cpp
|
||||
./src/dto/baseitemperson.cpp
|
||||
./src/dto/nameguidpair.cpp
|
||||
./src/dto/useritemdatadto.cpp
|
||||
./src/dto/dayofweek.cpp
|
||||
./src/dto/chapterinfo.cpp
|
||||
./src/dto/locationtype.cpp
|
||||
./src/dto/metadatafield.cpp
|
||||
./src/dto/imageorientation.cpp
|
||||
./src/dto/channeltype.cpp
|
||||
./src/dto/programaudio.cpp
|
||||
./src/dto/baseitemdto.cpp
|
||||
./src/dto/baseitemdtoqueryresult.cpp
|
||||
./src/dto/encodingcontext.cpp
|
||||
./src/dto/brandingoptions.cpp
|
||||
./src/dto/channelmediatype.cpp
|
||||
./src/dto/channelmediacontenttype.cpp
|
||||
./src/dto/channelitemsortfield.cpp
|
||||
./src/dto/channelfeatures.cpp
|
||||
./src/dto/collectioncreationresult.cpp
|
||||
./src/dto/version.cpp
|
||||
./src/dto/imagesavingconvention.cpp
|
||||
./src/dto/metadataoptions.cpp
|
||||
./src/dto/namevaluepair.cpp
|
||||
./src/dto/repositoryinfo.cpp
|
||||
./src/dto/pathsubstitution.cpp
|
||||
./src/dto/serverconfiguration.cpp
|
||||
./src/dto/mediaencoderpathdto.cpp
|
||||
./src/dto/problemdetails.cpp
|
||||
./src/dto/configurationpagetype.cpp
|
||||
./src/dto/configurationpageinfo.cpp
|
||||
./src/dto/generalcommandtype.cpp
|
||||
./src/dto/headermatchtype.cpp
|
||||
./src/dto/httpheaderinfo.cpp
|
||||
./src/dto/deviceidentification.cpp
|
||||
./src/dto/xmlattribute.cpp
|
||||
./src/dto/dlnaprofiletype.cpp
|
||||
./src/dto/directplayprofile.cpp
|
||||
./src/dto/transcodeseekinfo.cpp
|
||||
./src/dto/transcodingprofile.cpp
|
||||
./src/dto/profileconditiontype.cpp
|
||||
./src/dto/profileconditionvalue.cpp
|
||||
./src/dto/profilecondition.cpp
|
||||
./src/dto/containerprofile.cpp
|
||||
./src/dto/codectype.cpp
|
||||
./src/dto/codecprofile.cpp
|
||||
./src/dto/responseprofile.cpp
|
||||
./src/dto/subtitleprofile.cpp
|
||||
./src/dto/deviceprofile.cpp
|
||||
./src/dto/clientcapabilities.cpp
|
||||
./src/dto/deviceinfo.cpp
|
||||
./src/dto/deviceinfoqueryresult.cpp
|
||||
./src/dto/deviceoptions.cpp
|
||||
./src/dto/scrolldirection.cpp
|
||||
./src/dto/sortorder.cpp
|
||||
./src/dto/displaypreferencesdto.cpp
|
||||
./src/dto/deviceprofiletype.cpp
|
||||
./src/dto/deviceprofileinfo.cpp
|
||||
./src/dto/controlresponse.cpp
|
||||
./src/dto/defaultdirectorybrowserinfodto.cpp
|
||||
./src/dto/filesystementrytype.cpp
|
||||
./src/dto/filesystementryinfo.cpp
|
||||
./src/dto/validatepathdto.cpp
|
||||
./src/dto/queryfilterslegacy.cpp
|
||||
./src/dto/queryfilters.cpp
|
||||
./src/dto/imageformat.cpp
|
||||
./src/dto/imageinfo.cpp
|
||||
./src/dto/imagebynameinfo.cpp
|
||||
./src/dto/externalidmediatype.cpp
|
||||
./src/dto/externalidinfo.cpp
|
||||
./src/dto/remotesearchresult.cpp
|
||||
./src/dto/bookinfo.cpp
|
||||
./src/dto/bookinforemotesearchquery.cpp
|
||||
./src/dto/boxsetinfo.cpp
|
||||
./src/dto/boxsetinforemotesearchquery.cpp
|
||||
./src/dto/movieinfo.cpp
|
||||
./src/dto/movieinforemotesearchquery.cpp
|
||||
./src/dto/songinfo.cpp
|
||||
./src/dto/albuminfo.cpp
|
||||
./src/dto/albuminforemotesearchquery.cpp
|
||||
./src/dto/artistinfo.cpp
|
||||
./src/dto/artistinforemotesearchquery.cpp
|
||||
./src/dto/musicvideoinfo.cpp
|
||||
./src/dto/musicvideoinforemotesearchquery.cpp
|
||||
./src/dto/personlookupinfo.cpp
|
||||
./src/dto/personlookupinforemotesearchquery.cpp
|
||||
./src/dto/seriesinfo.cpp
|
||||
./src/dto/seriesinforemotesearchquery.cpp
|
||||
./src/dto/trailerinfo.cpp
|
||||
./src/dto/trailerinforemotesearchquery.cpp
|
||||
./src/dto/metadatarefreshmode.cpp
|
||||
./src/dto/seriesstatus.cpp
|
||||
./src/dto/parentalrating.cpp
|
||||
./src/dto/countryinfo.cpp
|
||||
./src/dto/culturedto.cpp
|
||||
./src/dto/metadataeditorinfo.cpp
|
||||
./src/dto/thememediaresult.cpp
|
||||
./src/dto/allthememediaresult.cpp
|
||||
./src/dto/itemcounts.cpp
|
||||
./src/dto/libraryoptioninfodto.cpp
|
||||
./src/dto/imageoption.cpp
|
||||
./src/dto/librarytypeoptionsdto.cpp
|
||||
./src/dto/libraryoptionsresultdto.cpp
|
||||
./src/dto/mediaupdateinfodto.cpp
|
||||
./src/dto/mediapathinfo.cpp
|
||||
./src/dto/typeoptions.cpp
|
||||
./src/dto/libraryoptions.cpp
|
||||
./src/dto/virtualfolderinfo.cpp
|
||||
./src/dto/addvirtualfolderdto.cpp
|
||||
./src/dto/updatelibraryoptionsdto.cpp
|
||||
./src/dto/mediapathdto.cpp
|
||||
./src/dto/tunerchannelmapping.cpp
|
||||
./src/dto/nameidpair.cpp
|
||||
./src/dto/channelmappingoptionsdto.cpp
|
||||
./src/dto/setchannelmappingdto.cpp
|
||||
./src/dto/guideinfo.cpp
|
||||
./src/dto/livetvservicestatus.cpp
|
||||
./src/dto/livetvserviceinfo.cpp
|
||||
./src/dto/livetvinfo.cpp
|
||||
./src/dto/listingsproviderinfo.cpp
|
||||
./src/dto/getprogramsdto.cpp
|
||||
./src/dto/recordingstatus.cpp
|
||||
./src/dto/keepuntil.cpp
|
||||
./src/dto/daypattern.cpp
|
||||
./src/dto/seriestimerinfodto.cpp
|
||||
./src/dto/seriestimerinfodtoqueryresult.cpp
|
||||
./src/dto/timerinfodto.cpp
|
||||
./src/dto/timerinfodtoqueryresult.cpp
|
||||
./src/dto/tunerhostinfo.cpp
|
||||
./src/dto/localizationoption.cpp
|
||||
./src/dto/playbackerrorcode.cpp
|
||||
./src/dto/playbackinforesponse.cpp
|
||||
./src/dto/playbackinfodto.cpp
|
||||
./src/dto/openlivestreamdto.cpp
|
||||
./src/dto/livestreamresponse.cpp
|
||||
./src/dto/recommendationtype.cpp
|
||||
./src/dto/recommendationdto.cpp
|
||||
./src/dto/notificationlevel.cpp
|
||||
./src/dto/notificationdto.cpp
|
||||
./src/dto/notificationresultdto.cpp
|
||||
./src/dto/notificationssummarydto.cpp
|
||||
./src/dto/notificationtypeinfo.cpp
|
||||
./src/dto/versioninfo.cpp
|
||||
./src/dto/packageinfo.cpp
|
||||
./src/dto/createplaylistdto.cpp
|
||||
./src/dto/playlistcreationresult.cpp
|
||||
./src/dto/playmethod.cpp
|
||||
./src/dto/repeatmode.cpp
|
||||
./src/dto/queueitem.cpp
|
||||
./src/dto/playbackstartinfo.cpp
|
||||
./src/dto/playbackprogressinfo.cpp
|
||||
./src/dto/playbackstopinfo.cpp
|
||||
./src/dto/pluginstatus.cpp
|
||||
./src/dto/plugininfo.cpp
|
||||
./src/dto/basepluginconfiguration.cpp
|
||||
./src/dto/pluginsecurityinfo.cpp
|
||||
./src/dto/quickconnectstate.cpp
|
||||
./src/dto/quickconnectresult.cpp
|
||||
./src/dto/ratingtype.cpp
|
||||
./src/dto/remoteimageinfo.cpp
|
||||
./src/dto/remoteimageresult.cpp
|
||||
./src/dto/imageproviderinfo.cpp
|
||||
./src/dto/taskstate.cpp
|
||||
./src/dto/taskcompletionstatus.cpp
|
||||
./src/dto/taskresult.cpp
|
||||
./src/dto/tasktriggerinfo.cpp
|
||||
./src/dto/taskinfo.cpp
|
||||
./src/dto/searchhint.cpp
|
||||
./src/dto/searchhintresult.cpp
|
||||
./src/dto/playerstateinfo.cpp
|
||||
./src/dto/sessionuserinfo.cpp
|
||||
./src/dto/baseitem.cpp
|
||||
./src/dto/transcodereason.cpp
|
||||
./src/dto/transcodinginfo.cpp
|
||||
./src/dto/sessioninfo.cpp
|
||||
./src/dto/generalcommand.cpp
|
||||
./src/dto/playcommand.cpp
|
||||
./src/dto/playstatecommand.cpp
|
||||
./src/dto/clientcapabilitiesdto.cpp
|
||||
./src/dto/startupconfigurationdto.cpp
|
||||
./src/dto/startupuserdto.cpp
|
||||
./src/dto/startupremoteaccessdto.cpp
|
||||
./src/dto/fontfile.cpp
|
||||
./src/dto/remotesubtitleinfo.cpp
|
||||
./src/dto/uploadsubtitledto.cpp
|
||||
./src/dto/bufferrequestdto.cpp
|
||||
./src/dto/joingrouprequestdto.cpp
|
||||
./src/dto/groupstatetype.cpp
|
||||
./src/dto/groupinfodto.cpp
|
||||
./src/dto/moveplaylistitemrequestdto.cpp
|
||||
./src/dto/newgrouprequestdto.cpp
|
||||
./src/dto/nextitemrequestdto.cpp
|
||||
./src/dto/pingrequestdto.cpp
|
||||
./src/dto/previousitemrequestdto.cpp
|
||||
./src/dto/groupqueuemode.cpp
|
||||
./src/dto/queuerequestdto.cpp
|
||||
./src/dto/readyrequestdto.cpp
|
||||
./src/dto/removefromplaylistrequestdto.cpp
|
||||
./src/dto/seekrequestdto.cpp
|
||||
./src/dto/ignorewaitrequestdto.cpp
|
||||
./src/dto/playrequestdto.cpp
|
||||
./src/dto/setplaylistitemrequestdto.cpp
|
||||
./src/dto/grouprepeatmode.cpp
|
||||
./src/dto/setrepeatmoderequestdto.cpp
|
||||
./src/dto/groupshufflemode.cpp
|
||||
./src/dto/setshufflemoderequestdto.cpp
|
||||
./src/dto/endpointinfo.cpp
|
||||
./src/dto/installationinfo.cpp
|
||||
./src/dto/ffmpeglocation.cpp
|
||||
./src/dto/architecture.cpp
|
||||
./src/dto/systeminfo.cpp
|
||||
./src/dto/publicsysteminfo.cpp
|
||||
./src/dto/logfile.cpp
|
||||
./src/dto/wakeonlaninfo.cpp
|
||||
./src/dto/utctimeresponse.cpp
|
||||
./src/dto/subtitleplaybackmode.cpp
|
||||
./src/dto/userconfiguration.cpp
|
||||
./src/dto/dynamicdayofweek.cpp
|
||||
./src/dto/accessschedule.cpp
|
||||
./src/dto/unrateditem.cpp
|
||||
./src/dto/syncplayuseraccesstype.cpp
|
||||
./src/dto/userpolicy.cpp
|
||||
./src/dto/userdto.cpp
|
||||
./src/dto/authenticationresult.cpp
|
||||
./src/dto/updateusereasypassword.cpp
|
||||
./src/dto/updateuserpassword.cpp
|
||||
./src/dto/authenticateuserbyname.cpp
|
||||
./src/dto/quickconnectdto.cpp
|
||||
./src/dto/forgotpassworddto.cpp
|
||||
./src/dto/forgotpasswordaction.cpp
|
||||
./src/dto/forgotpasswordresult.cpp
|
||||
./src/dto/pinredeemresult.cpp
|
||||
./src/dto/createuserbyname.cpp
|
||||
./src/dto/specialviewoptiondto.cpp
|
||||
./src/dto/libraryupdateinfo.cpp
|
||||
./src/dto/iplugin.cpp
|
||||
./src/dto/playrequest.cpp
|
||||
./src/dto/playstaterequest.cpp
|
||||
./src/dto/timereventinfo.cpp
|
||||
./src/dto/sendcommandtype.cpp
|
||||
./src/dto/sendcommand.cpp
|
||||
./src/dto/groupupdatetype.cpp
|
||||
./src/dto/objectgroupupdate.cpp
|
||||
./src/loader/http/subtitle.cpp
|
||||
./src/loader/http/activitylog.cpp
|
||||
./src/loader/http/library.cpp
|
||||
./src/loader/http/items.cpp
|
||||
./src/loader/http/dynamichls.cpp
|
||||
./src/loader/http/videoattachments.cpp
|
||||
./src/loader/http/itemupdate.cpp
|
||||
./src/loader/http/audio.cpp
|
||||
./src/loader/http/persons.cpp
|
||||
./src/loader/http/collection.cpp
|
||||
./src/loader/http/dlnaserver.cpp
|
||||
./src/loader/http/movies.cpp
|
||||
./src/loader/http/dashboard.cpp
|
||||
./src/loader/http/hlssegment.cpp
|
||||
./src/loader/http/branding.cpp
|
||||
./src/loader/http/startup.cpp
|
||||
./src/loader/http/channels.cpp
|
||||
./src/loader/http/localization.cpp
|
||||
./src/loader/http/videohls.cpp
|
||||
./src/loader/http/itemlookup.cpp
|
||||
./src/loader/http/system.cpp
|
||||
./src/loader/http/mediainfo.cpp
|
||||
./src/loader/http/genres.cpp
|
||||
./src/loader/http/syncplay.cpp
|
||||
./src/loader/http/universalaudio.cpp
|
||||
./src/loader/http/suggestions.cpp
|
||||
./src/loader/http/itemrefresh.cpp
|
||||
./src/loader/http/scheduledtasks.cpp
|
||||
./src/loader/http/imagebyname.cpp
|
||||
./src/loader/http/musicgenres.cpp
|
||||
./src/loader/http/user.cpp
|
||||
./src/loader/http/playlists.cpp
|
||||
./src/loader/http/userviews.cpp
|
||||
./src/loader/http/studios.cpp
|
||||
./src/loader/http/years.cpp
|
||||
./src/loader/http/trailers.cpp
|
||||
./src/loader/http/image.cpp
|
||||
./src/loader/http/librarystructure.cpp
|
||||
./src/loader/http/notifications.cpp
|
||||
./src/loader/http/videos.cpp
|
||||
./src/loader/http/package.cpp
|
||||
./src/loader/http/artists.cpp
|
||||
./src/loader/http/playstate.cpp
|
||||
./src/loader/http/quickconnect.cpp
|
||||
./src/loader/http/remoteimage.cpp
|
||||
./src/loader/http/userlibrary.cpp
|
||||
./src/loader/http/dlna.cpp
|
||||
./src/loader/http/configuration.cpp
|
||||
./src/loader/http/livetv.cpp
|
||||
./src/loader/http/timesync.cpp
|
||||
./src/loader/http/session.cpp
|
||||
./src/loader/http/displaypreferences.cpp
|
||||
./src/loader/http/instantmix.cpp
|
||||
./src/loader/http/apikey.cpp
|
||||
./src/loader/http/devices.cpp
|
||||
./src/loader/http/filter.cpp
|
||||
./src/loader/http/tvshows.cpp
|
||||
./src/loader/http/plugins.cpp
|
||||
./src/loader/http/environment.cpp
|
||||
./src/loader/http/search.cpp
|
||||
./src/loader/requesttypes.cpp)
|
1828
core/JellyfinQt.qmltypes
Normal file
1828
core/JellyfinQt.qmltypes
Normal file
File diff suppressed because it is too large
Load diff
9
core/README.md
Normal file
9
core/README.md
Normal 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.
|
30
core/codegen/enum_header.hbs
Normal file
30
core/codegen/enum_header.hbs
Normal file
|
@ -0,0 +1,30 @@
|
|||
class {{className}}Class {
|
||||
Q_GADGET
|
||||
public:
|
||||
enum Value {
|
||||
EnumNotSet,
|
||||
|
||||
{{#each values as |value|}}
|
||||
{{value}},
|
||||
|
||||
{{/each}}
|
||||
};
|
||||
Q_ENUM(Value)
|
||||
private:
|
||||
explicit {{className}}Class();
|
||||
};
|
||||
|
||||
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}}>);
|
40
core/codegen/enum_implementation.hbs
Normal file
40
core/codegen/enum_implementation.hbs
Normal file
|
@ -0,0 +1,40 @@
|
|||
{{className}}Class::{{className}}Class() {}
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using {{className}} = Jellyfin::DTO::{{className}};
|
||||
|
||||
template <>
|
||||
|
||||
{{className}} fromJsonValue(const QJsonValue &source, convertType<{{className}}>) {
|
||||
if (!source.isString()) return {{className}}::EnumNotSet;
|
||||
|
||||
QString str = source.toString();
|
||||
|
||||
{{#each values as |value|}}
|
||||
if (str == QStringLiteral("{{value}}")) {
|
||||
return {{className}}::{{value}};
|
||||
}
|
||||
|
||||
{{/each}}
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
25
core/codegen/loader_header.hbs
Normal file
25
core/codegen/loader_header.hbs
Normal file
|
@ -0,0 +1,25 @@
|
|||
using namespace {{dtoNamespace}};
|
||||
|
||||
{{#each endpoints as |e|}}
|
||||
{{#if e.endpoint.hasSuccessResponse}}
|
||||
|
||||
{{#if e.endpoint.description.length > 0}}
|
||||
/**
|
||||
* @brief {{e.endpoint.description}}
|
||||
|
||||
*/
|
||||
{{/if}}
|
||||
|
||||
|
||||
class {{e.className}}Loader : public {{supportNamespace}}::HttpLoader<{{e.endpoint.resultType}}, {{e.endpoint.parameterType}}> {
|
||||
public:
|
||||
explicit {{e.className}}Loader(ApiClient *apiClient = nullptr);
|
||||
|
||||
protected:
|
||||
QString path(const {{e.endpoint.parameterType}}& parameters) const override;
|
||||
QUrlQuery query(const {{e.endpoint.parameterType}}& parameters) const override;
|
||||
QByteArray body(const {{e.endpoint.parameterType}}& parameters) const override;
|
||||
QNetworkAccessManager::Operation operation() const override;
|
||||
};
|
||||
{{/if}}
|
||||
{{/each}}
|
57
core/codegen/loader_implementation.hbs
Normal file
57
core/codegen/loader_implementation.hbs
Normal file
|
@ -0,0 +1,57 @@
|
|||
|
||||
using namespace {{dtoNamespace}};
|
||||
|
||||
{{#each endpoints as |e|}}
|
||||
{{#if e.endpoint.hasSuccessResponse}}
|
||||
|
||||
{{e.className}}Loader::{{e.className}}Loader(ApiClient *apiClient)
|
||||
: {{supportNamespace}}::HttpLoader<{{e.endpoint.resultType}}, {{e.endpoint.parameterType}}>(apiClient) {}
|
||||
|
||||
QString {{e.className}}Loader::path(const {{e.endpoint.parameterType}} ¶ms) const {
|
||||
Q_UNUSED(params) // Might be overzealous, but I don't like theses kind of warnings
|
||||
|
||||
return {{e.pathStringInterpolation "params"}};
|
||||
}
|
||||
|
||||
QUrlQuery {{e.className}}Loader::query(const {{e.endpoint.parameterType}} ¶ms) const {
|
||||
Q_UNUSED(params) // Might be overzealous, but I don't like theses kind of warnings
|
||||
|
||||
QUrlQuery result;
|
||||
|
||||
{{#each e.endpoint.requiredQueryParameters as |p|}}
|
||||
result.addQueryItem("{{p.name}}", Support::toString<{{p.type.typeNameWithQualifiers}}>(params.{{p.type.name}}()));
|
||||
|
||||
{{/each}}
|
||||
|
||||
// Optional parameters
|
||||
|
||||
{{#each e.endpoint.optionalQueryParameters as |p|}}
|
||||
if (!params.{{p.type.name}}Null()) {
|
||||
result.addQueryItem("{{p.name}}", Support::toString<{{p.type.typeNameWithQualifiers}}>(params.{{p.type.name}}()));
|
||||
}
|
||||
|
||||
{{/each}}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
QByteArray {{e.className}}Loader::body(const {{e.endpoint.parameterType}} ¶ms) const {
|
||||
|
||||
{{#if e.endpoint.bodyParameters.length == 1}}
|
||||
return Support::toString<{{e.endpoint.bodyParameters[0].type.typeNameWithQualifiers}}>(params.body()).toUtf8();
|
||||
|
||||
{{else}}
|
||||
return QByteArray();
|
||||
|
||||
{{/if}}
|
||||
}
|
||||
|
||||
QNetworkAccessManager::Operation {{e.className}}Loader::operation() const {
|
||||
// HTTP method {{e.operation}}
|
||||
|
||||
return QNetworkAccessManager::{{e.operation}}Operation;
|
||||
|
||||
}
|
||||
|
||||
{{/if}}
|
||||
{{/each}}
|
69
core/codegen/loader_types_header.hbs
Normal file
69
core/codegen/loader_types_header.hbs
Normal file
|
@ -0,0 +1,69 @@
|
|||
using namespace {{dtoNamespace}};
|
||||
|
||||
{{#each endpoints as |e|}}
|
||||
class {{e.name}} {
|
||||
public:
|
||||
|
||||
{{#each e.parameters as |param|}}
|
||||
|
||||
/**
|
||||
* @brief {{param.description}}
|
||||
|
||||
*/
|
||||
|
||||
{{#if param.required}}
|
||||
const {{param.type.typeNameWithQualifiers}} &{{param.type.name}}() const;
|
||||
void set{{param.type.writeName}}({{param.type.typeNameWithQualifiers}} new{{param.type.writeName}});
|
||||
|
||||
{{else}}
|
||||
const {{param.type.typeName}} &{{param.type.name}}() const;
|
||||
void set{{param.type.writeName}}({{param.type.typeName}} new{{param.type.writeName}});
|
||||
bool {{param.type.name}}Null() const;
|
||||
void set{{param.type.writeName}}Null();
|
||||
|
||||
{{/if}}
|
||||
|
||||
{{/each}}
|
||||
|
||||
private:
|
||||
// Required path parameters
|
||||
|
||||
{{#each e.requiredPathParameters as |param|}}
|
||||
{{param.type.typeNameWithQualifiers}} {{param.type.memberName}};
|
||||
|
||||
{{/each}}
|
||||
|
||||
// Required query parameters
|
||||
|
||||
{{#each e.requiredQueryParameters as |param|}}
|
||||
{{param.type.typeNameWithQualifiers}} {{param.type.memberName}};
|
||||
|
||||
{{/each}}
|
||||
|
||||
// Optional query parameters
|
||||
|
||||
{{#each e.optionalQueryParameters as |param|}}
|
||||
{{#if param.type.defaultInitializer.length > 0}}
|
||||
{{param.type.typeNameWithQualifiers}} {{param.type.memberName}} = {{param.type.defaultInitializer}};
|
||||
{{else}}
|
||||
{{param.type.typeNameWithQualifiers}} {{param.type.memberName}};
|
||||
{{/if}}
|
||||
|
||||
{{/each}}
|
||||
|
||||
{{#if e.bodyParameters.length > 0}}
|
||||
// Body parameters
|
||||
|
||||
{{#if e.bodyParameters.length == 1}}
|
||||
{{e.bodyParameters[0].type.typeNameWithQualifiers}} m_body;
|
||||
|
||||
{{else}}
|
||||
//FIXME: Multiple body options not implemented.
|
||||
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
|
||||
};
|
||||
|
||||
|
||||
{{/each}}
|
7
core/codegen/loader_types_header_getters_setters.hbs
Normal file
7
core/codegen/loader_types_header_getters_setters.hbs
Normal file
|
@ -0,0 +1,7 @@
|
|||
/**
|
||||
* @brief {{description}}
|
||||
|
||||
*/
|
||||
|
||||
{{typeNameWithQualifiers}} {{name}}() const;
|
||||
void set{{writeName}}({{typeNameWithQualifiers}} new{{writeName}}) const;
|
57
core/codegen/loader_types_implementation.hbs
Normal file
57
core/codegen/loader_types_implementation.hbs
Normal file
|
@ -0,0 +1,57 @@
|
|||
using namespace {{dtoNamespace}};
|
||||
|
||||
{{#each endpoints as |e|}}
|
||||
|
||||
// {{e.name}}
|
||||
|
||||
{{#each e.parameters as |param|}}
|
||||
|
||||
{{#if param.required}}
|
||||
const {{param.type.typeNameWithQualifiers}} &{{e.name}}::{{param.type.name}}() const {
|
||||
return {{param.type.memberName}};
|
||||
}
|
||||
|
||||
void {{e.name}}::set{{param.type.writeName}}({{param.type.typeNameWithQualifiers}} new{{param.type.writeName}}) {
|
||||
|
||||
{{param.type.memberName}} = new{{param.type.writeName}};
|
||||
}
|
||||
|
||||
{{else}}
|
||||
const {{param.type.typeName}} &{{e.name}}::{{param.type.name}}() const {
|
||||
|
||||
{{#if param.type.needsOptional}}
|
||||
return {{param.type.memberName}}.value();
|
||||
|
||||
{{else}}
|
||||
return {{param.type.memberName}};
|
||||
|
||||
{{/if}}
|
||||
}
|
||||
|
||||
void {{e.name}}::set{{param.type.writeName}}({{param.type.typeName}} new{{param.type.writeName}}) {
|
||||
|
||||
{{param.type.memberName}} = new{{param.type.writeName}};
|
||||
}
|
||||
|
||||
bool {{e.name}}::{{param.type.name}}Null() const {
|
||||
// Nullable: {{param.type.isNullable}}
|
||||
|
||||
// Type Nullable: {{param.type.isTypeNullable}}
|
||||
|
||||
|
||||
|
||||
return {{param.type.nullableCheck}};
|
||||
}
|
||||
|
||||
void {{e.name}}::set{{param.type.writeName}}Null() {
|
||||
|
||||
{{param.type.memberName}}{{param.type.nullableSetter}};
|
||||
}
|
||||
|
||||
{{/if}}
|
||||
|
||||
{{/each}}
|
||||
|
||||
|
||||
|
||||
{{/each}}
|
99
core/codegen/object_header.hbs
Normal file
99
core/codegen/object_header.hbs
Normal file
|
@ -0,0 +1,99 @@
|
|||
{{#each userImports as |userClass|}}
|
||||
{{#if userClass != className}}
|
||||
class {{className}};
|
||||
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
|
||||
class {{className}} {
|
||||
public:
|
||||
{{#if hasRequiredProperties}}
|
||||
|
||||
{{className}}(
|
||||
{{#each properties as |p|}}
|
||||
{{#if p.isNotNullable}}
|
||||
|
||||
{{p.typeNameWithQualifiers}} {{p.name}}{{#if p.isLastNonNullable}}{{else}},{{/if}}
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
|
||||
);
|
||||
|
||||
{{else}}
|
||||
{{className}}();
|
||||
{{/if}}
|
||||
|
||||
{{className}}(const {{className}} &other);
|
||||
|
||||
/**
|
||||
* Replaces the data being hold by this class with that of the other.
|
||||
*/
|
||||
void replaceData({{className}} &other);
|
||||
|
||||
static {{className}} fromJson(QJsonObject source);
|
||||
void setFromJson(QJsonObject source);
|
||||
QJsonObject toJson() const;
|
||||
|
||||
// Properties
|
||||
|
||||
{{#each properties as |p|}}
|
||||
{{#if p.description.length > 0}}
|
||||
/**
|
||||
* @brief {{p.description}}
|
||||
|
||||
*/
|
||||
{{/if}}
|
||||
|
||||
{{p.typeNameWithQualifiers}} {{p.name}}() const;
|
||||
|
||||
{{#if p.description.length > 0}}
|
||||
/**
|
||||
* @brief {{p.description}}
|
||||
|
||||
*/
|
||||
{{/if}}
|
||||
|
||||
void set{{p.writeName}}({{p.typeNameWithQualifiers}} new{{p.writeName}});
|
||||
|
||||
{{#if p.isNullable}}
|
||||
bool {{p.name}}Null() const;
|
||||
void set{{p.writeName}}Null();
|
||||
|
||||
{{/if}}
|
||||
|
||||
{{/each}}
|
||||
|
||||
protected:
|
||||
|
||||
{{#each properties as |p|}}
|
||||
{{#if p.defaultInitializer.length > 0}}
|
||||
{{p.typeNameWithQualifiers}} {{p.memberName}} = {{p.defaultInitializer}};
|
||||
{{else}}
|
||||
{{p.typeNameWithQualifiers}} {{p.memberName}};
|
||||
{{/if}}
|
||||
|
||||
{{/each}}
|
||||
|
||||
|
||||
{{#if hasRequiredProperties}}
|
||||
private:
|
||||
// Private constructor which generates an invalid object, for use withing {{className}}::fromJson();
|
||||
|
||||
{{className}}();
|
||||
{{/if}}
|
||||
|
||||
};
|
||||
|
||||
|
||||
} // 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}}>);
|
130
core/codegen/object_implementation.hbs
Normal file
130
core/codegen/object_implementation.hbs
Normal file
|
@ -0,0 +1,130 @@
|
|||
{{className}}::{{className}}() {}
|
||||
|
||||
{{#if hasRequiredProperties}}
|
||||
{{className}}::{{className}} (
|
||||
|
||||
{{#each properties as |property|}}
|
||||
{{#if property.isNotNullable}}
|
||||
|
||||
{{property.typeNameWithQualifiers}} {{property.name}}{{#if property.isLastNonNullable}} {{else}}, {{/if}}
|
||||
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
) :
|
||||
|
||||
{{#each properties as |property|}}
|
||||
{{#if property.isNotNullable}}
|
||||
{{property.memberName}}({{property.name}})
|
||||
{{#if property.isLastNonNullable}}
|
||||
{ }
|
||||
{{else}}
|
||||
,
|
||||
{{/if}}
|
||||
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
|
||||
|
||||
|
||||
{{/if}}
|
||||
|
||||
{{className}}::{{className}}(const {{className}} &other) :
|
||||
|
||||
|
||||
{{#each properties as |property|}}
|
||||
{{property.memberName}}(other.{{property.memberName}})
|
||||
{{#if property.isLast}}
|
||||
{}
|
||||
{{else}}
|
||||
,
|
||||
{{/if}}
|
||||
|
||||
{{/each}}
|
||||
|
||||
|
||||
void {{className}}::replaceData({{className}} &other) {
|
||||
|
||||
{{#each properties as |property|}}
|
||||
{{property.memberName}} = other.{{property.memberName}};
|
||||
|
||||
{{/each}}
|
||||
}
|
||||
|
||||
|
||||
{{className}} {{className}}::fromJson(QJsonObject source) {
|
||||
|
||||
{{className}} instance;
|
||||
instance.setFromJson(source);
|
||||
return instance;
|
||||
}
|
||||
|
||||
|
||||
void {{className}}::setFromJson(QJsonObject source) {
|
||||
|
||||
{{#each properties as |property|}}
|
||||
{{property.memberName}} = {{supportNamespace}}::fromJsonValue<{{property.typeNameWithQualifiers}}>(source["{{property.originalName}}"]);
|
||||
|
||||
{{/each}}
|
||||
|
||||
}
|
||||
|
||||
QJsonObject {{className}}::toJson() const {
|
||||
QJsonObject result;
|
||||
|
||||
{{#each properties as |property|}}
|
||||
{{#if property.isNullable}}
|
||||
|
||||
|
||||
if (!({{property.nullableCheck}})) {
|
||||
result["{{property.originalName}}"] = {{supportNamespace}}::toJsonValue<{{property.typeNameWithQualifiers}}>({{property.memberName}});
|
||||
}
|
||||
|
||||
{{#else}}
|
||||
|
||||
result["{{property.originalName}}"] = {{supportNamespace}}::toJsonValue<{{property.typeNameWithQualifiers}}>({{property.memberName}});
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
{{#each properties as |property|}}
|
||||
{{property.typeNameWithQualifiers}} {{className}}::{{property.name}}() const { return {{property.memberName}}; }
|
||||
|
||||
void {{className}}::set{{property.writeName}}({{property.typeNameWithQualifiers}} new{{property.writeName}}) {
|
||||
|
||||
{{property.memberName}} = new{{property.writeName}};
|
||||
}
|
||||
|
||||
{{#if property.isNullable}}
|
||||
bool {{className}}::{{property.name}}Null() const {
|
||||
return {{property.nullableCheck}};
|
||||
}
|
||||
|
||||
void {{className}}::set{{property.writeName}}Null() {
|
||||
|
||||
{{property.memberName}}{{property.nullableSetter}};
|
||||
|
||||
}
|
||||
{{/if}}
|
||||
|
||||
{{/each}}
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using {{className}} = Jellyfin::DTO::{{className}};
|
||||
|
||||
template <>
|
||||
|
||||
{{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();
|
||||
}
|
|
@ -1,34 +0,0 @@
|
|||
TEMPLATE = lib
|
||||
QT += qml multimedia network websockets
|
||||
|
||||
include(defines.pri)
|
||||
include(../harbour-sailfin.pri)
|
||||
|
||||
SOURCES += \
|
||||
src/credentialmanager.cpp \
|
||||
src/jellyfin.cpp \
|
||||
src/jellyfinapiclient.cpp \
|
||||
src/jellyfinapimodel.cpp \
|
||||
src/jellyfindeviceprofile.cpp \
|
||||
src/jellyfinitem.cpp \
|
||||
src/jellyfinplaybackmanager.cpp \
|
||||
src/jellyfinwebsocket.cpp \
|
||||
src/jsonhelper.cpp \
|
||||
src/serverdiscoverymodel.cpp
|
||||
|
||||
HEADERS += \
|
||||
include/credentialmanager.h \
|
||||
include/jellyfin.h \
|
||||
include/jellyfinapiclient.h \
|
||||
include/jellyfinapimodel.h \
|
||||
include/jellyfindeviceprofile.h \
|
||||
include/jellyfinitem.h \
|
||||
include/jellyfinplaybackmanager.h \
|
||||
include/jellyfinwebsocket.h \
|
||||
include/jsonhelper.h \
|
||||
include/serverdiscoverymodel.h
|
||||
|
||||
VERSION = $$SAILFIN_VERSION
|
||||
|
||||
TARGET = jellyfin-qt
|
||||
DESTDIR = lib
|
673
core/dbus/org.mpris.MediaPlayer2.Player.xml
Normal file
673
core/dbus/org.mpris.MediaPlayer2.Player.xml
Normal file
|
@ -0,0 +1,673 @@
|
|||
<?xml version="1.0" ?>
|
||||
<node name="/Player_Interface" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
|
||||
<interface name="org.mpris.MediaPlayer2.Player">
|
||||
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>
|
||||
This interface implements the methods for querying and providing basic
|
||||
control over what is currently playing.
|
||||
</p>
|
||||
</tp:docstring>
|
||||
|
||||
<tp:enum name="Playback_Status" tp:name-for-bindings="Playback_Status" type="s">
|
||||
<tp:enumvalue suffix="Playing" value="Playing">
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>A track is currently playing.</p>
|
||||
</tp:docstring>
|
||||
</tp:enumvalue>
|
||||
<tp:enumvalue suffix="Paused" value="Paused">
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>A track is currently paused.</p>
|
||||
</tp:docstring>
|
||||
</tp:enumvalue>
|
||||
<tp:enumvalue suffix="Stopped" value="Stopped">
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>There is no track currently playing.</p>
|
||||
</tp:docstring>
|
||||
</tp:enumvalue>
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>A playback state.</p>
|
||||
</tp:docstring>
|
||||
</tp:enum>
|
||||
|
||||
<tp:enum name="Loop_Status" tp:name-for-bindings="Loop_Status" type="s">
|
||||
<tp:enumvalue suffix="None" value="None">
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>The playback will stop when there are no more tracks to play</p>
|
||||
</tp:docstring>
|
||||
</tp:enumvalue>
|
||||
<tp:enumvalue suffix="Track" value="Track">
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>The current track will start again from the begining once it has finished playing</p>
|
||||
</tp:docstring>
|
||||
</tp:enumvalue>
|
||||
<tp:enumvalue suffix="Playlist" value="Playlist">
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>The playback loops through a list of tracks</p>
|
||||
</tp:docstring>
|
||||
</tp:enumvalue>
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>A repeat / loop status</p>
|
||||
</tp:docstring>
|
||||
</tp:enum>
|
||||
|
||||
<tp:simple-type name="Track_Id" type="o" array-name="Track_Id_List">
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>Unique track identifier.</p>
|
||||
<p>
|
||||
If the media player implements the TrackList interface and allows
|
||||
the same track to appear multiple times in the tracklist,
|
||||
this must be unique within the scope of the tracklist.
|
||||
</p>
|
||||
<p>
|
||||
Note that this should be a valid D-Bus object id, although clients
|
||||
should not assume that any object is actually exported with any
|
||||
interfaces at that path.
|
||||
</p>
|
||||
<p>
|
||||
Media players may not use any paths starting with
|
||||
<literal>/org/mpris</literal> unless explicitly allowed by this specification.
|
||||
Such paths are intended to have special meaning, such as
|
||||
<literal>/org/mpris/MediaPlayer2/TrackList/NoTrack</literal>
|
||||
to indicate "no track".
|
||||
</p>
|
||||
<tp:rationale>
|
||||
<p>
|
||||
This is a D-Bus object id as that is the definitive way to have
|
||||
unique identifiers on D-Bus. It also allows for future optional
|
||||
expansions to the specification where tracks are exported to D-Bus
|
||||
with an interface similar to org.gnome.UPnP.MediaItem2.
|
||||
</p>
|
||||
</tp:rationale>
|
||||
</tp:docstring>
|
||||
</tp:simple-type>
|
||||
|
||||
<tp:simple-type name="Playback_Rate" type="d">
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>A playback rate</p>
|
||||
<p>
|
||||
This is a multiplier, so a value of 0.5 indicates that playback is
|
||||
happening at half speed, while 1.5 means that 1.5 seconds of "track time"
|
||||
is consumed every second.
|
||||
</p>
|
||||
</tp:docstring>
|
||||
</tp:simple-type>
|
||||
|
||||
<tp:simple-type name="Volume" type="d">
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>Audio volume level</p>
|
||||
<ul>
|
||||
<li>0.0 means mute.</li>
|
||||
<li>1.0 is a sensible maximum volume level (ex: 0dB).</li>
|
||||
</ul>
|
||||
<p>
|
||||
Note that the volume may be higher than 1.0, although generally
|
||||
clients should not attempt to set it above 1.0.
|
||||
</p>
|
||||
</tp:docstring>
|
||||
</tp:simple-type>
|
||||
|
||||
<tp:simple-type name="Time_In_Us" type="x">
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>Time in microseconds.</p>
|
||||
</tp:docstring>
|
||||
</tp:simple-type>
|
||||
|
||||
<method name="Next" tp:name-for-bindings="Next">
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>Skips to the next track in the tracklist.</p>
|
||||
<p>
|
||||
If there is no next track (and endless playback and track
|
||||
repeat are both off), stop playback.
|
||||
</p>
|
||||
<p>If playback is paused or stopped, it remains that way.</p>
|
||||
<p>
|
||||
If <tp:member-ref>CanGoNext</tp:member-ref> is
|
||||
<strong>false</strong>, attempting to call this method should have
|
||||
no effect.
|
||||
</p>
|
||||
</tp:docstring>
|
||||
</method>
|
||||
|
||||
<method name="Previous" tp:name-for-bindings="Previous">
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>Skips to the previous track in the tracklist.</p>
|
||||
<p>
|
||||
If there is no previous track (and endless playback and track
|
||||
repeat are both off), stop playback.
|
||||
</p>
|
||||
<p>If playback is paused or stopped, it remains that way.</p>
|
||||
<p>
|
||||
If <tp:member-ref>CanGoPrevious</tp:member-ref> is
|
||||
<strong>false</strong>, attempting to call this method should have
|
||||
no effect.
|
||||
</p>
|
||||
</tp:docstring>
|
||||
</method>
|
||||
|
||||
<method name="Pause" tp:name-for-bindings="Pause">
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>Pauses playback.</p>
|
||||
<p>If playback is already paused, this has no effect.</p>
|
||||
<p>
|
||||
Calling Play after this should cause playback to start again
|
||||
from the same position.
|
||||
</p>
|
||||
<p>
|
||||
If <tp:member-ref>CanPause</tp:member-ref> is
|
||||
<strong>false</strong>, attempting to call this method should have
|
||||
no effect.
|
||||
</p>
|
||||
</tp:docstring>
|
||||
</method>
|
||||
|
||||
<method name="PlayPause" tp:name-for-bindings="PlayPause">
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>Pauses playback.</p>
|
||||
<p>If playback is already paused, resumes playback.</p>
|
||||
<p>If playback is stopped, starts playback.</p>
|
||||
<p>
|
||||
If <tp:member-ref>CanPause</tp:member-ref> is
|
||||
<strong>false</strong>, attempting to call this method should have
|
||||
no effect and raise an error.
|
||||
</p>
|
||||
</tp:docstring>
|
||||
</method>
|
||||
|
||||
<method name="Stop" tp:name-for-bindings="Stop">
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>Stops playback.</p>
|
||||
<p>If playback is already stopped, this has no effect.</p>
|
||||
<p>
|
||||
Calling Play after this should cause playback to
|
||||
start again from the beginning of the track.
|
||||
</p>
|
||||
<p>
|
||||
If <tp:member-ref>CanControl</tp:member-ref> is
|
||||
<strong>false</strong>, attempting to call this method should have
|
||||
no effect and raise an error.
|
||||
</p>
|
||||
</tp:docstring>
|
||||
</method>
|
||||
|
||||
<method name="Play" tp:name-for-bindings="Play">
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>Starts or resumes playback.</p>
|
||||
<p>If already playing, this has no effect.</p>
|
||||
<p>If paused, playback resumes from the current position.</p>
|
||||
<p>If there is no track to play, this has no effect.</p>
|
||||
<p>
|
||||
If <tp:member-ref>CanPlay</tp:member-ref> is
|
||||
<strong>false</strong>, attempting to call this method should have
|
||||
no effect.
|
||||
</p>
|
||||
</tp:docstring>
|
||||
</method>
|
||||
|
||||
<method name="Seek" tp:name-for-bindings="Seek">
|
||||
<arg direction="in" type="x" name="Offset" tp:type="Time_In_Us">
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>The number of microseconds to seek forward.</p>
|
||||
</tp:docstring>
|
||||
</arg>
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>
|
||||
Seeks forward in the current track by the specified number
|
||||
of microseconds.
|
||||
</p>
|
||||
<p>
|
||||
A negative value seeks back. If this would mean seeking
|
||||
back further than the start of the track, the position
|
||||
is set to 0.
|
||||
</p>
|
||||
<p>
|
||||
If the value passed in would mean seeking beyond the end
|
||||
of the track, acts like a call to Next.
|
||||
</p>
|
||||
<p>
|
||||
If the <tp:member-ref>CanSeek</tp:member-ref> property is false,
|
||||
this has no effect.
|
||||
</p>
|
||||
</tp:docstring>
|
||||
</method>
|
||||
|
||||
<method name="SetPosition" tp:name-for-bindings="Set_Position">
|
||||
<arg direction="in" type="o" tp:type="Track_Id" name="TrackId">
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>The currently playing track's identifier.</p>
|
||||
<p>
|
||||
If this does not match the id of the currently-playing track,
|
||||
the call is ignored as "stale".
|
||||
</p>
|
||||
<p>
|
||||
<literal>/org/mpris/MediaPlayer2/TrackList/NoTrack</literal>
|
||||
is <em>not</em> a valid value for this argument.
|
||||
</p>
|
||||
</tp:docstring>
|
||||
</arg>
|
||||
<arg direction="in" type="x" tp:type="Time_In_Us" name="Position">
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>Track position in microseconds.</p>
|
||||
<p>This must be between 0 and <track_length>.</p>
|
||||
</tp:docstring>
|
||||
</arg>
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>Sets the current track position in microseconds.</p>
|
||||
<p>If the Position argument is less than 0, do nothing.</p>
|
||||
<p>
|
||||
If the Position argument is greater than the track length,
|
||||
do nothing.
|
||||
</p>
|
||||
<p>
|
||||
If the <tp:member-ref>CanSeek</tp:member-ref> property is false,
|
||||
this has no effect.
|
||||
</p>
|
||||
<tp:rationale>
|
||||
<p>
|
||||
The reason for having this method, rather than making
|
||||
<tp:member-ref>Position</tp:member-ref> writable, is to include
|
||||
the TrackId argument to avoid race conditions where a client tries
|
||||
to seek to a position when the track has already changed.
|
||||
</p>
|
||||
</tp:rationale>
|
||||
</tp:docstring>
|
||||
</method>
|
||||
|
||||
<method name="OpenUri" tp:name-for-bindings="Open_Uri">
|
||||
<arg direction="in" type="s" tp:type="Uri" name="Uri">
|
||||
<tp:docstring>
|
||||
<p>
|
||||
Uri of the track to load. Its uri scheme should be an element of the
|
||||
<literal>org.mpris.MediaPlayer2.SupportedUriSchemes</literal>
|
||||
property and the mime-type should match one of the elements of the
|
||||
<literal>org.mpris.MediaPlayer2.SupportedMimeTypes</literal>.
|
||||
</p>
|
||||
</tp:docstring>
|
||||
</arg>
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>Opens the Uri given as an argument</p>
|
||||
<p>If the playback is stopped, starts playing</p>
|
||||
<p>
|
||||
If the uri scheme or the mime-type of the uri to open is not supported,
|
||||
this method does nothing and may raise an error. In particular, if the
|
||||
list of available uri schemes is empty, this method may not be
|
||||
implemented.
|
||||
</p>
|
||||
<p>Clients should not assume that the Uri has been opened as soon as this
|
||||
method returns. They should wait until the mpris:trackid field in the
|
||||
<tp:member-ref>Metadata</tp:member-ref> property changes.
|
||||
</p>
|
||||
<p>
|
||||
If the media player implements the TrackList interface, then the
|
||||
opened track should be made part of the tracklist, the
|
||||
<literal>org.mpris.MediaPlayer2.TrackList.TrackAdded</literal> or
|
||||
<literal>org.mpris.MediaPlayer2.TrackList.TrackListReplaced</literal>
|
||||
signal should be fired, as well as the
|
||||
<literal>org.freedesktop.DBus.Properties.PropertiesChanged</literal>
|
||||
signal on the tracklist interface.
|
||||
</p>
|
||||
</tp:docstring>
|
||||
</method>
|
||||
|
||||
<property name="PlaybackStatus" tp:name-for-bindings="Playback_Status" type="s" tp:type="Playback_Status" access="read">
|
||||
<annotation name="org.freedesktop.DBus.Property.EmitsChangedSignal" value="true"/>
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>The current playback status.</p>
|
||||
<p>
|
||||
May be "Playing", "Paused" or "Stopped".
|
||||
</p>
|
||||
</tp:docstring>
|
||||
</property>
|
||||
|
||||
<property name="LoopStatus" type="s" access="readwrite"
|
||||
tp:name-for-bindings="Loop_Status" tp:type="Loop_Status">
|
||||
<annotation name="org.freedesktop.DBus.Property.EmitsChangedSignal" value="true"/>
|
||||
<annotation name="org.mpris.MediaPlayer2.property.optional" value="true"/>
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>The current loop / repeat status</p>
|
||||
<p>May be:
|
||||
<ul>
|
||||
<li>"None" if the playback will stop when there are no more tracks to play</li>
|
||||
<li>"Track" if the current track will start again from the begining once it has finished playing</li>
|
||||
<li>"Playlist" if the playback loops through a list of tracks</li>
|
||||
</ul>
|
||||
</p>
|
||||
<p>
|
||||
If <tp:member-ref>CanControl</tp:member-ref> is
|
||||
<strong>false</strong>, attempting to set this property should have
|
||||
no effect and raise an error.
|
||||
</p>
|
||||
</tp:docstring>
|
||||
</property>
|
||||
|
||||
<property name="Rate" tp:name-for-bindings="Rate" type="d" tp:type="Playback_Rate" access="readwrite">
|
||||
<annotation name="org.freedesktop.DBus.Property.EmitsChangedSignal" value="true"/>
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>The current playback rate.</p>
|
||||
<p>
|
||||
The value must fall in the range described by
|
||||
<tp:member-ref>MinimumRate</tp:member-ref> and
|
||||
<tp:member-ref>MaximumRate</tp:member-ref>, and must not be 0.0. If
|
||||
playback is paused, the <tp:member-ref>PlaybackStatus</tp:member-ref>
|
||||
property should be used to indicate this. A value of 0.0 should not
|
||||
be set by the client. If it is, the media player should act as
|
||||
though <tp:member-ref>Pause</tp:member-ref> was called.
|
||||
</p>
|
||||
<p>
|
||||
If the media player has no ability to play at speeds other than the
|
||||
normal playback rate, this must still be implemented, and must
|
||||
return 1.0. The <tp:member-ref>MinimumRate</tp:member-ref> and
|
||||
<tp:member-ref>MaximumRate</tp:member-ref> properties must also be
|
||||
set to 1.0.
|
||||
</p>
|
||||
<p>
|
||||
Not all values may be accepted by the media player. It is left to
|
||||
media player implementations to decide how to deal with values they
|
||||
cannot use; they may either ignore them or pick a "best fit" value.
|
||||
Clients are recommended to only use sensible fractions or multiples
|
||||
of 1 (eg: 0.5, 0.25, 1.5, 2.0, etc).
|
||||
</p>
|
||||
<tp:rationale>
|
||||
<p>
|
||||
This allows clients to display (reasonably) accurate progress bars
|
||||
without having to regularly query the media player for the current
|
||||
position.
|
||||
</p>
|
||||
</tp:rationale>
|
||||
</tp:docstring>
|
||||
</property>
|
||||
|
||||
<property name="Shuffle" tp:name-for-bindings="Shuffle" type="b" access="readwrite">
|
||||
<annotation name="org.freedesktop.DBus.Property.EmitsChangedSignal" value="true"/>
|
||||
<annotation name="org.mpris.MediaPlayer2.property.optional" value="true"/>
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>
|
||||
A value of <strong>false</strong> indicates that playback is
|
||||
progressing linearly through a playlist, while <strong>true</strong>
|
||||
means playback is progressing through a playlist in some other order.
|
||||
</p>
|
||||
<p>
|
||||
If <tp:member-ref>CanControl</tp:member-ref> is
|
||||
<strong>false</strong>, attempting to set this property should have
|
||||
no effect and raise an error.
|
||||
</p>
|
||||
</tp:docstring>
|
||||
</property>
|
||||
|
||||
<property name="Metadata" tp:name-for-bindings="Metadata" type="a{sv}" tp:type="Metadata_Map" access="read">
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName" value="QVariantMap"/>
|
||||
<annotation name="org.freedesktop.DBus.Property.EmitsChangedSignal" value="true"/>
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>The metadata of the current element.</p>
|
||||
<p>
|
||||
If there is a current track, this must have a "mpris:trackid" entry
|
||||
(of D-Bus type "o") at the very least, which contains a D-Bus path that
|
||||
uniquely identifies this track.
|
||||
</p>
|
||||
<p>
|
||||
See the type documentation for more details.
|
||||
</p>
|
||||
</tp:docstring>
|
||||
</property>
|
||||
|
||||
<property name="Volume" type="d" tp:type="Volume" tp:name-for-bindings="Volume" access="readwrite">
|
||||
<annotation name="org.freedesktop.DBus.Property.EmitsChangedSignal" value="true" />
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>The volume level.</p>
|
||||
<p>
|
||||
When setting, if a negative value is passed, the volume
|
||||
should be set to 0.0.
|
||||
</p>
|
||||
<p>
|
||||
If <tp:member-ref>CanControl</tp:member-ref> is
|
||||
<strong>false</strong>, attempting to set this property should have
|
||||
no effect and raise an error.
|
||||
</p>
|
||||
</tp:docstring>
|
||||
</property>
|
||||
|
||||
<property name="Position" type="x" tp:type="Time_In_Us" tp:name-for-bindings="Position" access="read">
|
||||
<annotation name="org.freedesktop.DBus.Property.EmitsChangedSignal" value="false"/>
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>
|
||||
The current track position in microseconds, between 0 and
|
||||
the 'mpris:length' metadata entry (see Metadata).
|
||||
</p>
|
||||
<p>
|
||||
Note: If the media player allows it, the current playback position
|
||||
can be changed either the SetPosition method or the Seek method on
|
||||
this interface. If this is not the case, the
|
||||
<tp:member-ref>CanSeek</tp:member-ref> property is false, and
|
||||
setting this property has no effect and can raise an error.
|
||||
</p>
|
||||
<p>
|
||||
If the playback progresses in a way that is inconstistant with the
|
||||
<tp:member-ref>Rate</tp:member-ref> property, the
|
||||
<tp:member-ref>Seeked</tp:member-ref> signal is emited.
|
||||
</p>
|
||||
</tp:docstring>
|
||||
</property>
|
||||
|
||||
<property name="MinimumRate" tp:name-for-bindings="Minimum_Rate" type="d" tp:type="Playback_Rate" access="read">
|
||||
<annotation name="org.freedesktop.DBus.Property.EmitsChangedSignal" value="true"/>
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>
|
||||
The minimum value which the <tp:member-ref>Rate</tp:member-ref>
|
||||
property can take.
|
||||
Clients should not attempt to set the
|
||||
<tp:member-ref>Rate</tp:member-ref> property below this value.
|
||||
</p>
|
||||
<p>
|
||||
Note that even if this value is 0.0 or negative, clients should
|
||||
not attempt to set the <tp:member-ref>Rate</tp:member-ref> property
|
||||
to 0.0.
|
||||
</p>
|
||||
<p>This value should always be 1.0 or less.</p>
|
||||
</tp:docstring>
|
||||
</property>
|
||||
|
||||
<property name="MaximumRate" tp:name-for-bindings="Maximum_Rate" type="d" tp:type="Playback_Rate" access="read">
|
||||
<annotation name="org.freedesktop.DBus.Property.EmitsChangedSignal" value="true"/>
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>
|
||||
The maximum value which the <tp:member-ref>Rate</tp:member-ref>
|
||||
property can take.
|
||||
Clients should not attempt to set the
|
||||
<tp:member-ref>Rate</tp:member-ref> property above this value.
|
||||
</p>
|
||||
<p>
|
||||
This value should always be 1.0 or greater.
|
||||
</p>
|
||||
</tp:docstring>
|
||||
</property>
|
||||
|
||||
<property name="CanGoNext" tp:name-for-bindings="Can_Go_Next" type="b" access="read">
|
||||
<annotation name="org.freedesktop.DBus.Property.EmitsChangedSignal" value="true"/>
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>
|
||||
Whether the client can call the <tp:member-ref>Next</tp:member-ref>
|
||||
method on this interface and expect the current track to change.
|
||||
</p>
|
||||
<p>
|
||||
If it is unknown whether a call to <tp:member-ref>Next</tp:member-ref> will
|
||||
be successful (for example, when streaming tracks), this property should
|
||||
be set to <strong>true</strong>.
|
||||
</p>
|
||||
<p>
|
||||
If <tp:member-ref>CanControl</tp:member-ref> is
|
||||
<strong>false</strong>, this property should also be
|
||||
<strong>false</strong>.
|
||||
</p>
|
||||
<tp:rationale>
|
||||
<p>
|
||||
Even when playback can generally be controlled, there may not
|
||||
always be a next track to move to.
|
||||
</p>
|
||||
</tp:rationale>
|
||||
</tp:docstring>
|
||||
</property>
|
||||
|
||||
<property name="CanGoPrevious" tp:name-for-bindings="Can_Go_Previous" type="b" access="read">
|
||||
<annotation name="org.freedesktop.DBus.Property.EmitsChangedSignal" value="true"/>
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>
|
||||
Whether the client can call the
|
||||
<tp:member-ref>Previous</tp:member-ref> method on this interface and
|
||||
expect the current track to change.
|
||||
</p>
|
||||
<p>
|
||||
If it is unknown whether a call to <tp:member-ref>Previous</tp:member-ref>
|
||||
will be successful (for example, when streaming tracks), this property
|
||||
should be set to <strong>true</strong>.
|
||||
</p>
|
||||
<p>
|
||||
If <tp:member-ref>CanControl</tp:member-ref> is
|
||||
<strong>false</strong>, this property should also be
|
||||
<strong>false</strong>.
|
||||
</p>
|
||||
<tp:rationale>
|
||||
<p>
|
||||
Even when playback can generally be controlled, there may not
|
||||
always be a next previous to move to.
|
||||
</p>
|
||||
</tp:rationale>
|
||||
|
||||
</tp:docstring>
|
||||
</property>
|
||||
|
||||
<property name="CanPlay" tp:name-for-bindings="Can_Play" type="b" access="read">
|
||||
<annotation name="org.freedesktop.DBus.Property.EmitsChangedSignal" value="true"/>
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>Whether playback can be started using
|
||||
<tp:member-ref>Play</tp:member-ref> or
|
||||
<tp:member-ref>PlayPause</tp:member-ref>.
|
||||
</p>
|
||||
<p>
|
||||
Note that this is related to whether there is a "current track": the
|
||||
value should not depend on whether the track is currently paused or
|
||||
playing. In fact, if a track is currently playing (and
|
||||
<tp:member-ref>CanControl</tp:member-ref> is <strong>true</strong>),
|
||||
this should be <strong>true</strong>.
|
||||
</p>
|
||||
<p>
|
||||
If <tp:member-ref>CanControl</tp:member-ref> is
|
||||
<strong>false</strong>, this property should also be
|
||||
<strong>false</strong>.
|
||||
</p>
|
||||
<tp:rationale>
|
||||
<p>
|
||||
Even when playback can generally be controlled, it may not be
|
||||
possible to enter a "playing" state, for example if there is no
|
||||
"current track".
|
||||
</p>
|
||||
</tp:rationale>
|
||||
</tp:docstring>
|
||||
</property>
|
||||
|
||||
<property name="CanPause" tp:name-for-bindings="Can_Pause" type="b" access="read">
|
||||
<annotation name="org.freedesktop.DBus.Property.EmitsChangedSignal" value="true"/>
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>Whether playback can be paused using
|
||||
<tp:member-ref>Pause</tp:member-ref> or
|
||||
<tp:member-ref>PlayPause</tp:member-ref>.
|
||||
</p>
|
||||
<p>
|
||||
Note that this is an intrinsic property of the current track: its
|
||||
value should not depend on whether the track is currently paused or
|
||||
playing. In fact, if playback is currently paused (and
|
||||
<tp:member-ref>CanControl</tp:member-ref> is <strong>true</strong>),
|
||||
this should be <strong>true</strong>.
|
||||
</p>
|
||||
<p>
|
||||
If <tp:member-ref>CanControl</tp:member-ref> is
|
||||
<strong>false</strong>, this property should also be
|
||||
<strong>false</strong>.
|
||||
</p>
|
||||
<tp:rationale>
|
||||
<p>
|
||||
Not all media is pausable: it may not be possible to pause some
|
||||
streamed media, for example.
|
||||
</p>
|
||||
</tp:rationale>
|
||||
</tp:docstring>
|
||||
</property>
|
||||
|
||||
<property name="CanSeek" tp:name-for-bindings="Can_Seek" type="b" access="read">
|
||||
<annotation name="org.freedesktop.DBus.Property.EmitsChangedSignal" value="true"/>
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>
|
||||
Whether the client can control the playback position using
|
||||
<tp:member-ref>Seek</tp:member-ref> and
|
||||
<tp:member-ref>SetPosition</tp:member-ref>. This may be different for
|
||||
different tracks.
|
||||
</p>
|
||||
<p>
|
||||
If <tp:member-ref>CanControl</tp:member-ref> is
|
||||
<strong>false</strong>, this property should also be
|
||||
<strong>false</strong>.
|
||||
</p>
|
||||
<tp:rationale>
|
||||
<p>
|
||||
Not all media is seekable: it may not be possible to seek when
|
||||
playing some streamed media, for example.
|
||||
</p>
|
||||
</tp:rationale>
|
||||
</tp:docstring>
|
||||
</property>
|
||||
|
||||
<property name="CanControl" tp:name-for-bindings="Can_Control" type="b" access="read">
|
||||
<annotation name="org.freedesktop.DBus.Property.EmitsChangedSignal" value="false"/>
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>Whether the media player may be controlled over this interface.</p>
|
||||
<p>
|
||||
This property is not expected to change, as it describes an intrinsic
|
||||
capability of the implementation.
|
||||
</p>
|
||||
<p>
|
||||
If this is <strong>false</strong>, clients should assume that all
|
||||
properties on this interface are read-only (and will raise errors
|
||||
if writing to them is attempted), no methods are implemented
|
||||
and all other properties starting with "Can" are also
|
||||
<strong>false</strong>.
|
||||
</p>
|
||||
<tp:rationale>
|
||||
<p>
|
||||
This allows clients to determine whether to present and enable
|
||||
controls to the user in advance of attempting to call methods
|
||||
and write to properties.
|
||||
</p>
|
||||
</tp:rationale>
|
||||
</tp:docstring>
|
||||
</property>
|
||||
|
||||
<signal name="Seeked" tp:name-for-bindings="Seeked">
|
||||
<arg name="Position" type="x" tp:type="Time_In_Us">
|
||||
<tp:docstring>
|
||||
<p>The new position, in microseconds.</p>
|
||||
</tp:docstring>
|
||||
</arg>
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>
|
||||
Indicates that the track position has changed in a way that is
|
||||
inconsistant with the current playing state.
|
||||
</p>
|
||||
<p>When this signal is not received, clients should assume that:</p>
|
||||
<ul>
|
||||
<li>
|
||||
When playing, the position progresses according to the rate property.
|
||||
</li>
|
||||
<li>When paused, it remains constant.</li>
|
||||
</ul>
|
||||
<p>
|
||||
This signal does not need to be emitted when playback starts
|
||||
or when the track changes, unless the track is starting at an
|
||||
unexpected position. An expected position would be the last
|
||||
known one when going from Paused to Playing, and 0 when going from
|
||||
Stopped to Playing.
|
||||
</p>
|
||||
</tp:docstring>
|
||||
</signal>
|
||||
|
||||
</interface>
|
||||
</node>
|
||||
<!-- vim:set sw=2 sts=2 et ft=xml: -->
|
250
core/dbus/org.mpris.MediaPlayer2.Playlists.xml
Normal file
250
core/dbus/org.mpris.MediaPlayer2.Playlists.xml
Normal file
|
@ -0,0 +1,250 @@
|
|||
<?xml version="1.0" ?>
|
||||
<node name="/Playlists_Interface" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
|
||||
<interface name="org.mpris.MediaPlayer2.Playlists">
|
||||
<tp:added version="2.1" />
|
||||
<tp:docstring>
|
||||
<p>Provides access to the media player's playlists.</p>
|
||||
<p>
|
||||
Since D-Bus does not provide an easy way to check for what interfaces
|
||||
are exported on an object, clients should attempt to get one of the
|
||||
properties on this interface to see if it is implemented.
|
||||
</p>
|
||||
</tp:docstring>
|
||||
|
||||
<tp:simple-type name="Playlist_Id" type="o" array-name="Playlist_Id_List">
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>Unique playlist identifier.</p>
|
||||
<tp:rationale>
|
||||
<p>
|
||||
Multiple playlists may have the same name.
|
||||
</p>
|
||||
<p>
|
||||
This is a D-Bus object id as that is the definitive way to have
|
||||
unique identifiers on D-Bus. It also allows for future optional
|
||||
expansions to the specification where tracks are exported to D-Bus
|
||||
with an interface similar to org.gnome.UPnP.MediaItem2.
|
||||
</p>
|
||||
</tp:rationale>
|
||||
</tp:docstring>
|
||||
</tp:simple-type>
|
||||
|
||||
<tp:simple-type name="Uri" type="s" array-name="Uri_List">
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>A URI.</p>
|
||||
</tp:docstring>
|
||||
</tp:simple-type>
|
||||
|
||||
<tp:struct name="Playlist" array-name="Playlist_List">
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>A data structure describing a playlist.</p>
|
||||
</tp:docstring>
|
||||
<tp:member type="o" tp:type="Playlist_Id" name="Id">
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>A unique identifier for the playlist.</p>
|
||||
<p>This should remain the same if the playlist is renamed.</p>
|
||||
</tp:docstring>
|
||||
</tp:member>
|
||||
<tp:member type="s" name="Name">
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>The name of the playlist, typically given by the user.</p>
|
||||
</tp:docstring>
|
||||
</tp:member>
|
||||
<tp:member type="s" tp:type="Uri" name="Icon">
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>The URI of an (optional) icon.</p>
|
||||
</tp:docstring>
|
||||
</tp:member>
|
||||
</tp:struct>
|
||||
|
||||
<tp:struct name="Maybe_Playlist">
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>A data structure describing a playlist, or nothing.</p>
|
||||
<tp:rationale>
|
||||
<p>
|
||||
D-Bus does not (at the time of writing) support a MAYBE type,
|
||||
so we are forced to invent our own.
|
||||
</p>
|
||||
</tp:rationale>
|
||||
</tp:docstring>
|
||||
<tp:member type="b" name="Valid">
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>Whether this structure refers to a valid playlist.</p>
|
||||
</tp:docstring>
|
||||
</tp:member>
|
||||
<tp:member type="(oss)" tp:type="Playlist" name="Playlist">
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>The playlist, providing Valid is true, otherwise undefined.</p>
|
||||
<p>
|
||||
When constructing this type, it should be noted that the playlist
|
||||
ID must be a valid object path, or D-Bus implementations may reject
|
||||
it. This is true even when Valid is false. It is suggested that
|
||||
"/" is used as the playlist ID in this case.
|
||||
</p>
|
||||
</tp:docstring>
|
||||
</tp:member>
|
||||
</tp:struct>
|
||||
|
||||
<tp:enum name="Playlist_Ordering" array-name="Playlist_Ordering_List" type="s">
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>Specifies the ordering of returned playlists.</p>
|
||||
</tp:docstring>
|
||||
<tp:enumvalue suffix="Alphabetical" value="Alphabetical">
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>Alphabetical ordering by name, ascending.</p>
|
||||
</tp:docstring>
|
||||
</tp:enumvalue>
|
||||
<tp:enumvalue suffix="CreationDate" value="Created">
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>Ordering by creation date, oldest first.</p>
|
||||
</tp:docstring>
|
||||
</tp:enumvalue>
|
||||
<tp:enumvalue suffix="ModifiedDate" value="Modified">
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>Ordering by last modified date, oldest first.</p>
|
||||
</tp:docstring>
|
||||
</tp:enumvalue>
|
||||
<tp:enumvalue suffix="LastPlayDate" value="Played">
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>Ordering by date of last playback, oldest first.</p>
|
||||
</tp:docstring>
|
||||
</tp:enumvalue>
|
||||
<tp:enumvalue suffix="UserDefined" value="User">
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>A user-defined ordering.</p>
|
||||
<tp:rationale>
|
||||
<p>
|
||||
Some media players may allow users to order playlists as they
|
||||
wish. This ordering allows playlists to be retreived in that
|
||||
order.
|
||||
</p>
|
||||
</tp:rationale>
|
||||
</tp:docstring>
|
||||
</tp:enumvalue>
|
||||
</tp:enum>
|
||||
|
||||
<method name="ActivatePlaylist" tp:name-for-bindings="Activate_Playlist">
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>
|
||||
Starts playing the given playlist.
|
||||
</p>
|
||||
<p>
|
||||
Note that this must be implemented. If the media player does not
|
||||
allow clients to change the playlist, it should not implement this
|
||||
interface at all.
|
||||
</p>
|
||||
<p>
|
||||
It is up to the media player whether this completely replaces the
|
||||
current tracklist, or whether it is merely inserted into the
|
||||
tracklist and the first track starts. For example, if the media
|
||||
player is operating in a "jukebox" mode, it may just append the
|
||||
playlist to the list of upcoming tracks, and skip to the first
|
||||
track in the playlist.
|
||||
</p>
|
||||
</tp:docstring>
|
||||
<arg direction="in" name="PlaylistId" type="o">
|
||||
<tp:docstring>
|
||||
<p>The id of the playlist to activate.</p>
|
||||
</tp:docstring>
|
||||
</arg>
|
||||
</method>
|
||||
|
||||
<method name="GetPlaylists" tp:name-for-bindings="Get_Playlists">
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>Gets a set of playlists.</p>
|
||||
</tp:docstring>
|
||||
<arg direction="in" name="Index" type="u">
|
||||
<tp:docstring>
|
||||
<p>The index of the first playlist to be fetched (according to the ordering).</p>
|
||||
</tp:docstring>
|
||||
</arg>
|
||||
<arg direction="in" name="MaxCount" type="u">
|
||||
<tp:docstring>
|
||||
<p>The maximum number of playlists to fetch.</p>
|
||||
</tp:docstring>
|
||||
</arg>
|
||||
<arg direction="in" name="Order" type="s" tp:type="Playlist_Ordering">
|
||||
<tp:docstring>
|
||||
<p>The ordering that should be used.</p>
|
||||
</tp:docstring>
|
||||
</arg>
|
||||
<arg direction="in" name="ReverseOrder" type="b">
|
||||
<tp:docstring>
|
||||
<p>Whether the order should be reversed.</p>
|
||||
</tp:docstring>
|
||||
</arg>
|
||||
<arg direction="out" name="Playlists" type="a(oss)" tp:type="Playlist[]">
|
||||
<tp:docstring>
|
||||
<p>A list of (at most MaxCount) playlists.</p>
|
||||
</tp:docstring>
|
||||
</arg>
|
||||
</method>
|
||||
|
||||
<property name="PlaylistCount" type="u" tp:name-for-bindings="Playlist_Count" access="read">
|
||||
<annotation name="org.freedesktop.DBus.Property.EmitsChangedSignal" value="true"/>
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>
|
||||
The number of playlists available.
|
||||
</p>
|
||||
</tp:docstring>
|
||||
</property>
|
||||
|
||||
<property name="Orderings" tp:name-for-bindings="Orderings" type="as" tp:type="Playlist_Ordering[]" access="read">
|
||||
<annotation name="org.freedesktop.DBus.Property.EmitsChangedSignal" value="true"/>
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>
|
||||
The available orderings. At least one must be offered.
|
||||
</p>
|
||||
<tp:rationale>
|
||||
<p>
|
||||
Media players may not have access to all the data required for some
|
||||
orderings. For example, creation times are not available on UNIX
|
||||
filesystems (don't let the ctime fool you!). On the other hand,
|
||||
clients should have some way to get the "most recent" playlists.
|
||||
</p>
|
||||
</tp:rationale>
|
||||
</tp:docstring>
|
||||
</property>
|
||||
|
||||
<property name="ActivePlaylist" type="(b(oss))" tp:name-for-bindings="Active_Playlist" tp:type="Maybe_Playlist" access="read">
|
||||
<annotation name="org.freedesktop.DBus.Property.EmitsChangedSignal" value="true"/>
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>
|
||||
The currently-active playlist.
|
||||
</p>
|
||||
<p>
|
||||
If there is no currently-active playlist, the structure's Valid field
|
||||
will be false, and the Playlist details are undefined.
|
||||
</p>
|
||||
<p>
|
||||
Note that this may not have a value even after ActivatePlaylist is
|
||||
called with a valid playlist id as ActivatePlaylist implementations
|
||||
have the option of simply inserting the contents of the playlist into
|
||||
the current tracklist.
|
||||
</p>
|
||||
</tp:docstring>
|
||||
</property>
|
||||
|
||||
<signal name="PlaylistChanged" tp:name-for-bindings="Playlist_Changed">
|
||||
<arg name="Playlist" type="(oss)" tp:type="Playlist">
|
||||
<tp:docstring>
|
||||
The playlist which details have changed.
|
||||
</tp:docstring>
|
||||
</arg>
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>Indicates that either the Name or Icon attribute of a
|
||||
playlist has changed.
|
||||
</p>
|
||||
<p>Client implementations should be aware that this signal
|
||||
may not be implemented.
|
||||
</p>
|
||||
<tp:rationale>
|
||||
Without this signal, media players have no way to notify clients
|
||||
of a change in the attributes of a playlist other than the active one
|
||||
</tp:rationale>
|
||||
</tp:docstring>
|
||||
</signal>
|
||||
|
||||
</interface>
|
||||
</node>
|
||||
<!-- vim:set sw=2 sts=2 et ft=xml: -->
|
||||
|
349
core/dbus/org.mpris.MediaPlayer2.TrackList.xml
Normal file
349
core/dbus/org.mpris.MediaPlayer2.TrackList.xml
Normal file
|
@ -0,0 +1,349 @@
|
|||
<?xml version="1.0" ?>
|
||||
<node name="/Track_List_Interface" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
|
||||
<interface name="org.mpris.MediaPlayer2.TrackList">
|
||||
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>
|
||||
Provides access to a short list of tracks which were recently played or
|
||||
will be played shortly. This is intended to provide context to the
|
||||
currently-playing track, rather than giving complete access to the
|
||||
media player's playlist.
|
||||
</p>
|
||||
<p>
|
||||
Example use cases are the list of tracks from the same album as the
|
||||
currently playing song or the
|
||||
<a href="http://projects.gnome.org/rhythmbox/">Rhythmbox</a> play queue.
|
||||
</p>
|
||||
<p>
|
||||
Each track in the tracklist has a unique identifier.
|
||||
The intention is that this uniquely identifies the track within
|
||||
the scope of the tracklist. In particular, if a media item
|
||||
(a particular music file, say) occurs twice in the track list, each
|
||||
occurrence should have a different identifier. If a track is removed
|
||||
from the middle of the playlist, it should not affect the track ids
|
||||
of any other tracks in the tracklist.
|
||||
</p>
|
||||
<p>
|
||||
As a result, the traditional track identifiers of URLs and position
|
||||
in the playlist cannot be used. Any scheme which satisfies the
|
||||
uniqueness requirements is valid, as clients should not make any
|
||||
assumptions about the value of the track id beyond the fact
|
||||
that it is a unique identifier.
|
||||
</p>
|
||||
<p>
|
||||
Note that the (memory and processing) burden of implementing the
|
||||
TrackList interface and maintaining unique track ids for the
|
||||
playlist can be mitigated by only exposing a subset of the playlist when
|
||||
it is very long (the 20 or so tracks around the currently playing
|
||||
track, for example). This is a recommended practice as the tracklist
|
||||
interface is not designed to enable browsing through a large list of tracks,
|
||||
but rather to provide clients with context about the currently playing track.
|
||||
</p>
|
||||
</tp:docstring>
|
||||
|
||||
<tp:mapping name="Metadata_Map" array-name="Metadata_Map_List">
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>A mapping from metadata attribute names to values.</p>
|
||||
<p>
|
||||
The <b>mpris:trackid</b> attribute must always be present, and must be
|
||||
of D-Bus type "o". This contains a D-Bus path that uniquely identifies
|
||||
the track within the scope of the playlist. There may or may not be
|
||||
an actual D-Bus object at that path; this specification says nothing
|
||||
about what interfaces such an object may implement.
|
||||
</p>
|
||||
<p>
|
||||
If the length of the track is known, it should be provided in the
|
||||
metadata property with the "mpris:length" key. The length must be
|
||||
given in microseconds, and be represented as a signed 64-bit integer.
|
||||
</p>
|
||||
<p>
|
||||
If there is an image associated with the track, a URL for it may be
|
||||
provided using the "mpris:artUrl" key. For other metadata, fields
|
||||
defined by the
|
||||
<a href="http://xesam.org/main/XesamOntology">Xesam ontology</a>
|
||||
should be used, prefixed by "xesam:". See the
|
||||
<a href="http://www.freedesktop.org/wiki/Specifications/mpris-spec/metadata">metadata page on the freedesktop.org wiki</a>
|
||||
for a list of common fields.
|
||||
</p>
|
||||
<p>
|
||||
Lists of strings should be passed using the array-of-string ("as")
|
||||
D-Bus type. Dates should be passed as strings using the ISO 8601
|
||||
extended format (eg: 2007-04-29T14:35:51). If the timezone is
|
||||
known, RFC 3339's internet profile should be used (eg:
|
||||
2007-04-29T14:35:51+02:00).
|
||||
</p>
|
||||
</tp:docstring>
|
||||
<tp:member type="s" name="Attribute">
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>
|
||||
The name of the attribute; see the
|
||||
<a href="http://www.freedesktop.org/wiki/Specifications/mpris-spec/metadata">metadata page</a>
|
||||
for guidelines on names to use.
|
||||
</p>
|
||||
</tp:docstring>
|
||||
</tp:member>
|
||||
<tp:member type="v" name="Value">
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>The value of the attribute, in the most appropriate format.</p>
|
||||
</tp:docstring>
|
||||
</tp:member>
|
||||
</tp:mapping>
|
||||
|
||||
<tp:simple-type name="Uri" type="s">
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>A unique resource identifier.</p>
|
||||
</tp:docstring>
|
||||
</tp:simple-type>
|
||||
|
||||
<method name="GetTracksMetadata" tp:name-for-bindings="Get_Tracks_Metadata">
|
||||
<arg direction="in" name="TrackIds" type="ao" tp:type="Track_Id[]">
|
||||
<tp:docstring>
|
||||
<p>The list of track ids for which metadata is requested.</p>
|
||||
</tp:docstring>
|
||||
</arg>
|
||||
<arg direction="out" type="aa{sv}" tp:type="Metadata_Map[]" name="Metadata">
|
||||
<tp:docstring>
|
||||
<p>Metadata of the set of tracks given as input.</p>
|
||||
<p>See the type documentation for more details.</p>
|
||||
</tp:docstring>
|
||||
</arg>
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>Gets all the metadata available for a set of tracks.</p>
|
||||
<p>
|
||||
Each set of metadata must have a "mpris:trackid" entry at the very least,
|
||||
which contains a string that uniquely identifies this track within
|
||||
the scope of the tracklist.
|
||||
</p>
|
||||
</tp:docstring>
|
||||
</method>
|
||||
|
||||
<method name="AddTrack" tp:name-for-bindings="Add_Track">
|
||||
<arg direction="in" type="s" tp:type="Uri" name="Uri">
|
||||
<tp:docstring>
|
||||
<p>
|
||||
The uri of the item to add. Its uri scheme should be an element of the
|
||||
<strong>org.mpris.MediaPlayer2.SupportedUriSchemes</strong>
|
||||
property and the mime-type should match one of the elements of the
|
||||
<strong>org.mpris.MediaPlayer2.SupportedMimeTypes</strong>
|
||||
</p>
|
||||
</tp:docstring>
|
||||
</arg>
|
||||
<arg direction="in" type="o" tp:type="Track_Id" name="AfterTrack">
|
||||
<tp:docstring>
|
||||
<p>
|
||||
The identifier of the track after which
|
||||
the new item should be inserted. The path
|
||||
<literal>/org/mpris/MediaPlayer2/TrackList/NoTrack</literal>
|
||||
indicates that the track should be inserted at the
|
||||
start of the track list.
|
||||
</p>
|
||||
</tp:docstring>
|
||||
</arg>
|
||||
<arg direction="in" type="b" name="SetAsCurrent">
|
||||
<tp:docstring>
|
||||
<p>
|
||||
Whether the newly inserted track should be considered as
|
||||
the current track. Setting this to true has the same effect as
|
||||
calling GoTo afterwards.
|
||||
</p>
|
||||
</tp:docstring>
|
||||
</arg>
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>Adds a URI in the TrackList.</p>
|
||||
<p>
|
||||
If the <tp:member-ref>CanEditTracks</tp:member-ref> property is false,
|
||||
this has no effect.
|
||||
</p>
|
||||
<p>
|
||||
Note: Clients should not assume that the track has been added at the
|
||||
time when this method returns. They should wait for a TrackAdded (or
|
||||
TrackListReplaced) signal.
|
||||
</p>
|
||||
</tp:docstring>
|
||||
</method>
|
||||
|
||||
<method name="RemoveTrack" tp:name-for-bindings="Remove__Track">
|
||||
<arg direction="in" type="o" tp:type="Track_Id" name="TrackId">
|
||||
<tp:docstring>
|
||||
<p>Identifier of the track to be removed.</p>
|
||||
<p>
|
||||
<literal>/org/mpris/MediaPlayer2/TrackList/NoTrack</literal>
|
||||
is <em>not</em> a valid value for this argument.
|
||||
</p>
|
||||
</tp:docstring>
|
||||
</arg>
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>Removes an item from the TrackList.</p>
|
||||
<p>If the track is not part of this tracklist, this has no effect.</p>
|
||||
<p>
|
||||
If the <tp:member-ref>CanEditTracks</tp:member-ref> property is false,
|
||||
this has no effect.
|
||||
</p>
|
||||
<p>
|
||||
Note: Clients should not assume that the track has been removed at the
|
||||
time when this method returns. They should wait for a TrackRemoved (or
|
||||
TrackListReplaced) signal.
|
||||
</p>
|
||||
</tp:docstring>
|
||||
</method>
|
||||
|
||||
<method name="GoTo" tp:name-for-bindings="Go_To">
|
||||
<arg direction="in" type="o" tp:type="Track_Id" name="TrackId">
|
||||
<tp:docstring>
|
||||
<p>Identifier of the track to skip to.</p>
|
||||
<p>
|
||||
<literal>/org/mpris/MediaPlayer2/TrackList/NoTrack</literal>
|
||||
is <em>not</em> a valid value for this argument.
|
||||
</p>
|
||||
</tp:docstring>
|
||||
</arg>
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>Skip to the specified TrackId.</p>
|
||||
<p>If the track is not part of this tracklist, this has no effect.</p>
|
||||
<p>
|
||||
If this object is not <strong>/org/mpris/MediaPlayer2</strong>,
|
||||
the current TrackList's tracks should be replaced with the contents of
|
||||
this TrackList, and the TrackListReplaced signal should be fired from
|
||||
<strong>/org/mpris/MediaPlayer2</strong>.
|
||||
</p>
|
||||
</tp:docstring>
|
||||
</method>
|
||||
|
||||
<property name="Tracks" type="ao" tp:type="Track_Id[]" tp:name-for-bindings="Tracks" access="read">
|
||||
<annotation name="org.freedesktop.DBus.Property.EmitsChangedSignal" value="invalidates"/>
|
||||
<tp:docstring>
|
||||
<p>
|
||||
An array which contains the identifier of each track
|
||||
in the tracklist, in order.
|
||||
</p>
|
||||
<p>
|
||||
The <literal>org.freedesktop.DBus.Properties.PropertiesChanged</literal>
|
||||
signal is emited every time this property changes, but the signal
|
||||
message does not contain the new value.
|
||||
|
||||
Client implementations should rather rely on the
|
||||
<tp:member-ref>TrackAdded</tp:member-ref>,
|
||||
<tp:member-ref>TrackRemoved</tp:member-ref> and
|
||||
<tp:member-ref>TrackListReplaced</tp:member-ref> signals to keep their
|
||||
representation of the tracklist up to date.
|
||||
</p>
|
||||
</tp:docstring>
|
||||
</property>
|
||||
|
||||
<property name="CanEditTracks" type="b" tp:name-for-bindings="Can_Edit_Tracks" access="read">
|
||||
<annotation name="org.freedesktop.DBus.Property.EmitsChangedSignal" value="true"/>
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>
|
||||
If <strong>false</strong>, calling
|
||||
<tp:member-ref>AddTrack</tp:member-ref> or
|
||||
<tp:member-ref>RemoveTrack</tp:member-ref> will have no effect,
|
||||
and may raise a NotSupported error.
|
||||
</p>
|
||||
</tp:docstring>
|
||||
</property>
|
||||
|
||||
<signal name="TrackListReplaced" tp:name-for-bindings="Track_List_Replaced">
|
||||
<arg name="Tracks" type="ao" tp:type="Track_Id[]">
|
||||
<tp:docstring>
|
||||
<p>The new content of the tracklist.</p>
|
||||
</tp:docstring>
|
||||
</arg>
|
||||
<arg name="CurrentTrack" type="o" tp:type="Track_Id">
|
||||
<tp:docstring>
|
||||
<p>The identifier of the track to be considered as current.</p>
|
||||
<p>
|
||||
<literal>/org/mpris/MediaPlayer2/TrackList/NoTrack</literal>
|
||||
indicates that there is no current track.
|
||||
</p>
|
||||
<p>
|
||||
This should correspond to the <literal>mpris:trackid</literal> field of the
|
||||
Metadata property of the <literal>org.mpris.MediaPlayer2.Player</literal>
|
||||
interface.
|
||||
</p>
|
||||
</tp:docstring>
|
||||
</arg>
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>Indicates that the entire tracklist has been replaced.</p>
|
||||
<p>
|
||||
It is left up to the implementation to decide when
|
||||
a change to the track list is invasive enough that
|
||||
this signal should be emitted instead of a series of
|
||||
TrackAdded and TrackRemoved signals.
|
||||
</p>
|
||||
</tp:docstring>
|
||||
</signal>
|
||||
|
||||
<signal name="TrackAdded" tp:name-for-bindings="Track_Added">
|
||||
<arg type="a{sv}" tp:type="Metadata_Map" name="Metadata">
|
||||
<tp:docstring>
|
||||
<p>The metadata of the newly added item.</p>
|
||||
<p>This must include a mpris:trackid entry.</p>
|
||||
<p>See the type documentation for more details.</p>
|
||||
</tp:docstring>
|
||||
</arg>
|
||||
<arg type="o" tp:type="Track_Id" name="AfterTrack">
|
||||
<tp:docstring>
|
||||
<p>
|
||||
The identifier of the track after which the new track
|
||||
was inserted. The path
|
||||
<literal>/org/mpris/MediaPlayer2/TrackList/NoTrack</literal>
|
||||
indicates that the track was inserted at the
|
||||
start of the track list.
|
||||
</p>
|
||||
</tp:docstring>
|
||||
</arg>
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>Indicates that a track has been added to the track list.</p>
|
||||
</tp:docstring>
|
||||
</signal>
|
||||
|
||||
<signal name="TrackRemoved" tp:name-for-bindings="Track_Removed">
|
||||
<arg type="o" tp:type="Track_Id" name="TrackId">
|
||||
<tp:docstring>
|
||||
<p>The identifier of the track being removed.</p>
|
||||
<p>
|
||||
<literal>/org/mpris/MediaPlayer2/TrackList/NoTrack</literal>
|
||||
is <em>not</em> a valid value for this argument.
|
||||
</p>
|
||||
</tp:docstring>
|
||||
</arg>
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>Indicates that a track has been removed from the track list.</p>
|
||||
</tp:docstring>
|
||||
</signal>
|
||||
|
||||
<signal name="TrackMetadataChanged" tp:name-for-bindings="Track_Metadata_Changed">
|
||||
<arg type="o" tp:type="Track_Id" name="TrackId">
|
||||
<tp:docstring>
|
||||
<p>The id of the track which metadata has changed.</p>
|
||||
<p>If the track id has changed, this will be the old value.</p>
|
||||
<p>
|
||||
<literal>/org/mpris/MediaPlayer2/TrackList/NoTrack</literal>
|
||||
is <em>not</em> a valid value for this argument.
|
||||
</p>
|
||||
</tp:docstring>
|
||||
</arg>
|
||||
<arg type="a{sv}" tp:type="Metadata_Map" name="Metadata">
|
||||
<tp:docstring>
|
||||
<p>The new track metadata.</p>
|
||||
<p>
|
||||
This must include a mpris:trackid entry. If the track id has
|
||||
changed, this will be the new value.
|
||||
</p>
|
||||
<p>See the type documentation for more details.</p>
|
||||
</tp:docstring>
|
||||
</arg>
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>
|
||||
Indicates that the metadata of a track in the tracklist has changed.
|
||||
</p>
|
||||
<p>
|
||||
This may indicate that a track has been replaced, in which case the
|
||||
mpris:trackid metadata entry is different from the TrackId argument.
|
||||
</p>
|
||||
</tp:docstring>
|
||||
</signal>
|
||||
|
||||
</interface>
|
||||
</node>
|
||||
<!-- vim:set sw=2 sts=2 et ft=xml: -->
|
198
core/dbus/org.mpris.MediaPlayer2.xml
Normal file
198
core/dbus/org.mpris.MediaPlayer2.xml
Normal file
|
@ -0,0 +1,198 @@
|
|||
<?xml version="1.0" ?>
|
||||
<node name="/Media_Player" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
|
||||
<interface name="org.mpris.MediaPlayer2">
|
||||
<annotation name="org.freedesktop.DBus.Property.EmitsChangedSignal" value="true"/>
|
||||
|
||||
<method name="Raise" tp:name-for-bindings="Raise">
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>
|
||||
Brings the media player's user interface to the front using any
|
||||
appropriate mechanism available.
|
||||
</p>
|
||||
<p>
|
||||
The media player may be unable to control how its user interface
|
||||
is displayed, or it may not have a graphical user interface at all.
|
||||
In this case, the <tp:member-ref>CanRaise</tp:member-ref> property is
|
||||
<strong>false</strong> and this method does nothing.
|
||||
</p>
|
||||
</tp:docstring>
|
||||
</method>
|
||||
|
||||
<method name="Quit" tp:name-for-bindings="Quit">
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>Causes the media player to stop running.</p>
|
||||
<p>
|
||||
The media player may refuse to allow clients to shut it down.
|
||||
In this case, the <tp:member-ref>CanQuit</tp:member-ref> property is
|
||||
<strong>false</strong> and this method does nothing.
|
||||
</p>
|
||||
<p>
|
||||
Note: Media players which can be D-Bus activated, or for which there is
|
||||
no sensibly easy way to terminate a running instance (via the main
|
||||
interface or a notification area icon for example) should allow clients
|
||||
to use this method. Otherwise, it should not be needed.
|
||||
</p>
|
||||
<p>If the media player does not have a UI, this should be implemented.</p>
|
||||
</tp:docstring>
|
||||
</method>
|
||||
|
||||
<property name="CanQuit" type="b" tp:name-for-bindings="Can_Quit" access="read">
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>
|
||||
If <strong>false</strong>, calling
|
||||
<tp:member-ref>Quit</tp:member-ref> will have no effect, and may
|
||||
raise a NotSupported error. If <strong>true</strong>, calling
|
||||
<tp:member-ref>Quit</tp:member-ref> will cause the media application
|
||||
to attempt to quit (although it may still be prevented from quitting
|
||||
by the user, for example).
|
||||
</p>
|
||||
</tp:docstring>
|
||||
</property>
|
||||
|
||||
<property name="Fullscreen" type="b" tp:name-for-bindings="Fullscreen" access="readwrite">
|
||||
<tp:added version="2.2" />
|
||||
<annotation name="org.mpris.MediaPlayer2.property.optional" value="true"/>
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>Whether the media player is occupying the fullscreen.</p>
|
||||
<p>
|
||||
This is typically used for videos. A value of <strong>true</strong>
|
||||
indicates that the media player is taking up the full screen.
|
||||
</p>
|
||||
<p>
|
||||
Media centre software may well have this value fixed to <strong>true</strong>
|
||||
</p>
|
||||
<p>
|
||||
If <tp:member-ref>CanSetFullscreen</tp:member-ref> is <strong>true</strong>,
|
||||
clients may set this property to <strong>true</strong> to tell the media player
|
||||
to enter fullscreen mode, or to <strong>false</strong> to return to windowed
|
||||
mode.
|
||||
</p>
|
||||
<p>
|
||||
If <tp:member-ref>CanSetFullscreen</tp:member-ref> is <strong>false</strong>,
|
||||
then attempting to set this property should have no effect, and may raise
|
||||
an error. However, even if it is <strong>true</strong>, the media player
|
||||
may still be unable to fulfil the request, in which case attempting to set
|
||||
this property will have no effect (but should not raise an error).
|
||||
</p>
|
||||
<tp:rationale>
|
||||
<p>
|
||||
This allows remote control interfaces, such as LIRC or mobile devices like
|
||||
phones, to control whether a video is shown in fullscreen.
|
||||
</p>
|
||||
</tp:rationale>
|
||||
</tp:docstring>
|
||||
</property>
|
||||
|
||||
<property name="CanSetFullscreen" type="b" tp:name-for-bindings="Can_Set_Fullscreen" access="read">
|
||||
<tp:added version="2.2" />
|
||||
<annotation name="org.mpris.MediaPlayer2.property.optional" value="true"/>
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>
|
||||
If <strong>false</strong>, attempting to set
|
||||
<tp:member-ref>Fullscreen</tp:member-ref> will have no effect, and may
|
||||
raise an error. If <strong>true</strong>, attempting to set
|
||||
<tp:member-ref>Fullscreen</tp:member-ref> will not raise an error, and (if it
|
||||
is different from the current value) will cause the media player to attempt to
|
||||
enter or exit fullscreen mode.
|
||||
</p>
|
||||
<p>
|
||||
Note that the media player may be unable to fulfil the request.
|
||||
In this case, the value will not change. If the media player knows in
|
||||
advance that it will not be able to fulfil the request, however, this
|
||||
property should be <strong>false</strong>.
|
||||
</p>
|
||||
<tp:rationale>
|
||||
<p>
|
||||
This allows clients to choose whether to display controls for entering
|
||||
or exiting fullscreen mode.
|
||||
</p>
|
||||
</tp:rationale>
|
||||
</tp:docstring>
|
||||
</property>
|
||||
|
||||
<property name="CanRaise" type="b" tp:name-for-bindings="Can_Raise" access="read">
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>
|
||||
If <strong>false</strong>, calling
|
||||
<tp:member-ref>Raise</tp:member-ref> will have no effect, and may
|
||||
raise a NotSupported error. If <strong>true</strong>, calling
|
||||
<tp:member-ref>Raise</tp:member-ref> will cause the media application
|
||||
to attempt to bring its user interface to the front, although it may
|
||||
be prevented from doing so (by the window manager, for example).
|
||||
</p>
|
||||
</tp:docstring>
|
||||
</property>
|
||||
|
||||
<property name="HasTrackList" type="b" tp:name-for-bindings="Has_TrackList" access="read">
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>
|
||||
Indicates whether the <strong>/org/mpris/MediaPlayer2</strong>
|
||||
object implements the <strong>org.mpris.MediaPlayer2.TrackList</strong>
|
||||
interface.
|
||||
</p>
|
||||
</tp:docstring>
|
||||
</property>
|
||||
|
||||
<property name="Identity" type="s" tp:name-for-bindings="Identity" access="read">
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>A friendly name to identify the media player to users.</p>
|
||||
<p>This should usually match the name found in .desktop files</p>
|
||||
<p>(eg: "VLC media player").</p>
|
||||
</tp:docstring>
|
||||
</property>
|
||||
|
||||
<property name="DesktopEntry" type="s" tp:name-for-bindings="Desktop_Entry" access="read">
|
||||
<annotation name="org.mpris.MediaPlayer2.property.optional" value="true"/>
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>The basename of an installed .desktop file which complies with the <a href="http://standards.freedesktop.org/desktop-entry-spec/latest/">Desktop entry specification</a>,
|
||||
with the ".desktop" extension stripped.</p>
|
||||
<p>
|
||||
Example: The desktop entry file is "/usr/share/applications/vlc.desktop",
|
||||
and this property contains "vlc"
|
||||
</p>
|
||||
</tp:docstring>
|
||||
</property>
|
||||
|
||||
<property name="SupportedUriSchemes" type="as" tp:name-for-bindings="Supported_Uri_Schemes" access="read">
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>
|
||||
The URI schemes supported by the media player.
|
||||
</p>
|
||||
<p>
|
||||
This can be viewed as protocols supported by the player in almost
|
||||
all cases. Almost every media player will include support for the
|
||||
"file" scheme. Other common schemes are "http" and "rtsp".
|
||||
</p>
|
||||
<p>
|
||||
Note that URI schemes should be lower-case.
|
||||
</p>
|
||||
<tp:rationale>
|
||||
<p>
|
||||
This is important for clients to know when using the editing
|
||||
capabilities of the Playlist interface, for example.
|
||||
</p>
|
||||
</tp:rationale>
|
||||
</tp:docstring>
|
||||
</property>
|
||||
|
||||
<property name="SupportedMimeTypes" type="as" tp:name-for-bindings="Supported_Mime_Types" access="read">
|
||||
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>
|
||||
The mime-types supported by the media player.
|
||||
</p>
|
||||
<p>
|
||||
Mime-types should be in the standard format (eg: audio/mpeg or
|
||||
application/ogg).
|
||||
</p>
|
||||
<tp:rationale>
|
||||
<p>
|
||||
This is important for clients to know when using the editing
|
||||
capabilities of the Playlist interface, for example.
|
||||
</p>
|
||||
</tp:rationale>
|
||||
</tp:docstring>
|
||||
</property>
|
||||
|
||||
</interface>
|
||||
</node>
|
||||
<!-- vim:set sw=2 sts=2 et ft=xml: -->
|
|
@ -1,2 +0,0 @@
|
|||
message(Including $$_FILE_ from $$IN_PWD)
|
||||
INCLUDEPATH += $$IN_PWD/include
|
77
core/doc/contributing.md
Normal file
77
core/doc/contributing.md
Normal file
|
@ -0,0 +1,77 @@
|
|||
\page contributing Contributing
|
||||
\brief All resources for (potential) contributors
|
||||
|
||||
This page should contain all resources for people who'd like to contribute to the project.
|
||||
If that happens to be you, thank you for considering to contribute to this project!
|
||||
This page will describe how the process goes, what code style this project uses and more useful information.
|
||||
|
||||
# Development process
|
||||
Development happens at [GitHub](https://github.com/heartfin/harbour-sailfin).
|
||||
Currently, both the library Jellyfin-Qt and the [Sailfish OS](https://sailfishos.org) app named Sailfin are developed in the same repository.
|
||||
|
||||
## Create or find an issue to work on
|
||||
If you want to contribute code, please check if an issue exists.
|
||||
Otherwise, create an issue describing what feature you'd like to develop before creating a merge request.
|
||||
|
||||
## Start working on your code
|
||||
Clone the git repo and create a new branch.
|
||||
If you have commit access to the repository, please create a branch in the form of `<issue-number>-<issue-title>`.
|
||||
For example, `36-control-remote-jellyfin-sessions`.
|
||||
|
||||
Now you can start writing your code and create commits.
|
||||
Please create focussed commits, that is, do not commit anything not related to the issue you are working on.
|
||||
Also state what you're changing in the commit message and add an entry in the file `rpm/harbour-sailfin.changes`.
|
||||
|
||||
If this is your first time contributing to the project, don't be shy and feel free to add your name to the contributors list in `sailfish/qml/pages/AboutPage.qml`!
|
||||
|
||||
## Submit a merge request
|
||||
Now that you have finalised your commit, you can create a merge request on the repository.
|
||||
Make sure that you have followed the contribution guidelines on this page.
|
||||
Someone will review it and if all is good, they will merge it in.
|
||||
|
||||
Congratulations on your contribution!
|
||||
|
||||
# Code style guidelines
|
||||
The code should follow the [Sailfish OS Code Conventions](https://docs.sailfishos.org/Develop/Apps/Coding_Conventions/) with the following exceptions:
|
||||
|
||||
## Exceptions for C++
|
||||
- Put curly braces on the same line as the declaration, example:
|
||||
```cpp
|
||||
int foo() {
|
||||
// implementation
|
||||
}
|
||||
```
|
||||
instead of
|
||||
```cpp
|
||||
int foo()
|
||||
{
|
||||
// implementation
|
||||
}
|
||||
```
|
||||
Rationale: I hate pressing enter and am used to the former. Moreover, it is already all over the place. Bad rationale, I know.
|
||||
|
||||
- Close namespace brackets with a comment in the form `// NS Jellyfin`, example:
|
||||
```cpp
|
||||
namespace Jellyfin {
|
||||
namespace Nested {
|
||||
// Content
|
||||
} // NS Nested
|
||||
} // NS Jellyfin
|
||||
```
|
||||
Rationale: Easy to know what namespace the bracket closes, since namespaces tend to span over large portions of a file.
|
||||
|
||||
- Use include guards in the form of `NAMESPACE_CLASSNAME_H`. Example:
|
||||
```cpp
|
||||
#ifndef JELLYFIN_MODEL_USER_H
|
||||
#define JELLYFIN_MODEL_USER_H
|
||||
namespace Jellyfin {
|
||||
namespace Model {
|
||||
|
||||
class User {
|
||||
// Methods etc
|
||||
};
|
||||
|
||||
} // NS Model
|
||||
} // NS Jellyfin
|
||||
```
|
||||
|
15
core/doc/custom.css
Normal file
15
core/doc/custom.css
Normal file
|
@ -0,0 +1,15 @@
|
|||
html {
|
||||
--primary-color: #be48d6;
|
||||
--primary-dark-color: #7a2e89;
|
||||
--primary-light-color #e256ff;
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
html:not(.light-mode) {
|
||||
--primary-color: #be48d6;
|
||||
--primary-dark-color: #7a2e89;
|
||||
--primary-light-color #e256ff;
|
||||
}
|
||||
}
|
||||
|
||||
|
5
core/doc/guide/apimodel-loader.md
Normal file
5
core/doc/guide/apimodel-loader.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
\page guide-apimodel-loader ApiModel and Loaders
|
||||
\brief This will give an overview of how the ApiModel and Loaders interact.
|
||||
|
||||
\todo
|
||||
This guide should still be written
|
73
core/doc/guide/getting-started.md
Normal file
73
core/doc/guide/getting-started.md
Normal file
|
@ -0,0 +1,73 @@
|
|||
\page guide-getting-started Getting Started
|
||||
\brief Installation procedure and first application using this library
|
||||
|
||||
This is a tutorial on how to use Jellyfin Qt library.
|
||||
|
||||
## Project setup
|
||||
|
||||
The library works as [a QML plugin](https://doc.qt.io/archives/qt-5.6/qqmlextensionplugin.html).
|
||||
Compile the library, install it in the QML plugin path and add a qmldir file like this:
|
||||
|
||||
```
|
||||
module nl.netsoj.chris.Jellyfin
|
||||
plugin JellyfinQt
|
||||
```
|
||||
|
||||
You should then be able to import it in your QML files.
|
||||
|
||||
|
||||
```qml
|
||||
import nl.netsoj.chris.Jellyfin
|
||||
```
|
||||
|
||||
\note
|
||||
In the documentation, the URI nl.netsoj.chris.Jellyfin will be used.
|
||||
If you deviate from this, make sure to put the plugin in the correct location,
|
||||
as well as using the correct import statements in QML.
|
||||
|
||||
## Hello Jellyfin!
|
||||
|
||||
The first step for interacting with the library is setting up an \ref Jellyfin::ApiClient.
|
||||
This object handles authentication.
|
||||
|
||||
|
||||
|
||||
\warning
|
||||
The way authentication works using ApiClient will change before the next major release to support multiple accounts! See \issue{4}
|
||||
|
||||
Lets create an instance of ApiClient that is reachable from everywhere, by putting it in the ApplicationWindow:
|
||||
|
||||
```qml
|
||||
import nl.netsoj.chris.Jellyfin as JF
|
||||
import QtQuick 2.0 as QQ
|
||||
|
||||
QQ.ApplicationWindow {
|
||||
readonly property JF.ApiClient apiClient: _apiClient
|
||||
|
||||
JF.ApiClient {
|
||||
id: _apiClient
|
||||
appName: "The name of your client"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
\note
|
||||
As an alternative, you could create a QML file only containing the ApiClient and [declaring it as a Singleton](https://doc.qt.io/archives/qt-5.6/qtqml-modules-qmldir.html#contents-of-a-module-definition-qmldir-file)
|
||||
|
||||
## Authentication
|
||||
If the user already has logged in and the credentials are stored, this is quite easy:
|
||||
the \ref Jellyfin::ApiClient::authenticated "authenticated" property will change to true and the corresponding signal will fire.
|
||||
You don't have to do anything else!
|
||||
|
||||
When the user never has logged in, the signal \ref Jellyfin::ApiClient::setupRequired "setupRequired()" will be fired.
|
||||
When this happens, you should let the user enter a server URL and set it as the \ref Jellyfin::ApiClient::baseUrl "baseUrl" property.
|
||||
You can get a list model of servers in the local network using the \ref Jellyfin::ServerDiscoveryModel.
|
||||
|
||||
After the \ref Jellyfin::ApiClient::baseUrl "baseUrl" property has been set, the slot \ref Jellyfin::ApiClient::authenticate "authenticate" should be called with an username and password.
|
||||
When authentication was successful, the property \ref Jellyfin::ApiClient::authenticated "authenticated" will be changed to true.
|
||||
Otherwise, the signal \ref Jellyfin::ApiClient::authenticationError "authenticationError" will be fired.
|
||||
|
||||
\note
|
||||
To show a list of available users, one can use the \ref Jellyfin::ViewModel::UserModel "UserModel" and \ref Jellyfin::ViewModel::PublicUsersLoader "PublicUsersLoader".
|
||||
However, this requires knowledge of the Loader and Model system, which will be explained in the next chapter \ref guide-apimodel-loader
|
||||
|
10
core/doc/guides.md
Normal file
10
core/doc/guides.md
Normal file
|
@ -0,0 +1,10 @@
|
|||
\page guides Usage guides
|
||||
|
||||
\brief All guides intended for developers working with this library.
|
||||
|
||||
All guides assume familiarity with QML. If you aren't, [the free online QML book](https://www.qt.io/product/qt6/qml-book) is a great place to start.
|
||||
Note that this book is written for Qt 6 QML, while this project is using Qt 5 QML.
|
||||
The differences between those versions are not large, so it still is a valuable resource.
|
||||
|
||||
* \subpage guide-getting-started
|
||||
* \subpage guide-apimodel-loader
|
11
core/doc/mainpage.md
Normal file
11
core/doc/mainpage.md
Normal file
|
@ -0,0 +1,11 @@
|
|||
\mainpage
|
||||
|
||||
\note
|
||||
This page is aimed at developers. If you are interested in using a Jellyfin application, please visit the [main website](https://heartfin.github.io/).
|
||||
|
||||
This is the documentation page for the Jellyfin Qt library, a library for the [Qt framework](https://qt.io/) for interacting with the [Jellyfin media server](https://jellyfin.org).
|
||||
This project is not affiliated with the Jellyfin project.
|
||||
|
||||
If you are planning on using this projects, see \ref guides for usage instructions and the reference documentation in the sidebar.
|
||||
|
||||
If you'd like to contribute code, see \ref contributing for the process and style guidelines.
|
4
core/doc/namespace/dto.dox
Normal file
4
core/doc/namespace/dto.dox
Normal file
|
@ -0,0 +1,4 @@
|
|||
/**
|
||||
* \namespace Jellyfin::DTO
|
||||
* \brief Contains auto-generated Data Transfer Objects for the Jellyfin HTTP API
|
||||
*/
|
4
core/doc/namespace/viewmodel.dox
Normal file
4
core/doc/namespace/viewmodel.dox
Normal file
|
@ -0,0 +1,4 @@
|
|||
/**
|
||||
* \namespace Jellyfin::ViewModel
|
||||
* \brief Contains all types exposed to QML
|
||||
*/
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Sailfin: a Jellyfin client written using Qt
|
||||
Copyright (C) 2020 Chris Josten
|
||||
Copyright (C) 2021 Chris Josten
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
|
@ -28,6 +28,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|||
|
||||
#include <QHostInfo>
|
||||
#include <QObject>
|
||||
#include <QQmlListProperty>
|
||||
#include <QQmlParserStatus>
|
||||
#include <QScopedPointer>
|
||||
#include <QString>
|
||||
#include <QSysInfo>
|
||||
#include <QtQml>
|
||||
|
@ -36,14 +39,29 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|||
#include <QNetworkReply>
|
||||
#include <QUrlQuery>
|
||||
|
||||
#include "dto/generalcommandtype.h"
|
||||
#include "credentialmanager.h"
|
||||
#include "jellyfindeviceprofile.h"
|
||||
#include "jellyfinitem.h"
|
||||
#include "jellyfinwebsocket.h"
|
||||
#include "model/controllablesession.h"
|
||||
#include "model/deviceprofile.h"
|
||||
#include "eventbus.h"
|
||||
|
||||
namespace Jellyfin {
|
||||
class MediaSource;
|
||||
class PlaybackManager;
|
||||
class WebSocket;
|
||||
|
||||
namespace ViewModel {
|
||||
class Settings;
|
||||
}
|
||||
|
||||
namespace DTO {
|
||||
class UserItemDataDto; // Keep it as an opaque pointer
|
||||
using UserData = UserItemDataDto;
|
||||
}
|
||||
|
||||
using namespace DTO;
|
||||
|
||||
class ApiClientPrivate;
|
||||
|
||||
/**
|
||||
* @brief An Api client for Jellyfin. Handles requests and authentication.
|
||||
*
|
||||
|
@ -69,31 +87,42 @@ class WebSocket;
|
|||
*
|
||||
* These steps might change. I'm considering decoupling CredentialsManager from this class to clean some code up.
|
||||
*/
|
||||
class ApiClient : public QObject {
|
||||
class ApiClient : public QObject, public QQmlParserStatus {
|
||||
friend class WebSocket;
|
||||
friend class PlaybackManager;
|
||||
Q_OBJECT
|
||||
Q_INTERFACES(QQmlParserStatus)
|
||||
Q_DECLARE_PRIVATE(ApiClient);
|
||||
public:
|
||||
explicit ApiClient(QObject *parent = nullptr);
|
||||
Q_PROPERTY(QString baseUrl MEMBER m_baseUrl READ baseUrl NOTIFY baseUrlChanged)
|
||||
virtual ~ApiClient();
|
||||
Q_PROPERTY(QString baseUrl READ baseUrl WRITE setBaseUrl NOTIFY baseUrlChanged)
|
||||
Q_PROPERTY(QString appName READ appName WRITE setAppName NOTIFY appNameChanged)
|
||||
Q_PROPERTY(Jellyfin::Model::DeviceTypeClass::Value deviceType READ deviceType WRITE setDeviceType NOTIFY deviceTypeChanged)
|
||||
Q_PROPERTY(bool authenticated READ authenticated WRITE setAuthenticated NOTIFY authenticatedChanged)
|
||||
Q_PROPERTY(QString userId READ userId NOTIFY userIdChanged)
|
||||
Q_PROPERTY(QJsonObject deviceProfile READ deviceProfileJson NOTIFY deviceProfileChanged)
|
||||
Q_PROPERTY(QString version READ version)
|
||||
Q_PROPERTY(Jellyfin::EventBus *eventbus READ eventbus FINAL)
|
||||
Q_PROPERTY(Jellyfin::WebSocket *websocket READ websocket FINAL)
|
||||
Q_PROPERTY(QVariantList supportedCommands READ supportedCommands WRITE setSupportedCommands NOTIFY supportedCommandsChanged)
|
||||
Q_PROPERTY(Jellyfin::ViewModel::Settings *settings READ settings NOTIFY settingsChanged)
|
||||
/**
|
||||
* Wether this ApiClient operates in "online mode".
|
||||
*
|
||||
* When operating in offline mode, this client will not make network requests and only use a local cache, making
|
||||
* certain features unavailable.
|
||||
*/
|
||||
Q_PROPERTY(bool online READ online NOTIFY onlineChanged)
|
||||
|
||||
/*QNetworkReply *handleRequest(QString path, QStringList sort, Pagination *pagination,
|
||||
QVariantMap filters, QStringList fields, QStringList expand, QString id);*/
|
||||
|
||||
bool authenticated() const { return m_authenticated; }
|
||||
void setBaseUrl(QString url) {
|
||||
this->m_baseUrl = url;
|
||||
if (this->m_baseUrl.endsWith("/")) {
|
||||
this->m_baseUrl.chop(1);
|
||||
}
|
||||
emit this->baseUrlChanged(m_baseUrl);
|
||||
}
|
||||
bool authenticated() const;
|
||||
void setBaseUrl(const QString &url);
|
||||
void setAppName(const QString &appName);
|
||||
void setDeviceType(Model::DeviceType deviceType);
|
||||
|
||||
QNetworkReply *get(const QString &path, const QUrlQuery ¶ms = QUrlQuery());
|
||||
QNetworkReply *post(const QString &path, const QJsonDocument &data = QJsonDocument(), const QUrlQuery ¶ms = QUrlQuery());
|
||||
void getPublicUsers();
|
||||
QNetworkReply *post(const QString &path, const QJsonDocument &data, const QUrlQuery ¶ms = QUrlQuery());
|
||||
QNetworkReply *post(const QString &path, const QByteArray &data = QByteArray(), const QUrlQuery ¶ms = QUrlQuery());
|
||||
|
||||
enum ApiError {
|
||||
JSON_ERROR,
|
||||
|
@ -101,12 +130,39 @@ public:
|
|||
UNEXPECTED_STATUS,
|
||||
INVALID_PASSWORD
|
||||
};
|
||||
Q_ENUM(ApiError)
|
||||
|
||||
QString &baseUrl() { return this->m_baseUrl; }
|
||||
QString &userId() { return m_userId; }
|
||||
QJsonObject &deviceProfile() { return m_deviceProfile; }
|
||||
QJsonObject &playbackDeviceProfile() { return m_playbackDeviceProfile; }
|
||||
const QString &baseUrl() const;
|
||||
const QString &appName() const;
|
||||
const QString &userId() const;
|
||||
const QString &deviceId() const;
|
||||
Model::DeviceType deviceType() const;
|
||||
/**
|
||||
* @brief QML applications can set this type to indicate which commands they support.
|
||||
*
|
||||
* These commands can be sent by other Jellyfin clients to instruct this Jellyfin client to play a
|
||||
* certain item, control playback and so on.
|
||||
*
|
||||
* This property must be set before restoreSavedSession() is called and not be changed afterwards.
|
||||
* The list support commands will be sent to the Jellyfin server. QML applications should listen to
|
||||
* the events emitted by the eventBus and act accordingly.
|
||||
*/
|
||||
QVariantList supportedCommands() const ;
|
||||
void setSupportedCommands(QVariantList newSupportedCommands);
|
||||
const QJsonObject deviceProfileJson() const;
|
||||
QSharedPointer<DTO::DeviceProfile> deviceProfile() const;
|
||||
const QJsonObject clientCapabilities() const;
|
||||
/**
|
||||
* @brief Retrieves the authentication token. Null QString if not authenticated.
|
||||
* @note This is not the full authentication header, just the token.
|
||||
*/
|
||||
const QString &token() const;
|
||||
QString version() const;
|
||||
bool online() const;
|
||||
|
||||
EventBus *eventbus() const;
|
||||
WebSocket *websocket() const;
|
||||
ViewModel::Settings * settings() const;
|
||||
|
||||
/**
|
||||
* @brief Sets the error handler of a reply to this classes default error handler
|
||||
|
@ -116,8 +172,12 @@ public:
|
|||
* funky casts.
|
||||
*/
|
||||
void setDefaultErrorHandler(QNetworkReply *rep) {
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)
|
||||
connect(rep, &QNetworkReply::errorOccurred, this, &ApiClient::defaultNetworkErrorHandler);
|
||||
#else
|
||||
connect(rep, static_cast<void (QNetworkReply::*)(QNetworkReply::NetworkError)>(&QNetworkReply::error),
|
||||
this, &ApiClient::defaultNetworkErrorHandler);
|
||||
#endif
|
||||
}
|
||||
signals:
|
||||
/*
|
||||
|
@ -133,6 +193,8 @@ signals:
|
|||
|
||||
void authenticatedChanged(bool authenticated);
|
||||
void baseUrlChanged(const QString &baseUrl);
|
||||
void appNameChanged(const QString &newAppName);
|
||||
void settingsChanged();
|
||||
|
||||
/**
|
||||
* @brief Set-up is required. You'll need to manually set up the baseUrl-property, call setupConnection
|
||||
|
@ -142,8 +204,19 @@ signals:
|
|||
|
||||
void userIdChanged(QString userId);
|
||||
|
||||
void itemFetched(const QString &itemId, const QJsonObject &result);
|
||||
void itemFetchFailed(const QString &itemId, const QNetworkReply::NetworkError error);
|
||||
void deviceProfileChanged();
|
||||
void deviceTypeChanged();
|
||||
|
||||
void supportedCommandsChanged();
|
||||
void onlineChanged();
|
||||
/**
|
||||
* @brief Emitted after submitQuickConnectCode succeeded
|
||||
*/
|
||||
void quickConnectAccepted();
|
||||
/**
|
||||
* @brief Emitted after submitQuickConnectCode failed
|
||||
*/
|
||||
void quickConnectRejected();
|
||||
|
||||
/**
|
||||
* @brief onUserDataChanged Emitted when the user data of an item is changed on the server.
|
||||
|
@ -151,8 +224,9 @@ signals:
|
|||
* @param userData The new user data
|
||||
*
|
||||
* Note: only Jellyfin::UserData should connect to this signal, they will update themselves!
|
||||
* Note: the userData is only valid during this callback, afterwards it is deleted!
|
||||
*/
|
||||
void userDataChanged(const QString &itemId, QSharedPointer<UserData> userData);
|
||||
void userDataChanged(const QString &itemId, UserData *userData);
|
||||
|
||||
public slots:
|
||||
/**
|
||||
|
@ -167,14 +241,13 @@ public slots:
|
|||
*/
|
||||
void setupConnection();
|
||||
void authenticate(QString username, QString password, bool storeCredentials = false);
|
||||
void submitQuickConnectCode(const QString &code);
|
||||
|
||||
/**
|
||||
* @brief Logs the user out and clears the session.
|
||||
*/
|
||||
void deleteSession();
|
||||
|
||||
void fetchItem(const QString &id);
|
||||
|
||||
/**
|
||||
* @brief Shares the capabilities of this device to the server.
|
||||
*/
|
||||
|
@ -183,7 +256,13 @@ public slots:
|
|||
|
||||
protected slots:
|
||||
void defaultNetworkErrorHandler(QNetworkReply::NetworkError error);
|
||||
void onUserDataChanged(const QString &itemId, QSharedPointer<UserData> newData);
|
||||
void onUserDataChanged(const QString &itemId, UserData *newData);
|
||||
void credManagerServersListed(QStringList users);
|
||||
void credManagerUsersListed(const QString &server, QStringList users);
|
||||
void credManagerTokenRetrieved(const QString &server, const QString &user, const QString &token);
|
||||
|
||||
void classBegin() override;
|
||||
void componentComplete() override;
|
||||
|
||||
protected:
|
||||
/**
|
||||
|
@ -191,13 +270,13 @@ protected:
|
|||
* @param request The request to add headers to
|
||||
* @param path The path to which the request is being made
|
||||
*/
|
||||
void addBaseRequestHeaders(QNetworkRequest &request, const QString &path, const QUrlQuery ¶ms = QUrlQuery());
|
||||
void addBaseRequestHeaders(QNetworkRequest &request, const QString &path, const QUrlQuery ¶ms = QUrlQuery()) const;
|
||||
|
||||
/**
|
||||
* @brief Adds the authorization to the header
|
||||
* @param The request to add the header to
|
||||
*/
|
||||
void addTokenHeader(QNetworkRequest &request);
|
||||
void addTokenHeader(QNetworkRequest &request) const;
|
||||
|
||||
/**
|
||||
* @brief getBrandingConfiguration Gets the login message and custom CSS (which we ignore)
|
||||
|
@ -213,49 +292,26 @@ protected:
|
|||
*/
|
||||
void generateDeviceProfile();
|
||||
|
||||
QString &token() { return m_token; }
|
||||
|
||||
private:
|
||||
QScopedPointer<ApiClientPrivate> d_ptr;
|
||||
QNetworkAccessManager m_naManager;
|
||||
/*
|
||||
* State information
|
||||
*/
|
||||
WebSocket *m_webSocket;
|
||||
CredentialsManager * m_credManager;
|
||||
QString m_token;
|
||||
QString m_deviceName;
|
||||
QString m_deviceId;
|
||||
QString m_userId = "";
|
||||
QJsonObject m_deviceProfile;
|
||||
QJsonObject m_playbackDeviceProfile;
|
||||
|
||||
bool m_authenticated = false;
|
||||
/**
|
||||
* @brief The base url of the request.
|
||||
*/
|
||||
QString m_baseUrl;
|
||||
|
||||
/*
|
||||
* Setters
|
||||
*/
|
||||
|
||||
void setAuthenticated(bool authenticated);
|
||||
|
||||
void setUserId(QString userId) {
|
||||
this->m_userId = userId;
|
||||
emit userIdChanged(userId);
|
||||
}
|
||||
|
||||
/*
|
||||
* Utilities
|
||||
*/
|
||||
void setUserId(const QString &userId);
|
||||
|
||||
/**
|
||||
* @brief Returns the statusCode of a QNetworkReply
|
||||
* @param The reply to obtain the statusCode of
|
||||
* @return The statuscode of the reply
|
||||
*
|
||||
* Seriously, Qt, why is your method to obtain the status code of a request so horrendous?
|
||||
* Seriously, Qt, why is your method to obtain the status code of a request so tedious?
|
||||
* It could've just been a rep->statusCode();
|
||||
*/
|
||||
static inline int statusCode(QNetworkReply *rep) {
|
||||
return rep->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt();
|
565
core/include/JellyfinQt/apimodel.h
Normal file
565
core/include/JellyfinQt/apimodel.h
Normal file
|
@ -0,0 +1,565 @@
|
|||
/*
|
||||
Sailfin: a Jellyfin client written using Qt
|
||||
Copyright (C) 2021 Chris Josten
|
||||
|
||||
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
|
||||
*/
|
||||
|
||||
#ifndef JELLYFIN_API_MODEL
|
||||
#define JELLYFIN_API_MODEL
|
||||
|
||||
#include <optional>
|
||||
#include <typeinfo>
|
||||
|
||||
#include <QAbstractListModel>
|
||||
#include <QFlags>
|
||||
#include <QFuture>
|
||||
#include <QFutureWatcher>
|
||||
#include <QMetaEnum>
|
||||
#include <QJsonArray>
|
||||
#include <QJsonDocument>
|
||||
#include <QJsonValue>
|
||||
#include <QtConcurrent/QtConcurrent>
|
||||
#include <QtQml>
|
||||
#include <QQmlParserStatus>
|
||||
#include <QVariant>
|
||||
|
||||
#include "apiclient.h"
|
||||
#include "jsonhelper.h"
|
||||
|
||||
#include "dto/baseitemdto.h"
|
||||
#include "dto/userdto.h"
|
||||
#include "dto/useritemdatadto.h"
|
||||
#include "dto/baseitemdtoqueryresult.h"
|
||||
#include "loader/requesttypes.h"
|
||||
#include "support/loader.h"
|
||||
#include "viewmodel/modelstatus.h"
|
||||
|
||||
Q_DECLARE_LOGGING_CATEGORY(jellyfinApiModel)
|
||||
|
||||
namespace Jellyfin {
|
||||
|
||||
/*
|
||||
* A brief description of this file:
|
||||
*
|
||||
* The reason why all of this is this complex is because Qt MOC's lack of support for template classes
|
||||
* with Q_OBJECT. To work around this, "base classes", such as BaseModelLoader, are created which contain
|
||||
* all functionallity required by Q_OBJECT. This class is extended by the templated class, which in turn
|
||||
* is extended once more, so it can be registered for the QML engine.
|
||||
*
|
||||
* The loading of the data has beens separated from the QAbstractModels into ViewModel::Loaders
|
||||
* to allow for loading over the network, loading from the cache and so on, without the QAbstractModel
|
||||
* knowing anything about how it's done, except for the parameters it can pass to the loader and the result.
|
||||
*
|
||||
*/
|
||||
|
||||
class BaseModelLoader : public QObject, public QQmlParserStatus {
|
||||
Q_INTERFACES(QQmlParserStatus)
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit BaseModelLoader(QObject *parent = nullptr);
|
||||
Q_PROPERTY(ApiClient *apiClient READ apiClient WRITE setApiClient NOTIFY apiClientChanged)
|
||||
Q_PROPERTY(Jellyfin::ViewModel::ModelStatusClass::Value status READ status NOTIFY statusChanged)
|
||||
Q_PROPERTY(int limit READ limit WRITE setLimit NOTIFY limitChanged)
|
||||
Q_PROPERTY(bool autoReload READ autoReload WRITE setAutoReload NOTIFY autoReloadChanged)
|
||||
|
||||
ApiClient *apiClient() const { return m_apiClient; }
|
||||
void setApiClient(ApiClient *newApiClient);
|
||||
|
||||
int limit() const { return m_limit; }
|
||||
void setLimit(int newLimit);
|
||||
bool autoReload() const { return m_autoReload; }
|
||||
void setAutoReload(bool newAutoReload);
|
||||
|
||||
ViewModel::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;
|
||||
|
||||
void autoReloadIfNeeded();
|
||||
signals:
|
||||
void ready();
|
||||
void apiClientChanged(ApiClient *newApiClient);
|
||||
void statusChanged();
|
||||
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:
|
||||
// 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;
|
||||
bool m_manualLimitSet = false;
|
||||
|
||||
// Query/record controlling properties
|
||||
int m_limit = -1;
|
||||
int m_startIndex = 0;
|
||||
int m_totalRecordCount = 0;
|
||||
bool m_explicitLimitSet = false;
|
||||
const int DEFAULT_LIMIT = 100;
|
||||
void emitModelShouldClear() { emit modelShouldClear(); }
|
||||
void emitItemsLoaded() { emit itemsLoaded(); }
|
||||
|
||||
ViewModel::ModelStatus m_status = ViewModel::ModelStatus::Uninitialised;
|
||||
void setStatus(ViewModel::ModelStatus newStatus) {
|
||||
if (this->m_status != newStatus) {
|
||||
this->m_status = newStatus;
|
||||
emit this->statusChanged();
|
||||
if (this->m_status == ViewModel::ModelStatus::Ready) {
|
||||
emit ready();
|
||||
}
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @brief Determines if this model is able to reload.
|
||||
*
|
||||
* The default implementation checks if the user is authenticated,
|
||||
* and the model is not reloading. If overriding this method, please
|
||||
* call this method as well in determining if the model should be reloadable.
|
||||
*
|
||||
* @return True if the model can reload, false otherwise.
|
||||
*/
|
||||
virtual bool canReload() const;
|
||||
};
|
||||
|
||||
/**
|
||||
* Base model loader that only has one template parameter,
|
||||
* so it can be used within the ApiModel.
|
||||
*/
|
||||
template <class T>
|
||||
class ModelLoader : public BaseModelLoader {
|
||||
public:
|
||||
ModelLoader(QObject *parent = nullptr)
|
||||
: BaseModelLoader(parent) {
|
||||
}
|
||||
|
||||
void reload() override {
|
||||
if (!canReload()) {
|
||||
return;
|
||||
}
|
||||
m_startIndex = 0;
|
||||
m_totalRecordCount = -1;
|
||||
emitModelShouldClear();
|
||||
loadMore(ViewModel::ModelStatus::Loading);
|
||||
}
|
||||
|
||||
void loadMore() {
|
||||
if (!canReload()) {
|
||||
return;
|
||||
}
|
||||
loadMore(ViewModel::ModelStatus::LoadingMore);
|
||||
}
|
||||
|
||||
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:
|
||||
/**
|
||||
* @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 suggestedStatus The suggested status this model should take on if it is able to load (more).
|
||||
* Either LOADING or LOAD_MORE.
|
||||
*/
|
||||
virtual void loadMore(ViewModel::ModelStatus suggestedStatus) = 0;
|
||||
std::pair<QList<T*>, int> m_result;
|
||||
};
|
||||
|
||||
/**
|
||||
* Template to extract records from the given result.
|
||||
*/
|
||||
template <class T, class R>
|
||||
QList<T> extractRecords(const R &result) {
|
||||
Q_UNUSED(result)
|
||||
qDebug() << "extractRecords not implemented for type " << typeid(R).name();
|
||||
return QList<T>();
|
||||
}
|
||||
|
||||
template <class R>
|
||||
int extractTotalRecordCount(const R &result) {
|
||||
Q_UNUSED(result)
|
||||
qDebug() << "extractTotalRecourdCount not implemented for type " << typeid(R).name();
|
||||
return -1;
|
||||
}
|
||||
template <class P>
|
||||
void setRequestLimit(P ¶meters, int limit) {
|
||||
Q_UNUSED(parameters)
|
||||
Q_UNUSED(limit)
|
||||
qDebug() << "setRequestLimit not implemented for type " << typeid(P).name();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return True if able to set the startIndex, false otherwise.
|
||||
*/
|
||||
template <class P>
|
||||
bool setRequestStartIndex(P ¶meters, int startIndex) {
|
||||
Q_UNUSED(parameters)
|
||||
Q_UNUSED(startIndex)
|
||||
qDebug() << "setRequestStartIndex not implemented for type " << typeid(P).name();
|
||||
return false;
|
||||
}
|
||||
|
||||
#ifndef JELLYFIN_APIMODEL_CPP
|
||||
extern template bool setRequestStartIndex(Loader::GetUserViewsParams ¶ms, int startIndex);
|
||||
extern template void setRequestLimit(Loader::GetUserViewsParams ¶ms, int limit);
|
||||
extern template QList<DTO::BaseItemDto> extractRecords(const DTO::BaseItemDtoQueryResult &result);
|
||||
extern template int extractTotalRecordCount(const DTO::BaseItemDtoQueryResult &result);
|
||||
extern template QList<DTO::BaseItemDto> extractRecords(const QList<DTO::BaseItemDto> &result);
|
||||
extern template int extractTotalRecordCount(const QList<DTO::BaseItemDto> &result);
|
||||
extern template void setRequestLimit(Loader::GetLatestMediaParams ¶ms, int limit);
|
||||
extern template bool setRequestStartIndex(Loader::GetLatestMediaParams ¶ms, int offset);
|
||||
extern template void setRequestLimit(Loader::GetItemsByUserIdParams ¶ms, int limit);
|
||||
extern template bool setRequestStartIndex(Loader::GetItemsByUserIdParams ¶ms, int offset);
|
||||
extern template void setRequestLimit(Loader::GetResumeItemsParams ¶ms, int limit);
|
||||
extern template bool setRequestStartIndex(Loader::GetResumeItemsParams ¶ms, int offset);
|
||||
extern template void setRequestLimit(Loader::GetPublicUsersParams ¶ms, int limit);
|
||||
extern template bool setRequestStartIndex(Loader::GetPublicUsersParams ¶ms, int offset);
|
||||
extern template void setRequestLimit(Loader::GetNextUpParams ¶ms, int limit);
|
||||
extern template bool setRequestStartIndex(Loader::GetNextUpParams ¶ms, int offset);
|
||||
extern template void setRequestLimit(Loader::GetAlbumArtistsParams ¶ms, int limit);
|
||||
extern template bool setRequestStartIndex(Loader::GetAlbumArtistsParams ¶ms, int offset);
|
||||
|
||||
extern template QList<DTO::UserDto> extractRecords(const QList<DTO::UserDto> &result);
|
||||
extern template int extractTotalRecordCount(const QList<DTO::UserDto> &result);
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Template for implementing a loader for the given type, response and parameters using Jellyfin::Support:Loaders.
|
||||
*
|
||||
* @tparam T type of which this loader should load a list of
|
||||
* @tparam D type of the DTO which can be converted into T using T(const D&, ApiClient*);
|
||||
* @tparam R type of the deserialized loader response
|
||||
* @tparam P type of the deserialized loader request parameters
|
||||
*/
|
||||
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(QScopedPointer<Support::Loader<R, P>>(loader)) {
|
||||
this->connect(m_loader.data(), &Support::Loader<R, P>::ready, this, &LoaderModelLoader<T, D, R, P>::loaderReady);
|
||||
this->connect(m_loader.data(), &Support::Loader<R, P>::error, this, &LoaderModelLoader<T, D, R, P>::loaderError);
|
||||
}
|
||||
protected:
|
||||
void loadMore(ViewModel::ModelStatus suggestedModelStatus) 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_loader->isRunning()) {
|
||||
m_loader->cancel();
|
||||
}
|
||||
// Set an invalid result.
|
||||
this->m_result = { QList<T*>(), -1 };
|
||||
|
||||
if (!setRequestStartIndex<P>(this->m_parameters, this->m_startIndex)
|
||||
&& suggestedModelStatus == ViewModel::ModelStatus::LoadingMore) {
|
||||
// This loader's parameters does not setting a starting index,
|
||||
// meaning loadMore is not supported.
|
||||
return;
|
||||
}
|
||||
setRequestStartIndex<P>(this->m_parameters, this->m_startIndex);
|
||||
|
||||
if (suggestedModelStatus == ViewModel::ModelStatus::LoadingMore && this->m_explicitLimitSet) {
|
||||
// If an explicit limit is set, we should load no more
|
||||
return;
|
||||
}
|
||||
|
||||
qCDebug(jellyfinApiModel) << "Explicit limit set: " << this->m_explicitLimitSet << ", " << this->m_limit;
|
||||
if (this->m_explicitLimitSet) {
|
||||
setRequestLimit<P>(this->m_parameters, this->m_limit);
|
||||
} else {
|
||||
setRequestLimit<P>(this->m_parameters, this->DEFAULT_LIMIT);
|
||||
}
|
||||
this->setStatus(suggestedModelStatus);
|
||||
|
||||
// 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);
|
||||
this->m_loader->setParameters(this->m_parameters);
|
||||
this->m_loader->load();
|
||||
}
|
||||
|
||||
QScopedPointer<Support::Loader<R, P>> m_loader;
|
||||
P m_parameters;
|
||||
|
||||
void loaderReady() {
|
||||
try {
|
||||
R result = m_loader->result();
|
||||
QList<D> records = extractRecords<D, R>(result);
|
||||
int totalRecordCount = extractTotalRecordCount<R>(result);
|
||||
qDebug() << "Total record count: " << totalRecordCount << ", records in request: " << records.size();
|
||||
// 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.append(new T(records[i], m_loader->apiClient()));
|
||||
}
|
||||
this->setStatus(ViewModel::ModelStatus::Ready);
|
||||
this->m_result = { models, this->m_startIndex};
|
||||
this->m_startIndex += records.size();
|
||||
this->m_totalRecordCount = totalRecordCount;
|
||||
this->emitItemsLoaded();
|
||||
|
||||
} catch(QException &e) {
|
||||
qWarning() << "Error while loading data: " << e.what();
|
||||
this->setStatus(ViewModel::ModelStatus::Error);
|
||||
}
|
||||
}
|
||||
|
||||
void loaderError(QString error) {
|
||||
Q_UNUSED(error)
|
||||
this->setStatus(ViewModel::ModelStatus::Error);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
class BaseApiModel : public QAbstractListModel {
|
||||
Q_OBJECT
|
||||
public:
|
||||
BaseApiModel(QObject *parent = nullptr)
|
||||
: QAbstractListModel (parent) {}
|
||||
|
||||
Q_PROPERTY(BaseModelLoader *loader READ loader WRITE setLoader NOTIFY loaderChanged)
|
||||
|
||||
virtual BaseModelLoader *loader() const = 0;
|
||||
virtual void setLoader(BaseModelLoader *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() = 0;
|
||||
virtual void clear() = 0;
|
||||
protected slots:
|
||||
virtual void loadingFinished() = 0;
|
||||
signals:
|
||||
void loaderChanged();
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Abstract model for displaying collections.
|
||||
*
|
||||
* @tparam T The class of the result.
|
||||
* @tparam R The class returned by the loader.
|
||||
* @tparam P The class with the request parameters for the loader.
|
||||
*
|
||||
*/
|
||||
template <class T>
|
||||
class ApiModel : public BaseApiModel {
|
||||
public:
|
||||
/**
|
||||
* @brief Creates a new basemodel
|
||||
* @param path The path (relative to the baseUrl of JellyfinApiClient) to make the call to.
|
||||
* @param subfield Leave empty if the root of the result is the array with results. Otherwise, set to the key name in the
|
||||
* root object which contains the data.
|
||||
* @param parent Parent (Standard QObject stuff)
|
||||
*
|
||||
* If the response looks something like this:
|
||||
* @code{.json}
|
||||
* [{...}, {...}, {...}]
|
||||
* @endcode
|
||||
*
|
||||
* or
|
||||
* @code{.json}
|
||||
* {...}
|
||||
* @endcode
|
||||
* responseHasRecords should be false
|
||||
*
|
||||
* If the response looks something like this:
|
||||
* @code{.json}
|
||||
* {
|
||||
* "Offset": 0,
|
||||
* "Count": 20,
|
||||
* "Items": [{...}, {...}, {...}, ..., {...}]
|
||||
* }
|
||||
* @endcode
|
||||
* responseHasRecords should be true
|
||||
*/
|
||||
explicit ApiModel(QObject *parent = nullptr)
|
||||
: BaseApiModel(parent) {
|
||||
}
|
||||
|
||||
// Standard QAbstractItemModel overrides
|
||||
int rowCount(const QModelIndex &index) const override {
|
||||
if (!index.isValid()) return m_array.size();
|
||||
return 0;
|
||||
}
|
||||
|
||||
// QList-like API
|
||||
QSharedPointer<T> at(int index) const { return m_array.at(index); }
|
||||
/**
|
||||
* @return the amount of objects in this model.
|
||||
*/
|
||||
int size() const {
|
||||
return m_array.size();
|
||||
}
|
||||
|
||||
void insert(int index, QSharedPointer<T> object) {
|
||||
Q_ASSERT(index >= 0 && index <= size());
|
||||
this->beginInsertRows(QModelIndex(), index, index);
|
||||
m_array.insert(index, object);
|
||||
this->endInsertRows();
|
||||
}
|
||||
|
||||
void append(QSharedPointer<T> object) { insert(size(), object); }
|
||||
//void append(T &object) { insert(size(), object); }
|
||||
void append(QList<QSharedPointer<T>> &objects) {
|
||||
int index = size();
|
||||
this->beginInsertRows(QModelIndex(), index, index + objects.size() - 1);
|
||||
m_array.append(objects);
|
||||
this->endInsertRows();
|
||||
};
|
||||
|
||||
QList<T*> mid(int pos, int length = -1) {
|
||||
return m_array.mid(pos, length);
|
||||
}
|
||||
|
||||
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(QSharedPointer<T> object) {
|
||||
int idx = m_array.indexOf(object);
|
||||
if (idx >= 0) {
|
||||
removeAt(idx);
|
||||
}
|
||||
}
|
||||
|
||||
void clear() override {
|
||||
this->beginResetModel();
|
||||
m_array.clear();
|
||||
this->endResetModel();
|
||||
}
|
||||
|
||||
const QList<QSharedPointer<T>> &toList() {
|
||||
return m_array;
|
||||
}
|
||||
|
||||
// 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;*/
|
||||
virtual bool canFetchMore(const QModelIndex &parent) const override {
|
||||
if (parent.isValid()) return false;
|
||||
if (m_loader == nullptr) return false;
|
||||
return m_loader->canLoadMore();
|
||||
}
|
||||
virtual void fetchMore(const QModelIndex &parent) override {
|
||||
if (parent.isValid()) return;
|
||||
if (m_loader != nullptr) {
|
||||
m_loader->loadMore();
|
||||
}
|
||||
}
|
||||
|
||||
BaseModelLoader *loader() const override {
|
||||
return m_loader;
|
||||
}
|
||||
|
||||
void setLoader(BaseModelLoader *newLoader) {
|
||||
ModelLoader<T> *castedLoader = dynamic_cast<ModelLoader<T> *>(newLoader);
|
||||
if (castedLoader != nullptr) {
|
||||
// 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>";
|
||||
}
|
||||
}
|
||||
|
||||
void reload() override {
|
||||
if (m_loader != nullptr) {
|
||||
m_loader->reload();
|
||||
}
|
||||
}
|
||||
|
||||
protected:
|
||||
// Model-specific properties.
|
||||
QList<QSharedPointer<T>> m_array;
|
||||
ModelLoader<T> *m_loader = nullptr;
|
||||
|
||||
void loadingFinished() override {
|
||||
Q_ASSERT(m_loader != nullptr);
|
||||
std::pair<QList<T*>, int> result = m_loader->result();
|
||||
qDebug() << "Results loaded: index: " << result.second << ", count: " << result.first.size();
|
||||
if (result.second == -1) {
|
||||
clear();
|
||||
} else if (result.second == m_array.size()) {
|
||||
m_array.reserve(m_array.size() + result.second);
|
||||
for (auto it = result.first.begin(); it != result.first.end(); it++) {
|
||||
append(QSharedPointer<T>(*it));
|
||||
}
|
||||
} else if (result.second < m_array.size()){
|
||||
removeUntilEnd(result.second);
|
||||
m_array.reserve(m_array.size() + result.second);
|
||||
for (auto it = result.first.begin(); it != result.first.end(); it++) {
|
||||
append(QSharedPointer<T>(*it));
|
||||
}
|
||||
} else {
|
||||
// result.second > m_array.size()
|
||||
qWarning() << "Retrieved data from loader at position bigger than size()";
|
||||
}
|
||||
}
|
||||
private:
|
||||
QMetaObject::Connection m_futureWatcherConnection;
|
||||
};
|
||||
|
||||
}
|
||||
#endif //JELLYFIN_API_MODEL
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Sailfin: a Jellyfin client written using Qt
|
||||
Copyright (C) 2020 Chris Josten
|
||||
Copyright (C) 2021 Chris Josten
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
|
@ -101,7 +101,7 @@ public:
|
|||
signals:
|
||||
void tokenRetrieved(const QString &server, const QString &user, const QString &token) const;
|
||||
void serversListed(const QStringList &servers) const;
|
||||
void usersListed(const QStringList &users) const;
|
||||
void usersListed(const QString& server, const QStringList &users) const;
|
||||
|
||||
protected:
|
||||
explicit CredentialsManager(QObject *parent = nullptr) : QObject (parent) {}
|
||||
|
@ -123,7 +123,6 @@ public:
|
|||
|
||||
private:
|
||||
QString urlToGroupName(const QString &url) const;
|
||||
QString groupNameToUrl(const QString &group) const;
|
||||
QSettings m_settings;
|
||||
};
|
||||
|
141
core/include/JellyfinQt/dto/accessschedule.h
Normal file
141
core/include/JellyfinQt/dto/accessschedule.h
Normal file
|
@ -0,0 +1,141 @@
|
|||
/*
|
||||
* 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_ACCESSSCHEDULE_H
|
||||
#define JELLYFIN_DTO_ACCESSSCHEDULE_H
|
||||
|
||||
#include <QJsonObject>
|
||||
#include <QJsonValue>
|
||||
#include <QString>
|
||||
#include <optional>
|
||||
|
||||
#include "JellyfinQt/dto/dynamicdayofweek.h"
|
||||
#include "JellyfinQt/support/jsonconv.h"
|
||||
|
||||
namespace Jellyfin {
|
||||
// Forward declaration
|
||||
class ApiClient;
|
||||
}
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
|
||||
class AccessSchedule {
|
||||
public:
|
||||
AccessSchedule(
|
||||
qint32 jellyfinId,
|
||||
QString userId,
|
||||
DynamicDayOfWeek dayOfWeek,
|
||||
double startHour,
|
||||
double endHour
|
||||
);
|
||||
|
||||
AccessSchedule(const AccessSchedule &other);
|
||||
|
||||
/**
|
||||
* Replaces the data being hold by this class with that of the other.
|
||||
*/
|
||||
void replaceData(AccessSchedule &other);
|
||||
|
||||
static AccessSchedule fromJson(QJsonObject source);
|
||||
void setFromJson(QJsonObject source);
|
||||
QJsonObject toJson() const;
|
||||
|
||||
// Properties
|
||||
/**
|
||||
* @brief Gets or sets the id of this instance.
|
||||
*/
|
||||
qint32 jellyfinId() const;
|
||||
/**
|
||||
* @brief Gets or sets the id of this instance.
|
||||
*/
|
||||
void setJellyfinId(qint32 newJellyfinId);
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the id of the associated user.
|
||||
*/
|
||||
QString userId() const;
|
||||
/**
|
||||
* @brief Gets or sets the id of the associated user.
|
||||
*/
|
||||
void setUserId(QString newUserId);
|
||||
|
||||
|
||||
DynamicDayOfWeek dayOfWeek() const;
|
||||
|
||||
void setDayOfWeek(DynamicDayOfWeek newDayOfWeek);
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the start hour.
|
||||
*/
|
||||
double startHour() const;
|
||||
/**
|
||||
* @brief Gets or sets the start hour.
|
||||
*/
|
||||
void setStartHour(double newStartHour);
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the end hour.
|
||||
*/
|
||||
double endHour() const;
|
||||
/**
|
||||
* @brief Gets or sets the end hour.
|
||||
*/
|
||||
void setEndHour(double newEndHour);
|
||||
|
||||
|
||||
protected:
|
||||
qint32 m_jellyfinId;
|
||||
QString m_userId;
|
||||
DynamicDayOfWeek m_dayOfWeek;
|
||||
double m_startHour;
|
||||
double m_endHour;
|
||||
|
||||
private:
|
||||
// Private constructor which generates an invalid object, for use withing AccessSchedule::fromJson();
|
||||
AccessSchedule();
|
||||
};
|
||||
|
||||
|
||||
} // 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
|
||||
|
||||
#endif // JELLYFIN_DTO_ACCESSSCHEDULE_H
|
203
core/include/JellyfinQt/dto/activitylogentry.h
Normal file
203
core/include/JellyfinQt/dto/activitylogentry.h
Normal file
|
@ -0,0 +1,203 @@
|
|||
/*
|
||||
* 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_ACTIVITYLOGENTRY_H
|
||||
#define JELLYFIN_DTO_ACTIVITYLOGENTRY_H
|
||||
|
||||
#include <QDateTime>
|
||||
#include <QJsonObject>
|
||||
#include <QJsonValue>
|
||||
#include <QString>
|
||||
#include <optional>
|
||||
|
||||
#include "JellyfinQt/dto/loglevel.h"
|
||||
#include "JellyfinQt/support/jsonconv.h"
|
||||
|
||||
namespace Jellyfin {
|
||||
// Forward declaration
|
||||
class ApiClient;
|
||||
}
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
|
||||
class ActivityLogEntry {
|
||||
public:
|
||||
ActivityLogEntry(
|
||||
qint64 jellyfinId,
|
||||
QDateTime date,
|
||||
QString userId,
|
||||
LogLevel severity
|
||||
);
|
||||
|
||||
ActivityLogEntry(const ActivityLogEntry &other);
|
||||
|
||||
/**
|
||||
* Replaces the data being hold by this class with that of the other.
|
||||
*/
|
||||
void replaceData(ActivityLogEntry &other);
|
||||
|
||||
static ActivityLogEntry fromJson(QJsonObject source);
|
||||
void setFromJson(QJsonObject source);
|
||||
QJsonObject toJson() const;
|
||||
|
||||
// Properties
|
||||
/**
|
||||
* @brief Gets or sets the identifier.
|
||||
*/
|
||||
qint64 jellyfinId() const;
|
||||
/**
|
||||
* @brief Gets or sets the identifier.
|
||||
*/
|
||||
void setJellyfinId(qint64 newJellyfinId);
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the name.
|
||||
*/
|
||||
QString name() const;
|
||||
/**
|
||||
* @brief Gets or sets the name.
|
||||
*/
|
||||
void setName(QString newName);
|
||||
bool nameNull() const;
|
||||
void setNameNull();
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the overview.
|
||||
*/
|
||||
QString overview() const;
|
||||
/**
|
||||
* @brief Gets or sets the overview.
|
||||
*/
|
||||
void setOverview(QString newOverview);
|
||||
bool overviewNull() const;
|
||||
void setOverviewNull();
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the short overview.
|
||||
*/
|
||||
QString shortOverview() const;
|
||||
/**
|
||||
* @brief Gets or sets the short overview.
|
||||
*/
|
||||
void setShortOverview(QString newShortOverview);
|
||||
bool shortOverviewNull() const;
|
||||
void setShortOverviewNull();
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the type.
|
||||
*/
|
||||
QString type() const;
|
||||
/**
|
||||
* @brief Gets or sets the type.
|
||||
*/
|
||||
void setType(QString newType);
|
||||
bool typeNull() const;
|
||||
void setTypeNull();
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the item identifier.
|
||||
*/
|
||||
QString itemId() const;
|
||||
/**
|
||||
* @brief Gets or sets the item identifier.
|
||||
*/
|
||||
void setItemId(QString newItemId);
|
||||
bool itemIdNull() const;
|
||||
void setItemIdNull();
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the date.
|
||||
*/
|
||||
QDateTime date() const;
|
||||
/**
|
||||
* @brief Gets or sets the date.
|
||||
*/
|
||||
void setDate(QDateTime newDate);
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the user identifier.
|
||||
*/
|
||||
QString userId() const;
|
||||
/**
|
||||
* @brief Gets or sets the user identifier.
|
||||
*/
|
||||
void setUserId(QString newUserId);
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the user primary image tag.
|
||||
*/
|
||||
QString userPrimaryImageTag() const;
|
||||
/**
|
||||
* @brief Gets or sets the user primary image tag.
|
||||
*/
|
||||
void setUserPrimaryImageTag(QString newUserPrimaryImageTag);
|
||||
bool userPrimaryImageTagNull() const;
|
||||
void setUserPrimaryImageTagNull();
|
||||
|
||||
|
||||
LogLevel severity() const;
|
||||
|
||||
void setSeverity(LogLevel newSeverity);
|
||||
|
||||
|
||||
protected:
|
||||
qint64 m_jellyfinId;
|
||||
QString m_name;
|
||||
QString m_overview;
|
||||
QString m_shortOverview;
|
||||
QString m_type;
|
||||
QString m_itemId;
|
||||
QDateTime m_date;
|
||||
QString m_userId;
|
||||
QString m_userPrimaryImageTag;
|
||||
LogLevel m_severity;
|
||||
|
||||
private:
|
||||
// Private constructor which generates an invalid object, for use withing ActivityLogEntry::fromJson();
|
||||
ActivityLogEntry();
|
||||
};
|
||||
|
||||
|
||||
} // 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
|
||||
|
||||
#endif // JELLYFIN_DTO_ACTIVITYLOGENTRY_H
|
125
core/include/JellyfinQt/dto/activitylogentryqueryresult.h
Normal file
125
core/include/JellyfinQt/dto/activitylogentryqueryresult.h
Normal file
|
@ -0,0 +1,125 @@
|
|||
/*
|
||||
* Sailfin: a Jellyfin client written using Qt
|
||||
* Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
|
||||
* OVERWRITTEN AT SOME POINT!
|
||||
*
|
||||
* If there is a bug in this file, please fix the code generator used to generate this file found in
|
||||
* core/openapigenerator.d.
|
||||
*
|
||||
* This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
|
||||
* file with a newer file if needed instead of manually updating the files.
|
||||
*/
|
||||
|
||||
#ifndef JELLYFIN_DTO_ACTIVITYLOGENTRYQUERYRESULT_H
|
||||
#define JELLYFIN_DTO_ACTIVITYLOGENTRYQUERYRESULT_H
|
||||
|
||||
#include <QJsonObject>
|
||||
#include <QJsonValue>
|
||||
#include <QList>
|
||||
#include <QStringList>
|
||||
#include <optional>
|
||||
|
||||
#include "JellyfinQt/dto/activitylogentry.h"
|
||||
#include "JellyfinQt/support/jsonconv.h"
|
||||
|
||||
namespace Jellyfin {
|
||||
// Forward declaration
|
||||
class ApiClient;
|
||||
}
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
|
||||
class ActivityLogEntryQueryResult {
|
||||
public:
|
||||
ActivityLogEntryQueryResult(
|
||||
qint32 totalRecordCount,
|
||||
qint32 startIndex
|
||||
);
|
||||
|
||||
ActivityLogEntryQueryResult(const ActivityLogEntryQueryResult &other);
|
||||
|
||||
/**
|
||||
* Replaces the data being hold by this class with that of the other.
|
||||
*/
|
||||
void replaceData(ActivityLogEntryQueryResult &other);
|
||||
|
||||
static ActivityLogEntryQueryResult fromJson(QJsonObject source);
|
||||
void setFromJson(QJsonObject source);
|
||||
QJsonObject toJson() const;
|
||||
|
||||
// Properties
|
||||
/**
|
||||
* @brief Gets or sets the items.
|
||||
*/
|
||||
QList<ActivityLogEntry> items() const;
|
||||
/**
|
||||
* @brief Gets or sets the items.
|
||||
*/
|
||||
void setItems(QList<ActivityLogEntry> newItems);
|
||||
bool itemsNull() const;
|
||||
void setItemsNull();
|
||||
|
||||
/**
|
||||
* @brief The total number of records available.
|
||||
*/
|
||||
qint32 totalRecordCount() const;
|
||||
/**
|
||||
* @brief The total number of records available.
|
||||
*/
|
||||
void setTotalRecordCount(qint32 newTotalRecordCount);
|
||||
|
||||
/**
|
||||
* @brief The index of the first record in Items.
|
||||
*/
|
||||
qint32 startIndex() const;
|
||||
/**
|
||||
* @brief The index of the first record in Items.
|
||||
*/
|
||||
void setStartIndex(qint32 newStartIndex);
|
||||
|
||||
|
||||
protected:
|
||||
QList<ActivityLogEntry> m_items;
|
||||
qint32 m_totalRecordCount;
|
||||
qint32 m_startIndex;
|
||||
|
||||
private:
|
||||
// Private constructor which generates an invalid object, for use withing ActivityLogEntryQueryResult::fromJson();
|
||||
ActivityLogEntryQueryResult();
|
||||
};
|
||||
|
||||
|
||||
} // 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
|
||||
|
||||
#endif // JELLYFIN_DTO_ACTIVITYLOGENTRYQUERYRESULT_H
|
97
core/include/JellyfinQt/dto/addvirtualfolderdto.h
Normal file
97
core/include/JellyfinQt/dto/addvirtualfolderdto.h
Normal file
|
@ -0,0 +1,97 @@
|
|||
/*
|
||||
* 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_ADDVIRTUALFOLDERDTO_H
|
||||
#define JELLYFIN_DTO_ADDVIRTUALFOLDERDTO_H
|
||||
|
||||
#include <QJsonObject>
|
||||
#include <QJsonValue>
|
||||
#include <QSharedPointer>
|
||||
#include <optional>
|
||||
|
||||
#include "JellyfinQt/dto/libraryoptions.h"
|
||||
#include "JellyfinQt/support/jsonconv.h"
|
||||
|
||||
namespace Jellyfin {
|
||||
// Forward declaration
|
||||
class ApiClient;
|
||||
}
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
|
||||
class AddVirtualFolderDto {
|
||||
public:
|
||||
AddVirtualFolderDto(
|
||||
QSharedPointer<LibraryOptions> libraryOptions
|
||||
);
|
||||
|
||||
AddVirtualFolderDto(const AddVirtualFolderDto &other);
|
||||
|
||||
/**
|
||||
* Replaces the data being hold by this class with that of the other.
|
||||
*/
|
||||
void replaceData(AddVirtualFolderDto &other);
|
||||
|
||||
static AddVirtualFolderDto fromJson(QJsonObject source);
|
||||
void setFromJson(QJsonObject source);
|
||||
QJsonObject toJson() const;
|
||||
|
||||
// Properties
|
||||
|
||||
QSharedPointer<LibraryOptions> libraryOptions() const;
|
||||
|
||||
void setLibraryOptions(QSharedPointer<LibraryOptions> newLibraryOptions);
|
||||
|
||||
|
||||
protected:
|
||||
QSharedPointer<LibraryOptions> m_libraryOptions = QSharedPointer<LibraryOptions>();
|
||||
|
||||
private:
|
||||
// Private constructor which generates an invalid object, for use withing AddVirtualFolderDto::fromJson();
|
||||
AddVirtualFolderDto();
|
||||
};
|
||||
|
||||
|
||||
} // 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
|
||||
|
||||
#endif // JELLYFIN_DTO_ADDVIRTUALFOLDERDTO_H
|
228
core/include/JellyfinQt/dto/albuminfo.h
Normal file
228
core/include/JellyfinQt/dto/albuminfo.h
Normal file
|
@ -0,0 +1,228 @@
|
|||
/*
|
||||
* Sailfin: a Jellyfin client written using Qt
|
||||
* Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
|
||||
* OVERWRITTEN AT SOME POINT!
|
||||
*
|
||||
* If there is a bug in this file, please fix the code generator used to generate this file found in
|
||||
* core/openapigenerator.d.
|
||||
*
|
||||
* This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
|
||||
* file with a newer file if needed instead of manually updating the files.
|
||||
*/
|
||||
|
||||
#ifndef JELLYFIN_DTO_ALBUMINFO_H
|
||||
#define JELLYFIN_DTO_ALBUMINFO_H
|
||||
|
||||
#include <QDateTime>
|
||||
#include <QJsonObject>
|
||||
#include <QJsonValue>
|
||||
#include <QList>
|
||||
#include <QString>
|
||||
#include <QStringList>
|
||||
#include <optional>
|
||||
|
||||
#include "JellyfinQt/dto/songinfo.h"
|
||||
#include "JellyfinQt/support/jsonconv.h"
|
||||
|
||||
namespace Jellyfin {
|
||||
// Forward declaration
|
||||
class ApiClient;
|
||||
}
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
|
||||
class AlbumInfo {
|
||||
public:
|
||||
AlbumInfo(
|
||||
bool isAutomated
|
||||
);
|
||||
|
||||
AlbumInfo(const AlbumInfo &other);
|
||||
|
||||
/**
|
||||
* Replaces the data being hold by this class with that of the other.
|
||||
*/
|
||||
void replaceData(AlbumInfo &other);
|
||||
|
||||
static AlbumInfo fromJson(QJsonObject source);
|
||||
void setFromJson(QJsonObject source);
|
||||
QJsonObject toJson() const;
|
||||
|
||||
// Properties
|
||||
/**
|
||||
* @brief Gets or sets the name.
|
||||
*/
|
||||
QString name() const;
|
||||
/**
|
||||
* @brief Gets or sets the name.
|
||||
*/
|
||||
void setName(QString newName);
|
||||
bool nameNull() const;
|
||||
void setNameNull();
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the path.
|
||||
*/
|
||||
QString path() const;
|
||||
/**
|
||||
* @brief Gets or sets the path.
|
||||
*/
|
||||
void setPath(QString newPath);
|
||||
bool pathNull() const;
|
||||
void setPathNull();
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the metadata language.
|
||||
*/
|
||||
QString metadataLanguage() const;
|
||||
/**
|
||||
* @brief Gets or sets the metadata language.
|
||||
*/
|
||||
void setMetadataLanguage(QString newMetadataLanguage);
|
||||
bool metadataLanguageNull() const;
|
||||
void setMetadataLanguageNull();
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the metadata country code.
|
||||
*/
|
||||
QString metadataCountryCode() const;
|
||||
/**
|
||||
* @brief Gets or sets the metadata country code.
|
||||
*/
|
||||
void setMetadataCountryCode(QString newMetadataCountryCode);
|
||||
bool metadataCountryCodeNull() const;
|
||||
void setMetadataCountryCodeNull();
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the provider ids.
|
||||
*/
|
||||
QJsonObject providerIds() const;
|
||||
/**
|
||||
* @brief Gets or sets the provider ids.
|
||||
*/
|
||||
void setProviderIds(QJsonObject newProviderIds);
|
||||
bool providerIdsNull() const;
|
||||
void setProviderIdsNull();
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the year.
|
||||
*/
|
||||
std::optional<qint32> year() const;
|
||||
/**
|
||||
* @brief Gets or sets the year.
|
||||
*/
|
||||
void setYear(std::optional<qint32> newYear);
|
||||
bool yearNull() const;
|
||||
void setYearNull();
|
||||
|
||||
|
||||
std::optional<qint32> indexNumber() const;
|
||||
|
||||
void setIndexNumber(std::optional<qint32> newIndexNumber);
|
||||
bool indexNumberNull() const;
|
||||
void setIndexNumberNull();
|
||||
|
||||
|
||||
std::optional<qint32> parentIndexNumber() const;
|
||||
|
||||
void setParentIndexNumber(std::optional<qint32> newParentIndexNumber);
|
||||
bool parentIndexNumberNull() const;
|
||||
void setParentIndexNumberNull();
|
||||
|
||||
|
||||
QDateTime premiereDate() const;
|
||||
|
||||
void setPremiereDate(QDateTime newPremiereDate);
|
||||
bool premiereDateNull() const;
|
||||
void setPremiereDateNull();
|
||||
|
||||
|
||||
bool isAutomated() const;
|
||||
|
||||
void setIsAutomated(bool newIsAutomated);
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the album artist.
|
||||
*/
|
||||
QStringList albumArtists() const;
|
||||
/**
|
||||
* @brief Gets or sets the album artist.
|
||||
*/
|
||||
void setAlbumArtists(QStringList newAlbumArtists);
|
||||
bool albumArtistsNull() const;
|
||||
void setAlbumArtistsNull();
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the artist provider ids.
|
||||
*/
|
||||
QJsonObject artistProviderIds() const;
|
||||
/**
|
||||
* @brief Gets or sets the artist provider ids.
|
||||
*/
|
||||
void setArtistProviderIds(QJsonObject newArtistProviderIds);
|
||||
bool artistProviderIdsNull() const;
|
||||
void setArtistProviderIdsNull();
|
||||
|
||||
|
||||
QList<SongInfo> songInfos() const;
|
||||
|
||||
void setSongInfos(QList<SongInfo> newSongInfos);
|
||||
bool songInfosNull() const;
|
||||
void setSongInfosNull();
|
||||
|
||||
|
||||
protected:
|
||||
QString m_name;
|
||||
QString m_path;
|
||||
QString m_metadataLanguage;
|
||||
QString m_metadataCountryCode;
|
||||
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;
|
||||
QJsonObject m_artistProviderIds;
|
||||
QList<SongInfo> m_songInfos;
|
||||
|
||||
private:
|
||||
// Private constructor which generates an invalid object, for use withing AlbumInfo::fromJson();
|
||||
AlbumInfo();
|
||||
};
|
||||
|
||||
|
||||
} // 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
|
||||
|
||||
#endif // JELLYFIN_DTO_ALBUMINFO_H
|
128
core/include/JellyfinQt/dto/albuminforemotesearchquery.h
Normal file
128
core/include/JellyfinQt/dto/albuminforemotesearchquery.h
Normal file
|
@ -0,0 +1,128 @@
|
|||
/*
|
||||
* 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_ALBUMINFOREMOTESEARCHQUERY_H
|
||||
#define JELLYFIN_DTO_ALBUMINFOREMOTESEARCHQUERY_H
|
||||
|
||||
#include <QJsonObject>
|
||||
#include <QJsonValue>
|
||||
#include <QSharedPointer>
|
||||
#include <QString>
|
||||
#include <optional>
|
||||
|
||||
#include "JellyfinQt/dto/albuminfo.h"
|
||||
#include "JellyfinQt/support/jsonconv.h"
|
||||
|
||||
namespace Jellyfin {
|
||||
// Forward declaration
|
||||
class ApiClient;
|
||||
}
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
|
||||
class AlbumInfoRemoteSearchQuery {
|
||||
public:
|
||||
AlbumInfoRemoteSearchQuery(
|
||||
QSharedPointer<AlbumInfo> searchInfo,
|
||||
QString itemId,
|
||||
bool includeDisabledProviders
|
||||
);
|
||||
|
||||
AlbumInfoRemoteSearchQuery(const AlbumInfoRemoteSearchQuery &other);
|
||||
|
||||
/**
|
||||
* Replaces the data being hold by this class with that of the other.
|
||||
*/
|
||||
void replaceData(AlbumInfoRemoteSearchQuery &other);
|
||||
|
||||
static AlbumInfoRemoteSearchQuery fromJson(QJsonObject source);
|
||||
void setFromJson(QJsonObject source);
|
||||
QJsonObject toJson() const;
|
||||
|
||||
// Properties
|
||||
|
||||
QSharedPointer<AlbumInfo> searchInfo() const;
|
||||
|
||||
void setSearchInfo(QSharedPointer<AlbumInfo> newSearchInfo);
|
||||
|
||||
|
||||
QString itemId() const;
|
||||
|
||||
void setItemId(QString newItemId);
|
||||
|
||||
/**
|
||||
* @brief Will only search within the given provider when set.
|
||||
*/
|
||||
QString searchProviderName() const;
|
||||
/**
|
||||
* @brief Will only search within the given provider when set.
|
||||
*/
|
||||
void setSearchProviderName(QString newSearchProviderName);
|
||||
bool searchProviderNameNull() const;
|
||||
void setSearchProviderNameNull();
|
||||
|
||||
/**
|
||||
* @brief Gets or sets a value indicating whether disabled providers should be included.
|
||||
*/
|
||||
bool includeDisabledProviders() const;
|
||||
/**
|
||||
* @brief Gets or sets a value indicating whether disabled providers should be included.
|
||||
*/
|
||||
void setIncludeDisabledProviders(bool newIncludeDisabledProviders);
|
||||
|
||||
|
||||
protected:
|
||||
QSharedPointer<AlbumInfo> m_searchInfo = QSharedPointer<AlbumInfo>();
|
||||
QString m_itemId;
|
||||
QString m_searchProviderName;
|
||||
bool m_includeDisabledProviders;
|
||||
|
||||
private:
|
||||
// Private constructor which generates an invalid object, for use withing AlbumInfoRemoteSearchQuery::fromJson();
|
||||
AlbumInfoRemoteSearchQuery();
|
||||
};
|
||||
|
||||
|
||||
} // 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
|
||||
|
||||
#endif // JELLYFIN_DTO_ALBUMINFOREMOTESEARCHQUERY_H
|
111
core/include/JellyfinQt/dto/allthememediaresult.h
Normal file
111
core/include/JellyfinQt/dto/allthememediaresult.h
Normal file
|
@ -0,0 +1,111 @@
|
|||
/*
|
||||
* 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_ALLTHEMEMEDIARESULT_H
|
||||
#define JELLYFIN_DTO_ALLTHEMEMEDIARESULT_H
|
||||
|
||||
#include <QJsonObject>
|
||||
#include <QJsonValue>
|
||||
#include <QSharedPointer>
|
||||
#include <optional>
|
||||
|
||||
#include "JellyfinQt/dto/thememediaresult.h"
|
||||
#include "JellyfinQt/support/jsonconv.h"
|
||||
|
||||
namespace Jellyfin {
|
||||
// Forward declaration
|
||||
class ApiClient;
|
||||
}
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
|
||||
class AllThemeMediaResult {
|
||||
public:
|
||||
AllThemeMediaResult(
|
||||
QSharedPointer<ThemeMediaResult> themeVideosResult,
|
||||
QSharedPointer<ThemeMediaResult> themeSongsResult,
|
||||
QSharedPointer<ThemeMediaResult> soundtrackSongsResult
|
||||
);
|
||||
|
||||
AllThemeMediaResult(const AllThemeMediaResult &other);
|
||||
|
||||
/**
|
||||
* Replaces the data being hold by this class with that of the other.
|
||||
*/
|
||||
void replaceData(AllThemeMediaResult &other);
|
||||
|
||||
static AllThemeMediaResult fromJson(QJsonObject source);
|
||||
void setFromJson(QJsonObject source);
|
||||
QJsonObject toJson() const;
|
||||
|
||||
// Properties
|
||||
|
||||
QSharedPointer<ThemeMediaResult> themeVideosResult() const;
|
||||
|
||||
void setThemeVideosResult(QSharedPointer<ThemeMediaResult> newThemeVideosResult);
|
||||
|
||||
|
||||
QSharedPointer<ThemeMediaResult> themeSongsResult() const;
|
||||
|
||||
void setThemeSongsResult(QSharedPointer<ThemeMediaResult> newThemeSongsResult);
|
||||
|
||||
|
||||
QSharedPointer<ThemeMediaResult> soundtrackSongsResult() const;
|
||||
|
||||
void setSoundtrackSongsResult(QSharedPointer<ThemeMediaResult> newSoundtrackSongsResult);
|
||||
|
||||
|
||||
protected:
|
||||
QSharedPointer<ThemeMediaResult> m_themeVideosResult = QSharedPointer<ThemeMediaResult>();
|
||||
QSharedPointer<ThemeMediaResult> m_themeSongsResult = QSharedPointer<ThemeMediaResult>();
|
||||
QSharedPointer<ThemeMediaResult> m_soundtrackSongsResult = QSharedPointer<ThemeMediaResult>();
|
||||
|
||||
private:
|
||||
// Private constructor which generates an invalid object, for use withing AllThemeMediaResult::fromJson();
|
||||
AllThemeMediaResult();
|
||||
};
|
||||
|
||||
|
||||
} // 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
|
||||
|
||||
#endif // JELLYFIN_DTO_ALLTHEMEMEDIARESULT_H
|
79
core/include/JellyfinQt/dto/architecture.h
Normal file
79
core/include/JellyfinQt/dto/architecture.h
Normal file
|
@ -0,0 +1,79 @@
|
|||
/*
|
||||
* 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_ARCHITECTURE_H
|
||||
#define JELLYFIN_DTO_ARCHITECTURE_H
|
||||
|
||||
#include <QJsonValue>
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
|
||||
#include "JellyfinQt/support/jsonconv.h"
|
||||
|
||||
namespace Jellyfin {
|
||||
// Forward declaration
|
||||
class ApiClient;
|
||||
}
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
class ArchitectureClass {
|
||||
Q_GADGET
|
||||
public:
|
||||
enum Value {
|
||||
EnumNotSet,
|
||||
X86,
|
||||
X64,
|
||||
Arm,
|
||||
Arm64,
|
||||
Wasm,
|
||||
};
|
||||
Q_ENUM(Value)
|
||||
private:
|
||||
explicit ArchitectureClass();
|
||||
};
|
||||
|
||||
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
|
||||
|
||||
#endif // JELLYFIN_DTO_ARCHITECTURE_H
|
204
core/include/JellyfinQt/dto/artistinfo.h
Normal file
204
core/include/JellyfinQt/dto/artistinfo.h
Normal file
|
@ -0,0 +1,204 @@
|
|||
/*
|
||||
* 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_ARTISTINFO_H
|
||||
#define JELLYFIN_DTO_ARTISTINFO_H
|
||||
|
||||
#include <QDateTime>
|
||||
#include <QJsonObject>
|
||||
#include <QJsonValue>
|
||||
#include <QList>
|
||||
#include <QString>
|
||||
#include <QStringList>
|
||||
#include <optional>
|
||||
|
||||
#include "JellyfinQt/dto/songinfo.h"
|
||||
#include "JellyfinQt/support/jsonconv.h"
|
||||
|
||||
namespace Jellyfin {
|
||||
// Forward declaration
|
||||
class ApiClient;
|
||||
}
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
|
||||
class ArtistInfo {
|
||||
public:
|
||||
ArtistInfo(
|
||||
bool isAutomated
|
||||
);
|
||||
|
||||
ArtistInfo(const ArtistInfo &other);
|
||||
|
||||
/**
|
||||
* Replaces the data being hold by this class with that of the other.
|
||||
*/
|
||||
void replaceData(ArtistInfo &other);
|
||||
|
||||
static ArtistInfo fromJson(QJsonObject source);
|
||||
void setFromJson(QJsonObject source);
|
||||
QJsonObject toJson() const;
|
||||
|
||||
// Properties
|
||||
/**
|
||||
* @brief Gets or sets the name.
|
||||
*/
|
||||
QString name() const;
|
||||
/**
|
||||
* @brief Gets or sets the name.
|
||||
*/
|
||||
void setName(QString newName);
|
||||
bool nameNull() const;
|
||||
void setNameNull();
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the path.
|
||||
*/
|
||||
QString path() const;
|
||||
/**
|
||||
* @brief Gets or sets the path.
|
||||
*/
|
||||
void setPath(QString newPath);
|
||||
bool pathNull() const;
|
||||
void setPathNull();
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the metadata language.
|
||||
*/
|
||||
QString metadataLanguage() const;
|
||||
/**
|
||||
* @brief Gets or sets the metadata language.
|
||||
*/
|
||||
void setMetadataLanguage(QString newMetadataLanguage);
|
||||
bool metadataLanguageNull() const;
|
||||
void setMetadataLanguageNull();
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the metadata country code.
|
||||
*/
|
||||
QString metadataCountryCode() const;
|
||||
/**
|
||||
* @brief Gets or sets the metadata country code.
|
||||
*/
|
||||
void setMetadataCountryCode(QString newMetadataCountryCode);
|
||||
bool metadataCountryCodeNull() const;
|
||||
void setMetadataCountryCodeNull();
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the provider ids.
|
||||
*/
|
||||
QJsonObject providerIds() const;
|
||||
/**
|
||||
* @brief Gets or sets the provider ids.
|
||||
*/
|
||||
void setProviderIds(QJsonObject newProviderIds);
|
||||
bool providerIdsNull() const;
|
||||
void setProviderIdsNull();
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the year.
|
||||
*/
|
||||
std::optional<qint32> year() const;
|
||||
/**
|
||||
* @brief Gets or sets the year.
|
||||
*/
|
||||
void setYear(std::optional<qint32> newYear);
|
||||
bool yearNull() const;
|
||||
void setYearNull();
|
||||
|
||||
|
||||
std::optional<qint32> indexNumber() const;
|
||||
|
||||
void setIndexNumber(std::optional<qint32> newIndexNumber);
|
||||
bool indexNumberNull() const;
|
||||
void setIndexNumberNull();
|
||||
|
||||
|
||||
std::optional<qint32> parentIndexNumber() const;
|
||||
|
||||
void setParentIndexNumber(std::optional<qint32> newParentIndexNumber);
|
||||
bool parentIndexNumberNull() const;
|
||||
void setParentIndexNumberNull();
|
||||
|
||||
|
||||
QDateTime premiereDate() const;
|
||||
|
||||
void setPremiereDate(QDateTime newPremiereDate);
|
||||
bool premiereDateNull() const;
|
||||
void setPremiereDateNull();
|
||||
|
||||
|
||||
bool isAutomated() const;
|
||||
|
||||
void setIsAutomated(bool newIsAutomated);
|
||||
|
||||
|
||||
QList<SongInfo> songInfos() const;
|
||||
|
||||
void setSongInfos(QList<SongInfo> newSongInfos);
|
||||
bool songInfosNull() const;
|
||||
void setSongInfosNull();
|
||||
|
||||
|
||||
protected:
|
||||
QString m_name;
|
||||
QString m_path;
|
||||
QString m_metadataLanguage;
|
||||
QString m_metadataCountryCode;
|
||||
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;
|
||||
QList<SongInfo> m_songInfos;
|
||||
|
||||
private:
|
||||
// Private constructor which generates an invalid object, for use withing ArtistInfo::fromJson();
|
||||
ArtistInfo();
|
||||
};
|
||||
|
||||
|
||||
} // 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
|
||||
|
||||
#endif // JELLYFIN_DTO_ARTISTINFO_H
|
128
core/include/JellyfinQt/dto/artistinforemotesearchquery.h
Normal file
128
core/include/JellyfinQt/dto/artistinforemotesearchquery.h
Normal file
|
@ -0,0 +1,128 @@
|
|||
/*
|
||||
* 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_ARTISTINFOREMOTESEARCHQUERY_H
|
||||
#define JELLYFIN_DTO_ARTISTINFOREMOTESEARCHQUERY_H
|
||||
|
||||
#include <QJsonObject>
|
||||
#include <QJsonValue>
|
||||
#include <QSharedPointer>
|
||||
#include <QString>
|
||||
#include <optional>
|
||||
|
||||
#include "JellyfinQt/dto/artistinfo.h"
|
||||
#include "JellyfinQt/support/jsonconv.h"
|
||||
|
||||
namespace Jellyfin {
|
||||
// Forward declaration
|
||||
class ApiClient;
|
||||
}
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
|
||||
class ArtistInfoRemoteSearchQuery {
|
||||
public:
|
||||
ArtistInfoRemoteSearchQuery(
|
||||
QSharedPointer<ArtistInfo> searchInfo,
|
||||
QString itemId,
|
||||
bool includeDisabledProviders
|
||||
);
|
||||
|
||||
ArtistInfoRemoteSearchQuery(const ArtistInfoRemoteSearchQuery &other);
|
||||
|
||||
/**
|
||||
* Replaces the data being hold by this class with that of the other.
|
||||
*/
|
||||
void replaceData(ArtistInfoRemoteSearchQuery &other);
|
||||
|
||||
static ArtistInfoRemoteSearchQuery fromJson(QJsonObject source);
|
||||
void setFromJson(QJsonObject source);
|
||||
QJsonObject toJson() const;
|
||||
|
||||
// Properties
|
||||
|
||||
QSharedPointer<ArtistInfo> searchInfo() const;
|
||||
|
||||
void setSearchInfo(QSharedPointer<ArtistInfo> newSearchInfo);
|
||||
|
||||
|
||||
QString itemId() const;
|
||||
|
||||
void setItemId(QString newItemId);
|
||||
|
||||
/**
|
||||
* @brief Will only search within the given provider when set.
|
||||
*/
|
||||
QString searchProviderName() const;
|
||||
/**
|
||||
* @brief Will only search within the given provider when set.
|
||||
*/
|
||||
void setSearchProviderName(QString newSearchProviderName);
|
||||
bool searchProviderNameNull() const;
|
||||
void setSearchProviderNameNull();
|
||||
|
||||
/**
|
||||
* @brief Gets or sets a value indicating whether disabled providers should be included.
|
||||
*/
|
||||
bool includeDisabledProviders() const;
|
||||
/**
|
||||
* @brief Gets or sets a value indicating whether disabled providers should be included.
|
||||
*/
|
||||
void setIncludeDisabledProviders(bool newIncludeDisabledProviders);
|
||||
|
||||
|
||||
protected:
|
||||
QSharedPointer<ArtistInfo> m_searchInfo = QSharedPointer<ArtistInfo>();
|
||||
QString m_itemId;
|
||||
QString m_searchProviderName;
|
||||
bool m_includeDisabledProviders;
|
||||
|
||||
private:
|
||||
// Private constructor which generates an invalid object, for use withing ArtistInfoRemoteSearchQuery::fromJson();
|
||||
ArtistInfoRemoteSearchQuery();
|
||||
};
|
||||
|
||||
|
||||
} // 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
|
||||
|
||||
#endif // JELLYFIN_DTO_ARTISTINFOREMOTESEARCHQUERY_H
|
120
core/include/JellyfinQt/dto/authenticateuserbyname.h
Normal file
120
core/include/JellyfinQt/dto/authenticateuserbyname.h
Normal file
|
@ -0,0 +1,120 @@
|
|||
/*
|
||||
* 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_AUTHENTICATEUSERBYNAME_H
|
||||
#define JELLYFIN_DTO_AUTHENTICATEUSERBYNAME_H
|
||||
|
||||
#include <QJsonObject>
|
||||
#include <QJsonValue>
|
||||
#include <QString>
|
||||
#include <optional>
|
||||
|
||||
#include "JellyfinQt/support/jsonconv.h"
|
||||
|
||||
namespace Jellyfin {
|
||||
// Forward declaration
|
||||
class ApiClient;
|
||||
}
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
|
||||
class AuthenticateUserByName {
|
||||
public: AuthenticateUserByName();
|
||||
AuthenticateUserByName(const AuthenticateUserByName &other);
|
||||
|
||||
/**
|
||||
* Replaces the data being hold by this class with that of the other.
|
||||
*/
|
||||
void replaceData(AuthenticateUserByName &other);
|
||||
|
||||
static AuthenticateUserByName fromJson(QJsonObject source);
|
||||
void setFromJson(QJsonObject source);
|
||||
QJsonObject toJson() const;
|
||||
|
||||
// Properties
|
||||
/**
|
||||
* @brief Gets or sets the username.
|
||||
*/
|
||||
QString username() const;
|
||||
/**
|
||||
* @brief Gets or sets the username.
|
||||
*/
|
||||
void setUsername(QString newUsername);
|
||||
bool usernameNull() const;
|
||||
void setUsernameNull();
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the plain text password.
|
||||
*/
|
||||
QString pw() const;
|
||||
/**
|
||||
* @brief Gets or sets the plain text password.
|
||||
*/
|
||||
void setPw(QString newPw);
|
||||
bool pwNull() const;
|
||||
void setPwNull();
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the sha1-hashed password.
|
||||
*/
|
||||
QString password() const;
|
||||
/**
|
||||
* @brief Gets or sets the sha1-hashed password.
|
||||
*/
|
||||
void setPassword(QString newPassword);
|
||||
bool passwordNull() const;
|
||||
void setPasswordNull();
|
||||
|
||||
|
||||
protected:
|
||||
QString m_username;
|
||||
QString m_pw;
|
||||
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
|
||||
|
||||
#endif // JELLYFIN_DTO_AUTHENTICATEUSERBYNAME_H
|
221
core/include/JellyfinQt/dto/authenticationinfo.h
Normal file
221
core/include/JellyfinQt/dto/authenticationinfo.h
Normal file
|
@ -0,0 +1,221 @@
|
|||
/*
|
||||
* 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_AUTHENTICATIONINFO_H
|
||||
#define JELLYFIN_DTO_AUTHENTICATIONINFO_H
|
||||
|
||||
#include <QDateTime>
|
||||
#include <QJsonObject>
|
||||
#include <QJsonValue>
|
||||
#include <QString>
|
||||
#include <optional>
|
||||
|
||||
#include "JellyfinQt/support/jsonconv.h"
|
||||
|
||||
namespace Jellyfin {
|
||||
// Forward declaration
|
||||
class ApiClient;
|
||||
}
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
|
||||
class AuthenticationInfo {
|
||||
public:
|
||||
AuthenticationInfo(
|
||||
qint64 jellyfinId,
|
||||
QString userId,
|
||||
bool isActive,
|
||||
QDateTime dateCreated,
|
||||
QDateTime dateLastActivity
|
||||
);
|
||||
|
||||
AuthenticationInfo(const AuthenticationInfo &other);
|
||||
|
||||
/**
|
||||
* Replaces the data being hold by this class with that of the other.
|
||||
*/
|
||||
void replaceData(AuthenticationInfo &other);
|
||||
|
||||
static AuthenticationInfo fromJson(QJsonObject source);
|
||||
void setFromJson(QJsonObject source);
|
||||
QJsonObject toJson() const;
|
||||
|
||||
// Properties
|
||||
/**
|
||||
* @brief Gets or sets the identifier.
|
||||
*/
|
||||
qint64 jellyfinId() const;
|
||||
/**
|
||||
* @brief Gets or sets the identifier.
|
||||
*/
|
||||
void setJellyfinId(qint64 newJellyfinId);
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the access token.
|
||||
*/
|
||||
QString accessToken() const;
|
||||
/**
|
||||
* @brief Gets or sets the access token.
|
||||
*/
|
||||
void setAccessToken(QString newAccessToken);
|
||||
bool accessTokenNull() const;
|
||||
void setAccessTokenNull();
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the device identifier.
|
||||
*/
|
||||
QString deviceId() const;
|
||||
/**
|
||||
* @brief Gets or sets the device identifier.
|
||||
*/
|
||||
void setDeviceId(QString newDeviceId);
|
||||
bool deviceIdNull() const;
|
||||
void setDeviceIdNull();
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the name of the application.
|
||||
*/
|
||||
QString appName() const;
|
||||
/**
|
||||
* @brief Gets or sets the name of the application.
|
||||
*/
|
||||
void setAppName(QString newAppName);
|
||||
bool appNameNull() const;
|
||||
void setAppNameNull();
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the application version.
|
||||
*/
|
||||
QString appVersion() const;
|
||||
/**
|
||||
* @brief Gets or sets the application version.
|
||||
*/
|
||||
void setAppVersion(QString newAppVersion);
|
||||
bool appVersionNull() const;
|
||||
void setAppVersionNull();
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the name of the device.
|
||||
*/
|
||||
QString deviceName() const;
|
||||
/**
|
||||
* @brief Gets or sets the name of the device.
|
||||
*/
|
||||
void setDeviceName(QString newDeviceName);
|
||||
bool deviceNameNull() const;
|
||||
void setDeviceNameNull();
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the user identifier.
|
||||
*/
|
||||
QString userId() const;
|
||||
/**
|
||||
* @brief Gets or sets the user identifier.
|
||||
*/
|
||||
void setUserId(QString newUserId);
|
||||
|
||||
/**
|
||||
* @brief Gets or sets a value indicating whether this instance is active.
|
||||
*/
|
||||
bool isActive() const;
|
||||
/**
|
||||
* @brief Gets or sets a value indicating whether this instance is active.
|
||||
*/
|
||||
void setIsActive(bool newIsActive);
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the date created.
|
||||
*/
|
||||
QDateTime dateCreated() const;
|
||||
/**
|
||||
* @brief Gets or sets the date created.
|
||||
*/
|
||||
void setDateCreated(QDateTime newDateCreated);
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the date revoked.
|
||||
*/
|
||||
QDateTime dateRevoked() const;
|
||||
/**
|
||||
* @brief Gets or sets the date revoked.
|
||||
*/
|
||||
void setDateRevoked(QDateTime newDateRevoked);
|
||||
bool dateRevokedNull() const;
|
||||
void setDateRevokedNull();
|
||||
|
||||
|
||||
QDateTime dateLastActivity() const;
|
||||
|
||||
void setDateLastActivity(QDateTime newDateLastActivity);
|
||||
|
||||
|
||||
QString userName() const;
|
||||
|
||||
void setUserName(QString newUserName);
|
||||
bool userNameNull() const;
|
||||
void setUserNameNull();
|
||||
|
||||
|
||||
protected:
|
||||
qint64 m_jellyfinId;
|
||||
QString m_accessToken;
|
||||
QString m_deviceId;
|
||||
QString m_appName;
|
||||
QString m_appVersion;
|
||||
QString m_deviceName;
|
||||
QString m_userId;
|
||||
bool m_isActive;
|
||||
QDateTime m_dateCreated;
|
||||
QDateTime m_dateRevoked;
|
||||
QDateTime m_dateLastActivity;
|
||||
QString m_userName;
|
||||
|
||||
private:
|
||||
// Private constructor which generates an invalid object, for use withing AuthenticationInfo::fromJson();
|
||||
AuthenticationInfo();
|
||||
};
|
||||
|
||||
|
||||
} // 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
|
||||
|
||||
#endif // JELLYFIN_DTO_AUTHENTICATIONINFO_H
|
125
core/include/JellyfinQt/dto/authenticationinfoqueryresult.h
Normal file
125
core/include/JellyfinQt/dto/authenticationinfoqueryresult.h
Normal file
|
@ -0,0 +1,125 @@
|
|||
/*
|
||||
* Sailfin: a Jellyfin client written using Qt
|
||||
* Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
|
||||
* OVERWRITTEN AT SOME POINT!
|
||||
*
|
||||
* If there is a bug in this file, please fix the code generator used to generate this file found in
|
||||
* core/openapigenerator.d.
|
||||
*
|
||||
* This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
|
||||
* file with a newer file if needed instead of manually updating the files.
|
||||
*/
|
||||
|
||||
#ifndef JELLYFIN_DTO_AUTHENTICATIONINFOQUERYRESULT_H
|
||||
#define JELLYFIN_DTO_AUTHENTICATIONINFOQUERYRESULT_H
|
||||
|
||||
#include <QJsonObject>
|
||||
#include <QJsonValue>
|
||||
#include <QList>
|
||||
#include <QStringList>
|
||||
#include <optional>
|
||||
|
||||
#include "JellyfinQt/dto/authenticationinfo.h"
|
||||
#include "JellyfinQt/support/jsonconv.h"
|
||||
|
||||
namespace Jellyfin {
|
||||
// Forward declaration
|
||||
class ApiClient;
|
||||
}
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
|
||||
class AuthenticationInfoQueryResult {
|
||||
public:
|
||||
AuthenticationInfoQueryResult(
|
||||
qint32 totalRecordCount,
|
||||
qint32 startIndex
|
||||
);
|
||||
|
||||
AuthenticationInfoQueryResult(const AuthenticationInfoQueryResult &other);
|
||||
|
||||
/**
|
||||
* Replaces the data being hold by this class with that of the other.
|
||||
*/
|
||||
void replaceData(AuthenticationInfoQueryResult &other);
|
||||
|
||||
static AuthenticationInfoQueryResult fromJson(QJsonObject source);
|
||||
void setFromJson(QJsonObject source);
|
||||
QJsonObject toJson() const;
|
||||
|
||||
// Properties
|
||||
/**
|
||||
* @brief Gets or sets the items.
|
||||
*/
|
||||
QList<AuthenticationInfo> items() const;
|
||||
/**
|
||||
* @brief Gets or sets the items.
|
||||
*/
|
||||
void setItems(QList<AuthenticationInfo> newItems);
|
||||
bool itemsNull() const;
|
||||
void setItemsNull();
|
||||
|
||||
/**
|
||||
* @brief The total number of records available.
|
||||
*/
|
||||
qint32 totalRecordCount() const;
|
||||
/**
|
||||
* @brief The total number of records available.
|
||||
*/
|
||||
void setTotalRecordCount(qint32 newTotalRecordCount);
|
||||
|
||||
/**
|
||||
* @brief The index of the first record in Items.
|
||||
*/
|
||||
qint32 startIndex() const;
|
||||
/**
|
||||
* @brief The index of the first record in Items.
|
||||
*/
|
||||
void setStartIndex(qint32 newStartIndex);
|
||||
|
||||
|
||||
protected:
|
||||
QList<AuthenticationInfo> m_items;
|
||||
qint32 m_totalRecordCount;
|
||||
qint32 m_startIndex;
|
||||
|
||||
private:
|
||||
// Private constructor which generates an invalid object, for use withing AuthenticationInfoQueryResult::fromJson();
|
||||
AuthenticationInfoQueryResult();
|
||||
};
|
||||
|
||||
|
||||
} // 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
|
||||
|
||||
#endif // JELLYFIN_DTO_AUTHENTICATIONINFOQUERYRESULT_H
|
122
core/include/JellyfinQt/dto/authenticationresult.h
Normal file
122
core/include/JellyfinQt/dto/authenticationresult.h
Normal file
|
@ -0,0 +1,122 @@
|
|||
/*
|
||||
* Sailfin: a Jellyfin client written using Qt
|
||||
* Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
|
||||
* OVERWRITTEN AT SOME POINT!
|
||||
*
|
||||
* If there is a bug in this file, please fix the code generator used to generate this file found in
|
||||
* core/openapigenerator.d.
|
||||
*
|
||||
* This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
|
||||
* file with a newer file if needed instead of manually updating the files.
|
||||
*/
|
||||
|
||||
#ifndef JELLYFIN_DTO_AUTHENTICATIONRESULT_H
|
||||
#define JELLYFIN_DTO_AUTHENTICATIONRESULT_H
|
||||
|
||||
#include <QJsonObject>
|
||||
#include <QJsonValue>
|
||||
#include <QSharedPointer>
|
||||
#include <QString>
|
||||
#include <optional>
|
||||
|
||||
#include "JellyfinQt/dto/sessioninfo.h"
|
||||
#include "JellyfinQt/dto/userdto.h"
|
||||
#include "JellyfinQt/support/jsonconv.h"
|
||||
|
||||
namespace Jellyfin {
|
||||
// Forward declaration
|
||||
class ApiClient;
|
||||
}
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
|
||||
class AuthenticationResult {
|
||||
public:
|
||||
AuthenticationResult(
|
||||
QSharedPointer<UserDto> user,
|
||||
QSharedPointer<SessionInfo> sessionInfo
|
||||
);
|
||||
|
||||
AuthenticationResult(const AuthenticationResult &other);
|
||||
|
||||
/**
|
||||
* Replaces the data being hold by this class with that of the other.
|
||||
*/
|
||||
void replaceData(AuthenticationResult &other);
|
||||
|
||||
static AuthenticationResult fromJson(QJsonObject source);
|
||||
void setFromJson(QJsonObject source);
|
||||
QJsonObject toJson() const;
|
||||
|
||||
// Properties
|
||||
|
||||
QSharedPointer<UserDto> user() const;
|
||||
|
||||
void setUser(QSharedPointer<UserDto> newUser);
|
||||
|
||||
|
||||
QSharedPointer<SessionInfo> sessionInfo() const;
|
||||
|
||||
void setSessionInfo(QSharedPointer<SessionInfo> newSessionInfo);
|
||||
|
||||
|
||||
QString accessToken() const;
|
||||
|
||||
void setAccessToken(QString newAccessToken);
|
||||
bool accessTokenNull() const;
|
||||
void setAccessTokenNull();
|
||||
|
||||
|
||||
QString serverId() const;
|
||||
|
||||
void setServerId(QString newServerId);
|
||||
bool serverIdNull() const;
|
||||
void setServerIdNull();
|
||||
|
||||
|
||||
protected:
|
||||
QSharedPointer<UserDto> m_user = QSharedPointer<UserDto>();
|
||||
QSharedPointer<SessionInfo> m_sessionInfo = QSharedPointer<SessionInfo>();
|
||||
QString m_accessToken;
|
||||
QString m_serverId;
|
||||
|
||||
private:
|
||||
// Private constructor which generates an invalid object, for use withing AuthenticationResult::fromJson();
|
||||
AuthenticationResult();
|
||||
};
|
||||
|
||||
|
||||
} // 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
|
||||
|
||||
#endif // JELLYFIN_DTO_AUTHENTICATIONRESULT_H
|
179
core/include/JellyfinQt/dto/baseitem.h
Normal file
179
core/include/JellyfinQt/dto/baseitem.h
Normal file
|
@ -0,0 +1,179 @@
|
|||
/*
|
||||
* 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_BASEITEM_H
|
||||
#define JELLYFIN_DTO_BASEITEM_H
|
||||
|
||||
#include <QDateTime>
|
||||
#include <QJsonObject>
|
||||
#include <QJsonValue>
|
||||
#include <QList>
|
||||
#include <QString>
|
||||
#include <QStringList>
|
||||
#include <optional>
|
||||
|
||||
#include "JellyfinQt/dto/mediaurl.h"
|
||||
#include "JellyfinQt/support/jsonconv.h"
|
||||
|
||||
namespace Jellyfin {
|
||||
// Forward declaration
|
||||
class ApiClient;
|
||||
}
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
|
||||
class BaseItem {
|
||||
public:
|
||||
BaseItem(
|
||||
QDateTime dateLastSaved,
|
||||
bool isHD,
|
||||
bool isShortcut,
|
||||
qint32 width,
|
||||
qint32 height,
|
||||
bool supportsExternalTransfer
|
||||
);
|
||||
|
||||
BaseItem(const BaseItem &other);
|
||||
|
||||
/**
|
||||
* Replaces the data being hold by this class with that of the other.
|
||||
*/
|
||||
void replaceData(BaseItem &other);
|
||||
|
||||
static BaseItem fromJson(QJsonObject source);
|
||||
void setFromJson(QJsonObject source);
|
||||
QJsonObject toJson() const;
|
||||
|
||||
// Properties
|
||||
|
||||
std::optional<qint64> size() const;
|
||||
|
||||
void setSize(std::optional<qint64> newSize);
|
||||
bool sizeNull() const;
|
||||
void setSizeNull();
|
||||
|
||||
|
||||
QString container() const;
|
||||
|
||||
void setContainer(QString newContainer);
|
||||
bool containerNull() const;
|
||||
void setContainerNull();
|
||||
|
||||
|
||||
QDateTime dateLastSaved() const;
|
||||
|
||||
void setDateLastSaved(QDateTime newDateLastSaved);
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the remote trailers.
|
||||
*/
|
||||
QList<MediaUrl> remoteTrailers() const;
|
||||
/**
|
||||
* @brief Gets or sets the remote trailers.
|
||||
*/
|
||||
void setRemoteTrailers(QList<MediaUrl> newRemoteTrailers);
|
||||
bool remoteTrailersNull() const;
|
||||
void setRemoteTrailersNull();
|
||||
|
||||
|
||||
bool isHD() const;
|
||||
|
||||
void setIsHD(bool newIsHD);
|
||||
|
||||
|
||||
bool isShortcut() const;
|
||||
|
||||
void setIsShortcut(bool newIsShortcut);
|
||||
|
||||
|
||||
QString shortcutPath() const;
|
||||
|
||||
void setShortcutPath(QString newShortcutPath);
|
||||
bool shortcutPathNull() const;
|
||||
void setShortcutPathNull();
|
||||
|
||||
|
||||
qint32 width() const;
|
||||
|
||||
void setWidth(qint32 newWidth);
|
||||
|
||||
|
||||
qint32 height() const;
|
||||
|
||||
void setHeight(qint32 newHeight);
|
||||
|
||||
|
||||
QStringList extraIds() const;
|
||||
|
||||
void setExtraIds(QStringList newExtraIds);
|
||||
bool extraIdsNull() const;
|
||||
void setExtraIdsNull();
|
||||
|
||||
|
||||
bool supportsExternalTransfer() const;
|
||||
|
||||
void setSupportsExternalTransfer(bool newSupportsExternalTransfer);
|
||||
|
||||
|
||||
protected:
|
||||
std::optional<qint64> m_size = std::nullopt;
|
||||
QString m_container;
|
||||
QDateTime m_dateLastSaved;
|
||||
QList<MediaUrl> m_remoteTrailers;
|
||||
bool m_isHD;
|
||||
bool m_isShortcut;
|
||||
QString m_shortcutPath;
|
||||
qint32 m_width;
|
||||
qint32 m_height;
|
||||
QStringList m_extraIds;
|
||||
bool m_supportsExternalTransfer;
|
||||
|
||||
private:
|
||||
// Private constructor which generates an invalid object, for use withing BaseItem::fromJson();
|
||||
BaseItem();
|
||||
};
|
||||
|
||||
|
||||
} // 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
|
||||
|
||||
#endif // JELLYFIN_DTO_BASEITEM_H
|
1738
core/include/JellyfinQt/dto/baseitemdto.h
Normal file
1738
core/include/JellyfinQt/dto/baseitemdto.h
Normal file
File diff suppressed because it is too large
Load diff
125
core/include/JellyfinQt/dto/baseitemdtoqueryresult.h
Normal file
125
core/include/JellyfinQt/dto/baseitemdtoqueryresult.h
Normal file
|
@ -0,0 +1,125 @@
|
|||
/*
|
||||
* Sailfin: a Jellyfin client written using Qt
|
||||
* Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
|
||||
* OVERWRITTEN AT SOME POINT!
|
||||
*
|
||||
* If there is a bug in this file, please fix the code generator used to generate this file found in
|
||||
* core/openapigenerator.d.
|
||||
*
|
||||
* This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
|
||||
* file with a newer file if needed instead of manually updating the files.
|
||||
*/
|
||||
|
||||
#ifndef JELLYFIN_DTO_BASEITEMDTOQUERYRESULT_H
|
||||
#define JELLYFIN_DTO_BASEITEMDTOQUERYRESULT_H
|
||||
|
||||
#include <QJsonObject>
|
||||
#include <QJsonValue>
|
||||
#include <QList>
|
||||
#include <QStringList>
|
||||
#include <optional>
|
||||
|
||||
#include "JellyfinQt/dto/baseitemdto.h"
|
||||
#include "JellyfinQt/support/jsonconv.h"
|
||||
|
||||
namespace Jellyfin {
|
||||
// Forward declaration
|
||||
class ApiClient;
|
||||
}
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
|
||||
class BaseItemDtoQueryResult {
|
||||
public:
|
||||
BaseItemDtoQueryResult(
|
||||
qint32 totalRecordCount,
|
||||
qint32 startIndex
|
||||
);
|
||||
|
||||
BaseItemDtoQueryResult(const BaseItemDtoQueryResult &other);
|
||||
|
||||
/**
|
||||
* Replaces the data being hold by this class with that of the other.
|
||||
*/
|
||||
void replaceData(BaseItemDtoQueryResult &other);
|
||||
|
||||
static BaseItemDtoQueryResult fromJson(QJsonObject source);
|
||||
void setFromJson(QJsonObject source);
|
||||
QJsonObject toJson() const;
|
||||
|
||||
// Properties
|
||||
/**
|
||||
* @brief Gets or sets the items.
|
||||
*/
|
||||
QList<BaseItemDto> items() const;
|
||||
/**
|
||||
* @brief Gets or sets the items.
|
||||
*/
|
||||
void setItems(QList<BaseItemDto> newItems);
|
||||
bool itemsNull() const;
|
||||
void setItemsNull();
|
||||
|
||||
/**
|
||||
* @brief The total number of records available.
|
||||
*/
|
||||
qint32 totalRecordCount() const;
|
||||
/**
|
||||
* @brief The total number of records available.
|
||||
*/
|
||||
void setTotalRecordCount(qint32 newTotalRecordCount);
|
||||
|
||||
/**
|
||||
* @brief The index of the first record in Items.
|
||||
*/
|
||||
qint32 startIndex() const;
|
||||
/**
|
||||
* @brief The index of the first record in Items.
|
||||
*/
|
||||
void setStartIndex(qint32 newStartIndex);
|
||||
|
||||
|
||||
protected:
|
||||
QList<BaseItemDto> m_items;
|
||||
qint32 m_totalRecordCount;
|
||||
qint32 m_startIndex;
|
||||
|
||||
private:
|
||||
// Private constructor which generates an invalid object, for use withing BaseItemDtoQueryResult::fromJson();
|
||||
BaseItemDtoQueryResult();
|
||||
};
|
||||
|
||||
|
||||
} // 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
|
||||
|
||||
#endif // JELLYFIN_DTO_BASEITEMDTOQUERYRESULT_H
|
156
core/include/JellyfinQt/dto/baseitemperson.h
Normal file
156
core/include/JellyfinQt/dto/baseitemperson.h
Normal file
|
@ -0,0 +1,156 @@
|
|||
/*
|
||||
* 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_BASEITEMPERSON_H
|
||||
#define JELLYFIN_DTO_BASEITEMPERSON_H
|
||||
|
||||
#include <QJsonObject>
|
||||
#include <QJsonValue>
|
||||
#include <QString>
|
||||
#include <optional>
|
||||
|
||||
#include "JellyfinQt/support/jsonconv.h"
|
||||
|
||||
namespace Jellyfin {
|
||||
// Forward declaration
|
||||
class ApiClient;
|
||||
}
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
|
||||
class BaseItemPerson {
|
||||
public: BaseItemPerson();
|
||||
BaseItemPerson(const BaseItemPerson &other);
|
||||
|
||||
/**
|
||||
* Replaces the data being hold by this class with that of the other.
|
||||
*/
|
||||
void replaceData(BaseItemPerson &other);
|
||||
|
||||
static BaseItemPerson fromJson(QJsonObject source);
|
||||
void setFromJson(QJsonObject source);
|
||||
QJsonObject toJson() const;
|
||||
|
||||
// Properties
|
||||
/**
|
||||
* @brief Gets or sets the name.
|
||||
*/
|
||||
QString name() const;
|
||||
/**
|
||||
* @brief Gets or sets the name.
|
||||
*/
|
||||
void setName(QString newName);
|
||||
bool nameNull() const;
|
||||
void setNameNull();
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the identifier.
|
||||
*/
|
||||
QString jellyfinId() const;
|
||||
/**
|
||||
* @brief Gets or sets the identifier.
|
||||
*/
|
||||
void setJellyfinId(QString newJellyfinId);
|
||||
bool jellyfinIdNull() const;
|
||||
void setJellyfinIdNull();
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the role.
|
||||
*/
|
||||
QString role() const;
|
||||
/**
|
||||
* @brief Gets or sets the role.
|
||||
*/
|
||||
void setRole(QString newRole);
|
||||
bool roleNull() const;
|
||||
void setRoleNull();
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the type.
|
||||
*/
|
||||
QString type() const;
|
||||
/**
|
||||
* @brief Gets or sets the type.
|
||||
*/
|
||||
void setType(QString newType);
|
||||
bool typeNull() const;
|
||||
void setTypeNull();
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the primary image tag.
|
||||
*/
|
||||
QString primaryImageTag() const;
|
||||
/**
|
||||
* @brief Gets or sets the primary image tag.
|
||||
*/
|
||||
void setPrimaryImageTag(QString newPrimaryImageTag);
|
||||
bool primaryImageTagNull() const;
|
||||
void setPrimaryImageTagNull();
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the primary image blurhash.
|
||||
*/
|
||||
QJsonObject imageBlurHashes() const;
|
||||
/**
|
||||
* @brief Gets or sets the primary image blurhash.
|
||||
*/
|
||||
void setImageBlurHashes(QJsonObject newImageBlurHashes);
|
||||
bool imageBlurHashesNull() const;
|
||||
void setImageBlurHashesNull();
|
||||
|
||||
|
||||
protected:
|
||||
QString m_name;
|
||||
QString m_jellyfinId;
|
||||
QString m_role;
|
||||
QString m_type;
|
||||
QString m_primaryImageTag;
|
||||
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
|
||||
|
||||
#endif // JELLYFIN_DTO_BASEITEMPERSON_H
|
48
core/include/JellyfinQt/dto/basepluginconfiguration.h
Normal file
48
core/include/JellyfinQt/dto/basepluginconfiguration.h
Normal file
|
@ -0,0 +1,48 @@
|
|||
/*
|
||||
* 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_BASEPLUGINCONFIGURATION_H
|
||||
#define JELLYFIN_DTO_BASEPLUGINCONFIGURATION_H
|
||||
|
||||
#include <QJsonObject>
|
||||
|
||||
namespace Jellyfin {
|
||||
// Forward declaration
|
||||
class ApiClient;
|
||||
}
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
using BasePluginConfiguration = QJsonObject;
|
||||
|
||||
} // NS DTO
|
||||
} // NS Jellyfin
|
||||
|
||||
#endif // JELLYFIN_DTO_BASEPLUGINCONFIGURATION_H
|
||||
// No implementation needed
|
201
core/include/JellyfinQt/dto/bookinfo.h
Normal file
201
core/include/JellyfinQt/dto/bookinfo.h
Normal file
|
@ -0,0 +1,201 @@
|
|||
/*
|
||||
* 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_BOOKINFO_H
|
||||
#define JELLYFIN_DTO_BOOKINFO_H
|
||||
|
||||
#include <QDateTime>
|
||||
#include <QJsonObject>
|
||||
#include <QJsonValue>
|
||||
#include <QString>
|
||||
#include <optional>
|
||||
|
||||
#include "JellyfinQt/support/jsonconv.h"
|
||||
|
||||
namespace Jellyfin {
|
||||
// Forward declaration
|
||||
class ApiClient;
|
||||
}
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
|
||||
class BookInfo {
|
||||
public:
|
||||
BookInfo(
|
||||
bool isAutomated
|
||||
);
|
||||
|
||||
BookInfo(const BookInfo &other);
|
||||
|
||||
/**
|
||||
* Replaces the data being hold by this class with that of the other.
|
||||
*/
|
||||
void replaceData(BookInfo &other);
|
||||
|
||||
static BookInfo fromJson(QJsonObject source);
|
||||
void setFromJson(QJsonObject source);
|
||||
QJsonObject toJson() const;
|
||||
|
||||
// Properties
|
||||
/**
|
||||
* @brief Gets or sets the name.
|
||||
*/
|
||||
QString name() const;
|
||||
/**
|
||||
* @brief Gets or sets the name.
|
||||
*/
|
||||
void setName(QString newName);
|
||||
bool nameNull() const;
|
||||
void setNameNull();
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the path.
|
||||
*/
|
||||
QString path() const;
|
||||
/**
|
||||
* @brief Gets or sets the path.
|
||||
*/
|
||||
void setPath(QString newPath);
|
||||
bool pathNull() const;
|
||||
void setPathNull();
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the metadata language.
|
||||
*/
|
||||
QString metadataLanguage() const;
|
||||
/**
|
||||
* @brief Gets or sets the metadata language.
|
||||
*/
|
||||
void setMetadataLanguage(QString newMetadataLanguage);
|
||||
bool metadataLanguageNull() const;
|
||||
void setMetadataLanguageNull();
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the metadata country code.
|
||||
*/
|
||||
QString metadataCountryCode() const;
|
||||
/**
|
||||
* @brief Gets or sets the metadata country code.
|
||||
*/
|
||||
void setMetadataCountryCode(QString newMetadataCountryCode);
|
||||
bool metadataCountryCodeNull() const;
|
||||
void setMetadataCountryCodeNull();
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the provider ids.
|
||||
*/
|
||||
QJsonObject providerIds() const;
|
||||
/**
|
||||
* @brief Gets or sets the provider ids.
|
||||
*/
|
||||
void setProviderIds(QJsonObject newProviderIds);
|
||||
bool providerIdsNull() const;
|
||||
void setProviderIdsNull();
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the year.
|
||||
*/
|
||||
std::optional<qint32> year() const;
|
||||
/**
|
||||
* @brief Gets or sets the year.
|
||||
*/
|
||||
void setYear(std::optional<qint32> newYear);
|
||||
bool yearNull() const;
|
||||
void setYearNull();
|
||||
|
||||
|
||||
std::optional<qint32> indexNumber() const;
|
||||
|
||||
void setIndexNumber(std::optional<qint32> newIndexNumber);
|
||||
bool indexNumberNull() const;
|
||||
void setIndexNumberNull();
|
||||
|
||||
|
||||
std::optional<qint32> parentIndexNumber() const;
|
||||
|
||||
void setParentIndexNumber(std::optional<qint32> newParentIndexNumber);
|
||||
bool parentIndexNumberNull() const;
|
||||
void setParentIndexNumberNull();
|
||||
|
||||
|
||||
QDateTime premiereDate() const;
|
||||
|
||||
void setPremiereDate(QDateTime newPremiereDate);
|
||||
bool premiereDateNull() const;
|
||||
void setPremiereDateNull();
|
||||
|
||||
|
||||
bool isAutomated() const;
|
||||
|
||||
void setIsAutomated(bool newIsAutomated);
|
||||
|
||||
|
||||
QString seriesName() const;
|
||||
|
||||
void setSeriesName(QString newSeriesName);
|
||||
bool seriesNameNull() const;
|
||||
void setSeriesNameNull();
|
||||
|
||||
|
||||
protected:
|
||||
QString m_name;
|
||||
QString m_path;
|
||||
QString m_metadataLanguage;
|
||||
QString m_metadataCountryCode;
|
||||
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;
|
||||
QString m_seriesName;
|
||||
|
||||
private:
|
||||
// Private constructor which generates an invalid object, for use withing BookInfo::fromJson();
|
||||
BookInfo();
|
||||
};
|
||||
|
||||
|
||||
} // 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
|
||||
|
||||
#endif // JELLYFIN_DTO_BOOKINFO_H
|
128
core/include/JellyfinQt/dto/bookinforemotesearchquery.h
Normal file
128
core/include/JellyfinQt/dto/bookinforemotesearchquery.h
Normal file
|
@ -0,0 +1,128 @@
|
|||
/*
|
||||
* 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_BOOKINFOREMOTESEARCHQUERY_H
|
||||
#define JELLYFIN_DTO_BOOKINFOREMOTESEARCHQUERY_H
|
||||
|
||||
#include <QJsonObject>
|
||||
#include <QJsonValue>
|
||||
#include <QSharedPointer>
|
||||
#include <QString>
|
||||
#include <optional>
|
||||
|
||||
#include "JellyfinQt/dto/bookinfo.h"
|
||||
#include "JellyfinQt/support/jsonconv.h"
|
||||
|
||||
namespace Jellyfin {
|
||||
// Forward declaration
|
||||
class ApiClient;
|
||||
}
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
|
||||
class BookInfoRemoteSearchQuery {
|
||||
public:
|
||||
BookInfoRemoteSearchQuery(
|
||||
QSharedPointer<BookInfo> searchInfo,
|
||||
QString itemId,
|
||||
bool includeDisabledProviders
|
||||
);
|
||||
|
||||
BookInfoRemoteSearchQuery(const BookInfoRemoteSearchQuery &other);
|
||||
|
||||
/**
|
||||
* Replaces the data being hold by this class with that of the other.
|
||||
*/
|
||||
void replaceData(BookInfoRemoteSearchQuery &other);
|
||||
|
||||
static BookInfoRemoteSearchQuery fromJson(QJsonObject source);
|
||||
void setFromJson(QJsonObject source);
|
||||
QJsonObject toJson() const;
|
||||
|
||||
// Properties
|
||||
|
||||
QSharedPointer<BookInfo> searchInfo() const;
|
||||
|
||||
void setSearchInfo(QSharedPointer<BookInfo> newSearchInfo);
|
||||
|
||||
|
||||
QString itemId() const;
|
||||
|
||||
void setItemId(QString newItemId);
|
||||
|
||||
/**
|
||||
* @brief Will only search within the given provider when set.
|
||||
*/
|
||||
QString searchProviderName() const;
|
||||
/**
|
||||
* @brief Will only search within the given provider when set.
|
||||
*/
|
||||
void setSearchProviderName(QString newSearchProviderName);
|
||||
bool searchProviderNameNull() const;
|
||||
void setSearchProviderNameNull();
|
||||
|
||||
/**
|
||||
* @brief Gets or sets a value indicating whether disabled providers should be included.
|
||||
*/
|
||||
bool includeDisabledProviders() const;
|
||||
/**
|
||||
* @brief Gets or sets a value indicating whether disabled providers should be included.
|
||||
*/
|
||||
void setIncludeDisabledProviders(bool newIncludeDisabledProviders);
|
||||
|
||||
|
||||
protected:
|
||||
QSharedPointer<BookInfo> m_searchInfo = QSharedPointer<BookInfo>();
|
||||
QString m_itemId;
|
||||
QString m_searchProviderName;
|
||||
bool m_includeDisabledProviders;
|
||||
|
||||
private:
|
||||
// Private constructor which generates an invalid object, for use withing BookInfoRemoteSearchQuery::fromJson();
|
||||
BookInfoRemoteSearchQuery();
|
||||
};
|
||||
|
||||
|
||||
} // 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
|
||||
|
||||
#endif // JELLYFIN_DTO_BOOKINFOREMOTESEARCHQUERY_H
|
193
core/include/JellyfinQt/dto/boxsetinfo.h
Normal file
193
core/include/JellyfinQt/dto/boxsetinfo.h
Normal file
|
@ -0,0 +1,193 @@
|
|||
/*
|
||||
* 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_BOXSETINFO_H
|
||||
#define JELLYFIN_DTO_BOXSETINFO_H
|
||||
|
||||
#include <QDateTime>
|
||||
#include <QJsonObject>
|
||||
#include <QJsonValue>
|
||||
#include <QString>
|
||||
#include <optional>
|
||||
|
||||
#include "JellyfinQt/support/jsonconv.h"
|
||||
|
||||
namespace Jellyfin {
|
||||
// Forward declaration
|
||||
class ApiClient;
|
||||
}
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
|
||||
class BoxSetInfo {
|
||||
public:
|
||||
BoxSetInfo(
|
||||
bool isAutomated
|
||||
);
|
||||
|
||||
BoxSetInfo(const BoxSetInfo &other);
|
||||
|
||||
/**
|
||||
* Replaces the data being hold by this class with that of the other.
|
||||
*/
|
||||
void replaceData(BoxSetInfo &other);
|
||||
|
||||
static BoxSetInfo fromJson(QJsonObject source);
|
||||
void setFromJson(QJsonObject source);
|
||||
QJsonObject toJson() const;
|
||||
|
||||
// Properties
|
||||
/**
|
||||
* @brief Gets or sets the name.
|
||||
*/
|
||||
QString name() const;
|
||||
/**
|
||||
* @brief Gets or sets the name.
|
||||
*/
|
||||
void setName(QString newName);
|
||||
bool nameNull() const;
|
||||
void setNameNull();
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the path.
|
||||
*/
|
||||
QString path() const;
|
||||
/**
|
||||
* @brief Gets or sets the path.
|
||||
*/
|
||||
void setPath(QString newPath);
|
||||
bool pathNull() const;
|
||||
void setPathNull();
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the metadata language.
|
||||
*/
|
||||
QString metadataLanguage() const;
|
||||
/**
|
||||
* @brief Gets or sets the metadata language.
|
||||
*/
|
||||
void setMetadataLanguage(QString newMetadataLanguage);
|
||||
bool metadataLanguageNull() const;
|
||||
void setMetadataLanguageNull();
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the metadata country code.
|
||||
*/
|
||||
QString metadataCountryCode() const;
|
||||
/**
|
||||
* @brief Gets or sets the metadata country code.
|
||||
*/
|
||||
void setMetadataCountryCode(QString newMetadataCountryCode);
|
||||
bool metadataCountryCodeNull() const;
|
||||
void setMetadataCountryCodeNull();
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the provider ids.
|
||||
*/
|
||||
QJsonObject providerIds() const;
|
||||
/**
|
||||
* @brief Gets or sets the provider ids.
|
||||
*/
|
||||
void setProviderIds(QJsonObject newProviderIds);
|
||||
bool providerIdsNull() const;
|
||||
void setProviderIdsNull();
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the year.
|
||||
*/
|
||||
std::optional<qint32> year() const;
|
||||
/**
|
||||
* @brief Gets or sets the year.
|
||||
*/
|
||||
void setYear(std::optional<qint32> newYear);
|
||||
bool yearNull() const;
|
||||
void setYearNull();
|
||||
|
||||
|
||||
std::optional<qint32> indexNumber() const;
|
||||
|
||||
void setIndexNumber(std::optional<qint32> newIndexNumber);
|
||||
bool indexNumberNull() const;
|
||||
void setIndexNumberNull();
|
||||
|
||||
|
||||
std::optional<qint32> parentIndexNumber() const;
|
||||
|
||||
void setParentIndexNumber(std::optional<qint32> newParentIndexNumber);
|
||||
bool parentIndexNumberNull() const;
|
||||
void setParentIndexNumberNull();
|
||||
|
||||
|
||||
QDateTime premiereDate() const;
|
||||
|
||||
void setPremiereDate(QDateTime newPremiereDate);
|
||||
bool premiereDateNull() const;
|
||||
void setPremiereDateNull();
|
||||
|
||||
|
||||
bool isAutomated() const;
|
||||
|
||||
void setIsAutomated(bool newIsAutomated);
|
||||
|
||||
|
||||
protected:
|
||||
QString m_name;
|
||||
QString m_path;
|
||||
QString m_metadataLanguage;
|
||||
QString m_metadataCountryCode;
|
||||
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;
|
||||
|
||||
private:
|
||||
// Private constructor which generates an invalid object, for use withing BoxSetInfo::fromJson();
|
||||
BoxSetInfo();
|
||||
};
|
||||
|
||||
|
||||
} // 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
|
||||
|
||||
#endif // JELLYFIN_DTO_BOXSETINFO_H
|
128
core/include/JellyfinQt/dto/boxsetinforemotesearchquery.h
Normal file
128
core/include/JellyfinQt/dto/boxsetinforemotesearchquery.h
Normal file
|
@ -0,0 +1,128 @@
|
|||
/*
|
||||
* 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_BOXSETINFOREMOTESEARCHQUERY_H
|
||||
#define JELLYFIN_DTO_BOXSETINFOREMOTESEARCHQUERY_H
|
||||
|
||||
#include <QJsonObject>
|
||||
#include <QJsonValue>
|
||||
#include <QSharedPointer>
|
||||
#include <QString>
|
||||
#include <optional>
|
||||
|
||||
#include "JellyfinQt/dto/boxsetinfo.h"
|
||||
#include "JellyfinQt/support/jsonconv.h"
|
||||
|
||||
namespace Jellyfin {
|
||||
// Forward declaration
|
||||
class ApiClient;
|
||||
}
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
|
||||
class BoxSetInfoRemoteSearchQuery {
|
||||
public:
|
||||
BoxSetInfoRemoteSearchQuery(
|
||||
QSharedPointer<BoxSetInfo> searchInfo,
|
||||
QString itemId,
|
||||
bool includeDisabledProviders
|
||||
);
|
||||
|
||||
BoxSetInfoRemoteSearchQuery(const BoxSetInfoRemoteSearchQuery &other);
|
||||
|
||||
/**
|
||||
* Replaces the data being hold by this class with that of the other.
|
||||
*/
|
||||
void replaceData(BoxSetInfoRemoteSearchQuery &other);
|
||||
|
||||
static BoxSetInfoRemoteSearchQuery fromJson(QJsonObject source);
|
||||
void setFromJson(QJsonObject source);
|
||||
QJsonObject toJson() const;
|
||||
|
||||
// Properties
|
||||
|
||||
QSharedPointer<BoxSetInfo> searchInfo() const;
|
||||
|
||||
void setSearchInfo(QSharedPointer<BoxSetInfo> newSearchInfo);
|
||||
|
||||
|
||||
QString itemId() const;
|
||||
|
||||
void setItemId(QString newItemId);
|
||||
|
||||
/**
|
||||
* @brief Will only search within the given provider when set.
|
||||
*/
|
||||
QString searchProviderName() const;
|
||||
/**
|
||||
* @brief Will only search within the given provider when set.
|
||||
*/
|
||||
void setSearchProviderName(QString newSearchProviderName);
|
||||
bool searchProviderNameNull() const;
|
||||
void setSearchProviderNameNull();
|
||||
|
||||
/**
|
||||
* @brief Gets or sets a value indicating whether disabled providers should be included.
|
||||
*/
|
||||
bool includeDisabledProviders() const;
|
||||
/**
|
||||
* @brief Gets or sets a value indicating whether disabled providers should be included.
|
||||
*/
|
||||
void setIncludeDisabledProviders(bool newIncludeDisabledProviders);
|
||||
|
||||
|
||||
protected:
|
||||
QSharedPointer<BoxSetInfo> m_searchInfo = QSharedPointer<BoxSetInfo>();
|
||||
QString m_itemId;
|
||||
QString m_searchProviderName;
|
||||
bool m_includeDisabledProviders;
|
||||
|
||||
private:
|
||||
// Private constructor which generates an invalid object, for use withing BoxSetInfoRemoteSearchQuery::fromJson();
|
||||
BoxSetInfoRemoteSearchQuery();
|
||||
};
|
||||
|
||||
|
||||
} // 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
|
||||
|
||||
#endif // JELLYFIN_DTO_BOXSETINFOREMOTESEARCHQUERY_H
|
108
core/include/JellyfinQt/dto/brandingoptions.h
Normal file
108
core/include/JellyfinQt/dto/brandingoptions.h
Normal file
|
@ -0,0 +1,108 @@
|
|||
/*
|
||||
* 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_BRANDINGOPTIONS_H
|
||||
#define JELLYFIN_DTO_BRANDINGOPTIONS_H
|
||||
|
||||
#include <QJsonObject>
|
||||
#include <QJsonValue>
|
||||
#include <QString>
|
||||
#include <optional>
|
||||
|
||||
#include "JellyfinQt/support/jsonconv.h"
|
||||
|
||||
namespace Jellyfin {
|
||||
// Forward declaration
|
||||
class ApiClient;
|
||||
}
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
|
||||
class BrandingOptions {
|
||||
public: BrandingOptions();
|
||||
BrandingOptions(const BrandingOptions &other);
|
||||
|
||||
/**
|
||||
* Replaces the data being hold by this class with that of the other.
|
||||
*/
|
||||
void replaceData(BrandingOptions &other);
|
||||
|
||||
static BrandingOptions fromJson(QJsonObject source);
|
||||
void setFromJson(QJsonObject source);
|
||||
QJsonObject toJson() const;
|
||||
|
||||
// Properties
|
||||
/**
|
||||
* @brief Gets or sets the login disclaimer.
|
||||
*/
|
||||
QString loginDisclaimer() const;
|
||||
/**
|
||||
* @brief Gets or sets the login disclaimer.
|
||||
*/
|
||||
void setLoginDisclaimer(QString newLoginDisclaimer);
|
||||
bool loginDisclaimerNull() const;
|
||||
void setLoginDisclaimerNull();
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the custom CSS.
|
||||
*/
|
||||
QString customCss() const;
|
||||
/**
|
||||
* @brief Gets or sets the custom CSS.
|
||||
*/
|
||||
void setCustomCss(QString newCustomCss);
|
||||
bool customCssNull() const;
|
||||
void setCustomCssNull();
|
||||
|
||||
|
||||
protected:
|
||||
QString m_loginDisclaimer;
|
||||
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
|
||||
|
||||
#endif // JELLYFIN_DTO_BRANDINGOPTIONS_H
|
134
core/include/JellyfinQt/dto/bufferrequestdto.h
Normal file
134
core/include/JellyfinQt/dto/bufferrequestdto.h
Normal file
|
@ -0,0 +1,134 @@
|
|||
/*
|
||||
* 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_BUFFERREQUESTDTO_H
|
||||
#define JELLYFIN_DTO_BUFFERREQUESTDTO_H
|
||||
|
||||
#include <QDateTime>
|
||||
#include <QJsonObject>
|
||||
#include <QJsonValue>
|
||||
#include <QString>
|
||||
#include <optional>
|
||||
|
||||
#include "JellyfinQt/support/jsonconv.h"
|
||||
|
||||
namespace Jellyfin {
|
||||
// Forward declaration
|
||||
class ApiClient;
|
||||
}
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
|
||||
class BufferRequestDto {
|
||||
public:
|
||||
BufferRequestDto(
|
||||
QDateTime when,
|
||||
qint64 positionTicks,
|
||||
bool isPlaying,
|
||||
QString playlistItemId
|
||||
);
|
||||
|
||||
BufferRequestDto(const BufferRequestDto &other);
|
||||
|
||||
/**
|
||||
* Replaces the data being hold by this class with that of the other.
|
||||
*/
|
||||
void replaceData(BufferRequestDto &other);
|
||||
|
||||
static BufferRequestDto fromJson(QJsonObject source);
|
||||
void setFromJson(QJsonObject source);
|
||||
QJsonObject toJson() const;
|
||||
|
||||
// Properties
|
||||
/**
|
||||
* @brief Gets or sets when the request has been made by the client.
|
||||
*/
|
||||
QDateTime when() const;
|
||||
/**
|
||||
* @brief Gets or sets when the request has been made by the client.
|
||||
*/
|
||||
void setWhen(QDateTime newWhen);
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the position ticks.
|
||||
*/
|
||||
qint64 positionTicks() const;
|
||||
/**
|
||||
* @brief Gets or sets the position ticks.
|
||||
*/
|
||||
void setPositionTicks(qint64 newPositionTicks);
|
||||
|
||||
/**
|
||||
* @brief Gets or sets a value indicating whether the client playback is unpaused.
|
||||
*/
|
||||
bool isPlaying() const;
|
||||
/**
|
||||
* @brief Gets or sets a value indicating whether the client playback is unpaused.
|
||||
*/
|
||||
void setIsPlaying(bool newIsPlaying);
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the playlist item identifier of the playing item.
|
||||
*/
|
||||
QString playlistItemId() const;
|
||||
/**
|
||||
* @brief Gets or sets the playlist item identifier of the playing item.
|
||||
*/
|
||||
void setPlaylistItemId(QString newPlaylistItemId);
|
||||
|
||||
|
||||
protected:
|
||||
QDateTime m_when;
|
||||
qint64 m_positionTicks;
|
||||
bool m_isPlaying;
|
||||
QString m_playlistItemId;
|
||||
|
||||
private:
|
||||
// Private constructor which generates an invalid object, for use withing BufferRequestDto::fromJson();
|
||||
BufferRequestDto();
|
||||
};
|
||||
|
||||
|
||||
} // 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
|
||||
|
||||
#endif // JELLYFIN_DTO_BUFFERREQUESTDTO_H
|
233
core/include/JellyfinQt/dto/channelfeatures.h
Normal file
233
core/include/JellyfinQt/dto/channelfeatures.h
Normal file
|
@ -0,0 +1,233 @@
|
|||
/*
|
||||
* 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_CHANNELFEATURES_H
|
||||
#define JELLYFIN_DTO_CHANNELFEATURES_H
|
||||
|
||||
#include <QJsonObject>
|
||||
#include <QJsonValue>
|
||||
#include <QList>
|
||||
#include <QString>
|
||||
#include <QStringList>
|
||||
#include <optional>
|
||||
|
||||
#include "JellyfinQt/dto/channelitemsortfield.h"
|
||||
#include "JellyfinQt/dto/channelmediacontenttype.h"
|
||||
#include "JellyfinQt/dto/channelmediatype.h"
|
||||
#include "JellyfinQt/support/jsonconv.h"
|
||||
|
||||
namespace Jellyfin {
|
||||
// Forward declaration
|
||||
class ApiClient;
|
||||
}
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
|
||||
class ChannelFeatures {
|
||||
public:
|
||||
ChannelFeatures(
|
||||
bool canSearch,
|
||||
bool supportsSortOrderToggle,
|
||||
bool supportsLatestMedia,
|
||||
bool canFilter,
|
||||
bool supportsContentDownloading
|
||||
);
|
||||
|
||||
ChannelFeatures(const ChannelFeatures &other);
|
||||
|
||||
/**
|
||||
* Replaces the data being hold by this class with that of the other.
|
||||
*/
|
||||
void replaceData(ChannelFeatures &other);
|
||||
|
||||
static ChannelFeatures fromJson(QJsonObject source);
|
||||
void setFromJson(QJsonObject source);
|
||||
QJsonObject toJson() const;
|
||||
|
||||
// Properties
|
||||
/**
|
||||
* @brief Gets or sets the name.
|
||||
*/
|
||||
QString name() const;
|
||||
/**
|
||||
* @brief Gets or sets the name.
|
||||
*/
|
||||
void setName(QString newName);
|
||||
bool nameNull() const;
|
||||
void setNameNull();
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the identifier.
|
||||
*/
|
||||
QString jellyfinId() const;
|
||||
/**
|
||||
* @brief Gets or sets the identifier.
|
||||
*/
|
||||
void setJellyfinId(QString newJellyfinId);
|
||||
bool jellyfinIdNull() const;
|
||||
void setJellyfinIdNull();
|
||||
|
||||
/**
|
||||
* @brief Gets or sets a value indicating whether this instance can search.
|
||||
*/
|
||||
bool canSearch() const;
|
||||
/**
|
||||
* @brief Gets or sets a value indicating whether this instance can search.
|
||||
*/
|
||||
void setCanSearch(bool newCanSearch);
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the media types.
|
||||
*/
|
||||
QList<ChannelMediaType> mediaTypes() const;
|
||||
/**
|
||||
* @brief Gets or sets the media types.
|
||||
*/
|
||||
void setMediaTypes(QList<ChannelMediaType> newMediaTypes);
|
||||
bool mediaTypesNull() const;
|
||||
void setMediaTypesNull();
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the content types.
|
||||
*/
|
||||
QList<ChannelMediaContentType> contentTypes() const;
|
||||
/**
|
||||
* @brief Gets or sets the content types.
|
||||
*/
|
||||
void setContentTypes(QList<ChannelMediaContentType> newContentTypes);
|
||||
bool contentTypesNull() const;
|
||||
void setContentTypesNull();
|
||||
|
||||
/**
|
||||
* @brief Represents the maximum number of records the channel allows retrieving at a time.
|
||||
*/
|
||||
std::optional<qint32> maxPageSize() const;
|
||||
/**
|
||||
* @brief Represents the maximum number of records the channel allows retrieving at a time.
|
||||
*/
|
||||
void setMaxPageSize(std::optional<qint32> newMaxPageSize);
|
||||
bool maxPageSizeNull() const;
|
||||
void setMaxPageSizeNull();
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the automatic refresh levels.
|
||||
*/
|
||||
std::optional<qint32> autoRefreshLevels() const;
|
||||
/**
|
||||
* @brief Gets or sets the automatic refresh levels.
|
||||
*/
|
||||
void setAutoRefreshLevels(std::optional<qint32> newAutoRefreshLevels);
|
||||
bool autoRefreshLevelsNull() const;
|
||||
void setAutoRefreshLevelsNull();
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the default sort orders.
|
||||
*/
|
||||
QList<ChannelItemSortField> defaultSortFields() const;
|
||||
/**
|
||||
* @brief Gets or sets the default sort orders.
|
||||
*/
|
||||
void setDefaultSortFields(QList<ChannelItemSortField> newDefaultSortFields);
|
||||
bool defaultSortFieldsNull() const;
|
||||
void setDefaultSortFieldsNull();
|
||||
|
||||
/**
|
||||
* @brief Indicates if a sort ascending/descending toggle is supported or not.
|
||||
*/
|
||||
bool supportsSortOrderToggle() const;
|
||||
/**
|
||||
* @brief Indicates if a sort ascending/descending toggle is supported or not.
|
||||
*/
|
||||
void setSupportsSortOrderToggle(bool newSupportsSortOrderToggle);
|
||||
|
||||
/**
|
||||
* @brief Gets or sets a value indicating whether [supports latest media].
|
||||
*/
|
||||
bool supportsLatestMedia() const;
|
||||
/**
|
||||
* @brief Gets or sets a value indicating whether [supports latest media].
|
||||
*/
|
||||
void setSupportsLatestMedia(bool newSupportsLatestMedia);
|
||||
|
||||
/**
|
||||
* @brief Gets or sets a value indicating whether this instance can filter.
|
||||
*/
|
||||
bool canFilter() const;
|
||||
/**
|
||||
* @brief Gets or sets a value indicating whether this instance can filter.
|
||||
*/
|
||||
void setCanFilter(bool newCanFilter);
|
||||
|
||||
/**
|
||||
* @brief Gets or sets a value indicating whether [supports content downloading].
|
||||
*/
|
||||
bool supportsContentDownloading() const;
|
||||
/**
|
||||
* @brief Gets or sets a value indicating whether [supports content downloading].
|
||||
*/
|
||||
void setSupportsContentDownloading(bool newSupportsContentDownloading);
|
||||
|
||||
|
||||
protected:
|
||||
QString m_name;
|
||||
QString m_jellyfinId;
|
||||
bool m_canSearch;
|
||||
QList<ChannelMediaType> m_mediaTypes;
|
||||
QList<ChannelMediaContentType> m_contentTypes;
|
||||
std::optional<qint32> m_maxPageSize = std::nullopt;
|
||||
std::optional<qint32> m_autoRefreshLevels = std::nullopt;
|
||||
QList<ChannelItemSortField> m_defaultSortFields;
|
||||
bool m_supportsSortOrderToggle;
|
||||
bool m_supportsLatestMedia;
|
||||
bool m_canFilter;
|
||||
bool m_supportsContentDownloading;
|
||||
|
||||
private:
|
||||
// Private constructor which generates an invalid object, for use withing ChannelFeatures::fromJson();
|
||||
ChannelFeatures();
|
||||
};
|
||||
|
||||
|
||||
} // 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
|
||||
|
||||
#endif // JELLYFIN_DTO_CHANNELFEATURES_H
|
81
core/include/JellyfinQt/dto/channelitemsortfield.h
Normal file
81
core/include/JellyfinQt/dto/channelitemsortfield.h
Normal file
|
@ -0,0 +1,81 @@
|
|||
/*
|
||||
* Sailfin: a Jellyfin client written using Qt
|
||||
* Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
|
||||
* OVERWRITTEN AT SOME POINT!
|
||||
*
|
||||
* If there is a bug in this file, please fix the code generator used to generate this file found in
|
||||
* core/openapigenerator.d.
|
||||
*
|
||||
* This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
|
||||
* file with a newer file if needed instead of manually updating the files.
|
||||
*/
|
||||
|
||||
#ifndef JELLYFIN_DTO_CHANNELITEMSORTFIELD_H
|
||||
#define JELLYFIN_DTO_CHANNELITEMSORTFIELD_H
|
||||
|
||||
#include <QJsonValue>
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
|
||||
#include "JellyfinQt/support/jsonconv.h"
|
||||
|
||||
namespace Jellyfin {
|
||||
// Forward declaration
|
||||
class ApiClient;
|
||||
}
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
class ChannelItemSortFieldClass {
|
||||
Q_GADGET
|
||||
public:
|
||||
enum Value {
|
||||
EnumNotSet,
|
||||
Name,
|
||||
CommunityRating,
|
||||
PremiereDate,
|
||||
DateCreated,
|
||||
Runtime,
|
||||
PlayCount,
|
||||
CommunityPlayCount,
|
||||
};
|
||||
Q_ENUM(Value)
|
||||
private:
|
||||
explicit ChannelItemSortFieldClass();
|
||||
};
|
||||
|
||||
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
|
||||
|
||||
#endif // JELLYFIN_DTO_CHANNELITEMSORTFIELD_H
|
137
core/include/JellyfinQt/dto/channelmappingoptionsdto.h
Normal file
137
core/include/JellyfinQt/dto/channelmappingoptionsdto.h
Normal file
|
@ -0,0 +1,137 @@
|
|||
/*
|
||||
* 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_CHANNELMAPPINGOPTIONSDTO_H
|
||||
#define JELLYFIN_DTO_CHANNELMAPPINGOPTIONSDTO_H
|
||||
|
||||
#include <QJsonObject>
|
||||
#include <QJsonValue>
|
||||
#include <QList>
|
||||
#include <QString>
|
||||
#include <QStringList>
|
||||
#include <optional>
|
||||
|
||||
#include "JellyfinQt/dto/nameidpair.h"
|
||||
#include "JellyfinQt/dto/namevaluepair.h"
|
||||
#include "JellyfinQt/dto/tunerchannelmapping.h"
|
||||
#include "JellyfinQt/support/jsonconv.h"
|
||||
|
||||
namespace Jellyfin {
|
||||
// Forward declaration
|
||||
class ApiClient;
|
||||
}
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
|
||||
class ChannelMappingOptionsDto {
|
||||
public: ChannelMappingOptionsDto();
|
||||
ChannelMappingOptionsDto(const ChannelMappingOptionsDto &other);
|
||||
|
||||
/**
|
||||
* Replaces the data being hold by this class with that of the other.
|
||||
*/
|
||||
void replaceData(ChannelMappingOptionsDto &other);
|
||||
|
||||
static ChannelMappingOptionsDto fromJson(QJsonObject source);
|
||||
void setFromJson(QJsonObject source);
|
||||
QJsonObject toJson() const;
|
||||
|
||||
// Properties
|
||||
/**
|
||||
* @brief Gets or sets list of tuner channels.
|
||||
*/
|
||||
QList<TunerChannelMapping> tunerChannels() const;
|
||||
/**
|
||||
* @brief Gets or sets list of tuner channels.
|
||||
*/
|
||||
void setTunerChannels(QList<TunerChannelMapping> newTunerChannels);
|
||||
bool tunerChannelsNull() const;
|
||||
void setTunerChannelsNull();
|
||||
|
||||
/**
|
||||
* @brief Gets or sets list of provider channels.
|
||||
*/
|
||||
QList<NameIdPair> providerChannels() const;
|
||||
/**
|
||||
* @brief Gets or sets list of provider channels.
|
||||
*/
|
||||
void setProviderChannels(QList<NameIdPair> newProviderChannels);
|
||||
bool providerChannelsNull() const;
|
||||
void setProviderChannelsNull();
|
||||
|
||||
/**
|
||||
* @brief Gets or sets list of mappings.
|
||||
*/
|
||||
QList<NameValuePair> mappings() const;
|
||||
/**
|
||||
* @brief Gets or sets list of mappings.
|
||||
*/
|
||||
void setMappings(QList<NameValuePair> newMappings);
|
||||
bool mappingsNull() const;
|
||||
void setMappingsNull();
|
||||
|
||||
/**
|
||||
* @brief Gets or sets provider name.
|
||||
*/
|
||||
QString providerName() const;
|
||||
/**
|
||||
* @brief Gets or sets provider name.
|
||||
*/
|
||||
void setProviderName(QString newProviderName);
|
||||
bool providerNameNull() const;
|
||||
void setProviderNameNull();
|
||||
|
||||
|
||||
protected:
|
||||
QList<TunerChannelMapping> m_tunerChannels;
|
||||
QList<NameIdPair> m_providerChannels;
|
||||
QList<NameValuePair> m_mappings;
|
||||
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
|
||||
|
||||
#endif // JELLYFIN_DTO_CHANNELMAPPINGOPTIONSDTO_H
|
82
core/include/JellyfinQt/dto/channelmediacontenttype.h
Normal file
82
core/include/JellyfinQt/dto/channelmediacontenttype.h
Normal file
|
@ -0,0 +1,82 @@
|
|||
/*
|
||||
* 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_CHANNELMEDIACONTENTTYPE_H
|
||||
#define JELLYFIN_DTO_CHANNELMEDIACONTENTTYPE_H
|
||||
|
||||
#include <QJsonValue>
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
|
||||
#include "JellyfinQt/support/jsonconv.h"
|
||||
|
||||
namespace Jellyfin {
|
||||
// Forward declaration
|
||||
class ApiClient;
|
||||
}
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
class ChannelMediaContentTypeClass {
|
||||
Q_GADGET
|
||||
public:
|
||||
enum Value {
|
||||
EnumNotSet,
|
||||
Clip,
|
||||
Podcast,
|
||||
Trailer,
|
||||
Movie,
|
||||
Episode,
|
||||
Song,
|
||||
MovieExtra,
|
||||
TvExtra,
|
||||
};
|
||||
Q_ENUM(Value)
|
||||
private:
|
||||
explicit ChannelMediaContentTypeClass();
|
||||
};
|
||||
|
||||
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
|
||||
|
||||
#endif // JELLYFIN_DTO_CHANNELMEDIACONTENTTYPE_H
|
77
core/include/JellyfinQt/dto/channelmediatype.h
Normal file
77
core/include/JellyfinQt/dto/channelmediatype.h
Normal file
|
@ -0,0 +1,77 @@
|
|||
/*
|
||||
* 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_CHANNELMEDIATYPE_H
|
||||
#define JELLYFIN_DTO_CHANNELMEDIATYPE_H
|
||||
|
||||
#include <QJsonValue>
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
|
||||
#include "JellyfinQt/support/jsonconv.h"
|
||||
|
||||
namespace Jellyfin {
|
||||
// Forward declaration
|
||||
class ApiClient;
|
||||
}
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
class ChannelMediaTypeClass {
|
||||
Q_GADGET
|
||||
public:
|
||||
enum Value {
|
||||
EnumNotSet,
|
||||
Audio,
|
||||
Video,
|
||||
Photo,
|
||||
};
|
||||
Q_ENUM(Value)
|
||||
private:
|
||||
explicit ChannelMediaTypeClass();
|
||||
};
|
||||
|
||||
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
|
||||
|
||||
#endif // JELLYFIN_DTO_CHANNELMEDIATYPE_H
|
76
core/include/JellyfinQt/dto/channeltype.h
Normal file
76
core/include/JellyfinQt/dto/channeltype.h
Normal file
|
@ -0,0 +1,76 @@
|
|||
/*
|
||||
* 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_CHANNELTYPE_H
|
||||
#define JELLYFIN_DTO_CHANNELTYPE_H
|
||||
|
||||
#include <QJsonValue>
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
|
||||
#include "JellyfinQt/support/jsonconv.h"
|
||||
|
||||
namespace Jellyfin {
|
||||
// Forward declaration
|
||||
class ApiClient;
|
||||
}
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
class ChannelTypeClass {
|
||||
Q_GADGET
|
||||
public:
|
||||
enum Value {
|
||||
EnumNotSet,
|
||||
TV,
|
||||
Radio,
|
||||
};
|
||||
Q_ENUM(Value)
|
||||
private:
|
||||
explicit ChannelTypeClass();
|
||||
};
|
||||
|
||||
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
|
||||
|
||||
#endif // JELLYFIN_DTO_CHANNELTYPE_H
|
140
core/include/JellyfinQt/dto/chapterinfo.h
Normal file
140
core/include/JellyfinQt/dto/chapterinfo.h
Normal file
|
@ -0,0 +1,140 @@
|
|||
/*
|
||||
* 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_CHAPTERINFO_H
|
||||
#define JELLYFIN_DTO_CHAPTERINFO_H
|
||||
|
||||
#include <QDateTime>
|
||||
#include <QJsonObject>
|
||||
#include <QJsonValue>
|
||||
#include <QString>
|
||||
#include <optional>
|
||||
|
||||
#include "JellyfinQt/support/jsonconv.h"
|
||||
|
||||
namespace Jellyfin {
|
||||
// Forward declaration
|
||||
class ApiClient;
|
||||
}
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
|
||||
class ChapterInfo {
|
||||
public:
|
||||
ChapterInfo(
|
||||
qint64 startPositionTicks,
|
||||
QDateTime imageDateModified
|
||||
);
|
||||
|
||||
ChapterInfo(const ChapterInfo &other);
|
||||
|
||||
/**
|
||||
* Replaces the data being hold by this class with that of the other.
|
||||
*/
|
||||
void replaceData(ChapterInfo &other);
|
||||
|
||||
static ChapterInfo fromJson(QJsonObject source);
|
||||
void setFromJson(QJsonObject source);
|
||||
QJsonObject toJson() const;
|
||||
|
||||
// Properties
|
||||
/**
|
||||
* @brief Gets or sets the start position ticks.
|
||||
*/
|
||||
qint64 startPositionTicks() const;
|
||||
/**
|
||||
* @brief Gets or sets the start position ticks.
|
||||
*/
|
||||
void setStartPositionTicks(qint64 newStartPositionTicks);
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the name.
|
||||
*/
|
||||
QString name() const;
|
||||
/**
|
||||
* @brief Gets or sets the name.
|
||||
*/
|
||||
void setName(QString newName);
|
||||
bool nameNull() const;
|
||||
void setNameNull();
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the image path.
|
||||
*/
|
||||
QString imagePath() const;
|
||||
/**
|
||||
* @brief Gets or sets the image path.
|
||||
*/
|
||||
void setImagePath(QString newImagePath);
|
||||
bool imagePathNull() const;
|
||||
void setImagePathNull();
|
||||
|
||||
|
||||
QDateTime imageDateModified() const;
|
||||
|
||||
void setImageDateModified(QDateTime newImageDateModified);
|
||||
|
||||
|
||||
QString imageTag() const;
|
||||
|
||||
void setImageTag(QString newImageTag);
|
||||
bool imageTagNull() const;
|
||||
void setImageTagNull();
|
||||
|
||||
|
||||
protected:
|
||||
qint64 m_startPositionTicks;
|
||||
QString m_name;
|
||||
QString m_imagePath;
|
||||
QDateTime m_imageDateModified;
|
||||
QString m_imageTag;
|
||||
|
||||
private:
|
||||
// Private constructor which generates an invalid object, for use withing ChapterInfo::fromJson();
|
||||
ChapterInfo();
|
||||
};
|
||||
|
||||
|
||||
} // 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
|
||||
|
||||
#endif // JELLYFIN_DTO_CHAPTERINFO_H
|
169
core/include/JellyfinQt/dto/clientcapabilities.h
Normal file
169
core/include/JellyfinQt/dto/clientcapabilities.h
Normal file
|
@ -0,0 +1,169 @@
|
|||
/*
|
||||
* 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_CLIENTCAPABILITIES_H
|
||||
#define JELLYFIN_DTO_CLIENTCAPABILITIES_H
|
||||
|
||||
#include <QJsonObject>
|
||||
#include <QJsonValue>
|
||||
#include <QList>
|
||||
#include <QSharedPointer>
|
||||
#include <QString>
|
||||
#include <QStringList>
|
||||
#include <optional>
|
||||
|
||||
#include "JellyfinQt/dto/deviceprofile.h"
|
||||
#include "JellyfinQt/dto/generalcommandtype.h"
|
||||
#include "JellyfinQt/support/jsonconv.h"
|
||||
|
||||
namespace Jellyfin {
|
||||
// Forward declaration
|
||||
class ApiClient;
|
||||
}
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
|
||||
class ClientCapabilities {
|
||||
public:
|
||||
ClientCapabilities(
|
||||
bool supportsMediaControl,
|
||||
bool supportsContentUploading,
|
||||
bool supportsPersistentIdentifier,
|
||||
bool supportsSync,
|
||||
QSharedPointer<DeviceProfile> deviceProfile
|
||||
);
|
||||
|
||||
ClientCapabilities(const ClientCapabilities &other);
|
||||
|
||||
/**
|
||||
* Replaces the data being hold by this class with that of the other.
|
||||
*/
|
||||
void replaceData(ClientCapabilities &other);
|
||||
|
||||
static ClientCapabilities fromJson(QJsonObject source);
|
||||
void setFromJson(QJsonObject source);
|
||||
QJsonObject toJson() const;
|
||||
|
||||
// Properties
|
||||
|
||||
QStringList playableMediaTypes() const;
|
||||
|
||||
void setPlayableMediaTypes(QStringList newPlayableMediaTypes);
|
||||
bool playableMediaTypesNull() const;
|
||||
void setPlayableMediaTypesNull();
|
||||
|
||||
|
||||
QList<GeneralCommandType> supportedCommands() const;
|
||||
|
||||
void setSupportedCommands(QList<GeneralCommandType> newSupportedCommands);
|
||||
bool supportedCommandsNull() const;
|
||||
void setSupportedCommandsNull();
|
||||
|
||||
|
||||
bool supportsMediaControl() const;
|
||||
|
||||
void setSupportsMediaControl(bool newSupportsMediaControl);
|
||||
|
||||
|
||||
bool supportsContentUploading() const;
|
||||
|
||||
void setSupportsContentUploading(bool newSupportsContentUploading);
|
||||
|
||||
|
||||
QString messageCallbackUrl() const;
|
||||
|
||||
void setMessageCallbackUrl(QString newMessageCallbackUrl);
|
||||
bool messageCallbackUrlNull() const;
|
||||
void setMessageCallbackUrlNull();
|
||||
|
||||
|
||||
bool supportsPersistentIdentifier() const;
|
||||
|
||||
void setSupportsPersistentIdentifier(bool newSupportsPersistentIdentifier);
|
||||
|
||||
|
||||
bool supportsSync() const;
|
||||
|
||||
void setSupportsSync(bool newSupportsSync);
|
||||
|
||||
|
||||
QSharedPointer<DeviceProfile> deviceProfile() const;
|
||||
|
||||
void setDeviceProfile(QSharedPointer<DeviceProfile> newDeviceProfile);
|
||||
|
||||
|
||||
QString appStoreUrl() const;
|
||||
|
||||
void setAppStoreUrl(QString newAppStoreUrl);
|
||||
bool appStoreUrlNull() const;
|
||||
void setAppStoreUrlNull();
|
||||
|
||||
|
||||
QString iconUrl() const;
|
||||
|
||||
void setIconUrl(QString newIconUrl);
|
||||
bool iconUrlNull() const;
|
||||
void setIconUrlNull();
|
||||
|
||||
|
||||
protected:
|
||||
QStringList m_playableMediaTypes;
|
||||
QList<GeneralCommandType> m_supportedCommands;
|
||||
bool m_supportsMediaControl;
|
||||
bool m_supportsContentUploading;
|
||||
QString m_messageCallbackUrl;
|
||||
bool m_supportsPersistentIdentifier;
|
||||
bool m_supportsSync;
|
||||
QSharedPointer<DeviceProfile> m_deviceProfile = QSharedPointer<DeviceProfile>();
|
||||
QString m_appStoreUrl;
|
||||
QString m_iconUrl;
|
||||
|
||||
private:
|
||||
// Private constructor which generates an invalid object, for use withing ClientCapabilities::fromJson();
|
||||
ClientCapabilities();
|
||||
};
|
||||
|
||||
|
||||
} // 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
|
||||
|
||||
#endif // JELLYFIN_DTO_CLIENTCAPABILITIES_H
|
205
core/include/JellyfinQt/dto/clientcapabilitiesdto.h
Normal file
205
core/include/JellyfinQt/dto/clientcapabilitiesdto.h
Normal file
|
@ -0,0 +1,205 @@
|
|||
/*
|
||||
* 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_CLIENTCAPABILITIESDTO_H
|
||||
#define JELLYFIN_DTO_CLIENTCAPABILITIESDTO_H
|
||||
|
||||
#include <QJsonObject>
|
||||
#include <QJsonValue>
|
||||
#include <QList>
|
||||
#include <QSharedPointer>
|
||||
#include <QString>
|
||||
#include <QStringList>
|
||||
#include <optional>
|
||||
|
||||
#include "JellyfinQt/dto/deviceprofile.h"
|
||||
#include "JellyfinQt/dto/generalcommandtype.h"
|
||||
#include "JellyfinQt/support/jsonconv.h"
|
||||
|
||||
namespace Jellyfin {
|
||||
// Forward declaration
|
||||
class ApiClient;
|
||||
}
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
|
||||
class ClientCapabilitiesDto {
|
||||
public:
|
||||
ClientCapabilitiesDto(
|
||||
bool supportsMediaControl,
|
||||
bool supportsContentUploading,
|
||||
bool supportsPersistentIdentifier,
|
||||
bool supportsSync,
|
||||
QSharedPointer<DeviceProfile> deviceProfile
|
||||
);
|
||||
|
||||
ClientCapabilitiesDto(const ClientCapabilitiesDto &other);
|
||||
|
||||
/**
|
||||
* Replaces the data being hold by this class with that of the other.
|
||||
*/
|
||||
void replaceData(ClientCapabilitiesDto &other);
|
||||
|
||||
static ClientCapabilitiesDto fromJson(QJsonObject source);
|
||||
void setFromJson(QJsonObject source);
|
||||
QJsonObject toJson() const;
|
||||
|
||||
// Properties
|
||||
/**
|
||||
* @brief Gets or sets the list of playable media types.
|
||||
*/
|
||||
QStringList playableMediaTypes() const;
|
||||
/**
|
||||
* @brief Gets or sets the list of playable media types.
|
||||
*/
|
||||
void setPlayableMediaTypes(QStringList newPlayableMediaTypes);
|
||||
bool playableMediaTypesNull() const;
|
||||
void setPlayableMediaTypesNull();
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the list of supported commands.
|
||||
*/
|
||||
QList<GeneralCommandType> supportedCommands() const;
|
||||
/**
|
||||
* @brief Gets or sets the list of supported commands.
|
||||
*/
|
||||
void setSupportedCommands(QList<GeneralCommandType> newSupportedCommands);
|
||||
bool supportedCommandsNull() const;
|
||||
void setSupportedCommandsNull();
|
||||
|
||||
/**
|
||||
* @brief Gets or sets a value indicating whether session supports media control.
|
||||
*/
|
||||
bool supportsMediaControl() const;
|
||||
/**
|
||||
* @brief Gets or sets a value indicating whether session supports media control.
|
||||
*/
|
||||
void setSupportsMediaControl(bool newSupportsMediaControl);
|
||||
|
||||
/**
|
||||
* @brief Gets or sets a value indicating whether session supports content uploading.
|
||||
*/
|
||||
bool supportsContentUploading() const;
|
||||
/**
|
||||
* @brief Gets or sets a value indicating whether session supports content uploading.
|
||||
*/
|
||||
void setSupportsContentUploading(bool newSupportsContentUploading);
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the message callback url.
|
||||
*/
|
||||
QString messageCallbackUrl() const;
|
||||
/**
|
||||
* @brief Gets or sets the message callback url.
|
||||
*/
|
||||
void setMessageCallbackUrl(QString newMessageCallbackUrl);
|
||||
bool messageCallbackUrlNull() const;
|
||||
void setMessageCallbackUrlNull();
|
||||
|
||||
/**
|
||||
* @brief Gets or sets a value indicating whether session supports a persistent identifier.
|
||||
*/
|
||||
bool supportsPersistentIdentifier() const;
|
||||
/**
|
||||
* @brief Gets or sets a value indicating whether session supports a persistent identifier.
|
||||
*/
|
||||
void setSupportsPersistentIdentifier(bool newSupportsPersistentIdentifier);
|
||||
|
||||
/**
|
||||
* @brief Gets or sets a value indicating whether session supports sync.
|
||||
*/
|
||||
bool supportsSync() const;
|
||||
/**
|
||||
* @brief Gets or sets a value indicating whether session supports sync.
|
||||
*/
|
||||
void setSupportsSync(bool newSupportsSync);
|
||||
|
||||
|
||||
QSharedPointer<DeviceProfile> deviceProfile() const;
|
||||
|
||||
void setDeviceProfile(QSharedPointer<DeviceProfile> newDeviceProfile);
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the app store url.
|
||||
*/
|
||||
QString appStoreUrl() const;
|
||||
/**
|
||||
* @brief Gets or sets the app store url.
|
||||
*/
|
||||
void setAppStoreUrl(QString newAppStoreUrl);
|
||||
bool appStoreUrlNull() const;
|
||||
void setAppStoreUrlNull();
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the icon url.
|
||||
*/
|
||||
QString iconUrl() const;
|
||||
/**
|
||||
* @brief Gets or sets the icon url.
|
||||
*/
|
||||
void setIconUrl(QString newIconUrl);
|
||||
bool iconUrlNull() const;
|
||||
void setIconUrlNull();
|
||||
|
||||
|
||||
protected:
|
||||
QStringList m_playableMediaTypes;
|
||||
QList<GeneralCommandType> m_supportedCommands;
|
||||
bool m_supportsMediaControl;
|
||||
bool m_supportsContentUploading;
|
||||
QString m_messageCallbackUrl;
|
||||
bool m_supportsPersistentIdentifier;
|
||||
bool m_supportsSync;
|
||||
QSharedPointer<DeviceProfile> m_deviceProfile = QSharedPointer<DeviceProfile>();
|
||||
QString m_appStoreUrl;
|
||||
QString m_iconUrl;
|
||||
|
||||
private:
|
||||
// Private constructor which generates an invalid object, for use withing ClientCapabilitiesDto::fromJson();
|
||||
ClientCapabilitiesDto();
|
||||
};
|
||||
|
||||
|
||||
} // 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
|
||||
|
||||
#endif // JELLYFIN_DTO_CLIENTCAPABILITIESDTO_H
|
132
core/include/JellyfinQt/dto/codecprofile.h
Normal file
132
core/include/JellyfinQt/dto/codecprofile.h
Normal file
|
@ -0,0 +1,132 @@
|
|||
/*
|
||||
* 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_CODECPROFILE_H
|
||||
#define JELLYFIN_DTO_CODECPROFILE_H
|
||||
|
||||
#include <QJsonObject>
|
||||
#include <QJsonValue>
|
||||
#include <QList>
|
||||
#include <QString>
|
||||
#include <QStringList>
|
||||
#include <optional>
|
||||
|
||||
#include "JellyfinQt/dto/codectype.h"
|
||||
#include "JellyfinQt/dto/profilecondition.h"
|
||||
#include "JellyfinQt/support/jsonconv.h"
|
||||
|
||||
namespace Jellyfin {
|
||||
// Forward declaration
|
||||
class ApiClient;
|
||||
}
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
|
||||
class CodecProfile {
|
||||
public:
|
||||
CodecProfile(
|
||||
CodecType type
|
||||
);
|
||||
|
||||
CodecProfile(const CodecProfile &other);
|
||||
|
||||
/**
|
||||
* Replaces the data being hold by this class with that of the other.
|
||||
*/
|
||||
void replaceData(CodecProfile &other);
|
||||
|
||||
static CodecProfile fromJson(QJsonObject source);
|
||||
void setFromJson(QJsonObject source);
|
||||
QJsonObject toJson() const;
|
||||
|
||||
// Properties
|
||||
|
||||
CodecType type() const;
|
||||
|
||||
void setType(CodecType newType);
|
||||
|
||||
|
||||
QList<ProfileCondition> conditions() const;
|
||||
|
||||
void setConditions(QList<ProfileCondition> newConditions);
|
||||
bool conditionsNull() const;
|
||||
void setConditionsNull();
|
||||
|
||||
|
||||
QList<ProfileCondition> applyConditions() const;
|
||||
|
||||
void setApplyConditions(QList<ProfileCondition> newApplyConditions);
|
||||
bool applyConditionsNull() const;
|
||||
void setApplyConditionsNull();
|
||||
|
||||
|
||||
QString codec() const;
|
||||
|
||||
void setCodec(QString newCodec);
|
||||
bool codecNull() const;
|
||||
void setCodecNull();
|
||||
|
||||
|
||||
QString container() const;
|
||||
|
||||
void setContainer(QString newContainer);
|
||||
bool containerNull() const;
|
||||
void setContainerNull();
|
||||
|
||||
|
||||
protected:
|
||||
CodecType m_type;
|
||||
QList<ProfileCondition> m_conditions;
|
||||
QList<ProfileCondition> m_applyConditions;
|
||||
QString m_codec;
|
||||
QString m_container;
|
||||
|
||||
private:
|
||||
// Private constructor which generates an invalid object, for use withing CodecProfile::fromJson();
|
||||
CodecProfile();
|
||||
};
|
||||
|
||||
|
||||
} // 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
|
||||
|
||||
#endif // JELLYFIN_DTO_CODECPROFILE_H
|
77
core/include/JellyfinQt/dto/codectype.h
Normal file
77
core/include/JellyfinQt/dto/codectype.h
Normal file
|
@ -0,0 +1,77 @@
|
|||
/*
|
||||
* 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_CODECTYPE_H
|
||||
#define JELLYFIN_DTO_CODECTYPE_H
|
||||
|
||||
#include <QJsonValue>
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
|
||||
#include "JellyfinQt/support/jsonconv.h"
|
||||
|
||||
namespace Jellyfin {
|
||||
// Forward declaration
|
||||
class ApiClient;
|
||||
}
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
class CodecTypeClass {
|
||||
Q_GADGET
|
||||
public:
|
||||
enum Value {
|
||||
EnumNotSet,
|
||||
Video,
|
||||
VideoAudio,
|
||||
Audio,
|
||||
};
|
||||
Q_ENUM(Value)
|
||||
private:
|
||||
explicit CodecTypeClass();
|
||||
};
|
||||
|
||||
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
|
||||
|
||||
#endif // JELLYFIN_DTO_CODECTYPE_H
|
96
core/include/JellyfinQt/dto/collectioncreationresult.h
Normal file
96
core/include/JellyfinQt/dto/collectioncreationresult.h
Normal file
|
@ -0,0 +1,96 @@
|
|||
/*
|
||||
* 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_COLLECTIONCREATIONRESULT_H
|
||||
#define JELLYFIN_DTO_COLLECTIONCREATIONRESULT_H
|
||||
|
||||
#include <QJsonObject>
|
||||
#include <QJsonValue>
|
||||
#include <QString>
|
||||
#include <optional>
|
||||
|
||||
#include "JellyfinQt/support/jsonconv.h"
|
||||
|
||||
namespace Jellyfin {
|
||||
// Forward declaration
|
||||
class ApiClient;
|
||||
}
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
|
||||
class CollectionCreationResult {
|
||||
public:
|
||||
CollectionCreationResult(
|
||||
QString jellyfinId
|
||||
);
|
||||
|
||||
CollectionCreationResult(const CollectionCreationResult &other);
|
||||
|
||||
/**
|
||||
* Replaces the data being hold by this class with that of the other.
|
||||
*/
|
||||
void replaceData(CollectionCreationResult &other);
|
||||
|
||||
static CollectionCreationResult fromJson(QJsonObject source);
|
||||
void setFromJson(QJsonObject source);
|
||||
QJsonObject toJson() const;
|
||||
|
||||
// Properties
|
||||
|
||||
QString jellyfinId() const;
|
||||
|
||||
void setJellyfinId(QString newJellyfinId);
|
||||
|
||||
|
||||
protected:
|
||||
QString m_jellyfinId;
|
||||
|
||||
private:
|
||||
// Private constructor which generates an invalid object, for use withing CollectionCreationResult::fromJson();
|
||||
CollectionCreationResult();
|
||||
};
|
||||
|
||||
|
||||
} // 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
|
||||
|
||||
#endif // JELLYFIN_DTO_COLLECTIONCREATIONRESULT_H
|
168
core/include/JellyfinQt/dto/configurationpageinfo.h
Normal file
168
core/include/JellyfinQt/dto/configurationpageinfo.h
Normal file
|
@ -0,0 +1,168 @@
|
|||
/*
|
||||
* 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_CONFIGURATIONPAGEINFO_H
|
||||
#define JELLYFIN_DTO_CONFIGURATIONPAGEINFO_H
|
||||
|
||||
#include <QJsonObject>
|
||||
#include <QJsonValue>
|
||||
#include <QString>
|
||||
#include <optional>
|
||||
|
||||
#include "JellyfinQt/dto/configurationpagetype.h"
|
||||
#include "JellyfinQt/support/jsonconv.h"
|
||||
|
||||
namespace Jellyfin {
|
||||
// Forward declaration
|
||||
class ApiClient;
|
||||
}
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
|
||||
class ConfigurationPageInfo {
|
||||
public:
|
||||
ConfigurationPageInfo(
|
||||
bool enableInMainMenu,
|
||||
ConfigurationPageType configurationPageType
|
||||
);
|
||||
|
||||
ConfigurationPageInfo(const ConfigurationPageInfo &other);
|
||||
|
||||
/**
|
||||
* Replaces the data being hold by this class with that of the other.
|
||||
*/
|
||||
void replaceData(ConfigurationPageInfo &other);
|
||||
|
||||
static ConfigurationPageInfo fromJson(QJsonObject source);
|
||||
void setFromJson(QJsonObject source);
|
||||
QJsonObject toJson() const;
|
||||
|
||||
// Properties
|
||||
/**
|
||||
* @brief Gets or sets the name.
|
||||
*/
|
||||
QString name() const;
|
||||
/**
|
||||
* @brief Gets or sets the name.
|
||||
*/
|
||||
void setName(QString newName);
|
||||
bool nameNull() const;
|
||||
void setNameNull();
|
||||
|
||||
/**
|
||||
* @brief Gets or sets a value indicating whether the configurations page is enabled in the main menu.
|
||||
*/
|
||||
bool enableInMainMenu() const;
|
||||
/**
|
||||
* @brief Gets or sets a value indicating whether the configurations page is enabled in the main menu.
|
||||
*/
|
||||
void setEnableInMainMenu(bool newEnableInMainMenu);
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the menu section.
|
||||
*/
|
||||
QString menuSection() const;
|
||||
/**
|
||||
* @brief Gets or sets the menu section.
|
||||
*/
|
||||
void setMenuSection(QString newMenuSection);
|
||||
bool menuSectionNull() const;
|
||||
void setMenuSectionNull();
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the menu icon.
|
||||
*/
|
||||
QString menuIcon() const;
|
||||
/**
|
||||
* @brief Gets or sets the menu icon.
|
||||
*/
|
||||
void setMenuIcon(QString newMenuIcon);
|
||||
bool menuIconNull() const;
|
||||
void setMenuIconNull();
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the display name.
|
||||
*/
|
||||
QString displayName() const;
|
||||
/**
|
||||
* @brief Gets or sets the display name.
|
||||
*/
|
||||
void setDisplayName(QString newDisplayName);
|
||||
bool displayNameNull() const;
|
||||
void setDisplayNameNull();
|
||||
|
||||
|
||||
ConfigurationPageType configurationPageType() const;
|
||||
|
||||
void setConfigurationPageType(ConfigurationPageType newConfigurationPageType);
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the plugin id.
|
||||
*/
|
||||
QString pluginId() const;
|
||||
/**
|
||||
* @brief Gets or sets the plugin id.
|
||||
*/
|
||||
void setPluginId(QString newPluginId);
|
||||
bool pluginIdNull() const;
|
||||
void setPluginIdNull();
|
||||
|
||||
|
||||
protected:
|
||||
QString m_name;
|
||||
bool m_enableInMainMenu;
|
||||
QString m_menuSection;
|
||||
QString m_menuIcon;
|
||||
QString m_displayName;
|
||||
ConfigurationPageType m_configurationPageType;
|
||||
QString m_pluginId;
|
||||
|
||||
private:
|
||||
// Private constructor which generates an invalid object, for use withing ConfigurationPageInfo::fromJson();
|
||||
ConfigurationPageInfo();
|
||||
};
|
||||
|
||||
|
||||
} // 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
|
||||
|
||||
#endif // JELLYFIN_DTO_CONFIGURATIONPAGEINFO_H
|
76
core/include/JellyfinQt/dto/configurationpagetype.h
Normal file
76
core/include/JellyfinQt/dto/configurationpagetype.h
Normal file
|
@ -0,0 +1,76 @@
|
|||
/*
|
||||
* 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_CONFIGURATIONPAGETYPE_H
|
||||
#define JELLYFIN_DTO_CONFIGURATIONPAGETYPE_H
|
||||
|
||||
#include <QJsonValue>
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
|
||||
#include "JellyfinQt/support/jsonconv.h"
|
||||
|
||||
namespace Jellyfin {
|
||||
// Forward declaration
|
||||
class ApiClient;
|
||||
}
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
class ConfigurationPageTypeClass {
|
||||
Q_GADGET
|
||||
public:
|
||||
enum Value {
|
||||
EnumNotSet,
|
||||
PluginConfiguration,
|
||||
None,
|
||||
};
|
||||
Q_ENUM(Value)
|
||||
private:
|
||||
explicit ConfigurationPageTypeClass();
|
||||
};
|
||||
|
||||
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
|
||||
|
||||
#endif // JELLYFIN_DTO_CONFIGURATIONPAGETYPE_H
|
116
core/include/JellyfinQt/dto/containerprofile.h
Normal file
116
core/include/JellyfinQt/dto/containerprofile.h
Normal file
|
@ -0,0 +1,116 @@
|
|||
/*
|
||||
* 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_CONTAINERPROFILE_H
|
||||
#define JELLYFIN_DTO_CONTAINERPROFILE_H
|
||||
|
||||
#include <QJsonObject>
|
||||
#include <QJsonValue>
|
||||
#include <QList>
|
||||
#include <QString>
|
||||
#include <QStringList>
|
||||
#include <optional>
|
||||
|
||||
#include "JellyfinQt/dto/dlnaprofiletype.h"
|
||||
#include "JellyfinQt/dto/profilecondition.h"
|
||||
#include "JellyfinQt/support/jsonconv.h"
|
||||
|
||||
namespace Jellyfin {
|
||||
// Forward declaration
|
||||
class ApiClient;
|
||||
}
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
|
||||
class ContainerProfile {
|
||||
public:
|
||||
ContainerProfile(
|
||||
DlnaProfileType type
|
||||
);
|
||||
|
||||
ContainerProfile(const ContainerProfile &other);
|
||||
|
||||
/**
|
||||
* Replaces the data being hold by this class with that of the other.
|
||||
*/
|
||||
void replaceData(ContainerProfile &other);
|
||||
|
||||
static ContainerProfile fromJson(QJsonObject source);
|
||||
void setFromJson(QJsonObject source);
|
||||
QJsonObject toJson() const;
|
||||
|
||||
// Properties
|
||||
|
||||
DlnaProfileType type() const;
|
||||
|
||||
void setType(DlnaProfileType newType);
|
||||
|
||||
|
||||
QList<ProfileCondition> conditions() const;
|
||||
|
||||
void setConditions(QList<ProfileCondition> newConditions);
|
||||
bool conditionsNull() const;
|
||||
void setConditionsNull();
|
||||
|
||||
|
||||
QString container() const;
|
||||
|
||||
void setContainer(QString newContainer);
|
||||
bool containerNull() const;
|
||||
void setContainerNull();
|
||||
|
||||
|
||||
protected:
|
||||
DlnaProfileType m_type;
|
||||
QList<ProfileCondition> m_conditions;
|
||||
QString m_container;
|
||||
|
||||
private:
|
||||
// Private constructor which generates an invalid object, for use withing ContainerProfile::fromJson();
|
||||
ContainerProfile();
|
||||
};
|
||||
|
||||
|
||||
} // 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
|
||||
|
||||
#endif // JELLYFIN_DTO_CONTAINERPROFILE_H
|
112
core/include/JellyfinQt/dto/controlresponse.h
Normal file
112
core/include/JellyfinQt/dto/controlresponse.h
Normal file
|
@ -0,0 +1,112 @@
|
|||
/*
|
||||
* Sailfin: a Jellyfin client written using Qt
|
||||
* Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
|
||||
* OVERWRITTEN AT SOME POINT!
|
||||
*
|
||||
* If there is a bug in this file, please fix the code generator used to generate this file found in
|
||||
* core/openapigenerator.d.
|
||||
*
|
||||
* This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
|
||||
* file with a newer file if needed instead of manually updating the files.
|
||||
*/
|
||||
|
||||
#ifndef JELLYFIN_DTO_CONTROLRESPONSE_H
|
||||
#define JELLYFIN_DTO_CONTROLRESPONSE_H
|
||||
|
||||
#include <QJsonObject>
|
||||
#include <QJsonValue>
|
||||
#include <QString>
|
||||
#include <optional>
|
||||
|
||||
#include "JellyfinQt/support/jsonconv.h"
|
||||
|
||||
namespace Jellyfin {
|
||||
// Forward declaration
|
||||
class ApiClient;
|
||||
}
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
|
||||
class ControlResponse {
|
||||
public:
|
||||
ControlResponse(
|
||||
bool isSuccessful
|
||||
);
|
||||
|
||||
ControlResponse(const ControlResponse &other);
|
||||
|
||||
/**
|
||||
* Replaces the data being hold by this class with that of the other.
|
||||
*/
|
||||
void replaceData(ControlResponse &other);
|
||||
|
||||
static ControlResponse fromJson(QJsonObject source);
|
||||
void setFromJson(QJsonObject source);
|
||||
QJsonObject toJson() const;
|
||||
|
||||
// Properties
|
||||
|
||||
QJsonObject headers() const;
|
||||
|
||||
void setHeaders(QJsonObject newHeaders);
|
||||
bool headersNull() const;
|
||||
void setHeadersNull();
|
||||
|
||||
|
||||
QString xml() const;
|
||||
|
||||
void setXml(QString newXml);
|
||||
bool xmlNull() const;
|
||||
void setXmlNull();
|
||||
|
||||
|
||||
bool isSuccessful() const;
|
||||
|
||||
void setIsSuccessful(bool newIsSuccessful);
|
||||
|
||||
|
||||
protected:
|
||||
QJsonObject m_headers;
|
||||
QString m_xml;
|
||||
bool m_isSuccessful;
|
||||
|
||||
private:
|
||||
// Private constructor which generates an invalid object, for use withing ControlResponse::fromJson();
|
||||
ControlResponse();
|
||||
};
|
||||
|
||||
|
||||
} // 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
|
||||
|
||||
#endif // JELLYFIN_DTO_CONTROLRESPONSE_H
|
132
core/include/JellyfinQt/dto/countryinfo.h
Normal file
132
core/include/JellyfinQt/dto/countryinfo.h
Normal file
|
@ -0,0 +1,132 @@
|
|||
/*
|
||||
* 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_COUNTRYINFO_H
|
||||
#define JELLYFIN_DTO_COUNTRYINFO_H
|
||||
|
||||
#include <QJsonObject>
|
||||
#include <QJsonValue>
|
||||
#include <QString>
|
||||
#include <optional>
|
||||
|
||||
#include "JellyfinQt/support/jsonconv.h"
|
||||
|
||||
namespace Jellyfin {
|
||||
// Forward declaration
|
||||
class ApiClient;
|
||||
}
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
|
||||
class CountryInfo {
|
||||
public: CountryInfo();
|
||||
CountryInfo(const CountryInfo &other);
|
||||
|
||||
/**
|
||||
* Replaces the data being hold by this class with that of the other.
|
||||
*/
|
||||
void replaceData(CountryInfo &other);
|
||||
|
||||
static CountryInfo fromJson(QJsonObject source);
|
||||
void setFromJson(QJsonObject source);
|
||||
QJsonObject toJson() const;
|
||||
|
||||
// Properties
|
||||
/**
|
||||
* @brief Gets or sets the name.
|
||||
*/
|
||||
QString name() const;
|
||||
/**
|
||||
* @brief Gets or sets the name.
|
||||
*/
|
||||
void setName(QString newName);
|
||||
bool nameNull() const;
|
||||
void setNameNull();
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the display name.
|
||||
*/
|
||||
QString displayName() const;
|
||||
/**
|
||||
* @brief Gets or sets the display name.
|
||||
*/
|
||||
void setDisplayName(QString newDisplayName);
|
||||
bool displayNameNull() const;
|
||||
void setDisplayNameNull();
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the name of the two letter ISO region.
|
||||
*/
|
||||
QString twoLetterISORegionName() const;
|
||||
/**
|
||||
* @brief Gets or sets the name of the two letter ISO region.
|
||||
*/
|
||||
void setTwoLetterISORegionName(QString newTwoLetterISORegionName);
|
||||
bool twoLetterISORegionNameNull() const;
|
||||
void setTwoLetterISORegionNameNull();
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the name of the three letter ISO region.
|
||||
*/
|
||||
QString threeLetterISORegionName() const;
|
||||
/**
|
||||
* @brief Gets or sets the name of the three letter ISO region.
|
||||
*/
|
||||
void setThreeLetterISORegionName(QString newThreeLetterISORegionName);
|
||||
bool threeLetterISORegionNameNull() const;
|
||||
void setThreeLetterISORegionNameNull();
|
||||
|
||||
|
||||
protected:
|
||||
QString m_name;
|
||||
QString m_displayName;
|
||||
QString m_twoLetterISORegionName;
|
||||
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
|
||||
|
||||
#endif // JELLYFIN_DTO_COUNTRYINFO_H
|
134
core/include/JellyfinQt/dto/createplaylistdto.h
Normal file
134
core/include/JellyfinQt/dto/createplaylistdto.h
Normal file
|
@ -0,0 +1,134 @@
|
|||
/*
|
||||
* 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_CREATEPLAYLISTDTO_H
|
||||
#define JELLYFIN_DTO_CREATEPLAYLISTDTO_H
|
||||
|
||||
#include <QJsonObject>
|
||||
#include <QJsonValue>
|
||||
#include <QList>
|
||||
#include <QString>
|
||||
#include <QStringList>
|
||||
#include <optional>
|
||||
|
||||
#include "JellyfinQt/support/jsonconv.h"
|
||||
|
||||
namespace Jellyfin {
|
||||
// Forward declaration
|
||||
class ApiClient;
|
||||
}
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
|
||||
class CreatePlaylistDto {
|
||||
public: CreatePlaylistDto();
|
||||
CreatePlaylistDto(const CreatePlaylistDto &other);
|
||||
|
||||
/**
|
||||
* Replaces the data being hold by this class with that of the other.
|
||||
*/
|
||||
void replaceData(CreatePlaylistDto &other);
|
||||
|
||||
static CreatePlaylistDto fromJson(QJsonObject source);
|
||||
void setFromJson(QJsonObject source);
|
||||
QJsonObject toJson() const;
|
||||
|
||||
// Properties
|
||||
/**
|
||||
* @brief Gets or sets the name of the new playlist.
|
||||
*/
|
||||
QString name() const;
|
||||
/**
|
||||
* @brief Gets or sets the name of the new playlist.
|
||||
*/
|
||||
void setName(QString newName);
|
||||
bool nameNull() const;
|
||||
void setNameNull();
|
||||
|
||||
/**
|
||||
* @brief Gets or sets item ids to add to the playlist.
|
||||
*/
|
||||
QStringList ids() const;
|
||||
/**
|
||||
* @brief Gets or sets item ids to add to the playlist.
|
||||
*/
|
||||
void setIds(QStringList newIds);
|
||||
bool idsNull() const;
|
||||
void setIdsNull();
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the user id.
|
||||
*/
|
||||
QString userId() const;
|
||||
/**
|
||||
* @brief Gets or sets the user id.
|
||||
*/
|
||||
void setUserId(QString newUserId);
|
||||
bool userIdNull() const;
|
||||
void setUserIdNull();
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the media type.
|
||||
*/
|
||||
QString mediaType() const;
|
||||
/**
|
||||
* @brief Gets or sets the media type.
|
||||
*/
|
||||
void setMediaType(QString newMediaType);
|
||||
bool mediaTypeNull() const;
|
||||
void setMediaTypeNull();
|
||||
|
||||
|
||||
protected:
|
||||
QString m_name;
|
||||
QStringList m_ids;
|
||||
QString m_userId;
|
||||
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
|
||||
|
||||
#endif // JELLYFIN_DTO_CREATEPLAYLISTDTO_H
|
108
core/include/JellyfinQt/dto/createuserbyname.h
Normal file
108
core/include/JellyfinQt/dto/createuserbyname.h
Normal file
|
@ -0,0 +1,108 @@
|
|||
/*
|
||||
* 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_CREATEUSERBYNAME_H
|
||||
#define JELLYFIN_DTO_CREATEUSERBYNAME_H
|
||||
|
||||
#include <QJsonObject>
|
||||
#include <QJsonValue>
|
||||
#include <QString>
|
||||
#include <optional>
|
||||
|
||||
#include "JellyfinQt/support/jsonconv.h"
|
||||
|
||||
namespace Jellyfin {
|
||||
// Forward declaration
|
||||
class ApiClient;
|
||||
}
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
|
||||
class CreateUserByName {
|
||||
public: CreateUserByName();
|
||||
CreateUserByName(const CreateUserByName &other);
|
||||
|
||||
/**
|
||||
* Replaces the data being hold by this class with that of the other.
|
||||
*/
|
||||
void replaceData(CreateUserByName &other);
|
||||
|
||||
static CreateUserByName fromJson(QJsonObject source);
|
||||
void setFromJson(QJsonObject source);
|
||||
QJsonObject toJson() const;
|
||||
|
||||
// Properties
|
||||
/**
|
||||
* @brief Gets or sets the username.
|
||||
*/
|
||||
QString name() const;
|
||||
/**
|
||||
* @brief Gets or sets the username.
|
||||
*/
|
||||
void setName(QString newName);
|
||||
bool nameNull() const;
|
||||
void setNameNull();
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the password.
|
||||
*/
|
||||
QString password() const;
|
||||
/**
|
||||
* @brief Gets or sets the password.
|
||||
*/
|
||||
void setPassword(QString newPassword);
|
||||
bool passwordNull() const;
|
||||
void setPasswordNull();
|
||||
|
||||
|
||||
protected:
|
||||
QString m_name;
|
||||
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
|
||||
|
||||
#endif // JELLYFIN_DTO_CREATEUSERBYNAME_H
|
142
core/include/JellyfinQt/dto/culturedto.h
Normal file
142
core/include/JellyfinQt/dto/culturedto.h
Normal file
|
@ -0,0 +1,142 @@
|
|||
/*
|
||||
* 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_CULTUREDTO_H
|
||||
#define JELLYFIN_DTO_CULTUREDTO_H
|
||||
|
||||
#include <QJsonObject>
|
||||
#include <QJsonValue>
|
||||
#include <QList>
|
||||
#include <QString>
|
||||
#include <QStringList>
|
||||
#include <optional>
|
||||
|
||||
#include "JellyfinQt/support/jsonconv.h"
|
||||
|
||||
namespace Jellyfin {
|
||||
// Forward declaration
|
||||
class ApiClient;
|
||||
}
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
|
||||
class CultureDto {
|
||||
public: CultureDto();
|
||||
CultureDto(const CultureDto &other);
|
||||
|
||||
/**
|
||||
* Replaces the data being hold by this class with that of the other.
|
||||
*/
|
||||
void replaceData(CultureDto &other);
|
||||
|
||||
static CultureDto fromJson(QJsonObject source);
|
||||
void setFromJson(QJsonObject source);
|
||||
QJsonObject toJson() const;
|
||||
|
||||
// Properties
|
||||
/**
|
||||
* @brief Gets or sets the name.
|
||||
*/
|
||||
QString name() const;
|
||||
/**
|
||||
* @brief Gets or sets the name.
|
||||
*/
|
||||
void setName(QString newName);
|
||||
bool nameNull() const;
|
||||
void setNameNull();
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the display name.
|
||||
*/
|
||||
QString displayName() const;
|
||||
/**
|
||||
* @brief Gets or sets the display name.
|
||||
*/
|
||||
void setDisplayName(QString newDisplayName);
|
||||
bool displayNameNull() const;
|
||||
void setDisplayNameNull();
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the name of the two letter ISO language.
|
||||
*/
|
||||
QString twoLetterISOLanguageName() const;
|
||||
/**
|
||||
* @brief Gets or sets the name of the two letter ISO language.
|
||||
*/
|
||||
void setTwoLetterISOLanguageName(QString newTwoLetterISOLanguageName);
|
||||
bool twoLetterISOLanguageNameNull() const;
|
||||
void setTwoLetterISOLanguageNameNull();
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the name of the three letter ISO language.
|
||||
*/
|
||||
QString threeLetterISOLanguageName() const;
|
||||
/**
|
||||
* @brief Gets or sets the name of the three letter ISO language.
|
||||
*/
|
||||
void setThreeLetterISOLanguageName(QString newThreeLetterISOLanguageName);
|
||||
bool threeLetterISOLanguageNameNull() const;
|
||||
void setThreeLetterISOLanguageNameNull();
|
||||
|
||||
|
||||
QStringList threeLetterISOLanguageNames() const;
|
||||
|
||||
void setThreeLetterISOLanguageNames(QStringList newThreeLetterISOLanguageNames);
|
||||
bool threeLetterISOLanguageNamesNull() const;
|
||||
void setThreeLetterISOLanguageNamesNull();
|
||||
|
||||
|
||||
protected:
|
||||
QString m_name;
|
||||
QString m_displayName;
|
||||
QString m_twoLetterISOLanguageName;
|
||||
QString m_threeLetterISOLanguageName;
|
||||
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
|
||||
|
||||
#endif // JELLYFIN_DTO_CULTUREDTO_H
|
81
core/include/JellyfinQt/dto/dayofweek.h
Normal file
81
core/include/JellyfinQt/dto/dayofweek.h
Normal file
|
@ -0,0 +1,81 @@
|
|||
/*
|
||||
* Sailfin: a Jellyfin client written using Qt
|
||||
* Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
|
||||
* OVERWRITTEN AT SOME POINT!
|
||||
*
|
||||
* If there is a bug in this file, please fix the code generator used to generate this file found in
|
||||
* core/openapigenerator.d.
|
||||
*
|
||||
* This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
|
||||
* file with a newer file if needed instead of manually updating the files.
|
||||
*/
|
||||
|
||||
#ifndef JELLYFIN_DTO_DAYOFWEEK_H
|
||||
#define JELLYFIN_DTO_DAYOFWEEK_H
|
||||
|
||||
#include <QJsonValue>
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
|
||||
#include "JellyfinQt/support/jsonconv.h"
|
||||
|
||||
namespace Jellyfin {
|
||||
// Forward declaration
|
||||
class ApiClient;
|
||||
}
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
class DayOfWeekClass {
|
||||
Q_GADGET
|
||||
public:
|
||||
enum Value {
|
||||
EnumNotSet,
|
||||
Sunday,
|
||||
Monday,
|
||||
Tuesday,
|
||||
Wednesday,
|
||||
Thursday,
|
||||
Friday,
|
||||
Saturday,
|
||||
};
|
||||
Q_ENUM(Value)
|
||||
private:
|
||||
explicit DayOfWeekClass();
|
||||
};
|
||||
|
||||
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
|
||||
|
||||
#endif // JELLYFIN_DTO_DAYOFWEEK_H
|
77
core/include/JellyfinQt/dto/daypattern.h
Normal file
77
core/include/JellyfinQt/dto/daypattern.h
Normal file
|
@ -0,0 +1,77 @@
|
|||
/*
|
||||
* 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_DAYPATTERN_H
|
||||
#define JELLYFIN_DTO_DAYPATTERN_H
|
||||
|
||||
#include <QJsonValue>
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
|
||||
#include "JellyfinQt/support/jsonconv.h"
|
||||
|
||||
namespace Jellyfin {
|
||||
// Forward declaration
|
||||
class ApiClient;
|
||||
}
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
class DayPatternClass {
|
||||
Q_GADGET
|
||||
public:
|
||||
enum Value {
|
||||
EnumNotSet,
|
||||
Daily,
|
||||
Weekdays,
|
||||
Weekends,
|
||||
};
|
||||
Q_ENUM(Value)
|
||||
private:
|
||||
explicit DayPatternClass();
|
||||
};
|
||||
|
||||
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
|
||||
|
||||
#endif // JELLYFIN_DTO_DAYPATTERN_H
|
96
core/include/JellyfinQt/dto/defaultdirectorybrowserinfodto.h
Normal file
96
core/include/JellyfinQt/dto/defaultdirectorybrowserinfodto.h
Normal file
|
@ -0,0 +1,96 @@
|
|||
/*
|
||||
* 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_DEFAULTDIRECTORYBROWSERINFODTO_H
|
||||
#define JELLYFIN_DTO_DEFAULTDIRECTORYBROWSERINFODTO_H
|
||||
|
||||
#include <QJsonObject>
|
||||
#include <QJsonValue>
|
||||
#include <QString>
|
||||
#include <optional>
|
||||
|
||||
#include "JellyfinQt/support/jsonconv.h"
|
||||
|
||||
namespace Jellyfin {
|
||||
// Forward declaration
|
||||
class ApiClient;
|
||||
}
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
|
||||
class DefaultDirectoryBrowserInfoDto {
|
||||
public: DefaultDirectoryBrowserInfoDto();
|
||||
DefaultDirectoryBrowserInfoDto(const DefaultDirectoryBrowserInfoDto &other);
|
||||
|
||||
/**
|
||||
* Replaces the data being hold by this class with that of the other.
|
||||
*/
|
||||
void replaceData(DefaultDirectoryBrowserInfoDto &other);
|
||||
|
||||
static DefaultDirectoryBrowserInfoDto fromJson(QJsonObject source);
|
||||
void setFromJson(QJsonObject source);
|
||||
QJsonObject toJson() const;
|
||||
|
||||
// Properties
|
||||
/**
|
||||
* @brief Gets or sets the path.
|
||||
*/
|
||||
QString path() const;
|
||||
/**
|
||||
* @brief Gets or sets the path.
|
||||
*/
|
||||
void setPath(QString newPath);
|
||||
bool pathNull() const;
|
||||
void setPathNull();
|
||||
|
||||
|
||||
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
|
||||
|
||||
#endif // JELLYFIN_DTO_DEFAULTDIRECTORYBROWSERINFODTO_H
|
195
core/include/JellyfinQt/dto/deviceidentification.h
Normal file
195
core/include/JellyfinQt/dto/deviceidentification.h
Normal file
|
@ -0,0 +1,195 @@
|
|||
/*
|
||||
* Sailfin: a Jellyfin client written using Qt
|
||||
* Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
|
||||
* OVERWRITTEN AT SOME POINT!
|
||||
*
|
||||
* If there is a bug in this file, please fix the code generator used to generate this file found in
|
||||
* core/openapigenerator.d.
|
||||
*
|
||||
* This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
|
||||
* file with a newer file if needed instead of manually updating the files.
|
||||
*/
|
||||
|
||||
#ifndef JELLYFIN_DTO_DEVICEIDENTIFICATION_H
|
||||
#define JELLYFIN_DTO_DEVICEIDENTIFICATION_H
|
||||
|
||||
#include <QJsonObject>
|
||||
#include <QJsonValue>
|
||||
#include <QList>
|
||||
#include <QString>
|
||||
#include <QStringList>
|
||||
#include <optional>
|
||||
|
||||
#include "JellyfinQt/dto/httpheaderinfo.h"
|
||||
#include "JellyfinQt/support/jsonconv.h"
|
||||
|
||||
namespace Jellyfin {
|
||||
// Forward declaration
|
||||
class ApiClient;
|
||||
}
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
|
||||
class DeviceIdentification {
|
||||
public: DeviceIdentification();
|
||||
DeviceIdentification(const DeviceIdentification &other);
|
||||
|
||||
/**
|
||||
* Replaces the data being hold by this class with that of the other.
|
||||
*/
|
||||
void replaceData(DeviceIdentification &other);
|
||||
|
||||
static DeviceIdentification fromJson(QJsonObject source);
|
||||
void setFromJson(QJsonObject source);
|
||||
QJsonObject toJson() const;
|
||||
|
||||
// Properties
|
||||
/**
|
||||
* @brief Gets or sets the name of the friendly.
|
||||
*/
|
||||
QString friendlyName() const;
|
||||
/**
|
||||
* @brief Gets or sets the name of the friendly.
|
||||
*/
|
||||
void setFriendlyName(QString newFriendlyName);
|
||||
bool friendlyNameNull() const;
|
||||
void setFriendlyNameNull();
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the model number.
|
||||
*/
|
||||
QString modelNumber() const;
|
||||
/**
|
||||
* @brief Gets or sets the model number.
|
||||
*/
|
||||
void setModelNumber(QString newModelNumber);
|
||||
bool modelNumberNull() const;
|
||||
void setModelNumberNull();
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the serial number.
|
||||
*/
|
||||
QString serialNumber() const;
|
||||
/**
|
||||
* @brief Gets or sets the serial number.
|
||||
*/
|
||||
void setSerialNumber(QString newSerialNumber);
|
||||
bool serialNumberNull() const;
|
||||
void setSerialNumberNull();
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the name of the model.
|
||||
*/
|
||||
QString modelName() const;
|
||||
/**
|
||||
* @brief Gets or sets the name of the model.
|
||||
*/
|
||||
void setModelName(QString newModelName);
|
||||
bool modelNameNull() const;
|
||||
void setModelNameNull();
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the model description.
|
||||
*/
|
||||
QString modelDescription() const;
|
||||
/**
|
||||
* @brief Gets or sets the model description.
|
||||
*/
|
||||
void setModelDescription(QString newModelDescription);
|
||||
bool modelDescriptionNull() const;
|
||||
void setModelDescriptionNull();
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the model URL.
|
||||
*/
|
||||
QString modelUrl() const;
|
||||
/**
|
||||
* @brief Gets or sets the model URL.
|
||||
*/
|
||||
void setModelUrl(QString newModelUrl);
|
||||
bool modelUrlNull() const;
|
||||
void setModelUrlNull();
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the manufacturer.
|
||||
*/
|
||||
QString manufacturer() const;
|
||||
/**
|
||||
* @brief Gets or sets the manufacturer.
|
||||
*/
|
||||
void setManufacturer(QString newManufacturer);
|
||||
bool manufacturerNull() const;
|
||||
void setManufacturerNull();
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the manufacturer URL.
|
||||
*/
|
||||
QString manufacturerUrl() const;
|
||||
/**
|
||||
* @brief Gets or sets the manufacturer URL.
|
||||
*/
|
||||
void setManufacturerUrl(QString newManufacturerUrl);
|
||||
bool manufacturerUrlNull() const;
|
||||
void setManufacturerUrlNull();
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the headers.
|
||||
*/
|
||||
QList<HttpHeaderInfo> headers() const;
|
||||
/**
|
||||
* @brief Gets or sets the headers.
|
||||
*/
|
||||
void setHeaders(QList<HttpHeaderInfo> newHeaders);
|
||||
bool headersNull() const;
|
||||
void setHeadersNull();
|
||||
|
||||
|
||||
protected:
|
||||
QString m_friendlyName;
|
||||
QString m_modelNumber;
|
||||
QString m_serialNumber;
|
||||
QString m_modelName;
|
||||
QString m_modelDescription;
|
||||
QString m_modelUrl;
|
||||
QString m_manufacturer;
|
||||
QString m_manufacturerUrl;
|
||||
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
|
||||
|
||||
#endif // JELLYFIN_DTO_DEVICEIDENTIFICATION_H
|
185
core/include/JellyfinQt/dto/deviceinfo.h
Normal file
185
core/include/JellyfinQt/dto/deviceinfo.h
Normal file
|
@ -0,0 +1,185 @@
|
|||
/*
|
||||
* 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_DEVICEINFO_H
|
||||
#define JELLYFIN_DTO_DEVICEINFO_H
|
||||
|
||||
#include <QDateTime>
|
||||
#include <QJsonObject>
|
||||
#include <QJsonValue>
|
||||
#include <QSharedPointer>
|
||||
#include <QString>
|
||||
#include <optional>
|
||||
|
||||
#include "JellyfinQt/dto/clientcapabilities.h"
|
||||
#include "JellyfinQt/support/jsonconv.h"
|
||||
|
||||
namespace Jellyfin {
|
||||
// Forward declaration
|
||||
class ApiClient;
|
||||
}
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
|
||||
class DeviceInfo {
|
||||
public:
|
||||
DeviceInfo(
|
||||
QString lastUserId,
|
||||
QDateTime dateLastActivity,
|
||||
QSharedPointer<ClientCapabilities> capabilities
|
||||
);
|
||||
|
||||
DeviceInfo(const DeviceInfo &other);
|
||||
|
||||
/**
|
||||
* Replaces the data being hold by this class with that of the other.
|
||||
*/
|
||||
void replaceData(DeviceInfo &other);
|
||||
|
||||
static DeviceInfo fromJson(QJsonObject source);
|
||||
void setFromJson(QJsonObject source);
|
||||
QJsonObject toJson() const;
|
||||
|
||||
// Properties
|
||||
|
||||
QString name() const;
|
||||
|
||||
void setName(QString newName);
|
||||
bool nameNull() const;
|
||||
void setNameNull();
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the identifier.
|
||||
*/
|
||||
QString jellyfinId() const;
|
||||
/**
|
||||
* @brief Gets or sets the identifier.
|
||||
*/
|
||||
void setJellyfinId(QString newJellyfinId);
|
||||
bool jellyfinIdNull() const;
|
||||
void setJellyfinIdNull();
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the last name of the user.
|
||||
*/
|
||||
QString lastUserName() const;
|
||||
/**
|
||||
* @brief Gets or sets the last name of the user.
|
||||
*/
|
||||
void setLastUserName(QString newLastUserName);
|
||||
bool lastUserNameNull() const;
|
||||
void setLastUserNameNull();
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the name of the application.
|
||||
*/
|
||||
QString appName() const;
|
||||
/**
|
||||
* @brief Gets or sets the name of the application.
|
||||
*/
|
||||
void setAppName(QString newAppName);
|
||||
bool appNameNull() const;
|
||||
void setAppNameNull();
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the application version.
|
||||
*/
|
||||
QString appVersion() const;
|
||||
/**
|
||||
* @brief Gets or sets the application version.
|
||||
*/
|
||||
void setAppVersion(QString newAppVersion);
|
||||
bool appVersionNull() const;
|
||||
void setAppVersionNull();
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the last user identifier.
|
||||
*/
|
||||
QString lastUserId() const;
|
||||
/**
|
||||
* @brief Gets or sets the last user identifier.
|
||||
*/
|
||||
void setLastUserId(QString newLastUserId);
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the date last modified.
|
||||
*/
|
||||
QDateTime dateLastActivity() const;
|
||||
/**
|
||||
* @brief Gets or sets the date last modified.
|
||||
*/
|
||||
void setDateLastActivity(QDateTime newDateLastActivity);
|
||||
|
||||
|
||||
QSharedPointer<ClientCapabilities> capabilities() const;
|
||||
|
||||
void setCapabilities(QSharedPointer<ClientCapabilities> newCapabilities);
|
||||
|
||||
|
||||
QString iconUrl() const;
|
||||
|
||||
void setIconUrl(QString newIconUrl);
|
||||
bool iconUrlNull() const;
|
||||
void setIconUrlNull();
|
||||
|
||||
|
||||
protected:
|
||||
QString m_name;
|
||||
QString m_jellyfinId;
|
||||
QString m_lastUserName;
|
||||
QString m_appName;
|
||||
QString m_appVersion;
|
||||
QString m_lastUserId;
|
||||
QDateTime m_dateLastActivity;
|
||||
QSharedPointer<ClientCapabilities> m_capabilities = QSharedPointer<ClientCapabilities>();
|
||||
QString m_iconUrl;
|
||||
|
||||
private:
|
||||
// Private constructor which generates an invalid object, for use withing DeviceInfo::fromJson();
|
||||
DeviceInfo();
|
||||
};
|
||||
|
||||
|
||||
} // 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
|
||||
|
||||
#endif // JELLYFIN_DTO_DEVICEINFO_H
|
125
core/include/JellyfinQt/dto/deviceinfoqueryresult.h
Normal file
125
core/include/JellyfinQt/dto/deviceinfoqueryresult.h
Normal file
|
@ -0,0 +1,125 @@
|
|||
/*
|
||||
* Sailfin: a Jellyfin client written using Qt
|
||||
* Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
|
||||
* OVERWRITTEN AT SOME POINT!
|
||||
*
|
||||
* If there is a bug in this file, please fix the code generator used to generate this file found in
|
||||
* core/openapigenerator.d.
|
||||
*
|
||||
* This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
|
||||
* file with a newer file if needed instead of manually updating the files.
|
||||
*/
|
||||
|
||||
#ifndef JELLYFIN_DTO_DEVICEINFOQUERYRESULT_H
|
||||
#define JELLYFIN_DTO_DEVICEINFOQUERYRESULT_H
|
||||
|
||||
#include <QJsonObject>
|
||||
#include <QJsonValue>
|
||||
#include <QList>
|
||||
#include <QStringList>
|
||||
#include <optional>
|
||||
|
||||
#include "JellyfinQt/dto/deviceinfo.h"
|
||||
#include "JellyfinQt/support/jsonconv.h"
|
||||
|
||||
namespace Jellyfin {
|
||||
// Forward declaration
|
||||
class ApiClient;
|
||||
}
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
|
||||
class DeviceInfoQueryResult {
|
||||
public:
|
||||
DeviceInfoQueryResult(
|
||||
qint32 totalRecordCount,
|
||||
qint32 startIndex
|
||||
);
|
||||
|
||||
DeviceInfoQueryResult(const DeviceInfoQueryResult &other);
|
||||
|
||||
/**
|
||||
* Replaces the data being hold by this class with that of the other.
|
||||
*/
|
||||
void replaceData(DeviceInfoQueryResult &other);
|
||||
|
||||
static DeviceInfoQueryResult fromJson(QJsonObject source);
|
||||
void setFromJson(QJsonObject source);
|
||||
QJsonObject toJson() const;
|
||||
|
||||
// Properties
|
||||
/**
|
||||
* @brief Gets or sets the items.
|
||||
*/
|
||||
QList<DeviceInfo> items() const;
|
||||
/**
|
||||
* @brief Gets or sets the items.
|
||||
*/
|
||||
void setItems(QList<DeviceInfo> newItems);
|
||||
bool itemsNull() const;
|
||||
void setItemsNull();
|
||||
|
||||
/**
|
||||
* @brief The total number of records available.
|
||||
*/
|
||||
qint32 totalRecordCount() const;
|
||||
/**
|
||||
* @brief The total number of records available.
|
||||
*/
|
||||
void setTotalRecordCount(qint32 newTotalRecordCount);
|
||||
|
||||
/**
|
||||
* @brief The index of the first record in Items.
|
||||
*/
|
||||
qint32 startIndex() const;
|
||||
/**
|
||||
* @brief The index of the first record in Items.
|
||||
*/
|
||||
void setStartIndex(qint32 newStartIndex);
|
||||
|
||||
|
||||
protected:
|
||||
QList<DeviceInfo> m_items;
|
||||
qint32 m_totalRecordCount;
|
||||
qint32 m_startIndex;
|
||||
|
||||
private:
|
||||
// Private constructor which generates an invalid object, for use withing DeviceInfoQueryResult::fromJson();
|
||||
DeviceInfoQueryResult();
|
||||
};
|
||||
|
||||
|
||||
} // 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
|
||||
|
||||
#endif // JELLYFIN_DTO_DEVICEINFOQUERYRESULT_H
|
92
core/include/JellyfinQt/dto/deviceoptions.h
Normal file
92
core/include/JellyfinQt/dto/deviceoptions.h
Normal file
|
@ -0,0 +1,92 @@
|
|||
/*
|
||||
* Sailfin: a Jellyfin client written using Qt
|
||||
* Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
|
||||
* OVERWRITTEN AT SOME POINT!
|
||||
*
|
||||
* If there is a bug in this file, please fix the code generator used to generate this file found in
|
||||
* core/openapigenerator.d.
|
||||
*
|
||||
* This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
|
||||
* file with a newer file if needed instead of manually updating the files.
|
||||
*/
|
||||
|
||||
#ifndef JELLYFIN_DTO_DEVICEOPTIONS_H
|
||||
#define JELLYFIN_DTO_DEVICEOPTIONS_H
|
||||
|
||||
#include <QJsonObject>
|
||||
#include <QJsonValue>
|
||||
#include <QString>
|
||||
#include <optional>
|
||||
|
||||
#include "JellyfinQt/support/jsonconv.h"
|
||||
|
||||
namespace Jellyfin {
|
||||
// Forward declaration
|
||||
class ApiClient;
|
||||
}
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
|
||||
class DeviceOptions {
|
||||
public: DeviceOptions();
|
||||
DeviceOptions(const DeviceOptions &other);
|
||||
|
||||
/**
|
||||
* Replaces the data being hold by this class with that of the other.
|
||||
*/
|
||||
void replaceData(DeviceOptions &other);
|
||||
|
||||
static DeviceOptions fromJson(QJsonObject source);
|
||||
void setFromJson(QJsonObject source);
|
||||
QJsonObject toJson() const;
|
||||
|
||||
// Properties
|
||||
|
||||
QString customName() const;
|
||||
|
||||
void setCustomName(QString newCustomName);
|
||||
bool customNameNull() const;
|
||||
void setCustomNameNull();
|
||||
|
||||
|
||||
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
|
||||
|
||||
#endif // JELLYFIN_DTO_DEVICEOPTIONS_H
|
553
core/include/JellyfinQt/dto/deviceprofile.h
Normal file
553
core/include/JellyfinQt/dto/deviceprofile.h
Normal file
|
@ -0,0 +1,553 @@
|
|||
/*
|
||||
* 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 <QJsonObject>
|
||||
#include <QJsonValue>
|
||||
#include <QList>
|
||||
#include <QSharedPointer>
|
||||
#include <QString>
|
||||
#include <QStringList>
|
||||
#include <optional>
|
||||
|
||||
#include "JellyfinQt/dto/codecprofile.h"
|
||||
#include "JellyfinQt/dto/containerprofile.h"
|
||||
#include "JellyfinQt/dto/deviceidentification.h"
|
||||
#include "JellyfinQt/dto/directplayprofile.h"
|
||||
#include "JellyfinQt/dto/responseprofile.h"
|
||||
#include "JellyfinQt/dto/subtitleprofile.h"
|
||||
#include "JellyfinQt/dto/transcodingprofile.h"
|
||||
#include "JellyfinQt/dto/xmlattribute.h"
|
||||
#include "JellyfinQt/support/jsonconv.h"
|
||||
|
||||
namespace Jellyfin {
|
||||
// Forward declaration
|
||||
class ApiClient;
|
||||
}
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
|
||||
class DeviceProfile {
|
||||
public:
|
||||
DeviceProfile(
|
||||
QSharedPointer<DeviceIdentification> identification,
|
||||
bool enableAlbumArtInDidl,
|
||||
bool enableSingleAlbumArtLimit,
|
||||
bool enableSingleSubtitleLimit,
|
||||
qint32 maxAlbumArtWidth,
|
||||
qint32 maxAlbumArtHeight,
|
||||
qint32 timelineOffsetSeconds,
|
||||
bool requiresPlainVideoItems,
|
||||
bool requiresPlainFolders,
|
||||
bool enableMSMediaReceiverRegistrar,
|
||||
bool ignoreTranscodeByteRangeRequests
|
||||
);
|
||||
|
||||
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.
|
||||
*/
|
||||
QString name() const;
|
||||
/**
|
||||
* @brief Gets or sets the Name.
|
||||
*/
|
||||
void setName(QString newName);
|
||||
bool nameNull() const;
|
||||
void setNameNull();
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the Id.
|
||||
*/
|
||||
QString jellyfinId() const;
|
||||
/**
|
||||
* @brief Gets or sets the Id.
|
||||
*/
|
||||
void setJellyfinId(QString newJellyfinId);
|
||||
bool jellyfinIdNull() const;
|
||||
void setJellyfinIdNull();
|
||||
|
||||
|
||||
QSharedPointer<DeviceIdentification> identification() const;
|
||||
|
||||
void setIdentification(QSharedPointer<DeviceIdentification> newIdentification);
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the FriendlyName.
|
||||
*/
|
||||
QString friendlyName() const;
|
||||
/**
|
||||
* @brief Gets or sets the FriendlyName.
|
||||
*/
|
||||
void setFriendlyName(QString newFriendlyName);
|
||||
bool friendlyNameNull() const;
|
||||
void setFriendlyNameNull();
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the Manufacturer.
|
||||
*/
|
||||
QString manufacturer() const;
|
||||
/**
|
||||
* @brief Gets or sets the Manufacturer.
|
||||
*/
|
||||
void setManufacturer(QString newManufacturer);
|
||||
bool manufacturerNull() const;
|
||||
void setManufacturerNull();
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the ManufacturerUrl.
|
||||
*/
|
||||
QString manufacturerUrl() const;
|
||||
/**
|
||||
* @brief Gets or sets the ManufacturerUrl.
|
||||
*/
|
||||
void setManufacturerUrl(QString newManufacturerUrl);
|
||||
bool manufacturerUrlNull() const;
|
||||
void setManufacturerUrlNull();
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the ModelName.
|
||||
*/
|
||||
QString modelName() const;
|
||||
/**
|
||||
* @brief Gets or sets the ModelName.
|
||||
*/
|
||||
void setModelName(QString newModelName);
|
||||
bool modelNameNull() const;
|
||||
void setModelNameNull();
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the ModelDescription.
|
||||
*/
|
||||
QString modelDescription() const;
|
||||
/**
|
||||
* @brief Gets or sets the ModelDescription.
|
||||
*/
|
||||
void setModelDescription(QString newModelDescription);
|
||||
bool modelDescriptionNull() const;
|
||||
void setModelDescriptionNull();
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the ModelNumber.
|
||||
*/
|
||||
QString modelNumber() const;
|
||||
/**
|
||||
* @brief Gets or sets the ModelNumber.
|
||||
*/
|
||||
void setModelNumber(QString newModelNumber);
|
||||
bool modelNumberNull() const;
|
||||
void setModelNumberNull();
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the ModelUrl.
|
||||
*/
|
||||
QString modelUrl() const;
|
||||
/**
|
||||
* @brief Gets or sets the ModelUrl.
|
||||
*/
|
||||
void setModelUrl(QString newModelUrl);
|
||||
bool modelUrlNull() const;
|
||||
void setModelUrlNull();
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the SerialNumber.
|
||||
*/
|
||||
QString serialNumber() const;
|
||||
/**
|
||||
* @brief Gets or sets the SerialNumber.
|
||||
*/
|
||||
void setSerialNumber(QString newSerialNumber);
|
||||
bool serialNumberNull() const;
|
||||
void setSerialNumberNull();
|
||||
|
||||
/**
|
||||
* @brief Gets or sets a value indicating whether EnableAlbumArtInDidl.
|
||||
*/
|
||||
bool enableAlbumArtInDidl() const;
|
||||
/**
|
||||
* @brief Gets or sets a value indicating whether EnableAlbumArtInDidl.
|
||||
*/
|
||||
void setEnableAlbumArtInDidl(bool newEnableAlbumArtInDidl);
|
||||
|
||||
/**
|
||||
* @brief Gets or sets a value indicating whether EnableSingleAlbumArtLimit.
|
||||
*/
|
||||
bool enableSingleAlbumArtLimit() const;
|
||||
/**
|
||||
* @brief Gets or sets a value indicating whether EnableSingleAlbumArtLimit.
|
||||
*/
|
||||
void setEnableSingleAlbumArtLimit(bool newEnableSingleAlbumArtLimit);
|
||||
|
||||
/**
|
||||
* @brief Gets or sets a value indicating whether EnableSingleSubtitleLimit.
|
||||
*/
|
||||
bool enableSingleSubtitleLimit() const;
|
||||
/**
|
||||
* @brief Gets or sets a value indicating whether EnableSingleSubtitleLimit.
|
||||
*/
|
||||
void setEnableSingleSubtitleLimit(bool newEnableSingleSubtitleLimit);
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the SupportedMediaTypes.
|
||||
*/
|
||||
QString supportedMediaTypes() const;
|
||||
/**
|
||||
* @brief Gets or sets the SupportedMediaTypes.
|
||||
*/
|
||||
void setSupportedMediaTypes(QString newSupportedMediaTypes);
|
||||
bool supportedMediaTypesNull() const;
|
||||
void setSupportedMediaTypesNull();
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the UserId.
|
||||
*/
|
||||
QString userId() const;
|
||||
/**
|
||||
* @brief Gets or sets the UserId.
|
||||
*/
|
||||
void setUserId(QString newUserId);
|
||||
bool userIdNull() const;
|
||||
void setUserIdNull();
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the AlbumArtPn.
|
||||
*/
|
||||
QString albumArtPn() const;
|
||||
/**
|
||||
* @brief Gets or sets the AlbumArtPn.
|
||||
*/
|
||||
void setAlbumArtPn(QString newAlbumArtPn);
|
||||
bool albumArtPnNull() const;
|
||||
void setAlbumArtPnNull();
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the MaxAlbumArtWidth.
|
||||
*/
|
||||
qint32 maxAlbumArtWidth() const;
|
||||
/**
|
||||
* @brief Gets or sets the MaxAlbumArtWidth.
|
||||
*/
|
||||
void setMaxAlbumArtWidth(qint32 newMaxAlbumArtWidth);
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the MaxAlbumArtHeight.
|
||||
*/
|
||||
qint32 maxAlbumArtHeight() const;
|
||||
/**
|
||||
* @brief Gets or sets the MaxAlbumArtHeight.
|
||||
*/
|
||||
void setMaxAlbumArtHeight(qint32 newMaxAlbumArtHeight);
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the MaxIconWidth.
|
||||
*/
|
||||
std::optional<qint32> maxIconWidth() const;
|
||||
/**
|
||||
* @brief Gets or sets the MaxIconWidth.
|
||||
*/
|
||||
void setMaxIconWidth(std::optional<qint32> newMaxIconWidth);
|
||||
bool maxIconWidthNull() const;
|
||||
void setMaxIconWidthNull();
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the MaxIconHeight.
|
||||
*/
|
||||
std::optional<qint32> maxIconHeight() const;
|
||||
/**
|
||||
* @brief Gets or sets the MaxIconHeight.
|
||||
*/
|
||||
void setMaxIconHeight(std::optional<qint32> newMaxIconHeight);
|
||||
bool maxIconHeightNull() const;
|
||||
void setMaxIconHeightNull();
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the MaxStreamingBitrate.
|
||||
*/
|
||||
std::optional<qint32> maxStreamingBitrate() const;
|
||||
/**
|
||||
* @brief Gets or sets the MaxStreamingBitrate.
|
||||
*/
|
||||
void setMaxStreamingBitrate(std::optional<qint32> newMaxStreamingBitrate);
|
||||
bool maxStreamingBitrateNull() const;
|
||||
void setMaxStreamingBitrateNull();
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the MaxStaticBitrate.
|
||||
*/
|
||||
std::optional<qint32> maxStaticBitrate() const;
|
||||
/**
|
||||
* @brief Gets or sets the MaxStaticBitrate.
|
||||
*/
|
||||
void setMaxStaticBitrate(std::optional<qint32> newMaxStaticBitrate);
|
||||
bool maxStaticBitrateNull() const;
|
||||
void setMaxStaticBitrateNull();
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the MusicStreamingTranscodingBitrate.
|
||||
*/
|
||||
std::optional<qint32> musicStreamingTranscodingBitrate() const;
|
||||
/**
|
||||
* @brief Gets or sets the MusicStreamingTranscodingBitrate.
|
||||
*/
|
||||
void setMusicStreamingTranscodingBitrate(std::optional<qint32> newMusicStreamingTranscodingBitrate);
|
||||
bool musicStreamingTranscodingBitrateNull() const;
|
||||
void setMusicStreamingTranscodingBitrateNull();
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the MaxStaticMusicBitrate.
|
||||
*/
|
||||
std::optional<qint32> maxStaticMusicBitrate() const;
|
||||
/**
|
||||
* @brief Gets or sets the MaxStaticMusicBitrate.
|
||||
*/
|
||||
void setMaxStaticMusicBitrate(std::optional<qint32> newMaxStaticMusicBitrate);
|
||||
bool maxStaticMusicBitrateNull() const;
|
||||
void setMaxStaticMusicBitrateNull();
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the content of the aggregationFlags element in the urn:schemas-sonycom:av namespace.
|
||||
*/
|
||||
QString sonyAggregationFlags() const;
|
||||
/**
|
||||
* @brief Gets or sets the content of the aggregationFlags element in the urn:schemas-sonycom:av namespace.
|
||||
*/
|
||||
void setSonyAggregationFlags(QString newSonyAggregationFlags);
|
||||
bool sonyAggregationFlagsNull() const;
|
||||
void setSonyAggregationFlagsNull();
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the ProtocolInfo.
|
||||
*/
|
||||
QString protocolInfo() const;
|
||||
/**
|
||||
* @brief Gets or sets the ProtocolInfo.
|
||||
*/
|
||||
void setProtocolInfo(QString newProtocolInfo);
|
||||
bool protocolInfoNull() const;
|
||||
void setProtocolInfoNull();
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the TimelineOffsetSeconds.
|
||||
*/
|
||||
qint32 timelineOffsetSeconds() const;
|
||||
/**
|
||||
* @brief Gets or sets the TimelineOffsetSeconds.
|
||||
*/
|
||||
void setTimelineOffsetSeconds(qint32 newTimelineOffsetSeconds);
|
||||
|
||||
/**
|
||||
* @brief Gets or sets a value indicating whether RequiresPlainVideoItems.
|
||||
*/
|
||||
bool requiresPlainVideoItems() const;
|
||||
/**
|
||||
* @brief Gets or sets a value indicating whether RequiresPlainVideoItems.
|
||||
*/
|
||||
void setRequiresPlainVideoItems(bool newRequiresPlainVideoItems);
|
||||
|
||||
/**
|
||||
* @brief Gets or sets a value indicating whether RequiresPlainFolders.
|
||||
*/
|
||||
bool requiresPlainFolders() const;
|
||||
/**
|
||||
* @brief Gets or sets a value indicating whether RequiresPlainFolders.
|
||||
*/
|
||||
void setRequiresPlainFolders(bool newRequiresPlainFolders);
|
||||
|
||||
/**
|
||||
* @brief Gets or sets a value indicating whether EnableMSMediaReceiverRegistrar.
|
||||
*/
|
||||
bool enableMSMediaReceiverRegistrar() const;
|
||||
/**
|
||||
* @brief Gets or sets a value indicating whether EnableMSMediaReceiverRegistrar.
|
||||
*/
|
||||
void setEnableMSMediaReceiverRegistrar(bool newEnableMSMediaReceiverRegistrar);
|
||||
|
||||
/**
|
||||
* @brief Gets or sets a value indicating whether IgnoreTranscodeByteRangeRequests.
|
||||
*/
|
||||
bool ignoreTranscodeByteRangeRequests() const;
|
||||
/**
|
||||
* @brief Gets or sets a value indicating whether IgnoreTranscodeByteRangeRequests.
|
||||
*/
|
||||
void setIgnoreTranscodeByteRangeRequests(bool newIgnoreTranscodeByteRangeRequests);
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the XmlRootAttributes.
|
||||
*/
|
||||
QList<XmlAttribute> xmlRootAttributes() const;
|
||||
/**
|
||||
* @brief Gets or sets the XmlRootAttributes.
|
||||
*/
|
||||
void setXmlRootAttributes(QList<XmlAttribute> newXmlRootAttributes);
|
||||
bool xmlRootAttributesNull() const;
|
||||
void setXmlRootAttributesNull();
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the direct play profiles.
|
||||
*/
|
||||
QList<DirectPlayProfile> directPlayProfiles() const;
|
||||
/**
|
||||
* @brief Gets or sets the direct play profiles.
|
||||
*/
|
||||
void setDirectPlayProfiles(QList<DirectPlayProfile> newDirectPlayProfiles);
|
||||
bool directPlayProfilesNull() const;
|
||||
void setDirectPlayProfilesNull();
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the transcoding profiles.
|
||||
*/
|
||||
QList<TranscodingProfile> transcodingProfiles() const;
|
||||
/**
|
||||
* @brief Gets or sets the transcoding profiles.
|
||||
*/
|
||||
void setTranscodingProfiles(QList<TranscodingProfile> newTranscodingProfiles);
|
||||
bool transcodingProfilesNull() const;
|
||||
void setTranscodingProfilesNull();
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the ContainerProfiles.
|
||||
*/
|
||||
QList<ContainerProfile> containerProfiles() const;
|
||||
/**
|
||||
* @brief Gets or sets the ContainerProfiles.
|
||||
*/
|
||||
void setContainerProfiles(QList<ContainerProfile> newContainerProfiles);
|
||||
bool containerProfilesNull() const;
|
||||
void setContainerProfilesNull();
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the CodecProfiles.
|
||||
*/
|
||||
QList<CodecProfile> codecProfiles() const;
|
||||
/**
|
||||
* @brief Gets or sets the CodecProfiles.
|
||||
*/
|
||||
void setCodecProfiles(QList<CodecProfile> newCodecProfiles);
|
||||
bool codecProfilesNull() const;
|
||||
void setCodecProfilesNull();
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the ResponseProfiles.
|
||||
*/
|
||||
QList<ResponseProfile> responseProfiles() const;
|
||||
/**
|
||||
* @brief Gets or sets the ResponseProfiles.
|
||||
*/
|
||||
void setResponseProfiles(QList<ResponseProfile> newResponseProfiles);
|
||||
bool responseProfilesNull() const;
|
||||
void setResponseProfilesNull();
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the SubtitleProfiles.
|
||||
*/
|
||||
QList<SubtitleProfile> subtitleProfiles() const;
|
||||
/**
|
||||
* @brief Gets or sets the SubtitleProfiles.
|
||||
*/
|
||||
void setSubtitleProfiles(QList<SubtitleProfile> newSubtitleProfiles);
|
||||
bool subtitleProfilesNull() const;
|
||||
void setSubtitleProfilesNull();
|
||||
|
||||
|
||||
protected:
|
||||
QString m_name;
|
||||
QString m_jellyfinId;
|
||||
QSharedPointer<DeviceIdentification> m_identification = QSharedPointer<DeviceIdentification>();
|
||||
QString m_friendlyName;
|
||||
QString m_manufacturer;
|
||||
QString m_manufacturerUrl;
|
||||
QString m_modelName;
|
||||
QString m_modelDescription;
|
||||
QString m_modelNumber;
|
||||
QString m_modelUrl;
|
||||
QString m_serialNumber;
|
||||
bool m_enableAlbumArtInDidl;
|
||||
bool m_enableSingleAlbumArtLimit;
|
||||
bool m_enableSingleSubtitleLimit;
|
||||
QString m_supportedMediaTypes;
|
||||
QString m_userId;
|
||||
QString m_albumArtPn;
|
||||
qint32 m_maxAlbumArtWidth;
|
||||
qint32 m_maxAlbumArtHeight;
|
||||
std::optional<qint32> m_maxIconWidth = std::nullopt;
|
||||
std::optional<qint32> m_maxIconHeight = std::nullopt;
|
||||
std::optional<qint32> m_maxStreamingBitrate = std::nullopt;
|
||||
std::optional<qint32> m_maxStaticBitrate = std::nullopt;
|
||||
std::optional<qint32> m_musicStreamingTranscodingBitrate = std::nullopt;
|
||||
std::optional<qint32> m_maxStaticMusicBitrate = std::nullopt;
|
||||
QString m_sonyAggregationFlags;
|
||||
QString m_protocolInfo;
|
||||
qint32 m_timelineOffsetSeconds;
|
||||
bool m_requiresPlainVideoItems;
|
||||
bool m_requiresPlainFolders;
|
||||
bool m_enableMSMediaReceiverRegistrar;
|
||||
bool m_ignoreTranscodeByteRangeRequests;
|
||||
QList<XmlAttribute> m_xmlRootAttributes;
|
||||
QList<DirectPlayProfile> m_directPlayProfiles;
|
||||
QList<TranscodingProfile> m_transcodingProfiles;
|
||||
QList<ContainerProfile> m_containerProfiles;
|
||||
QList<CodecProfile> m_codecProfiles;
|
||||
QList<ResponseProfile> m_responseProfiles;
|
||||
QList<SubtitleProfile> 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<DeviceProfile>);
|
||||
|
||||
template<>
|
||||
QJsonValue toJsonValue(const DeviceProfile &source, convertType<DeviceProfile>);
|
||||
|
||||
} // NS DTO
|
||||
} // NS Jellyfin
|
||||
|
||||
#endif // JELLYFIN_DTO_DEVICEPROFILE_H
|
121
core/include/JellyfinQt/dto/deviceprofileinfo.h
Normal file
121
core/include/JellyfinQt/dto/deviceprofileinfo.h
Normal file
|
@ -0,0 +1,121 @@
|
|||
/*
|
||||
* 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_DEVICEPROFILEINFO_H
|
||||
#define JELLYFIN_DTO_DEVICEPROFILEINFO_H
|
||||
|
||||
#include <QJsonObject>
|
||||
#include <QJsonValue>
|
||||
#include <QString>
|
||||
#include <optional>
|
||||
|
||||
#include "JellyfinQt/dto/deviceprofiletype.h"
|
||||
#include "JellyfinQt/support/jsonconv.h"
|
||||
|
||||
namespace Jellyfin {
|
||||
// Forward declaration
|
||||
class ApiClient;
|
||||
}
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
|
||||
class DeviceProfileInfo {
|
||||
public:
|
||||
DeviceProfileInfo(
|
||||
DeviceProfileType type
|
||||
);
|
||||
|
||||
DeviceProfileInfo(const DeviceProfileInfo &other);
|
||||
|
||||
/**
|
||||
* Replaces the data being hold by this class with that of the other.
|
||||
*/
|
||||
void replaceData(DeviceProfileInfo &other);
|
||||
|
||||
static DeviceProfileInfo fromJson(QJsonObject source);
|
||||
void setFromJson(QJsonObject source);
|
||||
QJsonObject toJson() const;
|
||||
|
||||
// Properties
|
||||
/**
|
||||
* @brief Gets or sets the identifier.
|
||||
*/
|
||||
QString jellyfinId() const;
|
||||
/**
|
||||
* @brief Gets or sets the identifier.
|
||||
*/
|
||||
void setJellyfinId(QString newJellyfinId);
|
||||
bool jellyfinIdNull() const;
|
||||
void setJellyfinIdNull();
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the name.
|
||||
*/
|
||||
QString name() const;
|
||||
/**
|
||||
* @brief Gets or sets the name.
|
||||
*/
|
||||
void setName(QString newName);
|
||||
bool nameNull() const;
|
||||
void setNameNull();
|
||||
|
||||
|
||||
DeviceProfileType type() const;
|
||||
|
||||
void setType(DeviceProfileType newType);
|
||||
|
||||
|
||||
protected:
|
||||
QString m_jellyfinId;
|
||||
QString m_name;
|
||||
DeviceProfileType m_type;
|
||||
|
||||
private:
|
||||
// Private constructor which generates an invalid object, for use withing DeviceProfileInfo::fromJson();
|
||||
DeviceProfileInfo();
|
||||
};
|
||||
|
||||
|
||||
} // 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
|
||||
|
||||
#endif // JELLYFIN_DTO_DEVICEPROFILEINFO_H
|
76
core/include/JellyfinQt/dto/deviceprofiletype.h
Normal file
76
core/include/JellyfinQt/dto/deviceprofiletype.h
Normal file
|
@ -0,0 +1,76 @@
|
|||
/*
|
||||
* 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_DEVICEPROFILETYPE_H
|
||||
#define JELLYFIN_DTO_DEVICEPROFILETYPE_H
|
||||
|
||||
#include <QJsonValue>
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
|
||||
#include "JellyfinQt/support/jsonconv.h"
|
||||
|
||||
namespace Jellyfin {
|
||||
// Forward declaration
|
||||
class ApiClient;
|
||||
}
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
class DeviceProfileTypeClass {
|
||||
Q_GADGET
|
||||
public:
|
||||
enum Value {
|
||||
EnumNotSet,
|
||||
System,
|
||||
User,
|
||||
};
|
||||
Q_ENUM(Value)
|
||||
private:
|
||||
explicit DeviceProfileTypeClass();
|
||||
};
|
||||
|
||||
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
|
||||
|
||||
#endif // JELLYFIN_DTO_DEVICEPROFILETYPE_H
|
121
core/include/JellyfinQt/dto/directplayprofile.h
Normal file
121
core/include/JellyfinQt/dto/directplayprofile.h
Normal file
|
@ -0,0 +1,121 @@
|
|||
/*
|
||||
* 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_DIRECTPLAYPROFILE_H
|
||||
#define JELLYFIN_DTO_DIRECTPLAYPROFILE_H
|
||||
|
||||
#include <QJsonObject>
|
||||
#include <QJsonValue>
|
||||
#include <QString>
|
||||
#include <optional>
|
||||
|
||||
#include "JellyfinQt/dto/dlnaprofiletype.h"
|
||||
#include "JellyfinQt/support/jsonconv.h"
|
||||
|
||||
namespace Jellyfin {
|
||||
// Forward declaration
|
||||
class ApiClient;
|
||||
}
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
|
||||
class DirectPlayProfile {
|
||||
public:
|
||||
DirectPlayProfile(
|
||||
DlnaProfileType type
|
||||
);
|
||||
|
||||
DirectPlayProfile(const DirectPlayProfile &other);
|
||||
|
||||
/**
|
||||
* Replaces the data being hold by this class with that of the other.
|
||||
*/
|
||||
void replaceData(DirectPlayProfile &other);
|
||||
|
||||
static DirectPlayProfile fromJson(QJsonObject source);
|
||||
void setFromJson(QJsonObject source);
|
||||
QJsonObject toJson() const;
|
||||
|
||||
// Properties
|
||||
|
||||
QString container() const;
|
||||
|
||||
void setContainer(QString newContainer);
|
||||
bool containerNull() const;
|
||||
void setContainerNull();
|
||||
|
||||
|
||||
QString audioCodec() const;
|
||||
|
||||
void setAudioCodec(QString newAudioCodec);
|
||||
bool audioCodecNull() const;
|
||||
void setAudioCodecNull();
|
||||
|
||||
|
||||
QString videoCodec() const;
|
||||
|
||||
void setVideoCodec(QString newVideoCodec);
|
||||
bool videoCodecNull() const;
|
||||
void setVideoCodecNull();
|
||||
|
||||
|
||||
DlnaProfileType type() const;
|
||||
|
||||
void setType(DlnaProfileType newType);
|
||||
|
||||
|
||||
protected:
|
||||
QString m_container;
|
||||
QString m_audioCodec;
|
||||
QString m_videoCodec;
|
||||
DlnaProfileType m_type;
|
||||
|
||||
private:
|
||||
// Private constructor which generates an invalid object, for use withing DirectPlayProfile::fromJson();
|
||||
DirectPlayProfile();
|
||||
};
|
||||
|
||||
|
||||
} // 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
|
||||
|
||||
#endif // JELLYFIN_DTO_DIRECTPLAYPROFILE_H
|
243
core/include/JellyfinQt/dto/displaypreferencesdto.h
Normal file
243
core/include/JellyfinQt/dto/displaypreferencesdto.h
Normal file
|
@ -0,0 +1,243 @@
|
|||
/*
|
||||
* 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_DISPLAYPREFERENCESDTO_H
|
||||
#define JELLYFIN_DTO_DISPLAYPREFERENCESDTO_H
|
||||
|
||||
#include <QJsonObject>
|
||||
#include <QJsonValue>
|
||||
#include <QString>
|
||||
#include <optional>
|
||||
|
||||
#include "JellyfinQt/dto/scrolldirection.h"
|
||||
#include "JellyfinQt/dto/sortorder.h"
|
||||
#include "JellyfinQt/support/jsonconv.h"
|
||||
|
||||
namespace Jellyfin {
|
||||
// Forward declaration
|
||||
class ApiClient;
|
||||
}
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
|
||||
class DisplayPreferencesDto {
|
||||
public:
|
||||
DisplayPreferencesDto(
|
||||
bool rememberIndexing,
|
||||
qint32 primaryImageHeight,
|
||||
qint32 primaryImageWidth,
|
||||
ScrollDirection scrollDirection,
|
||||
bool showBackdrop,
|
||||
bool rememberSorting,
|
||||
SortOrder sortOrder,
|
||||
bool showSidebar
|
||||
);
|
||||
|
||||
DisplayPreferencesDto(const DisplayPreferencesDto &other);
|
||||
|
||||
/**
|
||||
* Replaces the data being hold by this class with that of the other.
|
||||
*/
|
||||
void replaceData(DisplayPreferencesDto &other);
|
||||
|
||||
static DisplayPreferencesDto fromJson(QJsonObject source);
|
||||
void setFromJson(QJsonObject source);
|
||||
QJsonObject toJson() const;
|
||||
|
||||
// Properties
|
||||
/**
|
||||
* @brief Gets or sets the user id.
|
||||
*/
|
||||
QString jellyfinId() const;
|
||||
/**
|
||||
* @brief Gets or sets the user id.
|
||||
*/
|
||||
void setJellyfinId(QString newJellyfinId);
|
||||
bool jellyfinIdNull() const;
|
||||
void setJellyfinIdNull();
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the type of the view.
|
||||
*/
|
||||
QString viewType() const;
|
||||
/**
|
||||
* @brief Gets or sets the type of the view.
|
||||
*/
|
||||
void setViewType(QString newViewType);
|
||||
bool viewTypeNull() const;
|
||||
void setViewTypeNull();
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the sort by.
|
||||
*/
|
||||
QString sortBy() const;
|
||||
/**
|
||||
* @brief Gets or sets the sort by.
|
||||
*/
|
||||
void setSortBy(QString newSortBy);
|
||||
bool sortByNull() const;
|
||||
void setSortByNull();
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the index by.
|
||||
*/
|
||||
QString indexBy() const;
|
||||
/**
|
||||
* @brief Gets or sets the index by.
|
||||
*/
|
||||
void setIndexBy(QString newIndexBy);
|
||||
bool indexByNull() const;
|
||||
void setIndexByNull();
|
||||
|
||||
/**
|
||||
* @brief Gets or sets a value indicating whether [remember indexing].
|
||||
*/
|
||||
bool rememberIndexing() const;
|
||||
/**
|
||||
* @brief Gets or sets a value indicating whether [remember indexing].
|
||||
*/
|
||||
void setRememberIndexing(bool newRememberIndexing);
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the height of the primary image.
|
||||
*/
|
||||
qint32 primaryImageHeight() const;
|
||||
/**
|
||||
* @brief Gets or sets the height of the primary image.
|
||||
*/
|
||||
void setPrimaryImageHeight(qint32 newPrimaryImageHeight);
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the width of the primary image.
|
||||
*/
|
||||
qint32 primaryImageWidth() const;
|
||||
/**
|
||||
* @brief Gets or sets the width of the primary image.
|
||||
*/
|
||||
void setPrimaryImageWidth(qint32 newPrimaryImageWidth);
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the custom prefs.
|
||||
*/
|
||||
QJsonObject customPrefs() const;
|
||||
/**
|
||||
* @brief Gets or sets the custom prefs.
|
||||
*/
|
||||
void setCustomPrefs(QJsonObject newCustomPrefs);
|
||||
bool customPrefsNull() const;
|
||||
void setCustomPrefsNull();
|
||||
|
||||
|
||||
ScrollDirection scrollDirection() const;
|
||||
|
||||
void setScrollDirection(ScrollDirection newScrollDirection);
|
||||
|
||||
/**
|
||||
* @brief Gets or sets a value indicating whether to show backdrops on this item.
|
||||
*/
|
||||
bool showBackdrop() const;
|
||||
/**
|
||||
* @brief Gets or sets a value indicating whether to show backdrops on this item.
|
||||
*/
|
||||
void setShowBackdrop(bool newShowBackdrop);
|
||||
|
||||
/**
|
||||
* @brief Gets or sets a value indicating whether [remember sorting].
|
||||
*/
|
||||
bool rememberSorting() const;
|
||||
/**
|
||||
* @brief Gets or sets a value indicating whether [remember sorting].
|
||||
*/
|
||||
void setRememberSorting(bool newRememberSorting);
|
||||
|
||||
|
||||
SortOrder sortOrder() const;
|
||||
|
||||
void setSortOrder(SortOrder newSortOrder);
|
||||
|
||||
/**
|
||||
* @brief Gets or sets a value indicating whether [show sidebar].
|
||||
*/
|
||||
bool showSidebar() const;
|
||||
/**
|
||||
* @brief Gets or sets a value indicating whether [show sidebar].
|
||||
*/
|
||||
void setShowSidebar(bool newShowSidebar);
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the client.
|
||||
*/
|
||||
QString client() const;
|
||||
/**
|
||||
* @brief Gets or sets the client.
|
||||
*/
|
||||
void setClient(QString newClient);
|
||||
bool clientNull() const;
|
||||
void setClientNull();
|
||||
|
||||
|
||||
protected:
|
||||
QString m_jellyfinId;
|
||||
QString m_viewType;
|
||||
QString m_sortBy;
|
||||
QString m_indexBy;
|
||||
bool m_rememberIndexing;
|
||||
qint32 m_primaryImageHeight;
|
||||
qint32 m_primaryImageWidth;
|
||||
QJsonObject m_customPrefs;
|
||||
ScrollDirection m_scrollDirection;
|
||||
bool m_showBackdrop;
|
||||
bool m_rememberSorting;
|
||||
SortOrder m_sortOrder;
|
||||
bool m_showSidebar;
|
||||
QString m_client;
|
||||
|
||||
private:
|
||||
// Private constructor which generates an invalid object, for use withing DisplayPreferencesDto::fromJson();
|
||||
DisplayPreferencesDto();
|
||||
};
|
||||
|
||||
|
||||
} // 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
|
||||
|
||||
#endif // JELLYFIN_DTO_DISPLAYPREFERENCESDTO_H
|
77
core/include/JellyfinQt/dto/dlnaprofiletype.h
Normal file
77
core/include/JellyfinQt/dto/dlnaprofiletype.h
Normal file
|
@ -0,0 +1,77 @@
|
|||
/*
|
||||
* 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_DLNAPROFILETYPE_H
|
||||
#define JELLYFIN_DTO_DLNAPROFILETYPE_H
|
||||
|
||||
#include <QJsonValue>
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
|
||||
#include "JellyfinQt/support/jsonconv.h"
|
||||
|
||||
namespace Jellyfin {
|
||||
// Forward declaration
|
||||
class ApiClient;
|
||||
}
|
||||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
class DlnaProfileTypeClass {
|
||||
Q_GADGET
|
||||
public:
|
||||
enum Value {
|
||||
EnumNotSet,
|
||||
Audio,
|
||||
Video,
|
||||
Photo,
|
||||
};
|
||||
Q_ENUM(Value)
|
||||
private:
|
||||
explicit DlnaProfileTypeClass();
|
||||
};
|
||||
|
||||
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
|
||||
|
||||
#endif // JELLYFIN_DTO_DLNAPROFILETYPE_H
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue