diff options
Diffstat (limited to 'xbmc/addons/kodi-dev-kit/include/kodi/c-api')
59 files changed, 8225 insertions, 0 deletions
diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/CMakeLists.txt b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/CMakeLists.txt new file mode 100644 index 0000000..091e0fe --- /dev/null +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/CMakeLists.txt | |||
| @@ -0,0 +1,13 @@ | |||
| 1 | set(HEADERS addon_base.h | ||
| 2 | audio_engine.h | ||
| 3 | filesystem.h | ||
| 4 | general.h | ||
| 5 | network.h) | ||
| 6 | |||
| 7 | if(CORE_SYSTEM_NAME STREQUAL android) | ||
| 8 | list(APPEND SOURCES platform/android/system.h) | ||
| 9 | endif() | ||
| 10 | |||
| 11 | if(NOT ENABLE_STATIC_LIBS) | ||
| 12 | core_add_library(addons_kodi-dev-kit_include_kodi_c-api) | ||
| 13 | endif() | ||
diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/CMakeLists.txt b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/CMakeLists.txt new file mode 100644 index 0000000..4edd034 --- /dev/null +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/CMakeLists.txt | |||
| @@ -0,0 +1,13 @@ | |||
| 1 | set(HEADERS audio_decoder.h | ||
| 2 | audio_encoder.h | ||
| 3 | game.h | ||
| 4 | image_decoder.h | ||
| 5 | peripheral.h | ||
| 6 | pvr.h | ||
| 7 | screensaver.h | ||
| 8 | vfs.h | ||
| 9 | visualization.h) | ||
| 10 | |||
| 11 | if(NOT ENABLE_STATIC_LIBS) | ||
| 12 | core_add_library(addons_kodi-dev-kit_include_kodi_c-api_addon-instance) | ||
| 13 | endif() | ||
diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/audio_decoder.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/audio_decoder.h new file mode 100644 index 0000000..8b75ddb --- /dev/null +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/audio_decoder.h | |||
| @@ -0,0 +1,92 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2005-2020 Team Kodi | ||
| 3 | * This file is part of Kodi - https://kodi.tv | ||
| 4 | * | ||
| 5 | * SPDX-License-Identifier: GPL-2.0-or-later | ||
| 6 | * See LICENSES/README.md for more information. | ||
| 7 | */ | ||
| 8 | |||
| 9 | #pragma once | ||
| 10 | |||
| 11 | #ifndef C_API_ADDONINSTANCE_AUDIO_DECODER_H | ||
| 12 | #define C_API_ADDONINSTANCE_AUDIO_DECODER_H | ||
| 13 | |||
| 14 | #include "../addon_base.h" | ||
| 15 | #include "../audio_engine.h" | ||
| 16 | |||
| 17 | #define AUDIO_DECODER_LYRICS_SIZE 65535 | ||
| 18 | |||
| 19 | #ifdef __cplusplus | ||
| 20 | extern "C" | ||
| 21 | { | ||
| 22 | #endif /* __cplusplus */ | ||
| 23 | |||
| 24 | // WARNING About size use malloc/new! | ||
| 25 | struct AUDIO_DECODER_INFO_TAG | ||
| 26 | { | ||
| 27 | char title[ADDON_STANDARD_STRING_LENGTH_SMALL]; | ||
| 28 | char artist[ADDON_STANDARD_STRING_LENGTH_SMALL]; | ||
| 29 | char album[ADDON_STANDARD_STRING_LENGTH_SMALL]; | ||
| 30 | char album_artist[ADDON_STANDARD_STRING_LENGTH_SMALL]; | ||
| 31 | char media_type[ADDON_STANDARD_STRING_LENGTH_SMALL]; | ||
| 32 | char genre[ADDON_STANDARD_STRING_LENGTH_SMALL]; | ||
| 33 | int duration; | ||
| 34 | int track; | ||
| 35 | int disc; | ||
| 36 | char disc_subtitle[ADDON_STANDARD_STRING_LENGTH_SMALL]; | ||
| 37 | int disc_total; | ||
| 38 | char release_date[ADDON_STANDARD_STRING_LENGTH_SMALL]; | ||
| 39 | char lyrics[AUDIO_DECODER_LYRICS_SIZE]; | ||
| 40 | int samplerate; | ||
| 41 | int channels; | ||
| 42 | int bitrate; | ||
| 43 | char comment[ADDON_STANDARD_STRING_LENGTH]; | ||
| 44 | }; | ||
| 45 | |||
| 46 | typedef struct AddonProps_AudioDecoder | ||
| 47 | { | ||
| 48 | int dummy; | ||
| 49 | } AddonProps_AudioDecoder; | ||
| 50 | |||
| 51 | typedef struct AddonToKodiFuncTable_AudioDecoder | ||
| 52 | { | ||
| 53 | KODI_HANDLE kodiInstance; | ||
| 54 | } AddonToKodiFuncTable_AudioDecoder; | ||
| 55 | |||
| 56 | struct AddonInstance_AudioDecoder; | ||
| 57 | typedef struct KodiToAddonFuncTable_AudioDecoder | ||
| 58 | { | ||
| 59 | KODI_HANDLE addonInstance; | ||
| 60 | bool(__cdecl* init)(const struct AddonInstance_AudioDecoder* instance, | ||
| 61 | const char* file, | ||
| 62 | unsigned int filecache, | ||
| 63 | int* channels, | ||
| 64 | int* samplerate, | ||
| 65 | int* bitspersample, | ||
| 66 | int64_t* totaltime, | ||
| 67 | int* bitrate, | ||
| 68 | enum AudioEngineDataFormat* format, | ||
| 69 | const enum AudioEngineChannel** info); | ||
| 70 | int(__cdecl* read_pcm)(const struct AddonInstance_AudioDecoder* instance, | ||
| 71 | uint8_t* buffer, | ||
| 72 | int size, | ||
| 73 | int* actualsize); | ||
| 74 | int64_t(__cdecl* seek)(const struct AddonInstance_AudioDecoder* instance, int64_t time); | ||
| 75 | bool(__cdecl* read_tag)(const struct AddonInstance_AudioDecoder* instance, | ||
| 76 | const char* file, | ||
| 77 | struct AUDIO_DECODER_INFO_TAG* tag); | ||
| 78 | int(__cdecl* track_count)(const struct AddonInstance_AudioDecoder* instance, const char* file); | ||
| 79 | } KodiToAddonFuncTable_AudioDecoder; | ||
| 80 | |||
| 81 | typedef struct AddonInstance_AudioDecoder | ||
| 82 | { | ||
| 83 | struct AddonProps_AudioDecoder* props; | ||
| 84 | struct AddonToKodiFuncTable_AudioDecoder* toKodi; | ||
| 85 | struct KodiToAddonFuncTable_AudioDecoder* toAddon; | ||
| 86 | } AddonInstance_AudioDecoder; | ||
| 87 | |||
| 88 | #ifdef __cplusplus | ||
| 89 | } /* extern "C" */ | ||
| 90 | #endif /* __cplusplus */ | ||
| 91 | |||
| 92 | #endif /* !C_API_ADDONINSTANCE_AUDIO_DECODER_H */ | ||
diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/audio_encoder.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/audio_encoder.h new file mode 100644 index 0000000..6f24d1c --- /dev/null +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/audio_encoder.h | |||
| @@ -0,0 +1,67 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2005-2018 Team Kodi | ||
| 3 | * This file is part of Kodi - https://kodi.tv | ||
| 4 | * | ||
| 5 | * SPDX-License-Identifier: GPL-2.0-or-later | ||
| 6 | * See LICENSES/README.md for more information. | ||
| 7 | */ | ||
| 8 | |||
| 9 | #pragma once | ||
| 10 | |||
| 11 | #ifndef C_API_ADDONINSTANCE_AUDIO_ENCODER_H | ||
| 12 | #define C_API_ADDONINSTANCE_AUDIO_ENCODER_H | ||
| 13 | |||
| 14 | #include "../addon_base.h" | ||
| 15 | |||
| 16 | #ifdef __cplusplus | ||
| 17 | extern "C" | ||
| 18 | { | ||
| 19 | #endif /* __cplusplus */ | ||
| 20 | |||
| 21 | typedef struct AddonProps_AudioEncoder | ||
| 22 | { | ||
| 23 | int dummy; | ||
| 24 | } AddonProps_AudioEncoder; | ||
| 25 | |||
| 26 | typedef struct AddonToKodiFuncTable_AudioEncoder | ||
| 27 | { | ||
| 28 | KODI_HANDLE kodiInstance; | ||
| 29 | int (*write)(KODI_HANDLE kodiInstance, const uint8_t* data, int len); | ||
| 30 | int64_t (*seek)(KODI_HANDLE kodiInstance, int64_t pos, int whence); | ||
| 31 | } AddonToKodiFuncTable_AudioEncoder; | ||
| 32 | |||
| 33 | struct AddonInstance_AudioEncoder; | ||
| 34 | typedef struct KodiToAddonFuncTable_AudioEncoder | ||
| 35 | { | ||
| 36 | KODI_HANDLE addonInstance; | ||
| 37 | bool(__cdecl* start)(const struct AddonInstance_AudioEncoder* instance, | ||
| 38 | int in_channels, | ||
| 39 | int in_rate, | ||
| 40 | int in_bits, | ||
| 41 | const char* title, | ||
| 42 | const char* artist, | ||
| 43 | const char* albumartist, | ||
| 44 | const char* album, | ||
| 45 | const char* year, | ||
| 46 | const char* track, | ||
| 47 | const char* genre, | ||
| 48 | const char* comment, | ||
| 49 | int track_length); | ||
| 50 | int(__cdecl* encode)(const struct AddonInstance_AudioEncoder* instance, | ||
| 51 | int num_bytes_read, | ||
| 52 | const uint8_t* pbt_stream); | ||
| 53 | bool(__cdecl* finish)(const struct AddonInstance_AudioEncoder* instance); | ||
| 54 | } KodiToAddonFuncTable_AudioEncoder; | ||
| 55 | |||
| 56 | typedef struct AddonInstance_AudioEncoder | ||
| 57 | { | ||
| 58 | struct AddonProps_AudioEncoder* props; | ||
| 59 | struct AddonToKodiFuncTable_AudioEncoder* toKodi; | ||
| 60 | struct KodiToAddonFuncTable_AudioEncoder* toAddon; | ||
| 61 | } AddonInstance_AudioEncoder; | ||
| 62 | |||
| 63 | #ifdef __cplusplus | ||
| 64 | } /* extern "C" */ | ||
| 65 | #endif /* __cplusplus */ | ||
| 66 | |||
| 67 | #endif /* !C_API_ADDONINSTANCE_AUDIO_ENCODER_H */ | ||
diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/game.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/game.h new file mode 100644 index 0000000..c97fa5d --- /dev/null +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/game.h | |||
| @@ -0,0 +1,1212 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2014-2020 Team Kodi | ||
| 3 | * This file is part of Kodi - https://kodi.tv | ||
| 4 | * | ||
| 5 | * SPDX-License-Identifier: GPL-2.0-or-later | ||
| 6 | * See LICENSES/README.md for more information. | ||
| 7 | */ | ||
| 8 | |||
| 9 | #pragma once | ||
| 10 | |||
| 11 | #ifndef C_API_ADDONINSTANCE_GAME_H | ||
| 12 | #define C_API_ADDONINSTANCE_GAME_H | ||
| 13 | |||
| 14 | #include "../addon_base.h" | ||
| 15 | |||
| 16 | #include <stddef.h> /* size_t */ | ||
| 17 | |||
| 18 | //============================================================================== | ||
| 19 | /// @ingroup cpp_kodi_addon_game_Defs | ||
| 20 | /// @brief **Port ID used when topology is unknown** | ||
| 21 | #define DEFAULT_PORT_ID "1" | ||
| 22 | //------------------------------------------------------------------------------ | ||
| 23 | |||
| 24 | #ifdef __cplusplus | ||
| 25 | extern "C" | ||
| 26 | { | ||
| 27 | #endif /* __cplusplus */ | ||
| 28 | |||
| 29 | //============================================================================ | ||
| 30 | /// @ingroup cpp_kodi_addon_game_Defs | ||
| 31 | /// @brief **Game add-on error codes** | ||
| 32 | /// | ||
| 33 | /// Used as return values on most Game related functions. | ||
| 34 | /// | ||
| 35 | typedef enum GAME_ERROR | ||
| 36 | { | ||
| 37 | /// @brief no error occurred | ||
| 38 | GAME_ERROR_NO_ERROR, | ||
| 39 | |||
| 40 | /// @brief an unknown error occurred | ||
| 41 | GAME_ERROR_UNKNOWN, | ||
| 42 | |||
| 43 | /// @brief the method that the frontend called is not implemented | ||
| 44 | GAME_ERROR_NOT_IMPLEMENTED, | ||
| 45 | |||
| 46 | /// @brief the command was rejected by the game client | ||
| 47 | GAME_ERROR_REJECTED, | ||
| 48 | |||
| 49 | /// @brief the parameters of the method that was called are invalid for this operation | ||
| 50 | GAME_ERROR_INVALID_PARAMETERS, | ||
| 51 | |||
| 52 | /// @brief the command failed | ||
| 53 | GAME_ERROR_FAILED, | ||
| 54 | |||
| 55 | /// @brief no game is loaded | ||
| 56 | GAME_ERROR_NOT_LOADED, | ||
| 57 | |||
| 58 | /// @brief game requires restricted resources | ||
| 59 | GAME_ERROR_RESTRICTED, | ||
| 60 | } GAME_ERROR; | ||
| 61 | //---------------------------------------------------------------------------- | ||
| 62 | |||
| 63 | //--==----==----==----==----==----==----==----==----==----==----==----==----==-- | ||
| 64 | /// @defgroup cpp_kodi_addon_game_Defs_AudioStream 1. Audio stream | ||
| 65 | /// @ingroup cpp_kodi_addon_game_Defs | ||
| 66 | /// @brief **The for Audio stream used data system** | ||
| 67 | /// | ||
| 68 | /// Used to give Addon currently used audio stream configuration on Kodi and | ||
| 69 | /// arrays to give related data to Kodi on callbacks. | ||
| 70 | /// | ||
| 71 | ///@{ | ||
| 72 | |||
| 73 | //============================================================================ | ||
| 74 | /// @brief **Stream Format** | ||
| 75 | /// | ||
| 76 | /// From Kodi requested specified audio sample format. | ||
| 77 | /// | ||
| 78 | typedef enum GAME_PCM_FORMAT | ||
| 79 | { | ||
| 80 | GAME_PCM_FORMAT_UNKNOWN, | ||
| 81 | |||
| 82 | /// @brief S16NE sample format | ||
| 83 | GAME_PCM_FORMAT_S16NE, | ||
| 84 | } GAME_PCM_FORMAT; | ||
| 85 | //---------------------------------------------------------------------------- | ||
| 86 | |||
| 87 | //============================================================================ | ||
| 88 | /// @brief **Audio channel** | ||
| 89 | /// | ||
| 90 | /// Channel identification flags. | ||
| 91 | /// | ||
| 92 | typedef enum GAME_AUDIO_CHANNEL | ||
| 93 | { | ||
| 94 | /// @brief Channel list terminator | ||
| 95 | GAME_CH_NULL, | ||
| 96 | |||
| 97 | /// @brief Channel front left | ||
| 98 | GAME_CH_FL, | ||
| 99 | |||
| 100 | /// @brief Channel front right | ||
| 101 | GAME_CH_FR, | ||
| 102 | |||
| 103 | /// @brief Channel front center | ||
| 104 | GAME_CH_FC, | ||
| 105 | |||
| 106 | /// @brief Channel Low Frequency Effects / Subwoofer | ||
| 107 | GAME_CH_LFE, | ||
| 108 | |||
| 109 | /// @brief Channel back left | ||
| 110 | GAME_CH_BL, | ||
| 111 | |||
| 112 | /// @brief Channel back right | ||
| 113 | GAME_CH_BR, | ||
| 114 | |||
| 115 | /// @brief Channel front left over center | ||
| 116 | GAME_CH_FLOC, | ||
| 117 | |||
| 118 | /// @brief Channel front right over center | ||
| 119 | GAME_CH_FROC, | ||
| 120 | |||
| 121 | /// @brief Channel back center | ||
| 122 | GAME_CH_BC, | ||
| 123 | |||
| 124 | /// @brief Channel surround/side left | ||
| 125 | GAME_CH_SL, | ||
| 126 | |||
| 127 | /// @brief Channel surround/side right | ||
| 128 | GAME_CH_SR, | ||
| 129 | |||
| 130 | /// @brief Channel top front left | ||
| 131 | GAME_CH_TFL, | ||
| 132 | |||
| 133 | /// @brief Channel top front right | ||
| 134 | GAME_CH_TFR, | ||
| 135 | |||
| 136 | /// @brief Channel top front center | ||
| 137 | GAME_CH_TFC, | ||
| 138 | |||
| 139 | /// @brief Channel top center | ||
| 140 | GAME_CH_TC, | ||
| 141 | |||
| 142 | /// @brief Channel top back left | ||
| 143 | GAME_CH_TBL, | ||
| 144 | |||
| 145 | /// @brief Channel top back right | ||
| 146 | GAME_CH_TBR, | ||
| 147 | |||
| 148 | /// @brief Channel top back center | ||
| 149 | GAME_CH_TBC, | ||
| 150 | |||
| 151 | /// @brief Channel bacl left over center | ||
| 152 | GAME_CH_BLOC, | ||
| 153 | |||
| 154 | /// @brief Channel back right over center | ||
| 155 | GAME_CH_BROC, | ||
| 156 | } GAME_AUDIO_CHANNEL; | ||
| 157 | //---------------------------------------------------------------------------- | ||
| 158 | |||
| 159 | //============================================================================ | ||
| 160 | /// @brief **Game audio stream properties** | ||
| 161 | /// | ||
| 162 | /// Used by Kodi to pass the currently required audio stream settings to the addon | ||
| 163 | /// | ||
| 164 | typedef struct game_stream_audio_properties | ||
| 165 | { | ||
| 166 | GAME_PCM_FORMAT format; | ||
| 167 | const GAME_AUDIO_CHANNEL* channel_map; | ||
| 168 | } ATTRIBUTE_PACKED game_stream_audio_properties; | ||
| 169 | //---------------------------------------------------------------------------- | ||
| 170 | |||
| 171 | //============================================================================ | ||
| 172 | /// @brief **Audio stream packet** | ||
| 173 | /// | ||
| 174 | /// This packet contains audio stream data passed to Kodi. | ||
| 175 | /// | ||
| 176 | typedef struct game_stream_audio_packet | ||
| 177 | { | ||
| 178 | /// @brief Pointer for audio stream data given to Kodi | ||
| 179 | const uint8_t* data; | ||
| 180 | |||
| 181 | /// @brief Size of data array | ||
| 182 | size_t size; | ||
| 183 | } ATTRIBUTE_PACKED game_stream_audio_packet; | ||
| 184 | //---------------------------------------------------------------------------- | ||
| 185 | |||
| 186 | ///@} | ||
| 187 | |||
| 188 | //--==----==----==----==----==----==----==----==----==----==----==----==----==-- | ||
| 189 | /// @defgroup cpp_kodi_addon_game_Defs_VideoStream 2. Video stream | ||
| 190 | /// @ingroup cpp_kodi_addon_game_Defs | ||
| 191 | /// @brief **The for Video stream used data system** | ||
| 192 | /// | ||
| 193 | /// Used to give Addon currently used video stream configuration on Kodi and | ||
| 194 | /// arrays to give related data to Kodi on callbacks. | ||
| 195 | /// | ||
| 196 | ///@{ | ||
| 197 | |||
| 198 | //============================================================================ | ||
| 199 | /// @brief **Pixel format** | ||
| 200 | /// | ||
| 201 | /// From Kodi requested specified video RGB color model format. | ||
| 202 | /// | ||
| 203 | typedef enum GAME_PIXEL_FORMAT | ||
| 204 | { | ||
| 205 | GAME_PIXEL_FORMAT_UNKNOWN, | ||
| 206 | |||
| 207 | /// @brief 0RGB8888 Format | ||
| 208 | GAME_PIXEL_FORMAT_0RGB8888, | ||
| 209 | |||
| 210 | /// @brief RGB565 Format | ||
| 211 | GAME_PIXEL_FORMAT_RGB565, | ||
| 212 | |||
| 213 | /// @brief 0RGB1555 Format | ||
| 214 | GAME_PIXEL_FORMAT_0RGB1555, | ||
| 215 | } GAME_PIXEL_FORMAT; | ||
| 216 | //---------------------------------------------------------------------------- | ||
| 217 | |||
| 218 | //============================================================================ | ||
| 219 | /// @brief **Video rotation position** | ||
| 220 | /// | ||
| 221 | /// To define position how video becomes shown. | ||
| 222 | /// | ||
| 223 | typedef enum GAME_VIDEO_ROTATION | ||
| 224 | { | ||
| 225 | /// @brief 0° and Without rotation | ||
| 226 | GAME_VIDEO_ROTATION_0, | ||
| 227 | |||
| 228 | /// @brief rotate 90° counterclockwise | ||
| 229 | GAME_VIDEO_ROTATION_90_CCW, | ||
| 230 | |||
| 231 | /// @brief rotate 180° counterclockwise | ||
| 232 | GAME_VIDEO_ROTATION_180_CCW, | ||
| 233 | |||
| 234 | /// @brief rotate 270° counterclockwise | ||
| 235 | GAME_VIDEO_ROTATION_270_CCW, | ||
| 236 | } GAME_VIDEO_ROTATION; | ||
| 237 | //---------------------------------------------------------------------------- | ||
| 238 | |||
| 239 | //============================================================================ | ||
| 240 | /// @brief **Game video stream properties** | ||
| 241 | /// | ||
| 242 | /// Used by Kodi to pass the currently required video stream settings to the addon | ||
| 243 | /// | ||
| 244 | typedef struct game_stream_video_properties | ||
| 245 | { | ||
| 246 | /// @brief The to used pixel format | ||
| 247 | GAME_PIXEL_FORMAT format; | ||
| 248 | |||
| 249 | /// @brief The nominal used width | ||
| 250 | unsigned int nominal_width; | ||
| 251 | |||
| 252 | /// @brief The nominal used height | ||
| 253 | unsigned int nominal_height; | ||
| 254 | |||
| 255 | /// @brief The maximal used width | ||
| 256 | unsigned int max_width; | ||
| 257 | |||
| 258 | /// @brief The maximal used height | ||
| 259 | unsigned int max_height; | ||
| 260 | |||
| 261 | /// @brief On video stream used aspect ration | ||
| 262 | /// | ||
| 263 | /// @note If aspect_ratio is <= 0.0, an aspect ratio of nominal_width / nominal_height is assumed | ||
| 264 | float aspect_ratio; | ||
| 265 | } ATTRIBUTE_PACKED game_stream_video_properties; | ||
| 266 | //---------------------------------------------------------------------------- | ||
| 267 | |||
| 268 | //============================================================================ | ||
| 269 | /// @brief **Video stream packet** | ||
| 270 | /// | ||
| 271 | /// This packet contains video stream data passed to Kodi. | ||
| 272 | /// | ||
| 273 | typedef struct game_stream_video_packet | ||
| 274 | { | ||
| 275 | /// @brief Video height | ||
| 276 | unsigned int width; | ||
| 277 | |||
| 278 | /// @brief Video width | ||
| 279 | unsigned int height; | ||
| 280 | |||
| 281 | /// @brief Width @ref GAME_VIDEO_ROTATION defined rotation angle. | ||
| 282 | GAME_VIDEO_ROTATION rotation; | ||
| 283 | |||
| 284 | /// @brief Pointer for video stream data given to Kodi | ||
| 285 | const uint8_t* data; | ||
| 286 | |||
| 287 | /// @brief Size of data array | ||
| 288 | size_t size; | ||
| 289 | } ATTRIBUTE_PACKED game_stream_video_packet; | ||
| 290 | //---------------------------------------------------------------------------- | ||
| 291 | |||
| 292 | ///@} | ||
| 293 | |||
| 294 | //--==----==----==----==----==----==----==----==----==----==----==----==----==-- | ||
| 295 | /// @defgroup cpp_kodi_addon_game_Defs_HardwareFramebuffer 3. Hardware framebuffer stream | ||
| 296 | /// @ingroup cpp_kodi_addon_game_Defs | ||
| 297 | /// @brief **Hardware framebuffer stream data** | ||
| 298 | /// | ||
| 299 | ///@{ | ||
| 300 | |||
| 301 | //============================================================================ | ||
| 302 | /// @brief **Hardware framebuffer type** | ||
| 303 | /// | ||
| 304 | typedef enum GAME_HW_CONTEXT_TYPE | ||
| 305 | { | ||
| 306 | /// @brief None context | ||
| 307 | GAME_HW_CONTEXT_NONE, | ||
| 308 | |||
| 309 | /// @brief OpenGL 2.x. Driver can choose to use latest compatibility context | ||
| 310 | GAME_HW_CONTEXT_OPENGL, | ||
| 311 | |||
| 312 | /// @brief OpenGL ES 2.0 | ||
| 313 | GAME_HW_CONTEXT_OPENGLES2, | ||
| 314 | |||
| 315 | /// @brief Modern desktop core GL context. Use major/minor fields to set GL version | ||
| 316 | GAME_HW_CONTEXT_OPENGL_CORE, | ||
| 317 | |||
| 318 | /// @brief OpenGL ES 3.0 | ||
| 319 | GAME_HW_CONTEXT_OPENGLES3, | ||
| 320 | |||
| 321 | /// @brief OpenGL ES 3.1+. Set major/minor fields. | ||
| 322 | GAME_HW_CONTEXT_OPENGLES_VERSION, | ||
| 323 | |||
| 324 | /// @brief Vulkan | ||
| 325 | GAME_HW_CONTEXT_VULKAN | ||
| 326 | } GAME_HW_CONTEXT_TYPE; | ||
| 327 | //---------------------------------------------------------------------------- | ||
| 328 | |||
| 329 | //============================================================================ | ||
| 330 | /// @brief **Hardware framebuffer properties** | ||
| 331 | /// | ||
| 332 | typedef struct game_stream_hw_framebuffer_properties | ||
| 333 | { | ||
| 334 | /// @brief The API to use. | ||
| 335 | /// | ||
| 336 | GAME_HW_CONTEXT_TYPE context_type; | ||
| 337 | |||
| 338 | /// @brief Set if render buffers should have depth component attached. | ||
| 339 | /// | ||
| 340 | /// @todo: Obsolete | ||
| 341 | /// | ||
| 342 | bool depth; | ||
| 343 | |||
| 344 | /// @brief Set if stencil buffers should be attached. | ||
| 345 | /// | ||
| 346 | /// If depth and stencil are true, a packed 24/8 buffer will be added. | ||
| 347 | /// Only attaching stencil is invalid and will be ignored. | ||
| 348 | /// | ||
| 349 | /// @todo: Obsolete. | ||
| 350 | /// | ||
| 351 | bool stencil; | ||
| 352 | |||
| 353 | /// @brief Use conventional bottom-left origin convention. | ||
| 354 | /// | ||
| 355 | /// If false, standard top-left origin semantics are used. | ||
| 356 | /// | ||
| 357 | /// @todo: Move to GL specific interface | ||
| 358 | /// | ||
| 359 | bool bottom_left_origin; | ||
| 360 | |||
| 361 | /// @brief Major version number for core GL context or GLES 3.1+. | ||
| 362 | unsigned int version_major; | ||
| 363 | |||
| 364 | /// @brief Minor version number for core GL context or GLES 3.1+. | ||
| 365 | unsigned int version_minor; | ||
| 366 | |||
| 367 | /// @brief If this is true, the frontend will go very far to avoid resetting context | ||
| 368 | /// in scenarios like toggling fullscreen, etc. | ||
| 369 | /// | ||
| 370 | /// @todo: Obsolete? Maybe frontend should just always assume this... | ||
| 371 | /// | ||
| 372 | /// The reset callback might still be called in extreme situations such as if | ||
| 373 | /// the context is lost beyond recovery. | ||
| 374 | /// | ||
| 375 | /// For optimal stability, set this to false, and allow context to be reset at | ||
| 376 | /// any time. | ||
| 377 | /// | ||
| 378 | bool cache_context; | ||
| 379 | |||
| 380 | /// @brief Creates a debug context. | ||
| 381 | bool debug_context; | ||
| 382 | } ATTRIBUTE_PACKED game_stream_hw_framebuffer_properties; | ||
| 383 | //---------------------------------------------------------------------------- | ||
| 384 | |||
| 385 | //============================================================================ | ||
| 386 | /// @brief **Hardware framebuffer buffer** | ||
| 387 | /// | ||
| 388 | typedef struct game_stream_hw_framebuffer_buffer | ||
| 389 | { | ||
| 390 | /// @brief | ||
| 391 | uintptr_t framebuffer; | ||
| 392 | } ATTRIBUTE_PACKED game_stream_hw_framebuffer_buffer; | ||
| 393 | //---------------------------------------------------------------------------- | ||
| 394 | |||
| 395 | //============================================================================ | ||
| 396 | /// @brief **Hardware framebuffer packet** | ||
| 397 | /// | ||
| 398 | typedef struct game_stream_hw_framebuffer_packet | ||
| 399 | { | ||
| 400 | /// @brief | ||
| 401 | uintptr_t framebuffer; | ||
| 402 | } ATTRIBUTE_PACKED game_stream_hw_framebuffer_packet; | ||
| 403 | //---------------------------------------------------------------------------- | ||
| 404 | |||
| 405 | //============================================================================ | ||
| 406 | /// @brief **Hardware framebuffer process function address** | ||
| 407 | /// | ||
| 408 | typedef void (*game_proc_address_t)(void); | ||
| 409 | //---------------------------------------------------------------------------- | ||
| 410 | |||
| 411 | ///@} | ||
| 412 | |||
| 413 | //--==----==----==----==----==----==----==----==----==----==----==----==----==-- | ||
| 414 | /// @defgroup cpp_kodi_addon_game_Defs_SoftwareFramebuffer 4. Software framebuffer stream | ||
| 415 | /// @ingroup cpp_kodi_addon_game_Defs | ||
| 416 | /// @brief **Software framebuffer stream data** | ||
| 417 | /// | ||
| 418 | ///@{ | ||
| 419 | |||
| 420 | //============================================================================ | ||
| 421 | /// @brief **Game video stream properties** | ||
| 422 | /// | ||
| 423 | /// Used by Kodi to pass the currently required video stream settings to the addon | ||
| 424 | /// | ||
| 425 | typedef game_stream_video_properties game_stream_sw_framebuffer_properties; | ||
| 426 | //---------------------------------------------------------------------------- | ||
| 427 | |||
| 428 | //============================================================================ | ||
| 429 | /// @brief **Hardware framebuffer type** | ||
| 430 | /// | ||
| 431 | typedef struct game_stream_sw_framebuffer_buffer | ||
| 432 | { | ||
| 433 | GAME_PIXEL_FORMAT format; | ||
| 434 | uint8_t* data; | ||
| 435 | size_t size; | ||
| 436 | } ATTRIBUTE_PACKED game_stream_sw_framebuffer_buffer; | ||
| 437 | //---------------------------------------------------------------------------- | ||
| 438 | |||
| 439 | //============================================================================ | ||
| 440 | /// @brief **Video stream packet** | ||
| 441 | /// | ||
| 442 | /// This packet contains video stream data passed to Kodi. | ||
| 443 | /// | ||
| 444 | typedef game_stream_video_packet game_stream_sw_framebuffer_packet; | ||
| 445 | //---------------------------------------------------------------------------- | ||
| 446 | |||
| 447 | ///@} | ||
| 448 | |||
| 449 | //--==----==----==----==----==----==----==----==----==----==----==----==----==-- | ||
| 450 | /// @defgroup cpp_kodi_addon_game_Defs_StreamTypes 5. Stream types | ||
| 451 | /// @ingroup cpp_kodi_addon_game_Defs | ||
| 452 | /// @brief **Stream types data** | ||
| 453 | /// | ||
| 454 | ///@{ | ||
| 455 | |||
| 456 | //============================================================================ | ||
| 457 | /// @brief **Game stream types** | ||
| 458 | /// | ||
| 459 | typedef enum GAME_STREAM_TYPE | ||
| 460 | { | ||
| 461 | /// @brief Unknown | ||
| 462 | GAME_STREAM_UNKNOWN, | ||
| 463 | |||
| 464 | /// @brief Audio stream | ||
| 465 | GAME_STREAM_AUDIO, | ||
| 466 | |||
| 467 | /// @brief Video stream | ||
| 468 | GAME_STREAM_VIDEO, | ||
| 469 | |||
| 470 | /// @brief Hardware framebuffer | ||
| 471 | GAME_STREAM_HW_FRAMEBUFFER, | ||
| 472 | |||
| 473 | /// @brief Software framebuffer | ||
| 474 | GAME_STREAM_SW_FRAMEBUFFER, | ||
| 475 | } GAME_STREAM_TYPE; | ||
| 476 | //---------------------------------------------------------------------------- | ||
| 477 | |||
| 478 | //============================================================================ | ||
| 479 | /// @brief **Immutable stream metadata** | ||
| 480 | /// | ||
| 481 | /// This metadata is provided when the stream is opened. If any stream | ||
| 482 | /// properties change, a new stream must be opened. | ||
| 483 | /// | ||
| 484 | typedef struct game_stream_properties | ||
| 485 | { | ||
| 486 | /// @brief | ||
| 487 | GAME_STREAM_TYPE type; | ||
| 488 | union | ||
| 489 | { | ||
| 490 | /// @brief | ||
| 491 | game_stream_audio_properties audio; | ||
| 492 | |||
| 493 | /// @brief | ||
| 494 | game_stream_video_properties video; | ||
| 495 | |||
| 496 | /// @brief | ||
| 497 | game_stream_hw_framebuffer_properties hw_framebuffer; | ||
| 498 | |||
| 499 | /// @brief | ||
| 500 | game_stream_sw_framebuffer_properties sw_framebuffer; | ||
| 501 | }; | ||
| 502 | } ATTRIBUTE_PACKED game_stream_properties; | ||
| 503 | //---------------------------------------------------------------------------- | ||
| 504 | |||
| 505 | //============================================================================ | ||
| 506 | /// @brief **Stream buffers for hardware rendering and zero-copy support** | ||
| 507 | /// | ||
| 508 | typedef struct game_stream_buffer | ||
| 509 | { | ||
| 510 | /// @brief | ||
| 511 | GAME_STREAM_TYPE type; | ||
| 512 | union | ||
| 513 | { | ||
| 514 | /// @brief | ||
| 515 | game_stream_hw_framebuffer_buffer hw_framebuffer; | ||
| 516 | |||
| 517 | /// @brief | ||
| 518 | game_stream_sw_framebuffer_buffer sw_framebuffer; | ||
| 519 | }; | ||
| 520 | } ATTRIBUTE_PACKED game_stream_buffer; | ||
| 521 | //---------------------------------------------------------------------------- | ||
| 522 | |||
| 523 | //============================================================================ | ||
| 524 | /// @brief **Stream packet and ephemeral metadata** | ||
| 525 | /// | ||
| 526 | /// This packet contains stream data and accompanying metadata. The metadata | ||
| 527 | /// is ephemeral, meaning it only applies to the current packet and can change | ||
| 528 | /// from packet to packet in the same stream. | ||
| 529 | /// | ||
| 530 | typedef struct game_stream_packet | ||
| 531 | { | ||
| 532 | /// @brief | ||
| 533 | GAME_STREAM_TYPE type; | ||
| 534 | union | ||
| 535 | { | ||
| 536 | /// @brief | ||
| 537 | game_stream_audio_packet audio; | ||
| 538 | |||
| 539 | /// @brief | ||
| 540 | game_stream_video_packet video; | ||
| 541 | |||
| 542 | /// @brief | ||
| 543 | game_stream_hw_framebuffer_packet hw_framebuffer; | ||
| 544 | |||
| 545 | /// @brief | ||
| 546 | game_stream_sw_framebuffer_packet sw_framebuffer; | ||
| 547 | }; | ||
| 548 | } ATTRIBUTE_PACKED game_stream_packet; | ||
| 549 | //---------------------------------------------------------------------------- | ||
| 550 | |||
| 551 | ///@} | ||
| 552 | |||
| 553 | //--==----==----==----==----==----==----==----==----==----==----==----==----==-- | ||
| 554 | /// @defgroup cpp_kodi_addon_game_Defs_GameTypes 6. Game types | ||
| 555 | /// @ingroup cpp_kodi_addon_game_Defs | ||
| 556 | /// @brief **Game types data** | ||
| 557 | /// | ||
| 558 | ///@{ | ||
| 559 | |||
| 560 | //============================================================================ | ||
| 561 | /// @brief **Game reguin definition** | ||
| 562 | /// | ||
| 563 | /// Returned from game_get_region() | ||
| 564 | typedef enum GAME_REGION | ||
| 565 | { | ||
| 566 | /// @brief Game region unknown | ||
| 567 | GAME_REGION_UNKNOWN, | ||
| 568 | |||
| 569 | /// @brief Game region NTSC | ||
| 570 | GAME_REGION_NTSC, | ||
| 571 | |||
| 572 | /// @brief Game region PAL | ||
| 573 | GAME_REGION_PAL, | ||
| 574 | } GAME_REGION; | ||
| 575 | //---------------------------------------------------------------------------- | ||
| 576 | |||
| 577 | //============================================================================ | ||
| 578 | /// @brief **Special game types passed into game_load_game_special().** | ||
| 579 | /// | ||
| 580 | /// @remark Only used when multiple ROMs are required. | ||
| 581 | /// | ||
| 582 | typedef enum SPECIAL_GAME_TYPE | ||
| 583 | { | ||
| 584 | /// @brief Game Type BSX | ||
| 585 | SPECIAL_GAME_TYPE_BSX, | ||
| 586 | |||
| 587 | /// @brief Game Type BSX slotted | ||
| 588 | SPECIAL_GAME_TYPE_BSX_SLOTTED, | ||
| 589 | |||
| 590 | /// @brief Game Type sufami turbo | ||
| 591 | SPECIAL_GAME_TYPE_SUFAMI_TURBO, | ||
| 592 | |||
| 593 | /// @brief Game Type super game boy | ||
| 594 | SPECIAL_GAME_TYPE_SUPER_GAME_BOY, | ||
| 595 | } SPECIAL_GAME_TYPE; | ||
| 596 | //---------------------------------------------------------------------------- | ||
| 597 | |||
| 598 | //============================================================================ | ||
| 599 | /// @brief **Game Memory** | ||
| 600 | /// | ||
| 601 | typedef enum GAME_MEMORY | ||
| 602 | { | ||
| 603 | /// @brief Passed to game_get_memory_data/size(). If the memory type doesn't apply | ||
| 604 | /// to the implementation NULL/0 can be returned. | ||
| 605 | GAME_MEMORY_MASK = 0xff, | ||
| 606 | |||
| 607 | /// @brief Regular save ram. | ||
| 608 | /// | ||
| 609 | /// This ram is usually found on a game cartridge, backed | ||
| 610 | /// up by a battery. If save game data is too complex for a single memory | ||
| 611 | /// buffer, the SYSTEM_DIRECTORY environment callback can be used. | ||
| 612 | GAME_MEMORY_SAVE_RAM = 0, | ||
| 613 | |||
| 614 | /// @brief Some games have a built-in clock to keep track of time. | ||
| 615 | /// | ||
| 616 | /// This memory is usually just a couple of bytes to keep track of time. | ||
| 617 | GAME_MEMORY_RTC = 1, | ||
| 618 | |||
| 619 | /// @brief System ram lets a frontend peek into a game systems main RAM | ||
| 620 | GAME_MEMORY_SYSTEM_RAM = 2, | ||
| 621 | |||
| 622 | /// @brief Video ram lets a frontend peek into a game systems video RAM (VRAM) | ||
| 623 | GAME_MEMORY_VIDEO_RAM = 3, | ||
| 624 | |||
| 625 | /// @brief Special memory type | ||
| 626 | GAME_MEMORY_SNES_BSX_RAM = ((1 << 8) | GAME_MEMORY_SAVE_RAM), | ||
| 627 | |||
| 628 | /// @brief Special memory type | ||
| 629 | GAME_MEMORY_SNES_BSX_PRAM = ((2 << 8) | GAME_MEMORY_SAVE_RAM), | ||
| 630 | |||
| 631 | /// @brief Special memory type | ||
| 632 | GAME_MEMORY_SNES_SUFAMI_TURBO_A_RAM = ((3 << 8) | GAME_MEMORY_SAVE_RAM), | ||
| 633 | |||
| 634 | /// @brief Special memory type | ||
| 635 | GAME_MEMORY_SNES_SUFAMI_TURBO_B_RAM = ((4 << 8) | GAME_MEMORY_SAVE_RAM), | ||
| 636 | |||
| 637 | /// @brief Special memory type | ||
| 638 | GAME_MEMORY_SNES_GAME_BOY_RAM = ((5 << 8) | GAME_MEMORY_SAVE_RAM), | ||
| 639 | |||
| 640 | /// @brief Special memory type | ||
| 641 | GAME_MEMORY_SNES_GAME_BOY_RTC = ((6 << 8) | GAME_MEMORY_RTC), | ||
| 642 | } GAME_MEMORY; | ||
| 643 | //---------------------------------------------------------------------------- | ||
| 644 | |||
| 645 | //============================================================================ | ||
| 646 | /// @brief **ID values for SIMD CPU features** | ||
| 647 | typedef enum GAME_SIMD | ||
| 648 | { | ||
| 649 | /// @brief SIMD CPU SSE | ||
| 650 | GAME_SIMD_SSE = (1 << 0), | ||
| 651 | |||
| 652 | /// @brief SIMD CPU SSE2 | ||
| 653 | GAME_SIMD_SSE2 = (1 << 1), | ||
| 654 | |||
| 655 | /// @brief SIMD CPU VMX | ||
| 656 | GAME_SIMD_VMX = (1 << 2), | ||
| 657 | |||
| 658 | /// @brief SIMD CPU VMX128 | ||
| 659 | GAME_SIMD_VMX128 = (1 << 3), | ||
| 660 | |||
| 661 | /// @brief SIMD CPU AVX | ||
| 662 | GAME_SIMD_AVX = (1 << 4), | ||
| 663 | |||
| 664 | /// @brief SIMD CPU NEON | ||
| 665 | GAME_SIMD_NEON = (1 << 5), | ||
| 666 | |||
| 667 | /// @brief SIMD CPU SSE3 | ||
| 668 | GAME_SIMD_SSE3 = (1 << 6), | ||
| 669 | |||
| 670 | /// @brief SIMD CPU SSSE3 | ||
| 671 | GAME_SIMD_SSSE3 = (1 << 7), | ||
| 672 | |||
| 673 | /// @brief SIMD CPU MMX | ||
| 674 | GAME_SIMD_MMX = (1 << 8), | ||
| 675 | |||
| 676 | /// @brief SIMD CPU MMXEXT | ||
| 677 | GAME_SIMD_MMXEXT = (1 << 9), | ||
| 678 | |||
| 679 | /// @brief SIMD CPU SSE4 | ||
| 680 | GAME_SIMD_SSE4 = (1 << 10), | ||
| 681 | |||
| 682 | /// @brief SIMD CPU SSE42 | ||
| 683 | GAME_SIMD_SSE42 = (1 << 11), | ||
| 684 | |||
| 685 | /// @brief SIMD CPU AVX2 | ||
| 686 | GAME_SIMD_AVX2 = (1 << 12), | ||
| 687 | |||
| 688 | /// @brief SIMD CPU VFPU | ||
| 689 | GAME_SIMD_VFPU = (1 << 13), | ||
| 690 | } GAME_SIMD; | ||
| 691 | //---------------------------------------------------------------------------- | ||
| 692 | |||
| 693 | ///@} | ||
| 694 | |||
| 695 | //--==----==----==----==----==----==----==----==----==----==----==----==----==-- | ||
| 696 | /// @defgroup cpp_kodi_addon_game_Defs_InputTypes 7. Input types | ||
| 697 | /// @ingroup cpp_kodi_addon_game_Defs | ||
| 698 | /// @brief **Input types** | ||
| 699 | /// | ||
| 700 | ///@{ | ||
| 701 | |||
| 702 | //============================================================================ | ||
| 703 | /// @brief | ||
| 704 | typedef enum GAME_INPUT_EVENT_SOURCE | ||
| 705 | { | ||
| 706 | /// @brief | ||
| 707 | GAME_INPUT_EVENT_DIGITAL_BUTTON, | ||
| 708 | |||
| 709 | /// @brief | ||
| 710 | GAME_INPUT_EVENT_ANALOG_BUTTON, | ||
| 711 | |||
| 712 | /// @brief | ||
| 713 | GAME_INPUT_EVENT_AXIS, | ||
| 714 | |||
| 715 | /// @brief | ||
| 716 | GAME_INPUT_EVENT_ANALOG_STICK, | ||
| 717 | |||
| 718 | /// @brief | ||
| 719 | GAME_INPUT_EVENT_ACCELEROMETER, | ||
| 720 | |||
| 721 | /// @brief | ||
| 722 | GAME_INPUT_EVENT_KEY, | ||
| 723 | |||
| 724 | /// @brief | ||
| 725 | GAME_INPUT_EVENT_RELATIVE_POINTER, | ||
| 726 | |||
| 727 | /// @brief | ||
| 728 | GAME_INPUT_EVENT_ABSOLUTE_POINTER, | ||
| 729 | |||
| 730 | /// @brief | ||
| 731 | GAME_INPUT_EVENT_MOTOR, | ||
| 732 | } GAME_INPUT_EVENT_SOURCE; | ||
| 733 | //---------------------------------------------------------------------------- | ||
| 734 | |||
| 735 | //============================================================================ | ||
| 736 | /// @brief | ||
| 737 | typedef enum GAME_KEY_MOD | ||
| 738 | { | ||
| 739 | /// @brief | ||
| 740 | GAME_KEY_MOD_NONE = 0x0000, | ||
| 741 | |||
| 742 | /// @brief | ||
| 743 | GAME_KEY_MOD_SHIFT = 0x0001, | ||
| 744 | |||
| 745 | /// @brief | ||
| 746 | GAME_KEY_MOD_CTRL = 0x0002, | ||
| 747 | |||
| 748 | /// @brief | ||
| 749 | GAME_KEY_MOD_ALT = 0x0004, | ||
| 750 | |||
| 751 | /// @brief | ||
| 752 | GAME_KEY_MOD_META = 0x0008, | ||
| 753 | |||
| 754 | /// @brief | ||
| 755 | GAME_KEY_MOD_SUPER = 0x0010, | ||
| 756 | |||
| 757 | /// @brief | ||
| 758 | GAME_KEY_MOD_NUMLOCK = 0x0100, | ||
| 759 | |||
| 760 | /// @brief | ||
| 761 | GAME_KEY_MOD_CAPSLOCK = 0x0200, | ||
| 762 | |||
| 763 | /// @brief | ||
| 764 | GAME_KEY_MOD_SCROLLOCK = 0x0400, | ||
| 765 | } GAME_KEY_MOD; | ||
| 766 | //---------------------------------------------------------------------------- | ||
| 767 | |||
| 768 | //============================================================================ | ||
| 769 | /// @brief Type of port on the virtual game console | ||
| 770 | typedef enum GAME_PORT_TYPE | ||
| 771 | { | ||
| 772 | /// @brief Game port unknown | ||
| 773 | GAME_PORT_UNKNOWN, | ||
| 774 | |||
| 775 | /// @brief Game port Keyboard | ||
| 776 | GAME_PORT_KEYBOARD, | ||
| 777 | |||
| 778 | /// @brief Game port mouse | ||
| 779 | GAME_PORT_MOUSE, | ||
| 780 | |||
| 781 | /// @brief Game port controller | ||
| 782 | GAME_PORT_CONTROLLER, | ||
| 783 | } GAME_PORT_TYPE; | ||
| 784 | //---------------------------------------------------------------------------- | ||
| 785 | |||
| 786 | /*! @cond PRIVATE */ | ||
| 787 | /*! | ||
| 788 | * @brief "C" Game add-on controller layout. | ||
| 789 | * | ||
| 790 | * Structure used to interface in "C" between Kodi and Addon. | ||
| 791 | * | ||
| 792 | * See @ref AddonGameControllerLayout for description of values. | ||
| 793 | */ | ||
| 794 | typedef struct game_controller_layout | ||
| 795 | { | ||
| 796 | char* controller_id; | ||
| 797 | bool provides_input; // False for multitaps | ||
| 798 | char** digital_buttons; | ||
| 799 | unsigned int digital_button_count; | ||
| 800 | char** analog_buttons; | ||
| 801 | unsigned int analog_button_count; | ||
| 802 | char** analog_sticks; | ||
| 803 | unsigned int analog_stick_count; | ||
| 804 | char** accelerometers; | ||
| 805 | unsigned int accelerometer_count; | ||
| 806 | char** keys; | ||
| 807 | unsigned int key_count; | ||
| 808 | char** rel_pointers; | ||
| 809 | unsigned int rel_pointer_count; | ||
| 810 | char** abs_pointers; | ||
| 811 | unsigned int abs_pointer_count; | ||
| 812 | char** motors; | ||
| 813 | unsigned int motor_count; | ||
| 814 | } ATTRIBUTE_PACKED game_controller_layout; | ||
| 815 | /*! @endcond */ | ||
| 816 | |||
| 817 | struct game_input_port; | ||
| 818 | |||
| 819 | //============================================================================ | ||
| 820 | /// @brief Device that can provide input | ||
| 821 | typedef struct game_input_device | ||
| 822 | { | ||
| 823 | /// @brief ID used in the Kodi controller API | ||
| 824 | const char* controller_id; | ||
| 825 | |||
| 826 | /// @brief | ||
| 827 | const char* port_address; | ||
| 828 | |||
| 829 | /// @brief | ||
| 830 | struct game_input_port* available_ports; | ||
| 831 | |||
| 832 | /// @brief | ||
| 833 | unsigned int port_count; | ||
| 834 | } ATTRIBUTE_PACKED game_input_device; | ||
| 835 | //---------------------------------------------------------------------------- | ||
| 836 | |||
| 837 | //============================================================================ | ||
| 838 | /// @brief Port that can provide input | ||
| 839 | /// | ||
| 840 | /// Ports can accept multiple devices and devices can have multiple ports, so | ||
| 841 | /// the topology of possible configurations is a tree structure of alternating | ||
| 842 | /// port and device nodes. | ||
| 843 | /// | ||
| 844 | typedef struct game_input_port | ||
| 845 | { | ||
| 846 | /// @brief | ||
| 847 | GAME_PORT_TYPE type; | ||
| 848 | |||
| 849 | /// @brief Required for GAME_PORT_CONTROLLER type | ||
| 850 | const char* port_id; | ||
| 851 | |||
| 852 | /// @brief | ||
| 853 | game_input_device* accepted_devices; | ||
| 854 | |||
| 855 | /// @brief | ||
| 856 | unsigned int device_count; | ||
| 857 | } ATTRIBUTE_PACKED game_input_port; | ||
| 858 | //---------------------------------------------------------------------------- | ||
| 859 | |||
| 860 | //============================================================================ | ||
| 861 | /// @brief The input topology is the possible ways to connect input devices | ||
| 862 | /// | ||
| 863 | /// This represents the logical topology, which is the possible connections that | ||
| 864 | /// the game client's logic can handle. It is strictly a subset of the physical | ||
| 865 | /// topology. Loops are not allowed. | ||
| 866 | /// | ||
| 867 | typedef struct game_input_topology | ||
| 868 | { | ||
| 869 | /// @brief The list of ports on the virtual game console | ||
| 870 | game_input_port* ports; | ||
| 871 | |||
| 872 | /// @brief The number of ports | ||
| 873 | unsigned int port_count; | ||
| 874 | |||
| 875 | /// @brief A limit on the number of input-providing devices, or -1 for no limit | ||
| 876 | int player_limit; | ||
| 877 | } ATTRIBUTE_PACKED game_input_topology; | ||
| 878 | //---------------------------------------------------------------------------- | ||
| 879 | |||
| 880 | //============================================================================ | ||
| 881 | /// @brief | ||
| 882 | typedef struct game_digital_button_event | ||
| 883 | { | ||
| 884 | /// @brief | ||
| 885 | bool pressed; | ||
| 886 | } ATTRIBUTE_PACKED game_digital_button_event; | ||
| 887 | //---------------------------------------------------------------------------- | ||
| 888 | |||
| 889 | //============================================================================ | ||
| 890 | /// @brief | ||
| 891 | typedef struct game_analog_button_event | ||
| 892 | { | ||
| 893 | /// @brief | ||
| 894 | float magnitude; | ||
| 895 | } ATTRIBUTE_PACKED game_analog_button_event; | ||
| 896 | //---------------------------------------------------------------------------- | ||
| 897 | |||
| 898 | //============================================================================ | ||
| 899 | /// @brief | ||
| 900 | typedef struct game_axis_event | ||
| 901 | { | ||
| 902 | /// @brief | ||
| 903 | float position; | ||
| 904 | } ATTRIBUTE_PACKED game_axis_event; | ||
| 905 | //---------------------------------------------------------------------------- | ||
| 906 | |||
| 907 | //============================================================================ | ||
| 908 | /// @brief | ||
| 909 | typedef struct game_analog_stick_event | ||
| 910 | { | ||
| 911 | /// @brief | ||
| 912 | float x; | ||
| 913 | |||
| 914 | /// @brief | ||
| 915 | float y; | ||
| 916 | } ATTRIBUTE_PACKED game_analog_stick_event; | ||
| 917 | //---------------------------------------------------------------------------- | ||
| 918 | |||
| 919 | //============================================================================ | ||
| 920 | /// @brief | ||
| 921 | typedef struct game_accelerometer_event | ||
| 922 | { | ||
| 923 | /// @brief | ||
| 924 | float x; | ||
| 925 | |||
| 926 | /// @brief | ||
| 927 | float y; | ||
| 928 | |||
| 929 | /// @brief | ||
| 930 | float z; | ||
| 931 | } ATTRIBUTE_PACKED game_accelerometer_event; | ||
| 932 | //---------------------------------------------------------------------------- | ||
| 933 | |||
| 934 | //============================================================================ | ||
| 935 | /// @brief | ||
| 936 | typedef struct game_key_event | ||
| 937 | { | ||
| 938 | /// @brief | ||
| 939 | bool pressed; | ||
| 940 | |||
| 941 | /// @brief If the keypress generates a printing character | ||
| 942 | /// | ||
| 943 | /// The unicode value contains the character generated. If the key is a | ||
| 944 | /// non-printing character, e.g. a function or arrow key, the unicode value | ||
| 945 | /// is zero. | ||
| 946 | uint32_t unicode; | ||
| 947 | |||
| 948 | /// @brief | ||
| 949 | GAME_KEY_MOD modifiers; | ||
| 950 | } ATTRIBUTE_PACKED game_key_event; | ||
| 951 | //---------------------------------------------------------------------------- | ||
| 952 | |||
| 953 | //============================================================================ | ||
| 954 | /// @brief | ||
| 955 | typedef struct game_rel_pointer_event | ||
| 956 | { | ||
| 957 | /// @brief | ||
| 958 | int x; | ||
| 959 | |||
| 960 | /// @brief | ||
| 961 | int y; | ||
| 962 | } ATTRIBUTE_PACKED game_rel_pointer_event; | ||
| 963 | //---------------------------------------------------------------------------- | ||
| 964 | |||
| 965 | //============================================================================ | ||
| 966 | /// @brief | ||
| 967 | typedef struct game_abs_pointer_event | ||
| 968 | { | ||
| 969 | /// @brief | ||
| 970 | bool pressed; | ||
| 971 | |||
| 972 | /// @brief | ||
| 973 | float x; | ||
| 974 | |||
| 975 | /// @brief | ||
| 976 | float y; | ||
| 977 | } ATTRIBUTE_PACKED game_abs_pointer_event; | ||
| 978 | //---------------------------------------------------------------------------- | ||
| 979 | |||
| 980 | //============================================================================ | ||
| 981 | /// @brief | ||
| 982 | typedef struct game_motor_event | ||
| 983 | { | ||
| 984 | /// @brief | ||
| 985 | float magnitude; | ||
| 986 | } ATTRIBUTE_PACKED game_motor_event; | ||
| 987 | //---------------------------------------------------------------------------- | ||
| 988 | |||
| 989 | //============================================================================ | ||
| 990 | /// @brief | ||
| 991 | typedef struct game_input_event | ||
| 992 | { | ||
| 993 | /// @brief | ||
| 994 | GAME_INPUT_EVENT_SOURCE type; | ||
| 995 | |||
| 996 | /// @brief | ||
| 997 | const char* controller_id; | ||
| 998 | |||
| 999 | /// @brief | ||
| 1000 | GAME_PORT_TYPE port_type; | ||
| 1001 | |||
| 1002 | /// @brief | ||
| 1003 | const char* port_address; | ||
| 1004 | |||
| 1005 | /// @brief | ||
| 1006 | const char* feature_name; | ||
| 1007 | union | ||
| 1008 | { | ||
| 1009 | /// @brief | ||
| 1010 | struct game_digital_button_event digital_button; | ||
| 1011 | |||
| 1012 | /// @brief | ||
| 1013 | struct game_analog_button_event analog_button; | ||
| 1014 | |||
| 1015 | /// @brief | ||
| 1016 | struct game_axis_event axis; | ||
| 1017 | |||
| 1018 | /// @brief | ||
| 1019 | struct game_analog_stick_event analog_stick; | ||
| 1020 | |||
| 1021 | /// @brief | ||
| 1022 | struct game_accelerometer_event accelerometer; | ||
| 1023 | |||
| 1024 | /// @brief | ||
| 1025 | struct game_key_event key; | ||
| 1026 | |||
| 1027 | /// @brief | ||
| 1028 | struct game_rel_pointer_event rel_pointer; | ||
| 1029 | |||
| 1030 | /// @brief | ||
| 1031 | struct game_abs_pointer_event abs_pointer; | ||
| 1032 | |||
| 1033 | /// @brief | ||
| 1034 | struct game_motor_event motor; | ||
| 1035 | }; | ||
| 1036 | } ATTRIBUTE_PACKED game_input_event; | ||
| 1037 | //---------------------------------------------------------------------------- | ||
| 1038 | |||
| 1039 | ///@} | ||
| 1040 | |||
| 1041 | //--==----==----==----==----==----==----==----==----==----==----==----==----==-- | ||
| 1042 | /// @defgroup cpp_kodi_addon_game_Defs_EnvironmentTypes 8. Environment types | ||
| 1043 | /// @ingroup cpp_kodi_addon_game_Defs | ||
| 1044 | /// @brief **Environment types** | ||
| 1045 | /// | ||
| 1046 | ///@{ | ||
| 1047 | |||
| 1048 | //============================================================================ | ||
| 1049 | /// @brief Game system timing | ||
| 1050 | /// | ||
| 1051 | struct game_system_timing | ||
| 1052 | { | ||
| 1053 | /// @brief FPS of video content. | ||
| 1054 | double fps; | ||
| 1055 | |||
| 1056 | /// @brief Sampling rate of audio. | ||
| 1057 | double sample_rate; | ||
| 1058 | }; | ||
| 1059 | //---------------------------------------------------------------------------- | ||
| 1060 | |||
| 1061 | ///@} | ||
| 1062 | |||
| 1063 | |||
| 1064 | //--==----==----==----==----==----==----==----==----==----==----==----==----==-- | ||
| 1065 | |||
| 1066 | /*! | ||
| 1067 | * @brief Game properties | ||
| 1068 | * | ||
| 1069 | * Not to be used outside this header. | ||
| 1070 | */ | ||
| 1071 | typedef struct AddonProps_Game | ||
| 1072 | { | ||
| 1073 | /*! | ||
| 1074 | * The path of the game client being loaded. | ||
| 1075 | */ | ||
| 1076 | const char* game_client_dll_path; | ||
| 1077 | |||
| 1078 | /*! | ||
| 1079 | * Paths to proxy DLLs used to load the game client. | ||
| 1080 | */ | ||
| 1081 | const char** proxy_dll_paths; | ||
| 1082 | |||
| 1083 | /*! | ||
| 1084 | * Number of proxy DLL paths provided. | ||
| 1085 | */ | ||
| 1086 | unsigned int proxy_dll_count; | ||
| 1087 | |||
| 1088 | /*! | ||
| 1089 | * The "system" directories of the frontend. These directories can be used to | ||
| 1090 | * store system-specific ROMs such as BIOSes, configuration data, etc. | ||
| 1091 | */ | ||
| 1092 | const char** resource_directories; | ||
| 1093 | |||
| 1094 | /*! | ||
| 1095 | * Number of resource directories provided | ||
| 1096 | */ | ||
| 1097 | unsigned int resource_directory_count; | ||
| 1098 | |||
| 1099 | /*! | ||
| 1100 | * The writable directory of the frontend. This directory can be used to store | ||
| 1101 | * SRAM, memory cards, high scores, etc, if the game client cannot use the | ||
| 1102 | * regular memory interface, GetMemoryData(). | ||
| 1103 | */ | ||
| 1104 | const char* profile_directory; | ||
| 1105 | |||
| 1106 | /*! | ||
| 1107 | * The value of the <supports_vfs> property from addon.xml | ||
| 1108 | */ | ||
| 1109 | bool supports_vfs; | ||
| 1110 | |||
| 1111 | /*! | ||
| 1112 | * The extensions in the <extensions> property from addon.xml | ||
| 1113 | */ | ||
| 1114 | const char** extensions; | ||
| 1115 | |||
| 1116 | /*! | ||
| 1117 | * Number of extensions provided | ||
| 1118 | */ | ||
| 1119 | unsigned int extension_count; | ||
| 1120 | } AddonProps_Game; | ||
| 1121 | |||
| 1122 | typedef void* KODI_GAME_STREAM_HANDLE; | ||
| 1123 | |||
| 1124 | /*! Structure to transfer the methods from kodi_game_dll.h to Kodi */ | ||
| 1125 | |||
| 1126 | struct AddonInstance_Game; | ||
| 1127 | |||
| 1128 | /*! | ||
| 1129 | * @brief Game callbacks | ||
| 1130 | * | ||
| 1131 | * Not to be used outside this header. | ||
| 1132 | */ | ||
| 1133 | typedef struct AddonToKodiFuncTable_Game | ||
| 1134 | { | ||
| 1135 | KODI_HANDLE kodiInstance; | ||
| 1136 | |||
| 1137 | void (*CloseGame)(KODI_HANDLE kodiInstance); | ||
| 1138 | KODI_GAME_STREAM_HANDLE (*OpenStream)(KODI_HANDLE, const struct game_stream_properties*); | ||
| 1139 | bool (*GetStreamBuffer)(KODI_HANDLE, | ||
| 1140 | KODI_GAME_STREAM_HANDLE, | ||
| 1141 | unsigned int, | ||
| 1142 | unsigned int, | ||
| 1143 | struct game_stream_buffer*); | ||
| 1144 | void (*AddStreamData)(KODI_HANDLE, KODI_GAME_STREAM_HANDLE, const struct game_stream_packet*); | ||
| 1145 | void (*ReleaseStreamBuffer)(KODI_HANDLE, KODI_GAME_STREAM_HANDLE, struct game_stream_buffer*); | ||
| 1146 | void (*CloseStream)(KODI_HANDLE, KODI_GAME_STREAM_HANDLE); | ||
| 1147 | game_proc_address_t (*HwGetProcAddress)(KODI_HANDLE kodiInstance, const char* symbol); | ||
| 1148 | bool (*InputEvent)(KODI_HANDLE kodiInstance, const struct game_input_event* event); | ||
| 1149 | } AddonToKodiFuncTable_Game; | ||
| 1150 | |||
| 1151 | /*! | ||
| 1152 | * @brief Game function hooks | ||
| 1153 | * | ||
| 1154 | * Not to be used outside this header. | ||
| 1155 | */ | ||
| 1156 | typedef struct KodiToAddonFuncTable_Game | ||
| 1157 | { | ||
| 1158 | KODI_HANDLE addonInstance; | ||
| 1159 | |||
| 1160 | GAME_ERROR(__cdecl* LoadGame)(const struct AddonInstance_Game*, const char*); | ||
| 1161 | GAME_ERROR(__cdecl* LoadGameSpecial) | ||
| 1162 | (const struct AddonInstance_Game*, enum SPECIAL_GAME_TYPE, const char**, size_t); | ||
| 1163 | GAME_ERROR(__cdecl* LoadStandalone)(const struct AddonInstance_Game*); | ||
| 1164 | GAME_ERROR(__cdecl* UnloadGame)(const struct AddonInstance_Game*); | ||
| 1165 | GAME_ERROR(__cdecl* GetGameTiming) | ||
| 1166 | (const struct AddonInstance_Game*, struct game_system_timing*); | ||
| 1167 | GAME_REGION(__cdecl* GetRegion)(const struct AddonInstance_Game*); | ||
| 1168 | bool(__cdecl* RequiresGameLoop)(const struct AddonInstance_Game*); | ||
| 1169 | GAME_ERROR(__cdecl* RunFrame)(const struct AddonInstance_Game*); | ||
| 1170 | GAME_ERROR(__cdecl* Reset)(const struct AddonInstance_Game*); | ||
| 1171 | GAME_ERROR(__cdecl* HwContextReset)(const struct AddonInstance_Game*); | ||
| 1172 | GAME_ERROR(__cdecl* HwContextDestroy)(const struct AddonInstance_Game*); | ||
| 1173 | bool(__cdecl* HasFeature)(const struct AddonInstance_Game*, const char*, const char*); | ||
| 1174 | game_input_topology*(__cdecl* GetTopology)(const struct AddonInstance_Game*); | ||
| 1175 | void(__cdecl* FreeTopology)(const struct AddonInstance_Game*, struct game_input_topology*); | ||
| 1176 | void(__cdecl* SetControllerLayouts)(const struct AddonInstance_Game*, | ||
| 1177 | const struct game_controller_layout*, | ||
| 1178 | unsigned int); | ||
| 1179 | bool(__cdecl* EnableKeyboard)(const struct AddonInstance_Game*, bool, const char*); | ||
| 1180 | bool(__cdecl* EnableMouse)(const struct AddonInstance_Game*, bool, const char*); | ||
| 1181 | bool(__cdecl* ConnectController)(const struct AddonInstance_Game*, | ||
| 1182 | bool, | ||
| 1183 | const char*, | ||
| 1184 | const char*); | ||
| 1185 | bool(__cdecl* InputEvent)(const struct AddonInstance_Game*, const struct game_input_event*); | ||
| 1186 | size_t(__cdecl* SerializeSize)(const struct AddonInstance_Game*); | ||
| 1187 | GAME_ERROR(__cdecl* Serialize)(const struct AddonInstance_Game*, uint8_t*, size_t); | ||
| 1188 | GAME_ERROR(__cdecl* Deserialize)(const struct AddonInstance_Game*, const uint8_t*, size_t); | ||
| 1189 | GAME_ERROR(__cdecl* CheatReset)(const struct AddonInstance_Game*); | ||
| 1190 | GAME_ERROR(__cdecl* GetMemory) | ||
| 1191 | (const struct AddonInstance_Game*, enum GAME_MEMORY, uint8_t**, size_t*); | ||
| 1192 | GAME_ERROR(__cdecl* SetCheat) | ||
| 1193 | (const struct AddonInstance_Game*, unsigned int, bool, const char*); | ||
| 1194 | } KodiToAddonFuncTable_Game; | ||
| 1195 | |||
| 1196 | /*! | ||
| 1197 | * @brief Game instance | ||
| 1198 | * | ||
| 1199 | * Not to be used outside this header. | ||
| 1200 | */ | ||
| 1201 | typedef struct AddonInstance_Game | ||
| 1202 | { | ||
| 1203 | struct AddonProps_Game* props; | ||
| 1204 | struct AddonToKodiFuncTable_Game* toKodi; | ||
| 1205 | struct KodiToAddonFuncTable_Game* toAddon; | ||
| 1206 | } AddonInstance_Game; | ||
| 1207 | |||
| 1208 | #ifdef __cplusplus | ||
| 1209 | } | ||
| 1210 | #endif /* __cplusplus */ | ||
| 1211 | |||
| 1212 | #endif /* !C_API_ADDONINSTANCE_GAME_H */ | ||
diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/image_decoder.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/image_decoder.h new file mode 100644 index 0000000..6455b38 --- /dev/null +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/image_decoder.h | |||
| @@ -0,0 +1,83 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2005-2018 Team Kodi | ||
| 3 | * This file is part of Kodi - https://kodi.tv | ||
| 4 | * | ||
| 5 | * SPDX-License-Identifier: GPL-2.0-or-later | ||
| 6 | * See LICENSES/README.md for more information. | ||
| 7 | */ | ||
| 8 | |||
| 9 | #pragma once | ||
| 10 | |||
| 11 | #ifndef C_API_ADDONINSTANCE_IMAGE_DECODER_H | ||
| 12 | #define C_API_ADDONINSTANCE_IMAGE_DECODER_H | ||
| 13 | |||
| 14 | #include "../addon_base.h" | ||
| 15 | |||
| 16 | #ifdef __cplusplus | ||
| 17 | extern "C" | ||
| 18 | { | ||
| 19 | #endif /* __cplusplus */ | ||
| 20 | |||
| 21 | //============================================================================ | ||
| 22 | /// @ingroup cpp_kodi_addon_imagedecoder_Defs | ||
| 23 | /// @brief **Image format types**\n | ||
| 24 | /// Used to define wanted target format where image decoder should give to | ||
| 25 | /// Kodi. | ||
| 26 | /// | ||
| 27 | typedef enum ImageFormat | ||
| 28 | { | ||
| 29 | /// @brief A 32-bit ARGB pixel format, with alpha, that uses 8 bits per | ||
| 30 | /// channel, ARGBARGB... | ||
| 31 | ADDON_IMG_FMT_A8R8G8B8 = 1, | ||
| 32 | |||
| 33 | /// @brief A 8, alpha only, 8bpp, AAA... | ||
| 34 | ADDON_IMG_FMT_A8 = 2, | ||
| 35 | |||
| 36 | /// @brief RGBA 8:8:8:8, with alpha, 32bpp, RGBARGBA... | ||
| 37 | ADDON_IMG_FMT_RGBA8 = 3, | ||
| 38 | |||
| 39 | /// @brief RGB 8:8:8, with alpha, 24bpp, RGBRGB... | ||
| 40 | ADDON_IMG_FMT_RGB8 = 4 | ||
| 41 | } ImageFormat; | ||
| 42 | //---------------------------------------------------------------------------- | ||
| 43 | |||
| 44 | typedef struct AddonProps_ImageDecoder | ||
| 45 | { | ||
| 46 | const char* mimetype; | ||
| 47 | } AddonProps_ImageDecoder; | ||
| 48 | |||
| 49 | typedef struct AddonToKodiFuncTable_ImageDecoder | ||
| 50 | { | ||
| 51 | KODI_HANDLE kodi_instance; | ||
| 52 | } AddonToKodiFuncTable_ImageDecoder; | ||
| 53 | |||
| 54 | struct AddonInstance_ImageDecoder; | ||
| 55 | typedef struct KodiToAddonFuncTable_ImageDecoder | ||
| 56 | { | ||
| 57 | KODI_HANDLE addonInstance; | ||
| 58 | bool(__cdecl* load_image_from_memory)(const struct AddonInstance_ImageDecoder* instance, | ||
| 59 | unsigned char* buffer, | ||
| 60 | unsigned int buf_size, | ||
| 61 | unsigned int* width, | ||
| 62 | unsigned int* height); | ||
| 63 | |||
| 64 | bool(__cdecl* decode)(const struct AddonInstance_ImageDecoder* instance, | ||
| 65 | unsigned char* pixels, | ||
| 66 | unsigned int width, | ||
| 67 | unsigned int height, | ||
| 68 | unsigned int pitch, | ||
| 69 | enum ImageFormat format); | ||
| 70 | } KodiToAddonFuncTable_ImageDecoder; | ||
| 71 | |||
| 72 | typedef struct AddonInstance_ImageDecoder | ||
| 73 | { | ||
| 74 | struct AddonProps_ImageDecoder* props; | ||
| 75 | struct AddonToKodiFuncTable_ImageDecoder* toKodi; | ||
| 76 | struct KodiToAddonFuncTable_ImageDecoder* toAddon; | ||
| 77 | } AddonInstance_ImageDecoder; | ||
| 78 | |||
| 79 | #ifdef __cplusplus | ||
| 80 | } /* extern "C" */ | ||
| 81 | #endif /* __cplusplus */ | ||
| 82 | |||
| 83 | #endif /* !C_API_ADDONINSTANCE_IMAGE_DECODER_H */ | ||
diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/peripheral.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/peripheral.h new file mode 100644 index 0000000..393f34a --- /dev/null +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/peripheral.h | |||
| @@ -0,0 +1,709 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2014-2018 Team Kodi | ||
| 3 | * This file is part of Kodi - https://kodi.tv | ||
| 4 | * | ||
| 5 | * SPDX-License-Identifier: GPL-2.0-or-later | ||
| 6 | * See LICENSES/README.md for more information. | ||
| 7 | */ | ||
| 8 | |||
| 9 | #pragma once | ||
| 10 | |||
| 11 | #ifndef C_API_ADDONINSTANCE_PERIPHERAL_H | ||
| 12 | #define C_API_ADDONINSTANCE_PERIPHERAL_H | ||
| 13 | |||
| 14 | #include "../addon_base.h" | ||
| 15 | |||
| 16 | /* indicates a joystick has no preference for port number */ | ||
| 17 | #define NO_PORT_REQUESTED (-1) | ||
| 18 | |||
| 19 | /* joystick's driver button/hat/axis index is unknown */ | ||
| 20 | #define DRIVER_INDEX_UNKNOWN (-1) | ||
| 21 | |||
| 22 | #ifdef __cplusplus | ||
| 23 | extern "C" | ||
| 24 | { | ||
| 25 | #endif /* __cplusplus */ | ||
| 26 | |||
| 27 | //============================================================================ | ||
| 28 | /// @defgroup cpp_kodi_addon_peripheral_Defs_General_PERIPHERAL_ERROR enum PERIPHERAL_ERROR | ||
| 29 | /// @ingroup cpp_kodi_addon_peripheral_Defs_General | ||
| 30 | /// @brief **Peripheral add-on error codes**\n | ||
| 31 | /// Used as return values on most peripheral related functions. | ||
| 32 | /// | ||
| 33 | /// In this way, a peripheral instance signals errors in its processing and, | ||
| 34 | /// under certain conditions, allows Kodi to make corrections. | ||
| 35 | /// | ||
| 36 | ///@{ | ||
| 37 | typedef enum PERIPHERAL_ERROR | ||
| 38 | { | ||
| 39 | /// @brief __0__ : No error occurred | ||
| 40 | PERIPHERAL_NO_ERROR = 0, | ||
| 41 | |||
| 42 | /// @brief __-1__ : An unknown error occurred | ||
| 43 | PERIPHERAL_ERROR_UNKNOWN = -1, | ||
| 44 | |||
| 45 | /// @brief __-2__ : The command failed | ||
| 46 | PERIPHERAL_ERROR_FAILED = -2, | ||
| 47 | |||
| 48 | /// @brief __-3__ : The parameters of the method are invalid for this operation | ||
| 49 | PERIPHERAL_ERROR_INVALID_PARAMETERS = -3, | ||
| 50 | |||
| 51 | /// @brief __-4__ : The method that the frontend called is not implemented | ||
| 52 | PERIPHERAL_ERROR_NOT_IMPLEMENTED = -4, | ||
| 53 | |||
| 54 | /// @brief __-5__ : No peripherals are connected | ||
| 55 | PERIPHERAL_ERROR_NOT_CONNECTED = -5, | ||
| 56 | |||
| 57 | /// @brief __-6__ : Peripherals are connected, but command was interrupted | ||
| 58 | PERIPHERAL_ERROR_CONNECTION_FAILED = -6, | ||
| 59 | } PERIPHERAL_ERROR; | ||
| 60 | ///@} | ||
| 61 | //---------------------------------------------------------------------------- | ||
| 62 | |||
| 63 | // @name Peripheral types | ||
| 64 | //{ | ||
| 65 | |||
| 66 | //============================================================================ | ||
| 67 | /// @defgroup cpp_kodi_addon_peripheral_Defs_Peripheral_PERIPHERAL_TYPE enum PERIPHERAL_TYPE | ||
| 68 | /// @ingroup cpp_kodi_addon_peripheral_Defs_Peripheral | ||
| 69 | /// @brief **Peripheral types**\n | ||
| 70 | /// Types used to identify wanted peripheral. | ||
| 71 | ///@{ | ||
| 72 | typedef enum PERIPHERAL_TYPE | ||
| 73 | { | ||
| 74 | /// @brief Type declared as unknown. | ||
| 75 | PERIPHERAL_TYPE_UNKNOWN, | ||
| 76 | |||
| 77 | /// @brief Type declared as joystick. | ||
| 78 | PERIPHERAL_TYPE_JOYSTICK, | ||
| 79 | |||
| 80 | /// @brief Type declared as keyboard. | ||
| 81 | PERIPHERAL_TYPE_KEYBOARD, | ||
| 82 | } PERIPHERAL_TYPE; | ||
| 83 | ///@} | ||
| 84 | //---------------------------------------------------------------------------- | ||
| 85 | |||
| 86 | /*! | ||
| 87 | * @brief Information shared between peripherals | ||
| 88 | */ | ||
| 89 | typedef struct PERIPHERAL_INFO | ||
| 90 | { | ||
| 91 | PERIPHERAL_TYPE type; /*!< type of peripheral */ | ||
| 92 | char* name; /*!< name of peripheral */ | ||
| 93 | uint16_t vendor_id; /*!< vendor ID of peripheral, 0x0000 if unknown */ | ||
| 94 | uint16_t product_id; /*!< product ID of peripheral, 0x0000 if unknown */ | ||
| 95 | unsigned int index; /*!< the order in which the add-on identified this peripheral */ | ||
| 96 | } ATTRIBUTE_PACKED PERIPHERAL_INFO; | ||
| 97 | |||
| 98 | /*! | ||
| 99 | * @brief Peripheral add-on capabilities. | ||
| 100 | */ | ||
| 101 | typedef struct PERIPHERAL_CAPABILITIES | ||
| 102 | { | ||
| 103 | bool provides_joysticks; /*!< true if the add-on provides joysticks */ | ||
| 104 | bool provides_joystick_rumble; | ||
| 105 | bool provides_joystick_power_off; | ||
| 106 | bool provides_buttonmaps; /*!< true if the add-on provides button maps */ | ||
| 107 | } ATTRIBUTE_PACKED PERIPHERAL_CAPABILITIES; | ||
| 108 | |||
| 109 | //} | ||
| 110 | |||
| 111 | // @name Event types | ||
| 112 | //{ | ||
| 113 | |||
| 114 | //============================================================================ | ||
| 115 | /// @defgroup cpp_kodi_addon_peripheral_Defs_Event_PERIPHERAL_EVENT_TYPE enum PERIPHERAL_EVENT_TYPE | ||
| 116 | /// @ingroup cpp_kodi_addon_peripheral_Defs_Event | ||
| 117 | /// @brief **Event types**\n | ||
| 118 | /// Types of events that can be sent and received. | ||
| 119 | ///@{ | ||
| 120 | typedef enum PERIPHERAL_EVENT_TYPE | ||
| 121 | { | ||
| 122 | /// @brief unknown event | ||
| 123 | PERIPHERAL_EVENT_TYPE_NONE, | ||
| 124 | |||
| 125 | /// @brief state changed for joystick driver button | ||
| 126 | PERIPHERAL_EVENT_TYPE_DRIVER_BUTTON, | ||
| 127 | |||
| 128 | /// @brief state changed for joystick driver hat | ||
| 129 | PERIPHERAL_EVENT_TYPE_DRIVER_HAT, | ||
| 130 | |||
| 131 | /// @brief state changed for joystick driver axis | ||
| 132 | PERIPHERAL_EVENT_TYPE_DRIVER_AXIS, | ||
| 133 | |||
| 134 | /// @brief set the state for joystick rumble motor | ||
| 135 | PERIPHERAL_EVENT_TYPE_SET_MOTOR, | ||
| 136 | } PERIPHERAL_EVENT_TYPE; | ||
| 137 | ///@} | ||
| 138 | //---------------------------------------------------------------------------- | ||
| 139 | |||
| 140 | //============================================================================ | ||
| 141 | /// @defgroup cpp_kodi_addon_peripheral_Defs_Event_JOYSTICK_STATE_BUTTON enum JOYSTICK_STATE_BUTTON | ||
| 142 | /// @ingroup cpp_kodi_addon_peripheral_Defs_Event | ||
| 143 | /// @brief **State button**\n | ||
| 144 | /// States a button can have | ||
| 145 | ///@{ | ||
| 146 | typedef enum JOYSTICK_STATE_BUTTON | ||
| 147 | { | ||
| 148 | /// @brief button is released | ||
| 149 | JOYSTICK_STATE_BUTTON_UNPRESSED = 0x0, | ||
| 150 | |||
| 151 | /// @brief button is pressed | ||
| 152 | JOYSTICK_STATE_BUTTON_PRESSED = 0x1, | ||
| 153 | } JOYSTICK_STATE_BUTTON; | ||
| 154 | ///@} | ||
| 155 | //---------------------------------------------------------------------------- | ||
| 156 | |||
| 157 | //============================================================================ | ||
| 158 | /// @defgroup cpp_kodi_addon_peripheral_Defs_Event_JOYSTICK_STATE_HAT enum JOYSTICK_STATE_HAT | ||
| 159 | /// @ingroup cpp_kodi_addon_peripheral_Defs_Event | ||
| 160 | /// @brief **State hat**\n | ||
| 161 | /// States a D-pad (also called a hat) can have | ||
| 162 | ///@{ | ||
| 163 | typedef enum JOYSTICK_STATE_HAT | ||
| 164 | { | ||
| 165 | /// @brief no directions are pressed | ||
| 166 | JOYSTICK_STATE_HAT_UNPRESSED = 0x0, | ||
| 167 | |||
| 168 | /// @brief only left is pressed | ||
| 169 | JOYSTICK_STATE_HAT_LEFT = 0x1, | ||
| 170 | |||
| 171 | /// @brief only right is pressed | ||
| 172 | JOYSTICK_STATE_HAT_RIGHT = 0x2, | ||
| 173 | |||
| 174 | /// @brief only up is pressed | ||
| 175 | JOYSTICK_STATE_HAT_UP = 0x4, | ||
| 176 | |||
| 177 | /// @brief only down is pressed | ||
| 178 | JOYSTICK_STATE_HAT_DOWN = 0x8, | ||
| 179 | |||
| 180 | /// @brief left and up is pressed | ||
| 181 | JOYSTICK_STATE_HAT_LEFT_UP = JOYSTICK_STATE_HAT_LEFT | JOYSTICK_STATE_HAT_UP, | ||
| 182 | |||
| 183 | /// @brief left and down is pressed | ||
| 184 | JOYSTICK_STATE_HAT_LEFT_DOWN = JOYSTICK_STATE_HAT_LEFT | JOYSTICK_STATE_HAT_DOWN, | ||
| 185 | |||
| 186 | /// @brief right and up is pressed | ||
| 187 | JOYSTICK_STATE_HAT_RIGHT_UP = JOYSTICK_STATE_HAT_RIGHT | JOYSTICK_STATE_HAT_UP, | ||
| 188 | |||
| 189 | /// @brief right and down is pressed | ||
| 190 | JOYSTICK_STATE_HAT_RIGHT_DOWN = JOYSTICK_STATE_HAT_RIGHT | JOYSTICK_STATE_HAT_DOWN, | ||
| 191 | } JOYSTICK_STATE_HAT; | ||
| 192 | ///@} | ||
| 193 | //---------------------------------------------------------------------------- | ||
| 194 | |||
| 195 | //============================================================================ | ||
| 196 | /// @ingroup cpp_kodi_addon_peripheral_Defs_Event | ||
| 197 | /// @brief Axis value in the closed interval [-1.0, 1.0] | ||
| 198 | /// | ||
| 199 | /// The axis state uses the XInput coordinate system: | ||
| 200 | /// - Negative values signify down or to the left | ||
| 201 | /// - Positive values signify up or to the right | ||
| 202 | /// | ||
| 203 | typedef float JOYSTICK_STATE_AXIS; | ||
| 204 | //---------------------------------------------------------------------------- | ||
| 205 | |||
| 206 | //============================================================================ | ||
| 207 | /// @ingroup cpp_kodi_addon_peripheral_Defs_Event | ||
| 208 | /// @brief Motor value in the closed interval [0.0, 1.0] | ||
| 209 | typedef float JOYSTICK_STATE_MOTOR; | ||
| 210 | //---------------------------------------------------------------------------- | ||
| 211 | |||
| 212 | /*! | ||
| 213 | * @brief Event information | ||
| 214 | */ | ||
| 215 | typedef struct PERIPHERAL_EVENT | ||
| 216 | { | ||
| 217 | /*! @brief Index of the peripheral handling/receiving the event */ | ||
| 218 | unsigned int peripheral_index; | ||
| 219 | |||
| 220 | /*! @brief Type of the event used to determine which enum field to access below */ | ||
| 221 | PERIPHERAL_EVENT_TYPE type; | ||
| 222 | |||
| 223 | /*! @brief The index of the event source */ | ||
| 224 | unsigned int driver_index; | ||
| 225 | |||
| 226 | JOYSTICK_STATE_BUTTON driver_button_state; | ||
| 227 | JOYSTICK_STATE_HAT driver_hat_state; | ||
| 228 | JOYSTICK_STATE_AXIS driver_axis_state; | ||
| 229 | JOYSTICK_STATE_MOTOR motor_state; | ||
| 230 | } ATTRIBUTE_PACKED PERIPHERAL_EVENT; | ||
| 231 | |||
| 232 | //} | ||
| 233 | |||
| 234 | // @name Joystick types | ||
| 235 | //{ | ||
| 236 | |||
| 237 | /*! | ||
| 238 | * @brief Info specific to joystick peripherals | ||
| 239 | */ | ||
| 240 | typedef struct JOYSTICK_INFO | ||
| 241 | { | ||
| 242 | PERIPHERAL_INFO peripheral; /*!< @brief peripheral info for this joystick */ | ||
| 243 | char* provider; /*!< @brief name of the driver or interface providing the joystick */ | ||
| 244 | int requested_port; /*!< @brief requested port number (such as for 360 controllers), or NO_PORT_REQUESTED */ | ||
| 245 | unsigned int button_count; /*!< @brief number of buttons reported by the driver */ | ||
| 246 | unsigned int hat_count; /*!< @brief number of hats reported by the driver */ | ||
| 247 | unsigned int axis_count; /*!< @brief number of axes reported by the driver */ | ||
| 248 | unsigned int motor_count; /*!< @brief number of motors reported by the driver */ | ||
| 249 | bool supports_poweroff; /*!< @brief whether the joystick supports being powered off */ | ||
| 250 | } ATTRIBUTE_PACKED JOYSTICK_INFO; | ||
| 251 | |||
| 252 | //============================================================================ | ||
| 253 | /// @defgroup cpp_kodi_addon_peripheral_Defs_Joystick_JOYSTICK_DRIVER_PRIMITIVE_TYPE enum JOYSTICK_DRIVER_PRIMITIVE_TYPE | ||
| 254 | /// @ingroup cpp_kodi_addon_peripheral_Defs_Joystick | ||
| 255 | /// @brief **Driver primitive type**\n | ||
| 256 | /// Driver input primitives | ||
| 257 | /// | ||
| 258 | /// Mapping lower-level driver values to higher-level controller features is | ||
| 259 | /// non-injective; two triggers can share a single axis. | ||
| 260 | /// | ||
| 261 | /// To handle this, driver values are subdivided into "primitives" that map | ||
| 262 | /// injectively to higher-level features. | ||
| 263 | /// | ||
| 264 | ///@{ | ||
| 265 | typedef enum JOYSTICK_DRIVER_PRIMITIVE_TYPE | ||
| 266 | { | ||
| 267 | /// @brief Driver input primitive type unknown | ||
| 268 | JOYSTICK_DRIVER_PRIMITIVE_TYPE_UNKNOWN, | ||
| 269 | |||
| 270 | /// @brief Driver input primitive type button | ||
| 271 | JOYSTICK_DRIVER_PRIMITIVE_TYPE_BUTTON, | ||
| 272 | |||
| 273 | /// @brief Driver input primitive type hat direction | ||
| 274 | JOYSTICK_DRIVER_PRIMITIVE_TYPE_HAT_DIRECTION, | ||
| 275 | |||
| 276 | /// @brief Driver input primitive type semiaxis | ||
| 277 | JOYSTICK_DRIVER_PRIMITIVE_TYPE_SEMIAXIS, | ||
| 278 | |||
| 279 | /// @brief Driver input primitive type motor | ||
| 280 | JOYSTICK_DRIVER_PRIMITIVE_TYPE_MOTOR, | ||
| 281 | |||
| 282 | /// @brief Driver input primitive type key | ||
| 283 | JOYSTICK_DRIVER_PRIMITIVE_TYPE_KEY, | ||
| 284 | |||
| 285 | /// @brief Driver input primitive type mouse button | ||
| 286 | JOYSTICK_DRIVER_PRIMITIVE_TYPE_MOUSE_BUTTON, | ||
| 287 | |||
| 288 | /// @brief Driver input primitive type relative pointer direction | ||
| 289 | JOYSTICK_DRIVER_PRIMITIVE_TYPE_RELPOINTER_DIRECTION, | ||
| 290 | } JOYSTICK_DRIVER_PRIMITIVE_TYPE; | ||
| 291 | ///@} | ||
| 292 | //---------------------------------------------------------------------------- | ||
| 293 | |||
| 294 | /*! | ||
| 295 | * @brief Button primitive | ||
| 296 | */ | ||
| 297 | typedef struct JOYSTICK_DRIVER_BUTTON | ||
| 298 | { | ||
| 299 | int index; | ||
| 300 | } ATTRIBUTE_PACKED JOYSTICK_DRIVER_BUTTON; | ||
| 301 | |||
| 302 | //============================================================================ | ||
| 303 | /// @defgroup cpp_kodi_addon_peripheral_Defs_Joystick_JOYSTICK_DRIVER_HAT_DIRECTION enum JOYSTICK_DRIVER_HAT_DIRECTION | ||
| 304 | /// @ingroup cpp_kodi_addon_peripheral_Defs_Joystick | ||
| 305 | /// @brief **Driver direction**\n | ||
| 306 | /// Hat direction. | ||
| 307 | ///@{ | ||
| 308 | typedef enum JOYSTICK_DRIVER_HAT_DIRECTION | ||
| 309 | { | ||
| 310 | /// @brief Driver hat unknown | ||
| 311 | JOYSTICK_DRIVER_HAT_UNKNOWN, | ||
| 312 | |||
| 313 | /// @brief Driver hat left | ||
| 314 | JOYSTICK_DRIVER_HAT_LEFT, | ||
| 315 | |||
| 316 | /// @brief Driver hat right | ||
| 317 | JOYSTICK_DRIVER_HAT_RIGHT, | ||
| 318 | |||
| 319 | /// @brief Driver hat up | ||
| 320 | JOYSTICK_DRIVER_HAT_UP, | ||
| 321 | |||
| 322 | /// @brief Driver hat down | ||
| 323 | JOYSTICK_DRIVER_HAT_DOWN, | ||
| 324 | } JOYSTICK_DRIVER_HAT_DIRECTION; | ||
| 325 | ///@} | ||
| 326 | //---------------------------------------------------------------------------- | ||
| 327 | |||
| 328 | /*! | ||
| 329 | * @brief Hat direction primitive | ||
| 330 | */ | ||
| 331 | typedef struct JOYSTICK_DRIVER_HAT | ||
| 332 | { | ||
| 333 | int index; | ||
| 334 | JOYSTICK_DRIVER_HAT_DIRECTION direction; | ||
| 335 | } ATTRIBUTE_PACKED JOYSTICK_DRIVER_HAT; | ||
| 336 | |||
| 337 | //============================================================================ | ||
| 338 | /// @defgroup cpp_kodi_addon_peripheral_Defs_Joystick_JOYSTICK_DRIVER_SEMIAXIS_DIRECTION enum JOYSTICK_DRIVER_SEMIAXIS_DIRECTION | ||
| 339 | /// @ingroup cpp_kodi_addon_peripheral_Defs_Joystick | ||
| 340 | /// @brief **Driver direction**\n | ||
| 341 | /// Semiaxis direction. | ||
| 342 | ///@{ | ||
| 343 | typedef enum JOYSTICK_DRIVER_SEMIAXIS_DIRECTION | ||
| 344 | { | ||
| 345 | /// @brief negative half of the axis | ||
| 346 | JOYSTICK_DRIVER_SEMIAXIS_NEGATIVE = -1, | ||
| 347 | |||
| 348 | /// @brief unknown direction | ||
| 349 | JOYSTICK_DRIVER_SEMIAXIS_UNKNOWN = 0, | ||
| 350 | |||
| 351 | /// @brief positive half of the axis | ||
| 352 | JOYSTICK_DRIVER_SEMIAXIS_POSITIVE = 1, | ||
| 353 | } JOYSTICK_DRIVER_SEMIAXIS_DIRECTION; | ||
| 354 | ///@} | ||
| 355 | //---------------------------------------------------------------------------- | ||
| 356 | |||
| 357 | /*! | ||
| 358 | * @brief Semiaxis primitive | ||
| 359 | */ | ||
| 360 | typedef struct JOYSTICK_DRIVER_SEMIAXIS | ||
| 361 | { | ||
| 362 | int index; | ||
| 363 | int center; | ||
| 364 | JOYSTICK_DRIVER_SEMIAXIS_DIRECTION direction; | ||
| 365 | unsigned int range; | ||
| 366 | } ATTRIBUTE_PACKED JOYSTICK_DRIVER_SEMIAXIS; | ||
| 367 | |||
| 368 | /*! | ||
| 369 | * @brief Motor primitive | ||
| 370 | */ | ||
| 371 | typedef struct JOYSTICK_DRIVER_MOTOR | ||
| 372 | { | ||
| 373 | int index; | ||
| 374 | } ATTRIBUTE_PACKED JOYSTICK_DRIVER_MOTOR; | ||
| 375 | |||
| 376 | /*! | ||
| 377 | * @brief Keyboard key primitive | ||
| 378 | */ | ||
| 379 | typedef struct JOYSTICK_DRIVER_KEY | ||
| 380 | { | ||
| 381 | char keycode[16]; | ||
| 382 | } ATTRIBUTE_PACKED JOYSTICK_DRIVER_KEY; | ||
| 383 | |||
| 384 | //============================================================================ | ||
| 385 | /// @defgroup cpp_kodi_addon_peripheral_Defs_Joystick_JOYSTICK_DRIVER_MOUSE_INDEX enum JOYSTICK_DRIVER_MOUSE_INDEX | ||
| 386 | /// @ingroup cpp_kodi_addon_peripheral_Defs_Joystick | ||
| 387 | /// @brief **Buttons**\n | ||
| 388 | /// Mouse buttons. | ||
| 389 | ///@{ | ||
| 390 | typedef enum JOYSTICK_DRIVER_MOUSE_INDEX | ||
| 391 | { | ||
| 392 | /// @brief Mouse index unknown | ||
| 393 | JOYSTICK_DRIVER_MOUSE_INDEX_UNKNOWN, | ||
| 394 | |||
| 395 | /// @brief Mouse index left | ||
| 396 | JOYSTICK_DRIVER_MOUSE_INDEX_LEFT, | ||
| 397 | |||
| 398 | /// @brief Mouse index right | ||
| 399 | JOYSTICK_DRIVER_MOUSE_INDEX_RIGHT, | ||
| 400 | |||
| 401 | /// @brief Mouse index middle | ||
| 402 | JOYSTICK_DRIVER_MOUSE_INDEX_MIDDLE, | ||
| 403 | |||
| 404 | /// @brief Mouse index button 4 | ||
| 405 | JOYSTICK_DRIVER_MOUSE_INDEX_BUTTON4, | ||
| 406 | |||
| 407 | /// @brief Mouse index button 5 | ||
| 408 | JOYSTICK_DRIVER_MOUSE_INDEX_BUTTON5, | ||
| 409 | |||
| 410 | /// @brief Mouse index wheel up | ||
| 411 | JOYSTICK_DRIVER_MOUSE_INDEX_WHEEL_UP, | ||
| 412 | |||
| 413 | /// @brief Mouse index wheel down | ||
| 414 | JOYSTICK_DRIVER_MOUSE_INDEX_WHEEL_DOWN, | ||
| 415 | |||
| 416 | /// @brief Mouse index horizontal wheel left | ||
| 417 | JOYSTICK_DRIVER_MOUSE_INDEX_HORIZ_WHEEL_LEFT, | ||
| 418 | |||
| 419 | /// @brief Mouse index horizontal wheel right | ||
| 420 | JOYSTICK_DRIVER_MOUSE_INDEX_HORIZ_WHEEL_RIGHT, | ||
| 421 | } JOYSTICK_DRIVER_MOUSE_INDEX; | ||
| 422 | ///@} | ||
| 423 | //---------------------------------------------------------------------------- | ||
| 424 | |||
| 425 | /*! | ||
| 426 | * @brief Mouse button primitive | ||
| 427 | */ | ||
| 428 | typedef struct JOYSTICK_DRIVER_MOUSE_BUTTON | ||
| 429 | { | ||
| 430 | JOYSTICK_DRIVER_MOUSE_INDEX button; | ||
| 431 | } ATTRIBUTE_PACKED JOYSTICK_DRIVER_MOUSE_BUTTON; | ||
| 432 | |||
| 433 | //============================================================================ | ||
| 434 | /// @defgroup cpp_kodi_addon_peripheral_Defs_Joystick_JOYSTICK_DRIVER_RELPOINTER_DIRECTION enum JOYSTICK_DRIVER_RELPOINTER_DIRECTION | ||
| 435 | /// @ingroup cpp_kodi_addon_peripheral_Defs_Joystick | ||
| 436 | /// @brief **Pointer direction**\n | ||
| 437 | /// Relative pointer direction | ||
| 438 | ///@{ | ||
| 439 | typedef enum JOYSTICK_DRIVER_RELPOINTER_DIRECTION | ||
| 440 | { | ||
| 441 | /// @brief Relative pointer direction unknown | ||
| 442 | JOYSTICK_DRIVER_RELPOINTER_UNKNOWN, | ||
| 443 | |||
| 444 | /// @brief Relative pointer direction left | ||
| 445 | JOYSTICK_DRIVER_RELPOINTER_LEFT, | ||
| 446 | |||
| 447 | /// @brief Relative pointer direction right | ||
| 448 | JOYSTICK_DRIVER_RELPOINTER_RIGHT, | ||
| 449 | |||
| 450 | /// @brief Relative pointer direction up | ||
| 451 | JOYSTICK_DRIVER_RELPOINTER_UP, | ||
| 452 | |||
| 453 | /// @brief Relative pointer direction down | ||
| 454 | JOYSTICK_DRIVER_RELPOINTER_DOWN, | ||
| 455 | } JOYSTICK_DRIVER_RELPOINTER_DIRECTION; | ||
| 456 | ///@} | ||
| 457 | //---------------------------------------------------------------------------- | ||
| 458 | |||
| 459 | /*! | ||
| 460 | * @brief Relative pointer direction primitive | ||
| 461 | */ | ||
| 462 | typedef struct JOYSTICK_DRIVER_RELPOINTER | ||
| 463 | { | ||
| 464 | JOYSTICK_DRIVER_RELPOINTER_DIRECTION direction; | ||
| 465 | } ATTRIBUTE_PACKED JOYSTICK_DRIVER_RELPOINTER; | ||
| 466 | |||
| 467 | /*! | ||
| 468 | * @brief Driver primitive struct | ||
| 469 | */ | ||
| 470 | typedef struct JOYSTICK_DRIVER_PRIMITIVE | ||
| 471 | { | ||
| 472 | JOYSTICK_DRIVER_PRIMITIVE_TYPE type; | ||
| 473 | union | ||
| 474 | { | ||
| 475 | struct JOYSTICK_DRIVER_BUTTON button; | ||
| 476 | struct JOYSTICK_DRIVER_HAT hat; | ||
| 477 | struct JOYSTICK_DRIVER_SEMIAXIS semiaxis; | ||
| 478 | struct JOYSTICK_DRIVER_MOTOR motor; | ||
| 479 | struct JOYSTICK_DRIVER_KEY key; | ||
| 480 | struct JOYSTICK_DRIVER_MOUSE_BUTTON mouse; | ||
| 481 | struct JOYSTICK_DRIVER_RELPOINTER relpointer; | ||
| 482 | }; | ||
| 483 | } ATTRIBUTE_PACKED JOYSTICK_DRIVER_PRIMITIVE; | ||
| 484 | |||
| 485 | //============================================================================ | ||
| 486 | /// @defgroup cpp_kodi_addon_peripheral_Defs_Joystick_JOYSTICK_FEATURE_TYPE enum JOYSTICK_FEATURE_TYPE | ||
| 487 | /// @ingroup cpp_kodi_addon_peripheral_Defs_Joystick | ||
| 488 | /// @brief **Feature type**\n | ||
| 489 | /// Controller feature. | ||
| 490 | /// | ||
| 491 | /// Controller features are an abstraction over driver values. Each feature | ||
| 492 | /// maps to one or more driver primitives. | ||
| 493 | /// | ||
| 494 | ///@{ | ||
| 495 | typedef enum JOYSTICK_FEATURE_TYPE | ||
| 496 | { | ||
| 497 | /// @brief Unknown type | ||
| 498 | JOYSTICK_FEATURE_TYPE_UNKNOWN, | ||
| 499 | |||
| 500 | /// @brief Type scalar | ||
| 501 | JOYSTICK_FEATURE_TYPE_SCALAR, | ||
| 502 | |||
| 503 | /// @brief Type analog stick | ||
| 504 | JOYSTICK_FEATURE_TYPE_ANALOG_STICK, | ||
| 505 | |||
| 506 | /// @brief Type accelerometer | ||
| 507 | JOYSTICK_FEATURE_TYPE_ACCELEROMETER, | ||
| 508 | |||
| 509 | /// @brief Type motor | ||
| 510 | JOYSTICK_FEATURE_TYPE_MOTOR, | ||
| 511 | |||
| 512 | /// @brief Type relative pointer | ||
| 513 | JOYSTICK_FEATURE_TYPE_RELPOINTER, | ||
| 514 | |||
| 515 | /// @brief Type absolut pointer | ||
| 516 | JOYSTICK_FEATURE_TYPE_ABSPOINTER, | ||
| 517 | |||
| 518 | /// @brief Type wheel | ||
| 519 | JOYSTICK_FEATURE_TYPE_WHEEL, | ||
| 520 | |||
| 521 | /// @brief Type throttle | ||
| 522 | JOYSTICK_FEATURE_TYPE_THROTTLE, | ||
| 523 | |||
| 524 | /// @brief Type key | ||
| 525 | JOYSTICK_FEATURE_TYPE_KEY, | ||
| 526 | } JOYSTICK_FEATURE_TYPE; | ||
| 527 | ///@} | ||
| 528 | //---------------------------------------------------------------------------- | ||
| 529 | |||
| 530 | //============================================================================ | ||
| 531 | /// @defgroup cpp_kodi_addon_peripheral_Defs_Joystick_JOYSTICK_FEATURE_PRIMITIVE enum JOYSTICK_FEATURE_PRIMITIVE | ||
| 532 | /// @ingroup cpp_kodi_addon_peripheral_Defs_Joystick | ||
| 533 | /// @brief **Feature primitives**\n | ||
| 534 | /// Indices used to access a feature's driver primitives. | ||
| 535 | /// | ||
| 536 | ///@{ | ||
| 537 | typedef enum JOYSTICK_FEATURE_PRIMITIVE | ||
| 538 | { | ||
| 539 | /// @brief Scalar feature (a button, hat direction or semiaxis) | ||
| 540 | JOYSTICK_SCALAR_PRIMITIVE = 0, | ||
| 541 | |||
| 542 | /// @brief Analog stick up | ||
| 543 | JOYSTICK_ANALOG_STICK_UP = 0, | ||
| 544 | /// @brief Analog stick down | ||
| 545 | JOYSTICK_ANALOG_STICK_DOWN = 1, | ||
| 546 | /// @brief Analog stick right | ||
| 547 | JOYSTICK_ANALOG_STICK_RIGHT = 2, | ||
| 548 | /// @brief Analog stick left | ||
| 549 | JOYSTICK_ANALOG_STICK_LEFT = 3, | ||
| 550 | |||
| 551 | /// @brief Accelerometer X | ||
| 552 | JOYSTICK_ACCELEROMETER_POSITIVE_X = 0, | ||
| 553 | /// @brief Accelerometer Y | ||
| 554 | JOYSTICK_ACCELEROMETER_POSITIVE_Y = 1, | ||
| 555 | /// @brief Accelerometer Z | ||
| 556 | JOYSTICK_ACCELEROMETER_POSITIVE_Z = 2, | ||
| 557 | |||
| 558 | /// @brief Motor | ||
| 559 | JOYSTICK_MOTOR_PRIMITIVE = 0, | ||
| 560 | |||
| 561 | /// @brief Wheel left | ||
| 562 | JOYSTICK_WHEEL_LEFT = 0, | ||
| 563 | /// @brief Wheel right | ||
| 564 | JOYSTICK_WHEEL_RIGHT = 1, | ||
| 565 | |||
| 566 | /// @brief Throttle up | ||
| 567 | JOYSTICK_THROTTLE_UP = 0, | ||
| 568 | /// @brief Throttle down | ||
| 569 | JOYSTICK_THROTTLE_DOWN = 1, | ||
| 570 | |||
| 571 | /// @brief Key | ||
| 572 | JOYSTICK_KEY_PRIMITIVE = 0, | ||
| 573 | |||
| 574 | /// @brief Mouse button | ||
| 575 | JOYSTICK_MOUSE_BUTTON = 0, | ||
| 576 | |||
| 577 | /// @brief Relative pointer direction up | ||
| 578 | JOYSTICK_RELPOINTER_UP = 0, | ||
| 579 | /// @brief Relative pointer direction down | ||
| 580 | JOYSTICK_RELPOINTER_DOWN = 1, | ||
| 581 | /// @brief Relative pointer direction right | ||
| 582 | JOYSTICK_RELPOINTER_RIGHT = 2, | ||
| 583 | /// @brief Relative pointer direction left | ||
| 584 | JOYSTICK_RELPOINTER_LEFT = 3, | ||
| 585 | |||
| 586 | /// @brief Maximum number of primitives | ||
| 587 | JOYSTICK_PRIMITIVE_MAX = 4, | ||
| 588 | } JOYSTICK_FEATURE_PRIMITIVE; | ||
| 589 | ///@} | ||
| 590 | //---------------------------------------------------------------------------- | ||
| 591 | |||
| 592 | /*! | ||
| 593 | * @brief Mapping between higher-level controller feature and its driver primitives | ||
| 594 | */ | ||
| 595 | typedef struct JOYSTICK_FEATURE | ||
| 596 | { | ||
| 597 | char* name; | ||
| 598 | JOYSTICK_FEATURE_TYPE type; | ||
| 599 | struct JOYSTICK_DRIVER_PRIMITIVE primitives[JOYSTICK_PRIMITIVE_MAX]; | ||
| 600 | } ATTRIBUTE_PACKED JOYSTICK_FEATURE; | ||
| 601 | //} | ||
| 602 | |||
| 603 | typedef struct AddonProps_Peripheral | ||
| 604 | { | ||
| 605 | const char* user_path; /*!< @brief path to the user profile */ | ||
| 606 | const char* addon_path; /*!< @brief path to this add-on */ | ||
| 607 | } ATTRIBUTE_PACKED AddonProps_Peripheral; | ||
| 608 | |||
| 609 | struct AddonInstance_Peripheral; | ||
| 610 | |||
| 611 | typedef struct AddonToKodiFuncTable_Peripheral | ||
| 612 | { | ||
| 613 | KODI_HANDLE kodiInstance; | ||
| 614 | void (*trigger_scan)(void* kodiInstance); | ||
| 615 | void (*refresh_button_maps)(void* kodiInstance, | ||
| 616 | const char* device_name, | ||
| 617 | const char* controller_id); | ||
| 618 | unsigned int (*feature_count)(void* kodiInstance, | ||
| 619 | const char* controller_id, | ||
| 620 | JOYSTICK_FEATURE_TYPE type); | ||
| 621 | JOYSTICK_FEATURE_TYPE(*feature_type) | ||
| 622 | (void* kodiInstance, const char* controller_id, const char* feature_name); | ||
| 623 | } AddonToKodiFuncTable_Peripheral; | ||
| 624 | |||
| 625 | //! @todo Mouse, light gun, multitouch | ||
| 626 | |||
| 627 | typedef struct KodiToAddonFuncTable_Peripheral | ||
| 628 | { | ||
| 629 | KODI_HANDLE addonInstance; | ||
| 630 | |||
| 631 | void(__cdecl* get_capabilities)(const struct AddonInstance_Peripheral* addonInstance, | ||
| 632 | struct PERIPHERAL_CAPABILITIES* capabilities); | ||
| 633 | PERIPHERAL_ERROR(__cdecl* perform_device_scan) | ||
| 634 | (const struct AddonInstance_Peripheral* addonInstance, | ||
| 635 | unsigned int* peripheral_count, | ||
| 636 | struct PERIPHERAL_INFO** scan_results); | ||
| 637 | void(__cdecl* free_scan_results)(const struct AddonInstance_Peripheral* addonInstance, | ||
| 638 | unsigned int peripheral_count, | ||
| 639 | struct PERIPHERAL_INFO* scan_results); | ||
| 640 | PERIPHERAL_ERROR(__cdecl* get_events) | ||
| 641 | (const struct AddonInstance_Peripheral* addonInstance, | ||
| 642 | unsigned int* event_count, | ||
| 643 | struct PERIPHERAL_EVENT** events); | ||
| 644 | void(__cdecl* free_events)(const struct AddonInstance_Peripheral* addonInstance, | ||
| 645 | unsigned int event_count, | ||
| 646 | struct PERIPHERAL_EVENT* events); | ||
| 647 | bool(__cdecl* send_event)(const struct AddonInstance_Peripheral* addonInstance, | ||
| 648 | const struct PERIPHERAL_EVENT* event); | ||
| 649 | |||
| 650 | /// @name Joystick operations | ||
| 651 | ///{ | ||
| 652 | PERIPHERAL_ERROR(__cdecl* get_joystick_info) | ||
| 653 | (const struct AddonInstance_Peripheral* addonInstance, | ||
| 654 | unsigned int index, | ||
| 655 | struct JOYSTICK_INFO* info); | ||
| 656 | void(__cdecl* free_joystick_info)(const struct AddonInstance_Peripheral* addonInstance, | ||
| 657 | struct JOYSTICK_INFO* info); | ||
| 658 | PERIPHERAL_ERROR(__cdecl* get_features) | ||
| 659 | (const struct AddonInstance_Peripheral* addonInstance, | ||
| 660 | const struct JOYSTICK_INFO* joystick, | ||
| 661 | const char* controller_id, | ||
| 662 | unsigned int* feature_count, | ||
| 663 | struct JOYSTICK_FEATURE** features); | ||
| 664 | void(__cdecl* free_features)(const struct AddonInstance_Peripheral* addonInstance, | ||
| 665 | unsigned int feature_count, | ||
| 666 | struct JOYSTICK_FEATURE* features); | ||
| 667 | PERIPHERAL_ERROR(__cdecl* map_features) | ||
| 668 | (const struct AddonInstance_Peripheral* addonInstance, | ||
| 669 | const struct JOYSTICK_INFO* joystick, | ||
| 670 | const char* controller_id, | ||
| 671 | unsigned int feature_count, | ||
| 672 | const struct JOYSTICK_FEATURE* features); | ||
| 673 | PERIPHERAL_ERROR(__cdecl* get_ignored_primitives) | ||
| 674 | (const struct AddonInstance_Peripheral* addonInstance, | ||
| 675 | const struct JOYSTICK_INFO* joystick, | ||
| 676 | unsigned int* feature_count, | ||
| 677 | struct JOYSTICK_DRIVER_PRIMITIVE** primitives); | ||
| 678 | void(__cdecl* free_primitives)(const struct AddonInstance_Peripheral* addonInstance, | ||
| 679 | unsigned int, | ||
| 680 | struct JOYSTICK_DRIVER_PRIMITIVE* primitives); | ||
| 681 | PERIPHERAL_ERROR(__cdecl* set_ignored_primitives) | ||
| 682 | (const struct AddonInstance_Peripheral* addonInstance, | ||
| 683 | const struct JOYSTICK_INFO* joystick, | ||
| 684 | unsigned int primitive_count, | ||
| 685 | const struct JOYSTICK_DRIVER_PRIMITIVE* primitives); | ||
| 686 | void(__cdecl* save_button_map)(const struct AddonInstance_Peripheral* addonInstance, | ||
| 687 | const struct JOYSTICK_INFO* joystick); | ||
| 688 | void(__cdecl* revert_button_map)(const struct AddonInstance_Peripheral* addonInstance, | ||
| 689 | const struct JOYSTICK_INFO* joystick); | ||
| 690 | void(__cdecl* reset_button_map)(const struct AddonInstance_Peripheral* addonInstance, | ||
| 691 | const struct JOYSTICK_INFO* joystick, | ||
| 692 | const char* controller_id); | ||
| 693 | void(__cdecl* power_off_joystick)(const struct AddonInstance_Peripheral* addonInstance, | ||
| 694 | unsigned int index); | ||
| 695 | ///} | ||
| 696 | } KodiToAddonFuncTable_Peripheral; | ||
| 697 | |||
| 698 | typedef struct AddonInstance_Peripheral | ||
| 699 | { | ||
| 700 | struct AddonProps_Peripheral* props; | ||
| 701 | struct AddonToKodiFuncTable_Peripheral* toKodi; | ||
| 702 | struct KodiToAddonFuncTable_Peripheral* toAddon; | ||
| 703 | } AddonInstance_Peripheral; | ||
| 704 | |||
| 705 | #ifdef __cplusplus | ||
| 706 | } /* extern "C" */ | ||
| 707 | #endif /* __cplusplus */ | ||
| 708 | |||
| 709 | #endif /* !C_API_ADDONINSTANCE_PERIPHERAL_H */ | ||
diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/pvr.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/pvr.h new file mode 100644 index 0000000..a50ea2b --- /dev/null +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/pvr.h | |||
| @@ -0,0 +1,332 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2005-2018 Team Kodi | ||
| 3 | * This file is part of Kodi - https://kodi.tv | ||
| 4 | * | ||
| 5 | * SPDX-License-Identifier: GPL-2.0-or-later | ||
| 6 | * See LICENSES/README.md for more information. | ||
| 7 | */ | ||
| 8 | |||
| 9 | #pragma once | ||
| 10 | |||
| 11 | #ifndef C_API_ADDONINSTANCE_PVR_H | ||
| 12 | #define C_API_ADDONINSTANCE_PVR_H | ||
| 13 | |||
| 14 | #include "../../AddonBase.h" | ||
| 15 | #include "pvr/pvr_channel_groups.h" | ||
| 16 | #include "pvr/pvr_channels.h" | ||
| 17 | #include "pvr/pvr_defines.h" | ||
| 18 | #include "pvr/pvr_edl.h" | ||
| 19 | #include "pvr/pvr_epg.h" | ||
| 20 | #include "pvr/pvr_general.h" | ||
| 21 | #include "pvr/pvr_menu_hook.h" | ||
| 22 | #include "pvr/pvr_recordings.h" | ||
| 23 | #include "pvr/pvr_stream.h" | ||
| 24 | #include "pvr/pvr_timers.h" | ||
| 25 | |||
| 26 | //¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ | ||
| 27 | // "C" main interface function tables between Kodi and addon | ||
| 28 | // | ||
| 29 | // Values related to all parts and not used direct on addon, are to define here. | ||
| 30 | // | ||
| 31 | #ifdef __cplusplus | ||
| 32 | extern "C" | ||
| 33 | { | ||
| 34 | #endif /* __cplusplus */ | ||
| 35 | |||
| 36 | /*! | ||
| 37 | * @internal | ||
| 38 | * @brief PVR "C" basis API interface | ||
| 39 | * | ||
| 40 | * This field contains things that are exchanged between Kodi and Addon | ||
| 41 | * and is the basis of the PVR-side "C" API. | ||
| 42 | * | ||
| 43 | * @warning Care should be taken when making changes in this fields!\n | ||
| 44 | * Changes can destroy API in addons that have already been created. If a | ||
| 45 | * necessary change or new feature is added, the version of the PVR | ||
| 46 | * at @ref ADDON_INSTANCE_VERSION_PVR_MIN must be increased too.\n | ||
| 47 | * \n | ||
| 48 | * Conditional changes can be made in some places, without min PVR version | ||
| 49 | * increase. The add-on should then use CreateInstanceEx and add partial tests | ||
| 50 | * for this in the C++ header. | ||
| 51 | * | ||
| 52 | * Have by add of new parts a look about **Doxygen** `\\ingroup`, so that | ||
| 53 | * added parts included in documentation. | ||
| 54 | * | ||
| 55 | * If you add addon side related documentation, where his dev need know, | ||
| 56 | * use `///`. For parts only for Kodi make it like here. | ||
| 57 | * | ||
| 58 | * @endinternal | ||
| 59 | */ | ||
| 60 | |||
| 61 | struct AddonInstance_PVR; | ||
| 62 | |||
| 63 | /*! | ||
| 64 | * @brief Structure to define typical standard values | ||
| 65 | */ | ||
| 66 | typedef struct AddonProperties_PVR | ||
| 67 | { | ||
| 68 | const char* strUserPath; | ||
| 69 | const char* strClientPath; | ||
| 70 | int iEpgMaxDays; | ||
| 71 | } AddonProperties_PVR; | ||
| 72 | |||
| 73 | /*! | ||
| 74 | * @brief Structure to transfer the methods from Kodi to addon | ||
| 75 | */ | ||
| 76 | typedef struct AddonToKodiFuncTable_PVR | ||
| 77 | { | ||
| 78 | // Pointer inside Kodi where used from him to find his class | ||
| 79 | KODI_HANDLE kodiInstance; | ||
| 80 | |||
| 81 | //--==----==----==----==----==----==----==----==----==----==----==----==----== | ||
| 82 | // General callback functions | ||
| 83 | void (*AddMenuHook)(void* kodiInstance, const struct PVR_MENUHOOK* hook); | ||
| 84 | void (*RecordingNotification)(void* kodiInstance, | ||
| 85 | const char* name, | ||
| 86 | const char* fileName, | ||
| 87 | bool on); | ||
| 88 | void (*ConnectionStateChange)(void* kodiInstance, | ||
| 89 | const char* strConnectionString, | ||
| 90 | enum PVR_CONNECTION_STATE newState, | ||
| 91 | const char* strMessage); | ||
| 92 | void (*EpgEventStateChange)(void* kodiInstance, | ||
| 93 | struct EPG_TAG* tag, | ||
| 94 | enum EPG_EVENT_STATE newState); | ||
| 95 | |||
| 96 | //--==----==----==----==----==----==----==----==----==----==----==----==----== | ||
| 97 | // Transfer functions where give data back to Kodi, e.g. GetChannels calls TransferChannelEntry | ||
| 98 | void (*TransferChannelEntry)(void* kodiInstance, | ||
| 99 | const ADDON_HANDLE handle, | ||
| 100 | const struct PVR_CHANNEL* chan); | ||
| 101 | void (*TransferChannelGroup)(void* kodiInstance, | ||
| 102 | const ADDON_HANDLE handle, | ||
| 103 | const struct PVR_CHANNEL_GROUP* group); | ||
| 104 | void (*TransferChannelGroupMember)(void* kodiInstance, | ||
| 105 | const ADDON_HANDLE handle, | ||
| 106 | const struct PVR_CHANNEL_GROUP_MEMBER* member); | ||
| 107 | void (*TransferEpgEntry)(void* kodiInstance, | ||
| 108 | const ADDON_HANDLE handle, | ||
| 109 | const struct EPG_TAG* epgentry); | ||
| 110 | void (*TransferRecordingEntry)(void* kodiInstance, | ||
| 111 | const ADDON_HANDLE handle, | ||
| 112 | const struct PVR_RECORDING* recording); | ||
| 113 | void (*TransferTimerEntry)(void* kodiInstance, | ||
| 114 | const ADDON_HANDLE handle, | ||
| 115 | const struct PVR_TIMER* timer); | ||
| 116 | |||
| 117 | //--==----==----==----==----==----==----==----==----==----==----==----==----== | ||
| 118 | // Kodi inform interface functions | ||
| 119 | void (*TriggerChannelUpdate)(void* kodiInstance); | ||
| 120 | void (*TriggerChannelGroupsUpdate)(void* kodiInstance); | ||
| 121 | void (*TriggerEpgUpdate)(void* kodiInstance, unsigned int iChannelUid); | ||
| 122 | void (*TriggerRecordingUpdate)(void* kodiInstance); | ||
| 123 | void (*TriggerTimerUpdate)(void* kodiInstance); | ||
| 124 | |||
| 125 | //--==----==----==----==----==----==----==----==----==----==----==----==----== | ||
| 126 | // Stream demux interface functions | ||
| 127 | void (*FreeDemuxPacket)(void* kodiInstance, struct DemuxPacket* pPacket); | ||
| 128 | struct DemuxPacket* (*AllocateDemuxPacket)(void* kodiInstance, int iDataSize); | ||
| 129 | struct PVR_CODEC (*GetCodecByName)(const void* kodiInstance, const char* strCodecName); | ||
| 130 | |||
| 131 | //--==----==----==----==----==----==----==----==----==----==----==----==----== | ||
| 132 | // New functions becomes added below and can be on another API change (where | ||
| 133 | // breaks min API version) moved up. | ||
| 134 | } AddonToKodiFuncTable_PVR; | ||
| 135 | |||
| 136 | /*! | ||
| 137 | * @brief Structure to transfer the methods from addon to Kodi | ||
| 138 | */ | ||
| 139 | typedef struct KodiToAddonFuncTable_PVR | ||
| 140 | { | ||
| 141 | // Pointer inside addon where used on them to find his instance class (currently unused!) | ||
| 142 | KODI_HANDLE addonInstance; | ||
| 143 | |||
| 144 | //--==----==----==----==----==----==----==----==----==----==----==----==----== | ||
| 145 | // General interface functions | ||
| 146 | enum PVR_ERROR(__cdecl* GetCapabilities)(const struct AddonInstance_PVR*, | ||
| 147 | struct PVR_ADDON_CAPABILITIES*); | ||
| 148 | enum PVR_ERROR(__cdecl* GetBackendName)(const struct AddonInstance_PVR*, char*, int); | ||
| 149 | enum PVR_ERROR(__cdecl* GetBackendVersion)(const struct AddonInstance_PVR*, char*, int); | ||
| 150 | enum PVR_ERROR(__cdecl* GetBackendHostname)(const struct AddonInstance_PVR*, char*, int); | ||
| 151 | enum PVR_ERROR(__cdecl* GetConnectionString)(const struct AddonInstance_PVR*, char*, int); | ||
| 152 | enum PVR_ERROR(__cdecl* GetDriveSpace)(const struct AddonInstance_PVR*, uint64_t*, uint64_t*); | ||
| 153 | enum PVR_ERROR(__cdecl* CallSettingsMenuHook)(const struct AddonInstance_PVR*, | ||
| 154 | const struct PVR_MENUHOOK*); | ||
| 155 | |||
| 156 | //--==----==----==----==----==----==----==----==----==----==----==----==----== | ||
| 157 | // Channel interface functions | ||
| 158 | |||
| 159 | enum PVR_ERROR(__cdecl* GetChannelsAmount)(const struct AddonInstance_PVR*, int*); | ||
| 160 | enum PVR_ERROR(__cdecl* GetChannels)(const struct AddonInstance_PVR*, ADDON_HANDLE, bool); | ||
| 161 | enum PVR_ERROR(__cdecl* GetChannelStreamProperties)(const struct AddonInstance_PVR*, | ||
| 162 | const struct PVR_CHANNEL*, | ||
| 163 | struct PVR_NAMED_VALUE*, | ||
| 164 | unsigned int*); | ||
| 165 | enum PVR_ERROR(__cdecl* GetSignalStatus)(const struct AddonInstance_PVR*, | ||
| 166 | int, | ||
| 167 | struct PVR_SIGNAL_STATUS*); | ||
| 168 | enum PVR_ERROR(__cdecl* GetDescrambleInfo)(const struct AddonInstance_PVR*, | ||
| 169 | int, | ||
| 170 | struct PVR_DESCRAMBLE_INFO*); | ||
| 171 | |||
| 172 | //--==----==----==----==----==----==----==----==----==----==----==----==----== | ||
| 173 | // Channel group interface functions | ||
| 174 | enum PVR_ERROR(__cdecl* GetChannelGroupsAmount)(const struct AddonInstance_PVR*, int*); | ||
| 175 | enum PVR_ERROR(__cdecl* GetChannelGroups)(const struct AddonInstance_PVR*, ADDON_HANDLE, bool); | ||
| 176 | enum PVR_ERROR(__cdecl* GetChannelGroupMembers)(const struct AddonInstance_PVR*, | ||
| 177 | ADDON_HANDLE, | ||
| 178 | const struct PVR_CHANNEL_GROUP*); | ||
| 179 | |||
| 180 | //--==----==----==----==----==----==----==----==----==----==----==----==----== | ||
| 181 | // Channel edit interface functions | ||
| 182 | enum PVR_ERROR(__cdecl* DeleteChannel)(const struct AddonInstance_PVR*, | ||
| 183 | const struct PVR_CHANNEL*); | ||
| 184 | enum PVR_ERROR(__cdecl* RenameChannel)(const struct AddonInstance_PVR*, | ||
| 185 | const struct PVR_CHANNEL*); | ||
| 186 | enum PVR_ERROR(__cdecl* OpenDialogChannelSettings)(const struct AddonInstance_PVR*, | ||
| 187 | const struct PVR_CHANNEL*); | ||
| 188 | enum PVR_ERROR(__cdecl* OpenDialogChannelAdd)(const struct AddonInstance_PVR*, | ||
| 189 | const struct PVR_CHANNEL*); | ||
| 190 | enum PVR_ERROR(__cdecl* OpenDialogChannelScan)(const struct AddonInstance_PVR*); | ||
| 191 | enum PVR_ERROR(__cdecl* CallChannelMenuHook)(const struct AddonInstance_PVR*, | ||
| 192 | const PVR_MENUHOOK*, | ||
| 193 | const PVR_CHANNEL*); | ||
| 194 | |||
| 195 | //--==----==----==----==----==----==----==----==----==----==----==----==----== | ||
| 196 | // EPG interface functions | ||
| 197 | enum PVR_ERROR(__cdecl* GetEPGForChannel)( | ||
| 198 | const struct AddonInstance_PVR*, ADDON_HANDLE, int, time_t, time_t); | ||
| 199 | enum PVR_ERROR(__cdecl* IsEPGTagRecordable)(const struct AddonInstance_PVR*, | ||
| 200 | const struct EPG_TAG*, | ||
| 201 | bool*); | ||
| 202 | enum PVR_ERROR(__cdecl* IsEPGTagPlayable)(const struct AddonInstance_PVR*, | ||
| 203 | const struct EPG_TAG*, | ||
| 204 | bool*); | ||
| 205 | enum PVR_ERROR(__cdecl* GetEPGTagEdl)(const struct AddonInstance_PVR*, | ||
| 206 | const struct EPG_TAG*, | ||
| 207 | struct PVR_EDL_ENTRY[], | ||
| 208 | int*); | ||
| 209 | enum PVR_ERROR(__cdecl* GetEPGTagStreamProperties)(const struct AddonInstance_PVR*, | ||
| 210 | const struct EPG_TAG*, | ||
| 211 | struct PVR_NAMED_VALUE*, | ||
| 212 | unsigned int*); | ||
| 213 | enum PVR_ERROR(__cdecl* SetEPGTimeFrame)(const struct AddonInstance_PVR*, int); | ||
| 214 | enum PVR_ERROR(__cdecl* CallEPGMenuHook)(const struct AddonInstance_PVR*, | ||
| 215 | const struct PVR_MENUHOOK*, | ||
| 216 | const struct EPG_TAG*); | ||
| 217 | |||
| 218 | //--==----==----==----==----==----==----==----==----==----==----==----==----== | ||
| 219 | // Recording interface functions | ||
| 220 | enum PVR_ERROR(__cdecl* GetRecordingsAmount)(const struct AddonInstance_PVR*, bool, int*); | ||
| 221 | enum PVR_ERROR(__cdecl* GetRecordings)(const struct AddonInstance_PVR*, ADDON_HANDLE, bool); | ||
| 222 | enum PVR_ERROR(__cdecl* DeleteRecording)(const struct AddonInstance_PVR*, | ||
| 223 | const struct PVR_RECORDING*); | ||
| 224 | enum PVR_ERROR(__cdecl* UndeleteRecording)(const struct AddonInstance_PVR*, | ||
| 225 | const struct PVR_RECORDING*); | ||
| 226 | enum PVR_ERROR(__cdecl* DeleteAllRecordingsFromTrash)(const struct AddonInstance_PVR*); | ||
| 227 | enum PVR_ERROR(__cdecl* RenameRecording)(const struct AddonInstance_PVR*, | ||
| 228 | const struct PVR_RECORDING*); | ||
| 229 | enum PVR_ERROR(__cdecl* SetRecordingLifetime)(const struct AddonInstance_PVR*, | ||
| 230 | const struct PVR_RECORDING*); | ||
| 231 | enum PVR_ERROR(__cdecl* SetRecordingPlayCount)(const struct AddonInstance_PVR*, | ||
| 232 | const struct PVR_RECORDING*, | ||
| 233 | int); | ||
| 234 | enum PVR_ERROR(__cdecl* SetRecordingLastPlayedPosition)(const struct AddonInstance_PVR*, | ||
| 235 | const struct PVR_RECORDING*, | ||
| 236 | int); | ||
| 237 | enum PVR_ERROR(__cdecl* GetRecordingLastPlayedPosition)(const struct AddonInstance_PVR*, | ||
| 238 | const struct PVR_RECORDING*, | ||
| 239 | int*); | ||
| 240 | enum PVR_ERROR(__cdecl* GetRecordingEdl)(const struct AddonInstance_PVR*, | ||
| 241 | const struct PVR_RECORDING*, | ||
| 242 | struct PVR_EDL_ENTRY[], | ||
| 243 | int*); | ||
| 244 | enum PVR_ERROR(__cdecl* GetRecordingSize)(const struct AddonInstance_PVR*, | ||
| 245 | const PVR_RECORDING*, | ||
| 246 | int64_t*); | ||
| 247 | enum PVR_ERROR(__cdecl* GetRecordingStreamProperties)(const struct AddonInstance_PVR*, | ||
| 248 | const struct PVR_RECORDING*, | ||
| 249 | struct PVR_NAMED_VALUE*, | ||
| 250 | unsigned int*); | ||
| 251 | enum PVR_ERROR(__cdecl* CallRecordingMenuHook)(const struct AddonInstance_PVR*, | ||
| 252 | const struct PVR_MENUHOOK*, | ||
| 253 | const struct PVR_RECORDING*); | ||
| 254 | |||
| 255 | //--==----==----==----==----==----==----==----==----==----==----==----==----== | ||
| 256 | // Timer interface functions | ||
| 257 | enum PVR_ERROR(__cdecl* GetTimerTypes)(const struct AddonInstance_PVR*, | ||
| 258 | struct PVR_TIMER_TYPE[], | ||
| 259 | int*); | ||
| 260 | enum PVR_ERROR(__cdecl* GetTimersAmount)(const struct AddonInstance_PVR*, int*); | ||
| 261 | enum PVR_ERROR(__cdecl* GetTimers)(const struct AddonInstance_PVR*, ADDON_HANDLE); | ||
| 262 | enum PVR_ERROR(__cdecl* AddTimer)(const struct AddonInstance_PVR*, const struct PVR_TIMER*); | ||
| 263 | enum PVR_ERROR(__cdecl* DeleteTimer)(const struct AddonInstance_PVR*, | ||
| 264 | const struct PVR_TIMER*, | ||
| 265 | bool); | ||
| 266 | enum PVR_ERROR(__cdecl* UpdateTimer)(const struct AddonInstance_PVR*, const struct PVR_TIMER*); | ||
| 267 | enum PVR_ERROR(__cdecl* CallTimerMenuHook)(const struct AddonInstance_PVR*, | ||
| 268 | const struct PVR_MENUHOOK*, | ||
| 269 | const struct PVR_TIMER*); | ||
| 270 | |||
| 271 | //--==----==----==----==----==----==----==----==----==----==----==----==----== | ||
| 272 | // Powersaving interface functions | ||
| 273 | enum PVR_ERROR(__cdecl* OnSystemSleep)(const struct AddonInstance_PVR*); | ||
| 274 | enum PVR_ERROR(__cdecl* OnSystemWake)(const struct AddonInstance_PVR*); | ||
| 275 | enum PVR_ERROR(__cdecl* OnPowerSavingActivated)(const struct AddonInstance_PVR*); | ||
| 276 | enum PVR_ERROR(__cdecl* OnPowerSavingDeactivated)(const struct AddonInstance_PVR*); | ||
| 277 | |||
| 278 | //--==----==----==----==----==----==----==----==----==----==----==----==----== | ||
| 279 | // Live stream read interface functions | ||
| 280 | bool(__cdecl* OpenLiveStream)(const struct AddonInstance_PVR*, const struct PVR_CHANNEL*); | ||
| 281 | void(__cdecl* CloseLiveStream)(const struct AddonInstance_PVR*); | ||
| 282 | int(__cdecl* ReadLiveStream)(const struct AddonInstance_PVR*, unsigned char*, unsigned int); | ||
| 283 | int64_t(__cdecl* SeekLiveStream)(const struct AddonInstance_PVR*, int64_t, int); | ||
| 284 | int64_t(__cdecl* LengthLiveStream)(const struct AddonInstance_PVR*); | ||
| 285 | |||
| 286 | //--==----==----==----==----==----==----==----==----==----==----==----==----== | ||
| 287 | // Recording stream read interface functions | ||
| 288 | bool(__cdecl* OpenRecordedStream)(const struct AddonInstance_PVR*, const struct PVR_RECORDING*); | ||
| 289 | void(__cdecl* CloseRecordedStream)(const struct AddonInstance_PVR*); | ||
| 290 | int(__cdecl* ReadRecordedStream)(const struct AddonInstance_PVR*, unsigned char*, unsigned int); | ||
| 291 | int64_t(__cdecl* SeekRecordedStream)(const struct AddonInstance_PVR*, int64_t, int); | ||
| 292 | int64_t(__cdecl* LengthRecordedStream)(const struct AddonInstance_PVR*); | ||
| 293 | |||
| 294 | //--==----==----==----==----==----==----==----==----==----==----==----==----== | ||
| 295 | // Stream demux interface functions | ||
| 296 | enum PVR_ERROR(__cdecl* GetStreamProperties)(const struct AddonInstance_PVR*, | ||
| 297 | struct PVR_STREAM_PROPERTIES*); | ||
| 298 | struct DemuxPacket*(__cdecl* DemuxRead)(const struct AddonInstance_PVR*); | ||
| 299 | void(__cdecl* DemuxReset)(const struct AddonInstance_PVR*); | ||
| 300 | void(__cdecl* DemuxAbort)(const struct AddonInstance_PVR*); | ||
| 301 | void(__cdecl* DemuxFlush)(const struct AddonInstance_PVR*); | ||
| 302 | void(__cdecl* SetSpeed)(const struct AddonInstance_PVR*, int); | ||
| 303 | void(__cdecl* FillBuffer)(const struct AddonInstance_PVR*, bool); | ||
| 304 | bool(__cdecl* SeekTime)(const struct AddonInstance_PVR*, double, bool, double*); | ||
| 305 | |||
| 306 | //--==----==----==----==----==----==----==----==----==----==----==----==----== | ||
| 307 | // General stream interface functions | ||
| 308 | bool(__cdecl* CanPauseStream)(const struct AddonInstance_PVR*); | ||
| 309 | void(__cdecl* PauseStream)(const struct AddonInstance_PVR*, bool); | ||
| 310 | bool(__cdecl* CanSeekStream)(const struct AddonInstance_PVR*); | ||
| 311 | bool(__cdecl* IsRealTimeStream)(const struct AddonInstance_PVR*); | ||
| 312 | enum PVR_ERROR(__cdecl* GetStreamTimes)(const struct AddonInstance_PVR*, | ||
| 313 | struct PVR_STREAM_TIMES*); | ||
| 314 | enum PVR_ERROR(__cdecl* GetStreamReadChunkSize)(const struct AddonInstance_PVR*, int*); | ||
| 315 | |||
| 316 | //--==----==----==----==----==----==----==----==----==----==----==----==----== | ||
| 317 | // New functions becomes added below and can be on another API change (where | ||
| 318 | // breaks min API version) moved up. | ||
| 319 | } KodiToAddonFuncTable_PVR; | ||
| 320 | |||
| 321 | typedef struct AddonInstance_PVR | ||
| 322 | { | ||
| 323 | struct AddonProperties_PVR* props; | ||
| 324 | struct AddonToKodiFuncTable_PVR* toKodi; | ||
| 325 | struct KodiToAddonFuncTable_PVR* toAddon; | ||
| 326 | } AddonInstance_PVR; | ||
| 327 | |||
| 328 | #ifdef __cplusplus | ||
| 329 | } | ||
| 330 | #endif /* __cplusplus */ | ||
| 331 | |||
| 332 | #endif /* !C_API_ADDONINSTANCE_PVR_H */ | ||
diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/pvr/CMakeLists.txt b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/pvr/CMakeLists.txt new file mode 100644 index 0000000..0e37ea4 --- /dev/null +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/pvr/CMakeLists.txt | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | set(HEADERS pvr_channel_groups.h | ||
| 2 | pvr_channels.h | ||
| 3 | pvr_defines.h | ||
| 4 | pvr_edl.h | ||
| 5 | pvr_epg.h | ||
| 6 | pvr_general.h | ||
| 7 | pvr_menu_hook.h | ||
| 8 | pvr_recordings.h | ||
| 9 | pvr_stream.h | ||
| 10 | pvr_timers.h) | ||
| 11 | |||
| 12 | if(NOT ENABLE_STATIC_LIBS) | ||
| 13 | core_add_library(addons_kodi-dev-kit_include_kodi_c-api_addon-instance_pvr) | ||
| 14 | endif() | ||
diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_channel_groups.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_channel_groups.h new file mode 100644 index 0000000..a24d27f --- /dev/null +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_channel_groups.h | |||
| @@ -0,0 +1,59 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2005-2018 Team Kodi | ||
| 3 | * This file is part of Kodi - https://kodi.tv | ||
| 4 | * | ||
| 5 | * SPDX-License-Identifier: GPL-2.0-or-later | ||
| 6 | * See LICENSES/README.md for more information. | ||
| 7 | */ | ||
| 8 | |||
| 9 | #pragma once | ||
| 10 | |||
| 11 | #ifndef C_API_ADDONINSTANCE_PVR_CHANNEL_GROUPS_H | ||
| 12 | #define C_API_ADDONINSTANCE_PVR_CHANNEL_GROUPS_H | ||
| 13 | |||
| 14 | #include "pvr_defines.h" | ||
| 15 | |||
| 16 | #include <stdbool.h> | ||
| 17 | |||
| 18 | //¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ | ||
| 19 | // "C" Definitions group 3 - PVR channel group | ||
| 20 | #ifdef __cplusplus | ||
| 21 | extern "C" | ||
| 22 | { | ||
| 23 | #endif /* __cplusplus */ | ||
| 24 | |||
| 25 | /*! | ||
| 26 | * @brief "C" PVR add-on channel group. | ||
| 27 | * | ||
| 28 | * Structure used to interface in "C" between Kodi and Addon. | ||
| 29 | * | ||
| 30 | * See @ref kodi::addon::PVRChannelGroup for description of values. | ||
| 31 | */ | ||
| 32 | typedef struct PVR_CHANNEL_GROUP | ||
| 33 | { | ||
| 34 | char strGroupName[PVR_ADDON_NAME_STRING_LENGTH]; | ||
| 35 | bool bIsRadio; | ||
| 36 | unsigned int iPosition; | ||
| 37 | } PVR_CHANNEL_GROUP; | ||
| 38 | |||
| 39 | /*! | ||
| 40 | * @brief "C" PVR add-on channel group member. | ||
| 41 | * | ||
| 42 | * Structure used to interface in "C" between Kodi and Addon. | ||
| 43 | * | ||
| 44 | * See @ref kodi::addon::PVRChannelGroupMember for description of values. | ||
| 45 | */ | ||
| 46 | typedef struct PVR_CHANNEL_GROUP_MEMBER | ||
| 47 | { | ||
| 48 | char strGroupName[PVR_ADDON_NAME_STRING_LENGTH]; | ||
| 49 | unsigned int iChannelUniqueId; | ||
| 50 | unsigned int iChannelNumber; | ||
| 51 | unsigned int iSubChannelNumber; | ||
| 52 | int iOrder; | ||
| 53 | } PVR_CHANNEL_GROUP_MEMBER; | ||
| 54 | |||
| 55 | #ifdef __cplusplus | ||
| 56 | } | ||
| 57 | #endif /* __cplusplus */ | ||
| 58 | |||
| 59 | #endif /* !C_API_ADDONINSTANCE_PVR_CHANNEL_GROUPS_H */ | ||
diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_channels.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_channels.h new file mode 100644 index 0000000..00daffa --- /dev/null +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_channels.h | |||
| @@ -0,0 +1,109 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2005-2018 Team Kodi | ||
| 3 | * This file is part of Kodi - https://kodi.tv | ||
| 4 | * | ||
| 5 | * SPDX-License-Identifier: GPL-2.0-or-later | ||
| 6 | * See LICENSES/README.md for more information. | ||
| 7 | */ | ||
| 8 | |||
| 9 | #pragma once | ||
| 10 | |||
| 11 | #ifndef C_API_ADDONINSTANCE_PVR_CHANNELS_H | ||
| 12 | #define C_API_ADDONINSTANCE_PVR_CHANNELS_H | ||
| 13 | |||
| 14 | #include "pvr_defines.h" | ||
| 15 | |||
| 16 | #include <stdbool.h> | ||
| 17 | |||
| 18 | //¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ | ||
| 19 | // "C" Definitions group 2 - PVR channel | ||
| 20 | #ifdef __cplusplus | ||
| 21 | extern "C" | ||
| 22 | { | ||
| 23 | #endif /* __cplusplus */ | ||
| 24 | |||
| 25 | //============================================================================ | ||
| 26 | /// @ingroup cpp_kodi_addon_pvr_Defs_Channel | ||
| 27 | /// @brief Denotes that no channel uid is available. | ||
| 28 | /// | ||
| 29 | /// Special @ref kodi::addon::PVRTimer::SetClientChannelUid() and | ||
| 30 | /// @ref kodi::addon::PVRRecording::SetChannelUid() value to indicate that no | ||
| 31 | /// channel uid is available. | ||
| 32 | #define PVR_CHANNEL_INVALID_UID -1 | ||
| 33 | //---------------------------------------------------------------------------- | ||
| 34 | |||
| 35 | /*! | ||
| 36 | * @brief "C" PVR add-on channel. | ||
| 37 | * | ||
| 38 | * Structure used to interface in "C" between Kodi and Addon. | ||
| 39 | * | ||
| 40 | * See @ref kodi::addon::PVRChannel for description of values. | ||
| 41 | */ | ||
| 42 | typedef struct PVR_CHANNEL | ||
| 43 | { | ||
| 44 | unsigned int iUniqueId; | ||
| 45 | bool bIsRadio; | ||
| 46 | unsigned int iChannelNumber; | ||
| 47 | unsigned int iSubChannelNumber; | ||
| 48 | char strChannelName[PVR_ADDON_NAME_STRING_LENGTH]; | ||
| 49 | char strMimeType[PVR_ADDON_INPUT_FORMAT_STRING_LENGTH]; | ||
| 50 | unsigned int iEncryptionSystem; | ||
| 51 | char strIconPath[PVR_ADDON_URL_STRING_LENGTH]; | ||
| 52 | bool bIsHidden; | ||
| 53 | bool bHasArchive; | ||
| 54 | int iOrder; | ||
| 55 | } PVR_CHANNEL; | ||
| 56 | |||
| 57 | /*! | ||
| 58 | * @brief "C" PVR add-on signal status information. | ||
| 59 | * | ||
| 60 | * Structure used to interface in "C" between Kodi and Addon. | ||
| 61 | * | ||
| 62 | * See @ref kodi::addon::PVRSignalStatus for description of values. | ||
| 63 | */ | ||
| 64 | typedef struct PVR_SIGNAL_STATUS | ||
| 65 | { | ||
| 66 | char strAdapterName[PVR_ADDON_NAME_STRING_LENGTH]; | ||
| 67 | char strAdapterStatus[PVR_ADDON_NAME_STRING_LENGTH]; | ||
| 68 | char strServiceName[PVR_ADDON_NAME_STRING_LENGTH]; | ||
| 69 | char strProviderName[PVR_ADDON_NAME_STRING_LENGTH]; | ||
| 70 | char strMuxName[PVR_ADDON_NAME_STRING_LENGTH]; | ||
| 71 | int iSNR; | ||
| 72 | int iSignal; | ||
| 73 | long iBER; | ||
| 74 | long iUNC; | ||
| 75 | } PVR_SIGNAL_STATUS; | ||
| 76 | |||
| 77 | //============================================================================ | ||
| 78 | /// @ingroup cpp_kodi_addon_pvr_Defs_Channel_PVRDescrambleInfo | ||
| 79 | /// @brief Special @ref cpp_kodi_addon_pvr_Defs_Channel_PVRDescrambleInfo | ||
| 80 | /// value to indicate that a struct member's value is not available | ||
| 81 | /// | ||
| 82 | #define PVR_DESCRAMBLE_INFO_NOT_AVAILABLE -1 | ||
| 83 | //---------------------------------------------------------------------------- | ||
| 84 | |||
| 85 | /*! | ||
| 86 | * @brief "C" PVR add-on descramble information. | ||
| 87 | * | ||
| 88 | * Structure used to interface in "C" between Kodi and Addon. | ||
| 89 | * | ||
| 90 | * See @ref kodi::addon::PVRDescrambleInfo for description of values. | ||
| 91 | */ | ||
| 92 | typedef struct PVR_DESCRAMBLE_INFO | ||
| 93 | { | ||
| 94 | int iPid; | ||
| 95 | int iCaid; | ||
| 96 | int iProvid; | ||
| 97 | int iEcmTime; | ||
| 98 | int iHops; | ||
| 99 | char strCardSystem[PVR_ADDON_DESCRAMBLE_INFO_STRING_LENGTH]; | ||
| 100 | char strReader[PVR_ADDON_DESCRAMBLE_INFO_STRING_LENGTH]; | ||
| 101 | char strFrom[PVR_ADDON_DESCRAMBLE_INFO_STRING_LENGTH]; | ||
| 102 | char strProtocol[PVR_ADDON_DESCRAMBLE_INFO_STRING_LENGTH]; | ||
| 103 | } PVR_DESCRAMBLE_INFO; | ||
| 104 | |||
| 105 | #ifdef __cplusplus | ||
| 106 | } | ||
| 107 | #endif /* __cplusplus */ | ||
| 108 | |||
| 109 | #endif /* !C_API_ADDONINSTANCE_PVR_CHANNELS_H */ | ||
diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_defines.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_defines.h new file mode 100644 index 0000000..449000f --- /dev/null +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_defines.h | |||
| @@ -0,0 +1,66 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2005-2018 Team Kodi | ||
| 3 | * This file is part of Kodi - https://kodi.tv | ||
| 4 | * | ||
| 5 | * SPDX-License-Identifier: GPL-2.0-or-later | ||
| 6 | * See LICENSES/README.md for more information. | ||
| 7 | */ | ||
| 8 | |||
| 9 | #pragma once | ||
| 10 | |||
| 11 | #ifndef C_API_ADDONINSTANCE_PVR_DEFINES_H | ||
| 12 | #define C_API_ADDONINSTANCE_PVR_DEFINES_H | ||
| 13 | |||
| 14 | //¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ | ||
| 15 | // "C" Standard PVR definitions | ||
| 16 | // | ||
| 17 | // Values related to all parts and not used direct on addon, are to define here. | ||
| 18 | // | ||
| 19 | #ifdef __cplusplus | ||
| 20 | extern "C" | ||
| 21 | { | ||
| 22 | #endif /* __cplusplus */ | ||
| 23 | |||
| 24 | /*! | ||
| 25 | * @brief API array sizes which are used for data exchange between | ||
| 26 | * Kodi and addon. | ||
| 27 | */ | ||
| 28 | ///@{ | ||
| 29 | #define PVR_ADDON_NAME_STRING_LENGTH 1024 | ||
| 30 | #define PVR_ADDON_URL_STRING_LENGTH 1024 | ||
| 31 | #define PVR_ADDON_DESC_STRING_LENGTH 1024 | ||
| 32 | #define PVR_ADDON_INPUT_FORMAT_STRING_LENGTH 32 | ||
| 33 | #define PVR_ADDON_EDL_LENGTH 32 | ||
| 34 | #define PVR_ADDON_TIMERTYPE_ARRAY_SIZE 32 | ||
| 35 | #define PVR_ADDON_TIMERTYPE_VALUES_ARRAY_SIZE 512 | ||
| 36 | #define PVR_ADDON_TIMERTYPE_VALUES_ARRAY_SIZE_SMALL 128 | ||
| 37 | #define PVR_ADDON_TIMERTYPE_STRING_LENGTH 128 | ||
| 38 | #define PVR_ADDON_ATTRIBUTE_DESC_LENGTH 128 | ||
| 39 | #define PVR_ADDON_ATTRIBUTE_VALUES_ARRAY_SIZE 512 | ||
| 40 | #define PVR_ADDON_DESCRAMBLE_INFO_STRING_LENGTH 64 | ||
| 41 | #define PVR_ADDON_DATE_STRING_LENGTH 32 | ||
| 42 | ///@} | ||
| 43 | |||
| 44 | /*! | ||
| 45 | * @brief "C" Representation of a general attribute integer value. | ||
| 46 | */ | ||
| 47 | typedef struct PVR_ATTRIBUTE_INT_VALUE | ||
| 48 | { | ||
| 49 | int iValue; | ||
| 50 | char strDescription[PVR_ADDON_ATTRIBUTE_DESC_LENGTH]; | ||
| 51 | } PVR_ATTRIBUTE_INT_VALUE; | ||
| 52 | |||
| 53 | /*! | ||
| 54 | * @brief "C" Representation of a named value. | ||
| 55 | */ | ||
| 56 | typedef struct PVR_NAMED_VALUE | ||
| 57 | { | ||
| 58 | char strName[PVR_ADDON_NAME_STRING_LENGTH]; | ||
| 59 | char strValue[PVR_ADDON_NAME_STRING_LENGTH]; | ||
| 60 | } PVR_NAMED_VALUE; | ||
| 61 | |||
| 62 | #ifdef __cplusplus | ||
| 63 | } | ||
| 64 | #endif /* __cplusplus */ | ||
| 65 | |||
| 66 | #endif /* !C_API_ADDONINSTANCE_PVR_DEFINES_H */ | ||
diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_edl.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_edl.h new file mode 100644 index 0000000..e7cdf06 --- /dev/null +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_edl.h | |||
| @@ -0,0 +1,67 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2005-2018 Team Kodi | ||
| 3 | * This file is part of Kodi - https://kodi.tv | ||
| 4 | * | ||
| 5 | * SPDX-License-Identifier: GPL-2.0-or-later | ||
| 6 | * See LICENSES/README.md for more information. | ||
| 7 | */ | ||
| 8 | |||
| 9 | #pragma once | ||
| 10 | |||
| 11 | #ifndef C_API_ADDONINSTANCE_PVR_EDL_H | ||
| 12 | #define C_API_ADDONINSTANCE_PVR_EDL_H | ||
| 13 | |||
| 14 | #include "pvr_defines.h" | ||
| 15 | |||
| 16 | #include <stdint.h> | ||
| 17 | |||
| 18 | //¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ | ||
| 19 | // "C" Definitions group 8 - PVR Edit definition list (EDL) | ||
| 20 | #ifdef __cplusplus | ||
| 21 | extern "C" | ||
| 22 | { | ||
| 23 | #endif /* __cplusplus */ | ||
| 24 | |||
| 25 | //============================================================================ | ||
| 26 | /// @defgroup cpp_kodi_addon_pvr_Defs_EDLEntry_PVR_EDL_TYPE enum PVR_EDL_TYPE | ||
| 27 | /// @ingroup cpp_kodi_addon_pvr_Defs_EDLEntry | ||
| 28 | /// @brief **Edit definition list types**\n | ||
| 29 | /// Possible type values for @ref cpp_kodi_addon_pvr_Defs_EDLEntry_PVREDLEntry. | ||
| 30 | /// | ||
| 31 | ///@{ | ||
| 32 | typedef enum PVR_EDL_TYPE | ||
| 33 | { | ||
| 34 | /// @brief __0__ : cut (completely remove content) | ||
| 35 | PVR_EDL_TYPE_CUT = 0, | ||
| 36 | |||
| 37 | /// @brief __1__ : mute audio | ||
| 38 | PVR_EDL_TYPE_MUTE = 1, | ||
| 39 | |||
| 40 | /// @brief __2__ : scene markers (chapter seeking) | ||
| 41 | PVR_EDL_TYPE_SCENE = 2, | ||
| 42 | |||
| 43 | /// @brief __3__ : commercial breaks | ||
| 44 | PVR_EDL_TYPE_COMBREAK = 3 | ||
| 45 | } PVR_EDL_TYPE; | ||
| 46 | ///@} | ||
| 47 | //---------------------------------------------------------------------------- | ||
| 48 | |||
| 49 | /*! | ||
| 50 | * @brief "C" Edit definition list entry. | ||
| 51 | * | ||
| 52 | * Structure used to interface in "C" between Kodi and Addon. | ||
| 53 | * | ||
| 54 | * See @ref kodi::addon::PVREDLEntry for description of values. | ||
| 55 | */ | ||
| 56 | typedef struct PVR_EDL_ENTRY | ||
| 57 | { | ||
| 58 | int64_t start; | ||
| 59 | int64_t end; | ||
| 60 | enum PVR_EDL_TYPE type; | ||
| 61 | } PVR_EDL_ENTRY; | ||
| 62 | |||
| 63 | #ifdef __cplusplus | ||
| 64 | } | ||
| 65 | #endif /* __cplusplus */ | ||
| 66 | |||
| 67 | #endif /* !C_API_ADDONINSTANCE_PVR_EDL_H */ | ||
diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_epg.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_epg.h new file mode 100644 index 0000000..d7512dc --- /dev/null +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_epg.h | |||
| @@ -0,0 +1,658 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2005-2018 Team Kodi | ||
| 3 | * This file is part of Kodi - https://kodi.tv | ||
| 4 | * | ||
| 5 | * SPDX-License-Identifier: GPL-2.0-or-later | ||
| 6 | * See LICENSES/README.md for more information. | ||
| 7 | */ | ||
| 8 | |||
| 9 | #pragma once | ||
| 10 | |||
| 11 | #ifndef C_API_ADDONINSTANCE_PVR_EPG_H | ||
| 12 | #define C_API_ADDONINSTANCE_PVR_EPG_H | ||
| 13 | |||
| 14 | #include "pvr_defines.h" | ||
| 15 | |||
| 16 | #include <time.h> | ||
| 17 | |||
| 18 | //¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ | ||
| 19 | // "C" Definitions group 4 - PVR EPG | ||
| 20 | #ifdef __cplusplus | ||
| 21 | extern "C" | ||
| 22 | { | ||
| 23 | #endif /* __cplusplus */ | ||
| 24 | |||
| 25 | //============================================================================ | ||
| 26 | /// @defgroup cpp_kodi_addon_pvr_Defs_epg_EPG_EVENT enum EPG_EVENT_CONTENTMASK (and sub types) | ||
| 27 | /// @ingroup cpp_kodi_addon_pvr_Defs_epg | ||
| 28 | /// @brief **EPG entry content event types.**\n | ||
| 29 | /// These ID's come from the DVB-SI EIT table "content descriptor" | ||
| 30 | /// Also known under the name "E-book genre assignments". | ||
| 31 | /// | ||
| 32 | /// See [ETSI EN 300 468 V1.14.1 (2014-05)](https://www.etsi.org/deliver/etsi_en/300400_300499/300468/01.14.01_60/en_300468v011401p.pdf) | ||
| 33 | /// about. | ||
| 34 | /// | ||
| 35 | /// Values used by this functions: | ||
| 36 | /// - @ref kodi::addon::PVREPGTag::SetGenreType() | ||
| 37 | /// - @ref kodi::addon::PVREPGTag::SetGenreSubType() | ||
| 38 | /// - @ref kodi::addon::PVRRecording::SetGenreType() | ||
| 39 | /// - @ref kodi::addon::PVRRecording::SetGenreSubType() | ||
| 40 | /// | ||
| 41 | /// Following types are listed here: | ||
| 42 | /// | emum Type | Description | ||
| 43 | /// |-----------|-------------------- | ||
| 44 | /// | @ref EPG_EVENT_CONTENTMASK | EPG entry main content to use. | ||
| 45 | /// | @ref EPG_EVENT_CONTENTSUBMASK_MOVIEDRAMA | EPG entry sub content to @ref EPG_EVENT_CONTENTMASK_MOVIEDRAMA event types for sub type of <b>"Movie/Drama"</b>. | ||
| 46 | /// | @ref EPG_EVENT_CONTENTSUBMASK_NEWSCURRENTAFFAIRS | EPG entry sub content to @ref EPG_EVENT_CONTENTMASK_NEWSCURRENTAFFAIRS event types for sub type of <b>"News/Current affairs"</b>. | ||
| 47 | /// | @ref EPG_EVENT_CONTENTSUBMASK_SHOW | EPG entry sub content to @ref EPG_EVENT_CONTENTMASK_SHOW event types for sub type of <b>"Show/Game show"</b>. | ||
| 48 | /// | @ref EPG_EVENT_CONTENTSUBMASK_SPORTS | @brief EPG entry sub content to @ref EPG_EVENT_CONTENTMASK_SPORTS event types for sub type of <b>"Sports"</b>. | ||
| 49 | /// | @ref EPG_EVENT_CONTENTSUBMASK_CHILDRENYOUTH | EPG entry sub content to @ref EPG_EVENT_CONTENTMASK_CHILDRENYOUTH event types for sub type of <b>"Children's/Youth programmes"</b>. | ||
| 50 | /// | @ref EPG_EVENT_CONTENTSUBMASK_MUSICBALLETDANCE | EPG entry sub content to @ref EPG_EVENT_CONTENTMASK_MUSICBALLETDANCE event types for sub type of <b>"Music/Ballet/Dance"</b>. | ||
| 51 | /// | @ref EPG_EVENT_CONTENTSUBMASK_ARTSCULTURE | EPG entry sub content to @ref EPG_EVENT_CONTENTMASK_ARTSCULTURE event types for sub type of <b>"Arts/Culture (without music)"</b>. | ||
| 52 | /// | @ref EPG_EVENT_CONTENTSUBMASK_SOCIALPOLITICALECONOMICS | EPG entry sub content to @ref EPG_EVENT_CONTENTMASK_SOCIALPOLITICALECONOMICS event types for sub type of <b>"Social/Political issues/Economics"</b>. | ||
| 53 | /// | @ref EPG_EVENT_CONTENTSUBMASK_EDUCATIONALSCIENCE | EPG entry sub content to @ref EPG_EVENT_CONTENTMASK_EDUCATIONALSCIENCE event types for sub type of <b>"Education/Science/Factual topics"</b>. | ||
| 54 | /// | @ref EPG_EVENT_CONTENTSUBMASK_LEISUREHOBBIES | EPG entry sub content to @ref EPG_EVENT_CONTENTMASK_LEISUREHOBBIES event types for sub type of <b>"Leisure hobbies"</b>. | ||
| 55 | /// | @ref EPG_EVENT_CONTENTSUBMASK_SPECIAL | EPG entry sub content to @ref EPG_EVENT_CONTENTMASK_SPECIAL event types for sub type of <b>"Special characteristics"</b>. | ||
| 56 | ///@{ | ||
| 57 | |||
| 58 | //============================================================================ | ||
| 59 | /// @ingroup cpp_kodi_addon_pvr_Defs_epg_EPG_EVENT | ||
| 60 | /// @brief EPG entry main content to use. | ||
| 61 | /// | ||
| 62 | ///@{ | ||
| 63 | typedef enum EPG_EVENT_CONTENTMASK | ||
| 64 | { | ||
| 65 | /// @brief __0x00__ : Undefined content mask entry. | ||
| 66 | EPG_EVENT_CONTENTMASK_UNDEFINED = 0x00, | ||
| 67 | |||
| 68 | /// @brief __0x10__ : Movie/Drama.\n | ||
| 69 | /// \n | ||
| 70 | /// See @ref EPG_EVENT_CONTENTSUBMASK_MOVIEDRAMA about related sub types. | ||
| 71 | EPG_EVENT_CONTENTMASK_MOVIEDRAMA = 0x10, | ||
| 72 | |||
| 73 | /// @brief __0x20__ : News/Current affairs.\n | ||
| 74 | /// \n | ||
| 75 | /// See @ref EPG_EVENT_CONTENTSUBMASK_NEWSCURRENTAFFAIRS about related sub types. | ||
| 76 | EPG_EVENT_CONTENTMASK_NEWSCURRENTAFFAIRS = 0x20, | ||
| 77 | |||
| 78 | /// @brief __0x30__ : Show/Game show.\n | ||
| 79 | /// \n | ||
| 80 | /// See @ref EPG_EVENT_CONTENTSUBMASK_SHOW about related sub types. | ||
| 81 | EPG_EVENT_CONTENTMASK_SHOW = 0x30, | ||
| 82 | |||
| 83 | /// @brief __0x40__ : Sports.\n | ||
| 84 | /// \n | ||
| 85 | /// See @ref EPG_EVENT_CONTENTSUBMASK_SPORTS about related sub types. | ||
| 86 | EPG_EVENT_CONTENTMASK_SPORTS = 0x40, | ||
| 87 | |||
| 88 | /// @brief __0x50__ : Children's/Youth programmes.\n | ||
| 89 | /// \n | ||
| 90 | /// See @ref EPG_EVENT_CONTENTSUBMASK_CHILDRENYOUTH about related sub types. | ||
| 91 | EPG_EVENT_CONTENTMASK_CHILDRENYOUTH = 0x50, | ||
| 92 | |||
| 93 | /// @brief __0x60__ : Music/Ballet/Dance.\n | ||
| 94 | /// \n | ||
| 95 | /// See @ref EPG_EVENT_CONTENTSUBMASK_MUSICBALLETDANCE about related sub types. | ||
| 96 | EPG_EVENT_CONTENTMASK_MUSICBALLETDANCE = 0x60, | ||
| 97 | |||
| 98 | /// @brief __0x70__ : Arts/Culture (without music).\n | ||
| 99 | /// \n | ||
| 100 | /// See @ref EPG_EVENT_CONTENTSUBMASK_ARTSCULTURE about related sub types. | ||
| 101 | EPG_EVENT_CONTENTMASK_ARTSCULTURE = 0x70, | ||
| 102 | |||
| 103 | /// @brief __0x80__ : Social/Political issues/Economics.\n | ||
| 104 | /// \n | ||
| 105 | /// See @ref EPG_EVENT_CONTENTSUBMASK_SOCIALPOLITICALECONOMICS about related sub types. | ||
| 106 | EPG_EVENT_CONTENTMASK_SOCIALPOLITICALECONOMICS = 0x80, | ||
| 107 | |||
| 108 | /// @brief __0x90__ : Education/Science/Factual topics.\n | ||
| 109 | /// \n | ||
| 110 | /// See @ref EPG_EVENT_CONTENTSUBMASK_EDUCATIONALSCIENCE about related sub types. | ||
| 111 | EPG_EVENT_CONTENTMASK_EDUCATIONALSCIENCE = 0x90, | ||
| 112 | |||
| 113 | /// @brief __0xA0__ : Leisure hobbies.\n | ||
| 114 | /// \n | ||
| 115 | /// See @ref EPG_EVENT_CONTENTSUBMASK_LEISUREHOBBIES about related sub types. | ||
| 116 | EPG_EVENT_CONTENTMASK_LEISUREHOBBIES = 0xA0, | ||
| 117 | |||
| 118 | /// @brief __0xB0__ : Special characteristics.\n | ||
| 119 | /// \n | ||
| 120 | /// See @ref EPG_EVENT_CONTENTSUBMASK_SPECIAL about related sub types. | ||
| 121 | EPG_EVENT_CONTENTMASK_SPECIAL = 0xB0, | ||
| 122 | |||
| 123 | /// @brief __0xF0__ User defined. | ||
| 124 | EPG_EVENT_CONTENTMASK_USERDEFINED = 0xF0, | ||
| 125 | |||
| 126 | /// @brief Used to override standard genre types with a own name about.\n | ||
| 127 | /// \n | ||
| 128 | /// Set to this value @ref EPG_GENRE_USE_STRING on following places: | ||
| 129 | /// - @ref kodi::addon::PVREPGTag::SetGenreType() | ||
| 130 | /// - @ref kodi::addon::PVREPGTag::SetGenreSubType() | ||
| 131 | /// - @ref kodi::addon::PVRRecording::SetGenreType() | ||
| 132 | /// - @ref kodi::addon::PVRRecording::SetGenreSubType() | ||
| 133 | /// | ||
| 134 | /// @warning Value here is not a [ETSI EN 300 468 V1.14.1 (2014-05)](https://www.etsi.org/deliver/etsi_en/300400_300499/300468/01.14.01_60/en_300468v011401p.pdf) | ||
| 135 | /// conform. | ||
| 136 | /// | ||
| 137 | /// @note This is a own Kodi definition to set that genre is given by own | ||
| 138 | /// string. Used on @ref kodi::addon::PVREPGTag::SetGenreDescription() and | ||
| 139 | /// @ref kodi::addon::PVRRecording::SetGenreDescription() | ||
| 140 | EPG_GENRE_USE_STRING = 0x100 | ||
| 141 | } EPG_EVENT_CONTENTMASK; | ||
| 142 | ///@} | ||
| 143 | //---------------------------------------------------------------------------- | ||
| 144 | |||
| 145 | //============================================================================ | ||
| 146 | /// @ingroup cpp_kodi_addon_pvr_Defs_epg_EPG_EVENT | ||
| 147 | /// @brief EPG entry sub content to @ref EPG_EVENT_CONTENTMASK_MOVIEDRAMA event | ||
| 148 | /// types for sub type of <b>"Movie/Drama"</b>. | ||
| 149 | /// | ||
| 150 | ///@{ | ||
| 151 | typedef enum EPG_EVENT_CONTENTSUBMASK_MOVIEDRAMA | ||
| 152 | { | ||
| 153 | /// @brief __0x0__ : Movie/drama (general). | ||
| 154 | EPG_EVENT_CONTENTSUBMASK_MOVIEDRAMA_GENERAL = 0x0, | ||
| 155 | |||
| 156 | /// @brief __0x1__ : Detective/thriller. | ||
| 157 | EPG_EVENT_CONTENTSUBMASK_MOVIEDRAMA_DETECTIVE_THRILLER = 0x1, | ||
| 158 | |||
| 159 | /// @brief __0x2__ : Adventure/western/war. | ||
| 160 | EPG_EVENT_CONTENTSUBMASK_MOVIEDRAMA_ADVENTURE_WESTERN_WAR = 0x2, | ||
| 161 | |||
| 162 | /// @brief __0x3__ : Science fiction/fantasy/horror. | ||
| 163 | EPG_EVENT_CONTENTSUBMASK_MOVIEDRAMA_SCIENCEFICTION_FANTASY_HORROR = 0x3, | ||
| 164 | |||
| 165 | /// @brief __0x4__ : Comedy. | ||
| 166 | EPG_EVENT_CONTENTSUBMASK_MOVIEDRAMA_COMEDY = 0x4, | ||
| 167 | |||
| 168 | /// @brief __0x5__ : Soap/melodrama/folkloric. | ||
| 169 | EPG_EVENT_CONTENTSUBMASK_MOVIEDRAMA_SOAP_MELODRAMA_FOLKLORIC = 0x5, | ||
| 170 | |||
| 171 | /// @brief __0x6__ : Romance. | ||
| 172 | EPG_EVENT_CONTENTSUBMASK_MOVIEDRAMA_ROMANCE = 0x6, | ||
| 173 | |||
| 174 | /// @brief __0x7__ : Serious/classical/religious/historical movie/drama. | ||
| 175 | EPG_EVENT_CONTENTSUBMASK_MOVIEDRAMA_SERIOUS_CLASSICAL_RELIGIOUS_HISTORICAL = 0x7, | ||
| 176 | |||
| 177 | /// @brief __0x8__ : Adult movie/drama. | ||
| 178 | EPG_EVENT_CONTENTSUBMASK_MOVIEDRAMA_ADULT = 0x8, | ||
| 179 | |||
| 180 | /// @brief __0xF__ : User defined. | ||
| 181 | EPG_EVENT_CONTENTSUBMASK_MOVIEDRAMA_USERDEFINED = 0xF | ||
| 182 | } EPG_EVENT_CONTENTSUBMASK_MOVIEDRAMA; | ||
| 183 | ///@} | ||
| 184 | //---------------------------------------------------------------------------- | ||
| 185 | |||
| 186 | //============================================================================ | ||
| 187 | /// @ingroup cpp_kodi_addon_pvr_Defs_epg_EPG_EVENT | ||
| 188 | /// @brief EPG entry sub content to @ref EPG_EVENT_CONTENTMASK_NEWSCURRENTAFFAIRS event | ||
| 189 | /// types for sub type of <b>"News/Current affairs"</b>. | ||
| 190 | /// | ||
| 191 | typedef enum EPG_EVENT_CONTENTSUBMASK_NEWSCURRENTAFFAIRS | ||
| 192 | { | ||
| 193 | /// @brief __0x0__ : News/current affairs (general). | ||
| 194 | EPG_EVENT_CONTENTSUBMASK_NEWSCURRENTAFFAIRS_GENERAL = 0x0, | ||
| 195 | |||
| 196 | /// @brief __0x1__ : News/weather report. | ||
| 197 | EPG_EVENT_CONTENTSUBMASK_NEWSCURRENTAFFAIRS_WEATHER = 0x1, | ||
| 198 | |||
| 199 | /// @brief __0x2__ : News magazine. | ||
| 200 | EPG_EVENT_CONTENTSUBMASK_NEWSCURRENTAFFAIRS_MAGAZINE = 0x2, | ||
| 201 | |||
| 202 | /// @brief __0x3__ : Documentary. | ||
| 203 | EPG_EVENT_CONTENTSUBMASK_NEWSCURRENTAFFAIRS_DOCUMENTARY = 0x3, | ||
| 204 | |||
| 205 | /// @brief __0x4__ : Discussion/interview/debate | ||
| 206 | EPG_EVENT_CONTENTSUBMASK_NEWSCURRENTAFFAIRS_DISCUSSION_INTERVIEW_DEBATE = 0x4, | ||
| 207 | |||
| 208 | /// @brief __0xF__ : User defined. | ||
| 209 | EPG_EVENT_CONTENTSUBMASK_NEWSCURRENTAFFAIRS_USERDEFINED = 0xF | ||
| 210 | } EPG_EVENT_CONTENTSUBMASK_NEWSCURRENTAFFAIRS; | ||
| 211 | //---------------------------------------------------------------------------- | ||
| 212 | |||
| 213 | //============================================================================ | ||
| 214 | /// @ingroup cpp_kodi_addon_pvr_Defs_epg_EPG_EVENT | ||
| 215 | /// @brief EPG entry sub content to @ref EPG_EVENT_CONTENTMASK_SHOW event | ||
| 216 | /// types for sub type of <b>"Show/Game show"</b>. | ||
| 217 | /// | ||
| 218 | typedef enum EPG_EVENT_CONTENTSUBMASK_SHOW | ||
| 219 | { | ||
| 220 | /// @brief __0x0__ : Show/game show (general). | ||
| 221 | EPG_EVENT_CONTENTSUBMASK_SHOW_GENERAL = 0x0, | ||
| 222 | |||
| 223 | /// @brief __0x1__ : Game show/quiz/contest. | ||
| 224 | EPG_EVENT_CONTENTSUBMASK_SHOW_GAMESHOW_QUIZ_CONTEST = 0x1, | ||
| 225 | |||
| 226 | /// @brief __0x2__ : Variety show. | ||
| 227 | EPG_EVENT_CONTENTSUBMASK_SHOW_VARIETY_SHOW = 0x2, | ||
| 228 | |||
| 229 | /// @brief __0x3__ : Talk show. | ||
| 230 | EPG_EVENT_CONTENTSUBMASK_SHOW_TALK_SHOW = 0x3, | ||
| 231 | |||
| 232 | /// @brief __0xF__ : User defined. | ||
| 233 | EPG_EVENT_CONTENTSUBMASK_SHOW_USERDEFINED = 0xF | ||
| 234 | } EPG_EVENT_CONTENTSUBMASK_SHOW; | ||
| 235 | //---------------------------------------------------------------------------- | ||
| 236 | |||
| 237 | //============================================================================ | ||
| 238 | /// @ingroup cpp_kodi_addon_pvr_Defs_epg_EPG_EVENT | ||
| 239 | /// @brief EPG entry sub content to @ref EPG_EVENT_CONTENTMASK_SPORTS event | ||
| 240 | /// types for sub type of <b>"Sports"</b>. | ||
| 241 | /// | ||
| 242 | typedef enum EPG_EVENT_CONTENTSUBMASK_SPORTS | ||
| 243 | { | ||
| 244 | /// @brief __0x0__ : Sports (general). | ||
| 245 | EPG_EVENT_CONTENTSUBMASK_SPORTS_GENERAL = 0x0, | ||
| 246 | |||
| 247 | /// @brief __0x1__ : Special events (Olympic Games, World Cup, etc.). | ||
| 248 | EPG_EVENT_CONTENTSUBMASK_SPORTS_OLYMPICGAMES_WORLDCUP = 0x1, | ||
| 249 | |||
| 250 | /// @brief __0x2__ : Sports magazines. | ||
| 251 | EPG_EVENT_CONTENTSUBMASK_SPORTS_SPORTS_MAGAZINES = 0x2, | ||
| 252 | |||
| 253 | /// @brief __0x3__ : Football/soccer. | ||
| 254 | EPG_EVENT_CONTENTSUBMASK_SPORTS_FOOTBALL_SOCCER = 0x3, | ||
| 255 | |||
| 256 | /// @brief __0x4__ : Tennis/squash. | ||
| 257 | EPG_EVENT_CONTENTSUBMASK_SPORTS_TENNIS_SQUASH = 0x4, | ||
| 258 | |||
| 259 | /// @brief __0x5__ : Team sports (excluding football). | ||
| 260 | EPG_EVENT_CONTENTSUBMASK_SPORTS_TEAMSPORTS = 0x5, | ||
| 261 | |||
| 262 | /// @brief __0x6__ : Athletics. | ||
| 263 | EPG_EVENT_CONTENTSUBMASK_SPORTS_ATHLETICS = 0x6, | ||
| 264 | |||
| 265 | /// @brief __0x7__ : Motor sport. | ||
| 266 | EPG_EVENT_CONTENTSUBMASK_SPORTS_MOTORSPORT = 0x7, | ||
| 267 | |||
| 268 | /// @brief __0x8__ : Water sport. | ||
| 269 | EPG_EVENT_CONTENTSUBMASK_SPORTS_WATERSPORT = 0x8, | ||
| 270 | |||
| 271 | /// @brief __0x9__ : Winter sports. | ||
| 272 | EPG_EVENT_CONTENTSUBMASK_SPORTS_WINTERSPORTS = 0x9, | ||
| 273 | |||
| 274 | /// @brief __0xA__ : Equestrian. | ||
| 275 | EPG_EVENT_CONTENTSUBMASK_SPORTS_EQUESTRIAN = 0xA, | ||
| 276 | |||
| 277 | /// @brief __0xB__ : Martial sports. | ||
| 278 | EPG_EVENT_CONTENTSUBMASK_SPORTS_MARTIALSPORTS = 0xB, | ||
| 279 | |||
| 280 | /// @brief __0xF__ : User defined. | ||
| 281 | EPG_EVENT_CONTENTSUBMASK_SPORTS_USERDEFINED = 0xF | ||
| 282 | } EPG_EVENT_CONTENTSUBMASK_SPORTS; | ||
| 283 | //---------------------------------------------------------------------------- | ||
| 284 | |||
| 285 | //============================================================================ | ||
| 286 | /// @ingroup cpp_kodi_addon_pvr_Defs_epg_EPG_EVENT | ||
| 287 | /// @brief EPG entry sub content to @ref EPG_EVENT_CONTENTMASK_CHILDRENYOUTH event | ||
| 288 | /// types for sub type of <b>"Children's/Youth programmes"</b>. | ||
| 289 | /// | ||
| 290 | typedef enum EPG_EVENT_CONTENTSUBMASK_CHILDRENYOUTH | ||
| 291 | { | ||
| 292 | /// @brief __0x0__ : Children's/youth programmes (general). | ||
| 293 | EPG_EVENT_CONTENTSUBMASK_CHILDRENYOUTH_GENERAL = 0x0, | ||
| 294 | |||
| 295 | /// @brief __0x1__ : Pre-school children's programmes. | ||
| 296 | EPG_EVENT_CONTENTSUBMASK_CHILDRENYOUTH_PRESCHOOL_CHILDREN = 0x1, | ||
| 297 | |||
| 298 | /// @brief __0x2__ : Entertainment programmes for 6 to 14. | ||
| 299 | EPG_EVENT_CONTENTSUBMASK_CHILDRENYOUTH_ENTERTAIN_6TO14 = 0x2, | ||
| 300 | |||
| 301 | /// @brief __0x3__ : Entertainment programmes for 10 to 16. | ||
| 302 | EPG_EVENT_CONTENTSUBMASK_CHILDRENYOUTH_ENTERTAIN_10TO16 = 0x3, | ||
| 303 | |||
| 304 | /// @brief __0x4__ : Informational/educational/school programmes. | ||
| 305 | EPG_EVENT_CONTENTSUBMASK_CHILDRENYOUTH_INFORMATIONAL_EDUCATIONAL_SCHOOL = 0x4, | ||
| 306 | |||
| 307 | /// @brief __0x5__ : Cartoons/puppets. | ||
| 308 | EPG_EVENT_CONTENTSUBMASK_CHILDRENYOUTH_CARTOONS_PUPPETS = 0x5, | ||
| 309 | |||
| 310 | /// @brief __0xF__ : User defined. | ||
| 311 | EPG_EVENT_CONTENTSUBMASK_CHILDRENYOUTH_USERDEFINED = 0xF | ||
| 312 | } EPG_EVENT_CONTENTSUBMASK_CHILDRENYOUTH; | ||
| 313 | //---------------------------------------------------------------------------- | ||
| 314 | |||
| 315 | //============================================================================ | ||
| 316 | /// @ingroup cpp_kodi_addon_pvr_Defs_epg_EPG_EVENT | ||
| 317 | /// @brief EPG entry sub content to @ref EPG_EVENT_CONTENTMASK_MUSICBALLETDANCE event | ||
| 318 | /// types for sub type of <b>"Music/Ballet/Dance"</b>. | ||
| 319 | /// | ||
| 320 | typedef enum EPG_EVENT_CONTENTSUBMASK_MUSICBALLETDANCE | ||
| 321 | { | ||
| 322 | /// @brief __0x0__ : Music/ballet/dance (general). | ||
| 323 | EPG_EVENT_CONTENTSUBMASK_MUSICBALLETDANCE_GENERAL = 0x0, | ||
| 324 | |||
| 325 | /// @brief __0x1__ : Rock/pop. | ||
| 326 | EPG_EVENT_CONTENTSUBMASK_MUSICBALLETDANCE_ROCKPOP = 0x1, | ||
| 327 | |||
| 328 | /// @brief __0x2__ : Serious music/classical music. | ||
| 329 | EPG_EVENT_CONTENTSUBMASK_MUSICBALLETDANCE_SERIOUSMUSIC_CLASSICALMUSIC = 0x2, | ||
| 330 | |||
| 331 | /// @brief __0x3__ : Folk/traditional music. | ||
| 332 | EPG_EVENT_CONTENTSUBMASK_MUSICBALLETDANCE_FOLK_TRADITIONAL_MUSIC = 0x3, | ||
| 333 | |||
| 334 | /// @brief __0x4__ : Jazz. | ||
| 335 | EPG_EVENT_CONTENTSUBMASK_MUSICBALLETDANCE_JAZZ = 0x4, | ||
| 336 | |||
| 337 | /// @brief __0x5__ : Musical/opera. | ||
| 338 | EPG_EVENT_CONTENTSUBMASK_MUSICBALLETDANCE_MUSICAL_OPERA = 0x5, | ||
| 339 | |||
| 340 | /// @brief __0x6__ : Ballet. | ||
| 341 | EPG_EVENT_CONTENTSUBMASK_MUSICBALLETDANCE_BALLET = 0x6, | ||
| 342 | |||
| 343 | /// @brief __0xF__ : User defined. | ||
| 344 | EPG_EVENT_CONTENTSUBMASK_MUSICBALLETDANCE_USERDEFINED = 0xF | ||
| 345 | } EPG_EVENT_CONTENTSUBMASK_MUSICBALLETDANCE; | ||
| 346 | //---------------------------------------------------------------------------- | ||
| 347 | |||
| 348 | //============================================================================ | ||
| 349 | /// @ingroup cpp_kodi_addon_pvr_Defs_epg_EPG_EVENT | ||
| 350 | /// @brief EPG entry sub content to @ref EPG_EVENT_CONTENTMASK_ARTSCULTURE event | ||
| 351 | /// types for sub type of <b>"Arts/Culture (without music)"</b>. | ||
| 352 | /// | ||
| 353 | typedef enum EPG_EVENT_CONTENTSUBMASK_ARTSCULTURE | ||
| 354 | { | ||
| 355 | /// @brief __0x0__ : Arts/culture (without music, general). | ||
| 356 | EPG_EVENT_CONTENTSUBMASK_ARTSCULTURE_GENERAL = 0x0, | ||
| 357 | |||
| 358 | /// @brief __0x1__ : Performing arts. | ||
| 359 | EPG_EVENT_CONTENTSUBMASK_ARTSCULTURE_PERFORMINGARTS = 0x1, | ||
| 360 | |||
| 361 | /// @brief __0x2__ : Fine arts. | ||
| 362 | EPG_EVENT_CONTENTSUBMASK_ARTSCULTURE_FINEARTS = 0x2, | ||
| 363 | |||
| 364 | /// @brief __0x3__ : Religion. | ||
| 365 | EPG_EVENT_CONTENTSUBMASK_ARTSCULTURE_RELIGION = 0x3, | ||
| 366 | |||
| 367 | /// @brief __0x4__ : Popular culture/traditional arts. | ||
| 368 | EPG_EVENT_CONTENTSUBMASK_ARTSCULTURE_POPULARCULTURE_TRADITIONALARTS = 0x4, | ||
| 369 | |||
| 370 | /// @brief __0x5__ : Literature. | ||
| 371 | EPG_EVENT_CONTENTSUBMASK_ARTSCULTURE_LITERATURE = 0x5, | ||
| 372 | |||
| 373 | /// @brief __0x6__ : Film/cinema. | ||
| 374 | EPG_EVENT_CONTENTSUBMASK_ARTSCULTURE_FILM_CINEMA = 0x6, | ||
| 375 | |||
| 376 | /// @brief __0x7__ : Experimental film/video. | ||
| 377 | EPG_EVENT_CONTENTSUBMASK_ARTSCULTURE_EXPERIMENTALFILM_VIDEO = 0x7, | ||
| 378 | |||
| 379 | /// @brief __0x8__ : Broadcasting/press. | ||
| 380 | EPG_EVENT_CONTENTSUBMASK_ARTSCULTURE_BROADCASTING_PRESS = 0x8, | ||
| 381 | |||
| 382 | /// @brief __0x9__ : New media. | ||
| 383 | EPG_EVENT_CONTENTSUBMASK_ARTSCULTURE_NEWMEDIA = 0x9, | ||
| 384 | |||
| 385 | /// @brief __0xA__ : Arts/culture magazines. | ||
| 386 | EPG_EVENT_CONTENTSUBMASK_ARTSCULTURE_ARTS_CULTUREMAGAZINES = 0xA, | ||
| 387 | |||
| 388 | /// @brief __0xB__ : Fashion. | ||
| 389 | EPG_EVENT_CONTENTSUBMASK_ARTSCULTURE_FASHION = 0xB, | ||
| 390 | |||
| 391 | /// @brief __0xF__ : User defined. | ||
| 392 | EPG_EVENT_CONTENTSUBMASK_ARTSCULTURE_USERDEFINED = 0xF | ||
| 393 | } EPG_EVENT_CONTENTSUBMASK_ARTSCULTURE; | ||
| 394 | //---------------------------------------------------------------------------- | ||
| 395 | |||
| 396 | //============================================================================ | ||
| 397 | /// @ingroup cpp_kodi_addon_pvr_Defs_epg_EPG_EVENT | ||
| 398 | /// @brief EPG entry sub content to @ref EPG_EVENT_CONTENTMASK_SOCIALPOLITICALECONOMICS event | ||
| 399 | /// types for sub type of <b>"Social/Political issues/Economics"</b>. | ||
| 400 | /// | ||
| 401 | typedef enum EPG_EVENT_CONTENTSUBMASK_SOCIALPOLITICALECONOMICS | ||
| 402 | { | ||
| 403 | /// @brief __0x0__ : Social/political issues/economics (general). | ||
| 404 | EPG_EVENT_CONTENTSUBMASK_SOCIALPOLITICALECONOMICS_GENERAL = 0x0, | ||
| 405 | |||
| 406 | /// @brief __0x1__ : Magazines/reports/documentary. | ||
| 407 | EPG_EVENT_CONTENTSUBMASK_SOCIALPOLITICALECONOMICS_MAGAZINES_REPORTS_DOCUMENTARY = 0x1, | ||
| 408 | |||
| 409 | /// @brief __0x2__ : Economics/social advisory. | ||
| 410 | EPG_EVENT_CONTENTSUBMASK_SOCIALPOLITICALECONOMICS_ECONOMICS_SOCIALADVISORY = 0x2, | ||
| 411 | |||
| 412 | /// @brief __0x3__ : Remarkable people. | ||
| 413 | EPG_EVENT_CONTENTSUBMASK_SOCIALPOLITICALECONOMICS_REMARKABLEPEOPLE = 0x3, | ||
| 414 | |||
| 415 | /// @brief __0xF__ : User defined. | ||
| 416 | EPG_EVENT_CONTENTSUBMASK_SOCIALPOLITICALECONOMICS_USERDEFINED = 0xF | ||
| 417 | } EPG_EVENT_CONTENTSUBMASK_SOCIALPOLITICALECONOMICS; | ||
| 418 | //---------------------------------------------------------------------------- | ||
| 419 | |||
| 420 | //============================================================================ | ||
| 421 | /// @ingroup cpp_kodi_addon_pvr_Defs_epg_EPG_EVENT | ||
| 422 | /// @brief EPG entry sub content to @ref EPG_EVENT_CONTENTMASK_EDUCATIONALSCIENCE event | ||
| 423 | /// types for sub type of <b>"Education/Science/Factual topics"</b>. | ||
| 424 | /// | ||
| 425 | typedef enum EPG_EVENT_CONTENTSUBMASK_EDUCATIONALSCIENCE | ||
| 426 | { | ||
| 427 | /// @brief __0x0__ : Education/science/factual topics (general). | ||
| 428 | EPG_EVENT_CONTENTSUBMASK_EDUCATIONALSCIENCE_GENERAL = 0x0, | ||
| 429 | |||
| 430 | /// @brief __0x1__ : Nature/animals/environment. | ||
| 431 | EPG_EVENT_CONTENTSUBMASK_EDUCATIONALSCIENCE_NATURE_ANIMALS_ENVIRONMENT = 0x1, | ||
| 432 | |||
| 433 | /// @brief __0x2__ : Technology/natural sciences. | ||
| 434 | EPG_EVENT_CONTENTSUBMASK_EDUCATIONALSCIENCE_TECHNOLOGY_NATURALSCIENCES = 0x2, | ||
| 435 | |||
| 436 | /// @brief __0x3__ : Medicine/physiology/psychology. | ||
| 437 | EPG_EVENT_CONTENTSUBMASK_EDUCATIONALSCIENCE_MEDICINE_PHYSIOLOGY_PSYCHOLOGY = 0x3, | ||
| 438 | |||
| 439 | /// @brief __0x4__ : Foreign countries/expeditions. | ||
| 440 | EPG_EVENT_CONTENTSUBMASK_EDUCATIONALSCIENCE_FOREIGNCOUNTRIES_EXPEDITIONS = 0x4, | ||
| 441 | |||
| 442 | /// @brief __0x5__ : Social/spiritual sciences. | ||
| 443 | EPG_EVENT_CONTENTSUBMASK_EDUCATIONALSCIENCE_SOCIAL_SPIRITUALSCIENCES = 0x5, | ||
| 444 | |||
| 445 | /// @brief __0x6__ : Further education. | ||
| 446 | EPG_EVENT_CONTENTSUBMASK_EDUCATIONALSCIENCE_FURTHEREDUCATION = 0x6, | ||
| 447 | |||
| 448 | /// @brief __0x7__ : Languages. | ||
| 449 | EPG_EVENT_CONTENTSUBMASK_EDUCATIONALSCIENCE_LANGUAGES = 0x7, | ||
| 450 | |||
| 451 | /// @brief __0xF__ : User defined. | ||
| 452 | EPG_EVENT_CONTENTSUBMASK_EDUCATIONALSCIENCE_USERDEFINED = 0xF | ||
| 453 | } EPG_EVENT_CONTENTSUBMASK_EDUCATIONALSCIENCE; | ||
| 454 | //---------------------------------------------------------------------------- | ||
| 455 | |||
| 456 | //============================================================================ | ||
| 457 | /// @ingroup cpp_kodi_addon_pvr_Defs_epg_EPG_EVENT | ||
| 458 | /// @brief EPG entry sub content to @ref EPG_EVENT_CONTENTMASK_LEISUREHOBBIES event | ||
| 459 | /// types for sub type of <b>"Leisure hobbies"</b>. | ||
| 460 | /// | ||
| 461 | typedef enum EPG_EVENT_CONTENTSUBMASK_LEISUREHOBBIES | ||
| 462 | { | ||
| 463 | /// @brief __0x0__ : Leisure hobbies (general) . | ||
| 464 | EPG_EVENT_CONTENTSUBMASK_LEISUREHOBBIES_GENERAL = 0x0, | ||
| 465 | |||
| 466 | /// @brief __0x1__ : Tourism/travel. | ||
| 467 | EPG_EVENT_CONTENTSUBMASK_LEISUREHOBBIES_TOURISM_TRAVEL = 0x1, | ||
| 468 | |||
| 469 | /// @brief __0x2__ : Handicraft. | ||
| 470 | EPG_EVENT_CONTENTSUBMASK_LEISUREHOBBIES_HANDICRAFT = 0x2, | ||
| 471 | |||
| 472 | /// @brief __0x3__ : Motoring. | ||
| 473 | EPG_EVENT_CONTENTSUBMASK_LEISUREHOBBIES_MOTORING = 0x3, | ||
| 474 | |||
| 475 | /// @brief __0x4__ : Fitness and health. | ||
| 476 | EPG_EVENT_CONTENTSUBMASK_LEISUREHOBBIES_FITNESSANDHEALTH = 0x4, | ||
| 477 | |||
| 478 | /// @brief __0x5__ : Cooking. | ||
| 479 | EPG_EVENT_CONTENTSUBMASK_LEISUREHOBBIES_COOKING = 0x5, | ||
| 480 | |||
| 481 | /// @brief __0x6__ : Advertisement/shopping. | ||
| 482 | EPG_EVENT_CONTENTSUBMASK_LEISUREHOBBIES_ADVERTISEMENT_SHOPPING = 0x6, | ||
| 483 | |||
| 484 | /// @brief __0x7__ : Gardening. | ||
| 485 | EPG_EVENT_CONTENTSUBMASK_LEISUREHOBBIES_GARDENING = 0x7, | ||
| 486 | |||
| 487 | /// @brief __0xF__ : User defined. | ||
| 488 | EPG_EVENT_CONTENTSUBMASK_LEISUREHOBBIES_USERDEFINED = 0xF | ||
| 489 | } EPG_EVENT_CONTENTSUBMASK_LEISUREHOBBIES; | ||
| 490 | //---------------------------------------------------------------------------- | ||
| 491 | |||
| 492 | //============================================================================ | ||
| 493 | /// @ingroup cpp_kodi_addon_pvr_Defs_epg_EPG_EVENT | ||
| 494 | /// @brief EPG entry sub content to @ref EPG_EVENT_CONTENTMASK_SPECIAL event | ||
| 495 | /// types for sub type of <b>"Special characteristics"</b>. | ||
| 496 | /// | ||
| 497 | typedef enum EPG_EVENT_CONTENTSUBMASK_SPECIAL | ||
| 498 | { | ||
| 499 | /// @brief __0x0__ : Special characteristics / Original language (general). | ||
| 500 | EPG_EVENT_CONTENTSUBMASK_SPECIAL_GENERAL = 0x0, | ||
| 501 | |||
| 502 | /// @brief __0x1__ : Black and white. | ||
| 503 | EPG_EVENT_CONTENTSUBMASK_SPECIAL_BLACKANDWHITE = 0x1, | ||
| 504 | |||
| 505 | /// @brief __0x2__ : Unpublished. | ||
| 506 | EPG_EVENT_CONTENTSUBMASK_SPECIAL_UNPUBLISHED = 0x2, | ||
| 507 | |||
| 508 | /// @brief __0x3__ : Live broadcast. | ||
| 509 | EPG_EVENT_CONTENTSUBMASK_SPECIAL_LIVEBROADCAST = 0x3, | ||
| 510 | |||
| 511 | /// @brief __0x4__ : Plano-stereoscopic. | ||
| 512 | EPG_EVENT_CONTENTSUBMASK_SPECIAL_PLANOSTEREOSCOPIC = 0x4, | ||
| 513 | |||
| 514 | /// @brief __0x5__ : Local or regional. | ||
| 515 | EPG_EVENT_CONTENTSUBMASK_SPECIAL_LOCALORREGIONAL = 0x5, | ||
| 516 | |||
| 517 | /// @brief __0xF__ : User defined. | ||
| 518 | EPG_EVENT_CONTENTSUBMASK_SPECIAL_USERDEFINED = 0xF | ||
| 519 | } EPG_EVENT_CONTENTSUBMASK_SPECIAL; | ||
| 520 | //---------------------------------------------------------------------------- | ||
| 521 | |||
| 522 | ///@} | ||
| 523 | |||
| 524 | //============================================================================ | ||
| 525 | /// @ingroup cpp_kodi_addon_pvr_Defs_epg | ||
| 526 | /// @brief Separator to use in strings containing different tokens, for example | ||
| 527 | /// writers, directors, actors of an event. | ||
| 528 | /// | ||
| 529 | #define EPG_STRING_TOKEN_SEPARATOR "," | ||
| 530 | //---------------------------------------------------------------------------- | ||
| 531 | |||
| 532 | //============================================================================ | ||
| 533 | /// @defgroup cpp_kodi_addon_pvr_Defs_epg_EPG_TAG_FLAG enum EPG_TAG_FLAG | ||
| 534 | /// @ingroup cpp_kodi_addon_pvr_Defs_epg | ||
| 535 | /// @brief <b>Bit field of independent flags associated with the EPG entry.</b>\n | ||
| 536 | /// Values used by @ref kodi::addon::PVREPGTag::SetFlags(). | ||
| 537 | /// | ||
| 538 | /// Here's example about the use of this: | ||
| 539 | /// ~~~~~~~~~~~~~{.cpp} | ||
| 540 | /// kodi::addon::PVREPGTag tag; | ||
| 541 | /// tag.SetFlags(EPG_TAG_FLAG_IS_SERIES | EPG_TAG_FLAG_IS_NEW); | ||
| 542 | /// ~~~~~~~~~~~~~ | ||
| 543 | /// | ||
| 544 | ///@{ | ||
| 545 | typedef enum EPG_TAG_FLAG | ||
| 546 | { | ||
| 547 | /// @brief __0000 0000__ : Nothing special to say about this entry. | ||
| 548 | EPG_TAG_FLAG_UNDEFINED = 0, | ||
| 549 | |||
| 550 | /// @brief __0000 0001__ : This EPG entry is part of a series. | ||
| 551 | EPG_TAG_FLAG_IS_SERIES = (1 << 0), | ||
| 552 | |||
| 553 | /// @brief __0000 0010__ : This EPG entry will be flagged as new. | ||
| 554 | EPG_TAG_FLAG_IS_NEW = (1 << 1), | ||
| 555 | |||
| 556 | /// @brief __0000 0100__ : This EPG entry will be flagged as a premiere. | ||
| 557 | EPG_TAG_FLAG_IS_PREMIERE = (1 << 2), | ||
| 558 | |||
| 559 | /// @brief __0000 1000__ : This EPG entry will be flagged as a finale. | ||
| 560 | EPG_TAG_FLAG_IS_FINALE = (1 << 3), | ||
| 561 | |||
| 562 | /// @brief __0001 0000__ : This EPG entry will be flagged as live. | ||
| 563 | EPG_TAG_FLAG_IS_LIVE = (1 << 4), | ||
| 564 | } EPG_TAG_FLAG; | ||
| 565 | ///@} | ||
| 566 | //---------------------------------------------------------------------------- | ||
| 567 | |||
| 568 | //============================================================================ | ||
| 569 | /// @ingroup cpp_kodi_addon_pvr_Defs_epg | ||
| 570 | /// @brief Special PVREPGTag::SetUniqueBroadcastId value | ||
| 571 | /// | ||
| 572 | /// Special @ref kodi::addon::PVREPGTag::SetUniqueBroadcastId() value to | ||
| 573 | /// indicate that a tag has not a valid EPG event uid. | ||
| 574 | /// | ||
| 575 | #define EPG_TAG_INVALID_UID 0 | ||
| 576 | //---------------------------------------------------------------------------- | ||
| 577 | |||
| 578 | //============================================================================ | ||
| 579 | /// @ingroup cpp_kodi_addon_pvr_Defs_epg | ||
| 580 | /// @brief Special @ref kodi::addon::PVREPGTag::SetSeriesNumber(), @ref kodi::addon::PVREPGTag::SetEpisodeNumber() | ||
| 581 | /// and @ref kodi::addon::PVREPGTag::SetEpisodePartNumber() value to indicate | ||
| 582 | /// it is not to be used. | ||
| 583 | /// | ||
| 584 | #define EPG_TAG_INVALID_SERIES_EPISODE -1 | ||
| 585 | //---------------------------------------------------------------------------- | ||
| 586 | |||
| 587 | //============================================================================ | ||
| 588 | /// @ingroup cpp_kodi_addon_pvr_Defs_epg | ||
| 589 | /// @brief Timeframe value for use with @ref kodi::addon::CInstancePVRClient::SetEPGTimeFrame() | ||
| 590 | /// function to indicate "no timeframe". | ||
| 591 | /// | ||
| 592 | #define EPG_TIMEFRAME_UNLIMITED -1 | ||
| 593 | //---------------------------------------------------------------------------- | ||
| 594 | |||
| 595 | //============================================================================ | ||
| 596 | /// @defgroup cpp_kodi_addon_pvr_Defs_epg_EPG_EVENT_STATE enum EPG_EVENT_STATE | ||
| 597 | /// @ingroup cpp_kodi_addon_pvr_Defs_epg | ||
| 598 | /// @brief **EPG event states.**\n | ||
| 599 | /// Used with @ref kodi::addon::CInstancePVRClient::EpgEventStateChange() | ||
| 600 | /// callback. | ||
| 601 | /// | ||
| 602 | ///@{ | ||
| 603 | typedef enum EPG_EVENT_STATE | ||
| 604 | { | ||
| 605 | /// @brief __0__ : Event created. | ||
| 606 | EPG_EVENT_CREATED = 0, | ||
| 607 | |||
| 608 | /// @brief __1__ : Event updated. | ||
| 609 | EPG_EVENT_UPDATED = 1, | ||
| 610 | |||
| 611 | /// @brief __2__ : Event deleted. | ||
| 612 | EPG_EVENT_DELETED = 2, | ||
| 613 | } EPG_EVENT_STATE; | ||
| 614 | ///@} | ||
| 615 | //---------------------------------------------------------------------------- | ||
| 616 | |||
| 617 | /*! | ||
| 618 | * @brief "C" PVR add-on channel group member. | ||
| 619 | * | ||
| 620 | * Structure used to interface in "C" between Kodi and Addon. | ||
| 621 | * | ||
| 622 | * See @ref kodi::addon::PVREPGTag for description of values. | ||
| 623 | */ | ||
| 624 | typedef struct EPG_TAG | ||
| 625 | { | ||
| 626 | unsigned int iUniqueBroadcastId; | ||
| 627 | unsigned int iUniqueChannelId; | ||
| 628 | const char* strTitle; | ||
| 629 | time_t startTime; | ||
| 630 | time_t endTime; | ||
| 631 | const char* strPlotOutline; | ||
| 632 | const char* strPlot; | ||
| 633 | const char* strOriginalTitle; | ||
| 634 | const char* strCast; | ||
| 635 | const char* strDirector; | ||
| 636 | const char* strWriter; | ||
| 637 | int iYear; | ||
| 638 | const char* strIMDBNumber; | ||
| 639 | const char* strIconPath; | ||
| 640 | int iGenreType; | ||
| 641 | int iGenreSubType; | ||
| 642 | const char* strGenreDescription; | ||
| 643 | const char* strFirstAired; | ||
| 644 | int iParentalRating; | ||
| 645 | int iStarRating; | ||
| 646 | int iSeriesNumber; | ||
| 647 | int iEpisodeNumber; | ||
| 648 | int iEpisodePartNumber; | ||
| 649 | const char* strEpisodeName; | ||
| 650 | unsigned int iFlags; | ||
| 651 | const char* strSeriesLink; | ||
| 652 | } EPG_TAG; | ||
| 653 | |||
| 654 | #ifdef __cplusplus | ||
| 655 | } | ||
| 656 | #endif /* __cplusplus */ | ||
| 657 | |||
| 658 | #endif /* !C_API_ADDONINSTANCE_PVR_EPG_H */ | ||
diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_general.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_general.h new file mode 100644 index 0000000..e2136f6 --- /dev/null +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_general.h | |||
| @@ -0,0 +1,295 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2005-2018 Team Kodi | ||
| 3 | * This file is part of Kodi - https://kodi.tv | ||
| 4 | * | ||
| 5 | * SPDX-License-Identifier: GPL-2.0-or-later | ||
| 6 | * See LICENSES/README.md for more information. | ||
| 7 | */ | ||
| 8 | |||
| 9 | #pragma once | ||
| 10 | |||
| 11 | #ifndef C_API_ADDONINSTANCE_PVR_GENERAL_H | ||
| 12 | #define C_API_ADDONINSTANCE_PVR_GENERAL_H | ||
| 13 | |||
| 14 | #include "pvr_defines.h" | ||
| 15 | |||
| 16 | #ifdef BUILD_KODI_ADDON | ||
| 17 | #include "../../../InputStreamConstants.h" | ||
| 18 | #else | ||
| 19 | #include "cores/VideoPlayer/Interface/Addon/InputStreamConstants.h" | ||
| 20 | #endif | ||
| 21 | |||
| 22 | #include <stdbool.h> | ||
| 23 | |||
| 24 | //¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ | ||
| 25 | // "C" Definitions group 1 - General PVR | ||
| 26 | #ifdef __cplusplus | ||
| 27 | extern "C" | ||
| 28 | { | ||
| 29 | #endif /* __cplusplus */ | ||
| 30 | |||
| 31 | //============================================================================ | ||
| 32 | /// @defgroup cpp_kodi_addon_pvr_Defs_General_PVR_ERROR enum PVR_ERROR | ||
| 33 | /// @ingroup cpp_kodi_addon_pvr_Defs_General | ||
| 34 | /// @brief **PVR add-on error codes**\n | ||
| 35 | /// Used as return values on most PVR related functions. | ||
| 36 | /// | ||
| 37 | /// In this way, a PVR instance signals errors in its processing and, under | ||
| 38 | /// certain conditions, allows Kodi to make corrections. | ||
| 39 | /// | ||
| 40 | ///@{ | ||
| 41 | typedef enum PVR_ERROR | ||
| 42 | { | ||
| 43 | /// @brief __0__ : No error occurred. | ||
| 44 | PVR_ERROR_NO_ERROR = 0, | ||
| 45 | |||
| 46 | /// @brief __-1__ : An unknown error occurred. | ||
| 47 | PVR_ERROR_UNKNOWN = -1, | ||
| 48 | |||
| 49 | /// @brief __-2__ : The method that Kodi called is not implemented by the add-on. | ||
| 50 | PVR_ERROR_NOT_IMPLEMENTED = -2, | ||
| 51 | |||
| 52 | /// @brief __-3__ : The backend reported an error, or the add-on isn't connected. | ||
| 53 | PVR_ERROR_SERVER_ERROR = -3, | ||
| 54 | |||
| 55 | /// @brief __-4__ : The command was sent to the backend, but the response timed out. | ||
| 56 | PVR_ERROR_SERVER_TIMEOUT = -4, | ||
| 57 | |||
| 58 | /// @brief __-5__ : The command was rejected by the backend. | ||
| 59 | PVR_ERROR_REJECTED = -5, | ||
| 60 | |||
| 61 | /// @brief __-6__ : The requested item can not be added, because it's already present. | ||
| 62 | PVR_ERROR_ALREADY_PRESENT = -6, | ||
| 63 | |||
| 64 | /// @brief __-7__ : The parameters of the method that was called are invalid for this | ||
| 65 | /// operation. | ||
| 66 | PVR_ERROR_INVALID_PARAMETERS = -7, | ||
| 67 | |||
| 68 | /// @brief __-8__ : A recording is running, so the timer can't be deleted without | ||
| 69 | /// doing a forced delete. | ||
| 70 | PVR_ERROR_RECORDING_RUNNING = -8, | ||
| 71 | |||
| 72 | /// @brief __-9__ : The command failed. | ||
| 73 | PVR_ERROR_FAILED = -9, | ||
| 74 | } PVR_ERROR; | ||
| 75 | ///@} | ||
| 76 | //---------------------------------------------------------------------------- | ||
| 77 | |||
| 78 | //============================================================================ | ||
| 79 | /// @defgroup cpp_kodi_addon_pvr_Defs_General_PVR_CONNECTION_STATE enum PVR_CONNECTION_STATE | ||
| 80 | /// @ingroup cpp_kodi_addon_pvr_Defs_General | ||
| 81 | /// @brief **PVR backend connection states**\n | ||
| 82 | /// Used with @ref kodi::addon::CInstancePVRClient::ConnectionStateChange() callback. | ||
| 83 | /// | ||
| 84 | /// With this, a PVR instance signals that Kodi should perform special | ||
| 85 | /// operations. | ||
| 86 | /// | ||
| 87 | ///@{ | ||
| 88 | typedef enum PVR_CONNECTION_STATE | ||
| 89 | { | ||
| 90 | /// @brief __0__ : Unknown state (e.g. not yet tried to connect). | ||
| 91 | PVR_CONNECTION_STATE_UNKNOWN = 0, | ||
| 92 | |||
| 93 | /// @brief __1__ : Backend server is not reachable (e.g. server not existing or | ||
| 94 | /// network down). | ||
| 95 | PVR_CONNECTION_STATE_SERVER_UNREACHABLE = 1, | ||
| 96 | |||
| 97 | /// @brief __2__ : Backend server is reachable, but there is not the expected type of | ||
| 98 | /// server running (e.g. HTSP required, but FTP running at given server:port). | ||
| 99 | PVR_CONNECTION_STATE_SERVER_MISMATCH = 2, | ||
| 100 | |||
| 101 | /// @brief __3__ : Backend server is reachable, but server version does not match | ||
| 102 | /// client requirements. | ||
| 103 | PVR_CONNECTION_STATE_VERSION_MISMATCH = 3, | ||
| 104 | |||
| 105 | /// @brief __4__ : Backend server is reachable, but denies client access (e.g. due | ||
| 106 | /// to wrong credentials). | ||
| 107 | PVR_CONNECTION_STATE_ACCESS_DENIED = 4, | ||
| 108 | |||
| 109 | /// @brief __5__ : Connection to backend server is established. | ||
| 110 | PVR_CONNECTION_STATE_CONNECTED = 5, | ||
| 111 | |||
| 112 | /// @brief __6__ : No connection to backend server (e.g. due to network errors or | ||
| 113 | /// client initiated disconnect). | ||
| 114 | PVR_CONNECTION_STATE_DISCONNECTED = 6, | ||
| 115 | |||
| 116 | /// @brief __7__ : Connecting to backend. | ||
| 117 | PVR_CONNECTION_STATE_CONNECTING = 7, | ||
| 118 | } PVR_CONNECTION_STATE; | ||
| 119 | ///@} | ||
| 120 | //---------------------------------------------------------------------------- | ||
| 121 | |||
| 122 | //============================================================================ | ||
| 123 | /// @defgroup cpp_kodi_addon_pvr_Defs_General_PVR_STREAM_PROPERTY definition PVR_STREAM_PROPERTY | ||
| 124 | /// @ingroup cpp_kodi_addon_pvr_Defs_General_Inputstream | ||
| 125 | /// @brief **PVR related stream property values**\n | ||
| 126 | /// This is used to pass additional data to Kodi on a given PVR stream. | ||
| 127 | /// | ||
| 128 | /// Then transferred to livestream, recordings or EPG Tag stream using the | ||
| 129 | /// properties. | ||
| 130 | /// | ||
| 131 | /// This defines are used by: | ||
| 132 | /// - @ref kodi::addon::CInstancePVRClient::GetChannelStreamProperties() | ||
| 133 | /// - @ref kodi::addon::CInstancePVRClient::GetEPGTagStreamProperties() | ||
| 134 | /// - @ref kodi::addon::CInstancePVRClient::GetRecordingStreamProperties() | ||
| 135 | /// | ||
| 136 | /// | ||
| 137 | ///--------------------------------------------------------------------------- | ||
| 138 | /// | ||
| 139 | /// **Example:** | ||
| 140 | /// ~~~~~~~~~~~~~{.cpp} | ||
| 141 | /// ... | ||
| 142 | /// | ||
| 143 | /// PVR_ERROR CMyPVRInstance::GetChannelStreamProperties(const kodi::addon::PVRChannel& channel, | ||
| 144 | /// std::vector<PVRStreamProperty>& properties) | ||
| 145 | /// { | ||
| 146 | /// ... | ||
| 147 | /// properties.emplace_back(PVR_STREAM_PROPERTY_INPUTSTREAM, "inputstream.adaptive"); | ||
| 148 | /// properties.emplace_back("inputstream.adaptive.manifest_type", "mpd"); | ||
| 149 | /// properties.emplace_back("inputstream.adaptive.manifest_update_parameter", "full"); | ||
| 150 | /// properties.emplace_back(PVR_STREAM_PROPERTY_MIMETYPE, "application/xml+dash"); | ||
| 151 | /// return PVR_ERROR_NO_ERROR; | ||
| 152 | /// } | ||
| 153 | /// | ||
| 154 | /// ... | ||
| 155 | /// ~~~~~~~~~~~~~ | ||
| 156 | /// | ||
| 157 | ///@{ | ||
| 158 | |||
| 159 | /// @brief the URL of the stream that should be played. | ||
| 160 | /// | ||
| 161 | #define PVR_STREAM_PROPERTY_STREAMURL "streamurl" | ||
| 162 | |||
| 163 | /// @brief To define in stream properties the name of the inputstream add-on | ||
| 164 | /// that should be used. | ||
| 165 | /// | ||
| 166 | /// Leave blank to use Kodi's built-in playing capabilities or to allow ffmpeg | ||
| 167 | /// to handle directly set to @ref PVR_STREAM_PROPERTY_VALUE_INPUTSTREAMFFMPEG. | ||
| 168 | /// | ||
| 169 | #define PVR_STREAM_PROPERTY_INPUTSTREAM STREAM_PROPERTY_INPUTSTREAM | ||
| 170 | |||
| 171 | /// @brief Identification string for an input stream. | ||
| 172 | /// | ||
| 173 | /// This value can be used in addition to @ref PVR_STREAM_PROPERTY_INPUTSTREAM. | ||
| 174 | /// It is used to provide the respective inpustream addon with additional | ||
| 175 | /// identification. | ||
| 176 | /// | ||
| 177 | /// The difference between this and other stream properties is that it is also | ||
| 178 | /// passed in the associated @ref kodi::addon::CAddonBase::CreateInstance() | ||
| 179 | /// call. | ||
| 180 | /// | ||
| 181 | /// This makes it possible to select different processing classes within the | ||
| 182 | /// associated add-on. | ||
| 183 | /// | ||
| 184 | /// | ||
| 185 | ///--------------------------------------------------------------------------- | ||
| 186 | /// | ||
| 187 | /// **Example:** | ||
| 188 | /// ~~~~~~~~~~~~~{.cpp} | ||
| 189 | /// ... | ||
| 190 | /// | ||
| 191 | /// // On PVR instance of addon | ||
| 192 | /// PVR_ERROR CMyPVRInstance::GetChannelStreamProperties(const kodi::addon::PVRChannel& channel, | ||
| 193 | /// std::vector<PVRStreamProperty>& properties) | ||
| 194 | /// { | ||
| 195 | /// ... | ||
| 196 | /// // For here on example the inpustream is also inside the PVR addon | ||
| 197 | /// properties.emplace_back(PVR_STREAM_PROPERTY_INPUTSTREAM, "pvr.my_one"); | ||
| 198 | /// properties.emplace_back(PVR_STREAM_PROPERTY_INPUTSTREAM_INSTANCE_ID, "my_special_id_1"); | ||
| 199 | /// return PVR_ERROR_NO_ERROR; | ||
| 200 | /// } | ||
| 201 | /// | ||
| 202 | /// ... | ||
| 203 | /// | ||
| 204 | /// // On CAddonBase part of addon | ||
| 205 | /// ADDON_STATUS CMyAddon::CreateInstanceEx(int instanceType, | ||
| 206 | /// std::string instanceID, | ||
| 207 | /// KODI_HANDLE instance, | ||
| 208 | /// KODI_HANDLE& addonInstance | ||
| 209 | /// const std::string& version) | ||
| 210 | /// { | ||
| 211 | /// if (instanceType == ADDON_INSTANCE_INPUTSTREAM) | ||
| 212 | /// { | ||
| 213 | /// kodi::Log(ADDON_LOG_INFO, "Creating my special inputstream"); | ||
| 214 | /// if (instanceID == "my_special_id_1") | ||
| 215 | /// addonInstance = new CMyPVRClientInstance_Type1(instance, version); | ||
| 216 | /// else if (instanceID == "my_special_id_2") | ||
| 217 | /// addonInstance = new CMyPVRClientInstance_Type2(instance, version); | ||
| 218 | /// return ADDON_STATUS_OK; | ||
| 219 | /// } | ||
| 220 | /// else if (...) | ||
| 221 | /// { | ||
| 222 | /// ... | ||
| 223 | /// } | ||
| 224 | /// return ADDON_STATUS_UNKNOWN; | ||
| 225 | /// } | ||
| 226 | /// | ||
| 227 | /// ... | ||
| 228 | /// ~~~~~~~~~~~~~ | ||
| 229 | /// | ||
| 230 | #define PVR_STREAM_PROPERTY_INPUTSTREAM_INSTANCE_ID STREAM_PROPERTY_INPUTSTREAM_INSTANCE_ID | ||
| 231 | |||
| 232 | /// @brief the MIME type of the stream that should be played. | ||
| 233 | /// | ||
| 234 | #define PVR_STREAM_PROPERTY_MIMETYPE "mimetype" | ||
| 235 | |||
| 236 | /// @brief <b>"true"</b> to denote that the stream that should be played is a | ||
| 237 | /// realtime stream. | ||
| 238 | /// | ||
| 239 | /// Any other value indicates that this is no realtime stream. | ||
| 240 | /// | ||
| 241 | #define PVR_STREAM_PROPERTY_ISREALTIMESTREAM STREAM_PROPERTY_ISREALTIMESTREAM | ||
| 242 | |||
| 243 | /// @brief <b>"true"</b> to denote that if the stream is from an EPG tag. | ||
| 244 | /// | ||
| 245 | /// It should be played is a live stream. Otherwise if it's a EPG tag it will | ||
| 246 | /// play as normal video. | ||
| 247 | /// | ||
| 248 | #define PVR_STREAM_PROPERTY_EPGPLAYBACKASLIVE "epgplaybackaslive" | ||
| 249 | |||
| 250 | /// @brief Special value for @ref PVR_STREAM_PROPERTY_INPUTSTREAM to use | ||
| 251 | /// ffmpeg to directly play a stream URL. | ||
| 252 | #define PVR_STREAM_PROPERTY_VALUE_INPUTSTREAMFFMPEG STREAM_PROPERTY_VALUE_INPUTSTREAMFFMPEG | ||
| 253 | |||
| 254 | ///@} | ||
| 255 | //----------------------------------------------------------------------------- | ||
| 256 | |||
| 257 | /*! | ||
| 258 | * @brief "C" PVR add-on capabilities. | ||
| 259 | * | ||
| 260 | * Structure used to interface in "C" between Kodi and Addon. | ||
| 261 | * | ||
| 262 | * See @ref kodi::addon::PVRCapabilities for description of values. | ||
| 263 | */ | ||
| 264 | typedef struct PVR_ADDON_CAPABILITIES | ||
| 265 | { | ||
| 266 | bool bSupportsEPG; | ||
| 267 | bool bSupportsEPGEdl; | ||
| 268 | bool bSupportsTV; | ||
| 269 | bool bSupportsRadio; | ||
| 270 | bool bSupportsRecordings; | ||
| 271 | bool bSupportsRecordingsUndelete; | ||
| 272 | bool bSupportsTimers; | ||
| 273 | bool bSupportsChannelGroups; | ||
| 274 | bool bSupportsChannelScan; | ||
| 275 | bool bSupportsChannelSettings; | ||
| 276 | bool bHandlesInputStream; | ||
| 277 | bool bHandlesDemuxing; | ||
| 278 | bool bSupportsRecordingPlayCount; | ||
| 279 | bool bSupportsLastPlayedPosition; | ||
| 280 | bool bSupportsRecordingEdl; | ||
| 281 | bool bSupportsRecordingsRename; | ||
| 282 | bool bSupportsRecordingsLifetimeChange; | ||
| 283 | bool bSupportsDescrambleInfo; | ||
| 284 | bool bSupportsAsyncEPGTransfer; | ||
| 285 | bool bSupportsRecordingSize; | ||
| 286 | |||
| 287 | unsigned int iRecordingsLifetimesSize; | ||
| 288 | struct PVR_ATTRIBUTE_INT_VALUE recordingsLifetimeValues[PVR_ADDON_ATTRIBUTE_VALUES_ARRAY_SIZE]; | ||
| 289 | } PVR_ADDON_CAPABILITIES; | ||
| 290 | |||
| 291 | #ifdef __cplusplus | ||
| 292 | } | ||
| 293 | #endif /* __cplusplus */ | ||
| 294 | |||
| 295 | #endif /* !C_API_ADDONINSTANCE_PVR_GENERAL_H */ | ||
diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_menu_hook.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_menu_hook.h new file mode 100644 index 0000000..2ead263 --- /dev/null +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_menu_hook.h | |||
| @@ -0,0 +1,77 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2005-2018 Team Kodi | ||
| 3 | * This file is part of Kodi - https://kodi.tv | ||
| 4 | * | ||
| 5 | * SPDX-License-Identifier: GPL-2.0-or-later | ||
| 6 | * See LICENSES/README.md for more information. | ||
| 7 | */ | ||
| 8 | |||
| 9 | #pragma once | ||
| 10 | |||
| 11 | #ifndef C_API_ADDONINSTANCE_PVR_MENUHOOK_H | ||
| 12 | #define C_API_ADDONINSTANCE_PVR_MENUHOOK_H | ||
| 13 | |||
| 14 | #include "pvr_defines.h" | ||
| 15 | |||
| 16 | //¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ | ||
| 17 | // "C" Definitions group 7 - Menu hook | ||
| 18 | #ifdef __cplusplus | ||
| 19 | extern "C" | ||
| 20 | { | ||
| 21 | #endif /* __cplusplus */ | ||
| 22 | |||
| 23 | //============================================================================ | ||
| 24 | /// @defgroup cpp_kodi_addon_pvr_Defs_Menuhook_PVR_MENUHOOK_CAT enum PVR_MENUHOOK_CAT | ||
| 25 | /// @ingroup cpp_kodi_addon_pvr_Defs_Menuhook | ||
| 26 | /// @brief **PVR context menu hook categories**\n | ||
| 27 | /// Possible menu types given to Kodi with @ref kodi::addon::CInstancePVRClient::AddMenuHook(). | ||
| 28 | /// | ||
| 29 | ///@{ | ||
| 30 | typedef enum PVR_MENUHOOK_CAT | ||
| 31 | { | ||
| 32 | /// @brief __-1__ : Unknown menu hook. | ||
| 33 | PVR_MENUHOOK_UNKNOWN = -1, | ||
| 34 | |||
| 35 | /// @brief __0__ : All categories. | ||
| 36 | PVR_MENUHOOK_ALL = 0, | ||
| 37 | |||
| 38 | /// @brief __1__ : For channels. | ||
| 39 | PVR_MENUHOOK_CHANNEL = 1, | ||
| 40 | |||
| 41 | /// @brief __2__ : For timers. | ||
| 42 | PVR_MENUHOOK_TIMER = 2, | ||
| 43 | |||
| 44 | /// @brief __3__ : For EPG. | ||
| 45 | PVR_MENUHOOK_EPG = 3, | ||
| 46 | |||
| 47 | /// @brief __4__ : For recordings. | ||
| 48 | PVR_MENUHOOK_RECORDING = 4, | ||
| 49 | |||
| 50 | /// @brief __5__ : For deleted recordings. | ||
| 51 | PVR_MENUHOOK_DELETED_RECORDING = 5, | ||
| 52 | |||
| 53 | /// @brief __6__ : For settings. | ||
| 54 | PVR_MENUHOOK_SETTING = 6, | ||
| 55 | } PVR_MENUHOOK_CAT; | ||
| 56 | ///@} | ||
| 57 | //---------------------------------------------------------------------------- | ||
| 58 | |||
| 59 | /*! | ||
| 60 | * @brief "C" PVR add-on menu hook. | ||
| 61 | * | ||
| 62 | * Structure used to interface in "C" between Kodi and Addon. | ||
| 63 | * | ||
| 64 | * See @ref kodi::addon::PVRMenuhook for description of values. | ||
| 65 | */ | ||
| 66 | typedef struct PVR_MENUHOOK | ||
| 67 | { | ||
| 68 | unsigned int iHookId; | ||
| 69 | unsigned int iLocalizedStringId; | ||
| 70 | enum PVR_MENUHOOK_CAT category; | ||
| 71 | } PVR_MENUHOOK; | ||
| 72 | |||
| 73 | #ifdef __cplusplus | ||
| 74 | } | ||
| 75 | #endif /* __cplusplus */ | ||
| 76 | |||
| 77 | #endif /* !C_API_ADDONINSTANCE_PVR_MENUHOOK_H */ | ||
diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_recordings.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_recordings.h new file mode 100644 index 0000000..2e2c081 --- /dev/null +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_recordings.h | |||
| @@ -0,0 +1,148 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2005-2018 Team Kodi | ||
| 3 | * This file is part of Kodi - https://kodi.tv | ||
| 4 | * | ||
| 5 | * SPDX-License-Identifier: GPL-2.0-or-later | ||
| 6 | * See LICENSES/README.md for more information. | ||
| 7 | */ | ||
| 8 | |||
| 9 | #pragma once | ||
| 10 | |||
| 11 | #ifndef C_API_ADDONINSTANCE_PVR_RECORDINGS_H | ||
| 12 | #define C_API_ADDONINSTANCE_PVR_RECORDINGS_H | ||
| 13 | |||
| 14 | #include "pvr_defines.h" | ||
| 15 | |||
| 16 | #include <stdbool.h> | ||
| 17 | #include <stdint.h> | ||
| 18 | #include <time.h> | ||
| 19 | |||
| 20 | //¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ | ||
| 21 | // "C" Definitions group 5 - PVR recordings | ||
| 22 | #ifdef __cplusplus | ||
| 23 | extern "C" | ||
| 24 | { | ||
| 25 | #endif /* __cplusplus */ | ||
| 26 | |||
| 27 | //============================================================================ | ||
| 28 | /// @defgroup cpp_kodi_addon_pvr_Defs_Recording_PVR_RECORDING_FLAG enum PVR_RECORDING_FLAG | ||
| 29 | /// @ingroup cpp_kodi_addon_pvr_Defs_Recording | ||
| 30 | /// @brief **Bit field of independent flags associated with the EPG entry.**\n | ||
| 31 | /// Values used by @ref kodi::addon::PVRRecording::SetFlags(). | ||
| 32 | /// | ||
| 33 | /// Here's example about the use of this: | ||
| 34 | /// ~~~~~~~~~~~~~{.cpp} | ||
| 35 | /// kodi::addon::PVRRecording tag; | ||
| 36 | /// tag.SetFlags(PVR_RECORDING_FLAG_IS_SERIES | PVR_RECORDING_FLAG_IS_PREMIERE); | ||
| 37 | /// ~~~~~~~~~~~~~ | ||
| 38 | /// | ||
| 39 | ///@{ | ||
| 40 | typedef enum PVR_RECORDING_FLAG | ||
| 41 | { | ||
| 42 | /// @brief __0000 0000__ : Nothing special to say about this recording. | ||
| 43 | PVR_RECORDING_FLAG_UNDEFINED = 0, | ||
| 44 | |||
| 45 | /// @brief __0000 0001__ : This recording is part of a series. | ||
| 46 | PVR_RECORDING_FLAG_IS_SERIES = (1 << 0), | ||
| 47 | |||
| 48 | /// @brief __0000 0010__ : This recording will be flagged as new. | ||
| 49 | PVR_RECORDING_FLAG_IS_NEW = (1 << 1), | ||
| 50 | |||
| 51 | /// @brief __0000 0100__ : This recording will be flagged as a premiere. | ||
| 52 | PVR_RECORDING_FLAG_IS_PREMIERE = (1 << 2), | ||
| 53 | |||
| 54 | /// @brief __0000 1000__ : This recording will be flagged as a finale. | ||
| 55 | PVR_RECORDING_FLAG_IS_FINALE = (1 << 3), | ||
| 56 | |||
| 57 | /// @brief __0001 0000__ : This recording will be flagged as live. | ||
| 58 | PVR_RECORDING_FLAG_IS_LIVE = (1 << 4), | ||
| 59 | } PVR_RECORDING_FLAG; | ||
| 60 | ///@} | ||
| 61 | //---------------------------------------------------------------------------- | ||
| 62 | |||
| 63 | //============================================================================ | ||
| 64 | /// @ingroup cpp_kodi_addon_pvr_Defs_Recording_PVRRecording | ||
| 65 | /// @brief Special @ref kodi::addon::PVRRecording::SetSeriesNumber() and | ||
| 66 | /// @ref kodi::addon::PVRRecording::SetEpisodeNumber() value to indicate it is | ||
| 67 | /// not to be used. | ||
| 68 | /// | ||
| 69 | /// Used if recording has no valid season and/or episode info. | ||
| 70 | /// | ||
| 71 | #define PVR_RECORDING_INVALID_SERIES_EPISODE EPG_TAG_INVALID_SERIES_EPISODE | ||
| 72 | //---------------------------------------------------------------------------- | ||
| 73 | |||
| 74 | //============================================================================ | ||
| 75 | /// @ingroup cpp_kodi_addon_pvr_Defs_Recording_PVRRecording | ||
| 76 | /// @brief Value where set in background to inform that related part not used. | ||
| 77 | /// | ||
| 78 | /// Normally this related parts need not to set by this as it is default. | ||
| 79 | #define PVR_RECORDING_VALUE_NOT_AVAILABLE -1 | ||
| 80 | //---------------------------------------------------------------------------- | ||
| 81 | |||
| 82 | //============================================================================ | ||
| 83 | /// @defgroup cpp_kodi_addon_pvr_Defs_Recording_PVR_RECORDING_CHANNEL_TYPE enum PVR_RECORDING_CHANNEL_TYPE | ||
| 84 | /// @ingroup cpp_kodi_addon_pvr_Defs_Recording | ||
| 85 | /// @brief **PVR recording channel types**\n | ||
| 86 | /// Used on @ref kodi::addon::PVRRecording::SetChannelType() value to set related | ||
| 87 | /// type. | ||
| 88 | /// | ||
| 89 | ///@{ | ||
| 90 | typedef enum PVR_RECORDING_CHANNEL_TYPE | ||
| 91 | { | ||
| 92 | /// @brief __0__ : Unknown type. | ||
| 93 | PVR_RECORDING_CHANNEL_TYPE_UNKNOWN = 0, | ||
| 94 | |||
| 95 | /// @brief __1__ : TV channel. | ||
| 96 | PVR_RECORDING_CHANNEL_TYPE_TV = 1, | ||
| 97 | |||
| 98 | /// @brief __2__ : Radio channel. | ||
| 99 | PVR_RECORDING_CHANNEL_TYPE_RADIO = 2, | ||
| 100 | } PVR_RECORDING_CHANNEL_TYPE; | ||
| 101 | ///@} | ||
| 102 | //---------------------------------------------------------------------------- | ||
| 103 | |||
| 104 | /*! | ||
| 105 | * @brief "C" PVR add-on recording. | ||
| 106 | * | ||
| 107 | * Structure used to interface in "C" between Kodi and Addon. | ||
| 108 | * | ||
| 109 | * See @ref kodi::addon::PVRRecording for description of values. | ||
| 110 | */ | ||
| 111 | typedef struct PVR_RECORDING | ||
| 112 | { | ||
| 113 | char strRecordingId[PVR_ADDON_NAME_STRING_LENGTH]; | ||
| 114 | char strTitle[PVR_ADDON_NAME_STRING_LENGTH]; | ||
| 115 | char strEpisodeName[PVR_ADDON_NAME_STRING_LENGTH]; | ||
| 116 | int iSeriesNumber; | ||
| 117 | int iEpisodeNumber; | ||
| 118 | int iYear; | ||
| 119 | char strDirectory[PVR_ADDON_URL_STRING_LENGTH]; | ||
| 120 | char strPlotOutline[PVR_ADDON_DESC_STRING_LENGTH]; | ||
| 121 | char strPlot[PVR_ADDON_DESC_STRING_LENGTH]; | ||
| 122 | char strGenreDescription[PVR_ADDON_DESC_STRING_LENGTH]; | ||
| 123 | char strChannelName[PVR_ADDON_NAME_STRING_LENGTH]; | ||
| 124 | char strIconPath[PVR_ADDON_URL_STRING_LENGTH]; | ||
| 125 | char strThumbnailPath[PVR_ADDON_URL_STRING_LENGTH]; | ||
| 126 | char strFanartPath[PVR_ADDON_URL_STRING_LENGTH]; | ||
| 127 | time_t recordingTime; | ||
| 128 | int iDuration; | ||
| 129 | int iPriority; | ||
| 130 | int iLifetime; | ||
| 131 | int iGenreType; | ||
| 132 | int iGenreSubType; | ||
| 133 | int iPlayCount; | ||
| 134 | int iLastPlayedPosition; | ||
| 135 | bool bIsDeleted; | ||
| 136 | unsigned int iEpgEventId; | ||
| 137 | int iChannelUid; | ||
| 138 | enum PVR_RECORDING_CHANNEL_TYPE channelType; | ||
| 139 | char strFirstAired[PVR_ADDON_DATE_STRING_LENGTH]; | ||
| 140 | unsigned int iFlags; | ||
| 141 | int64_t sizeInBytes; | ||
| 142 | } PVR_RECORDING; | ||
| 143 | |||
| 144 | #ifdef __cplusplus | ||
| 145 | } | ||
| 146 | #endif /* __cplusplus */ | ||
| 147 | |||
| 148 | #endif /* !C_API_ADDONINSTANCE_PVR_RECORDINGS_H */ | ||
diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_stream.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_stream.h new file mode 100644 index 0000000..1206c67 --- /dev/null +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_stream.h | |||
| @@ -0,0 +1,160 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2005-2018 Team Kodi | ||
| 3 | * This file is part of Kodi - https://kodi.tv | ||
| 4 | * | ||
| 5 | * SPDX-License-Identifier: GPL-2.0-or-later | ||
| 6 | * See LICENSES/README.md for more information. | ||
| 7 | */ | ||
| 8 | |||
| 9 | #pragma once | ||
| 10 | |||
| 11 | #ifndef C_API_ADDONINSTANCE_PVR_STREAM_H | ||
| 12 | #define C_API_ADDONINSTANCE_PVR_STREAM_H | ||
| 13 | |||
| 14 | #include "pvr_defines.h" | ||
| 15 | |||
| 16 | #ifdef BUILD_KODI_ADDON | ||
| 17 | #include "../../../DemuxPacket.h" | ||
| 18 | #else | ||
| 19 | #include "cores/VideoPlayer/Interface/Addon/DemuxPacket.h" | ||
| 20 | #endif | ||
| 21 | |||
| 22 | #include <stdint.h> | ||
| 23 | #include <time.h> | ||
| 24 | |||
| 25 | //¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ | ||
| 26 | // "C" Definitions group 9 - PVR stream definitions (NOTE: Becomes replaced | ||
| 27 | // in future by inputstream addon instance way) | ||
| 28 | #ifdef __cplusplus | ||
| 29 | extern "C" | ||
| 30 | { | ||
| 31 | #endif /* __cplusplus */ | ||
| 32 | |||
| 33 | //============================================================================ | ||
| 34 | /// @ingroup cpp_kodi_addon_pvr_Defs_Stream | ||
| 35 | /// @brief Maximum of allowed streams | ||
| 36 | /// | ||
| 37 | #define PVR_STREAM_MAX_STREAMS 20 | ||
| 38 | //---------------------------------------------------------------------------- | ||
| 39 | |||
| 40 | //============================================================================ | ||
| 41 | /// @ingroup cpp_kodi_addon_pvr_Defs_Stream | ||
| 42 | /// @brief Invalid codec identifier | ||
| 43 | /// | ||
| 44 | #define PVR_INVALID_CODEC_ID 0 | ||
| 45 | //---------------------------------------------------------------------------- | ||
| 46 | |||
| 47 | //============================================================================ | ||
| 48 | /// @ingroup cpp_kodi_addon_pvr_Defs_Stream | ||
| 49 | /// @brief Invalid codec | ||
| 50 | /// | ||
| 51 | #define PVR_INVALID_CODEC \ | ||
| 52 | { \ | ||
| 53 | PVR_CODEC_TYPE_UNKNOWN, PVR_INVALID_CODEC_ID \ | ||
| 54 | } | ||
| 55 | //---------------------------------------------------------------------------- | ||
| 56 | |||
| 57 | //============================================================================ | ||
| 58 | /// @defgroup cpp_kodi_addon_pvr_Defs_Stream_PVR_CODEC_TYPE enum PVR_CODEC_TYPE | ||
| 59 | /// @ingroup cpp_kodi_addon_pvr_Defs_Stream | ||
| 60 | /// @brief **Inputstream types**\n | ||
| 61 | /// To identify type on stream. | ||
| 62 | /// | ||
| 63 | /// Used on @ref kodi::addon::PVRStreamProperties::SetCodecType and @ref kodi::addon::PVRStreamProperties::SetCodecType. | ||
| 64 | /// | ||
| 65 | ///@{ | ||
| 66 | typedef enum PVR_CODEC_TYPE | ||
| 67 | { | ||
| 68 | /// @brief To set nothing defined. | ||
| 69 | PVR_CODEC_TYPE_UNKNOWN = -1, | ||
| 70 | |||
| 71 | /// @brief To identify @ref cpp_kodi_addon_pvr_Defs_Stream_PVRStreamProperties as Video. | ||
| 72 | PVR_CODEC_TYPE_VIDEO, | ||
| 73 | |||
| 74 | /// @brief To identify @ref cpp_kodi_addon_pvr_Defs_Stream_PVRStreamProperties as Audio. | ||
| 75 | PVR_CODEC_TYPE_AUDIO, | ||
| 76 | |||
| 77 | /// @brief To identify @ref cpp_kodi_addon_pvr_Defs_Stream_PVRStreamProperties as Data. | ||
| 78 | /// | ||
| 79 | /// With codec id related source identified. | ||
| 80 | PVR_CODEC_TYPE_DATA, | ||
| 81 | |||
| 82 | /// @brief To identify @ref cpp_kodi_addon_pvr_Defs_Stream_PVRStreamProperties as Subtitle. | ||
| 83 | PVR_CODEC_TYPE_SUBTITLE, | ||
| 84 | |||
| 85 | /// @brief To identify @ref cpp_kodi_addon_pvr_Defs_Stream_PVRStreamProperties as Radio RDS. | ||
| 86 | PVR_CODEC_TYPE_RDS, | ||
| 87 | |||
| 88 | PVR_CODEC_TYPE_NB | ||
| 89 | } PVR_CODEC_TYPE; | ||
| 90 | ///@} | ||
| 91 | //---------------------------------------------------------------------------- | ||
| 92 | |||
| 93 | //============================================================================ | ||
| 94 | /// @defgroup cpp_kodi_addon_pvr_Defs_Stream_PVR_CODEC struct PVR_CODEC | ||
| 95 | /// @ingroup cpp_kodi_addon_pvr_Defs_Stream | ||
| 96 | /// @brief **Codec identification structure**\n | ||
| 97 | /// Identifier about stream between Kodi and addon. | ||
| 98 | /// | ||
| 99 | ///@{ | ||
| 100 | typedef struct PVR_CODEC | ||
| 101 | { | ||
| 102 | /// @brief Used codec type for stream. | ||
| 103 | enum PVR_CODEC_TYPE codec_type; | ||
| 104 | |||
| 105 | /// @brief Related codec identifier, normally match the ffmpeg id's. | ||
| 106 | unsigned int codec_id; | ||
| 107 | } PVR_CODEC; | ||
| 108 | ///@} | ||
| 109 | //---------------------------------------------------------------------------- | ||
| 110 | |||
| 111 | /*! | ||
| 112 | * @brief "C" Stream properties | ||
| 113 | * | ||
| 114 | * Structure used to interface in "C" between Kodi and Addon. | ||
| 115 | * | ||
| 116 | * See @ref cpp_kodi_addon_pvr_Defs_Stream_PVRStreamProperties for description of values. | ||
| 117 | */ | ||
| 118 | typedef struct PVR_STREAM_PROPERTIES | ||
| 119 | { | ||
| 120 | unsigned int iStreamCount; | ||
| 121 | struct PVR_STREAM | ||
| 122 | { | ||
| 123 | unsigned int iPID; | ||
| 124 | enum PVR_CODEC_TYPE iCodecType; | ||
| 125 | unsigned int iCodecId; | ||
| 126 | char strLanguage[4]; | ||
| 127 | int iSubtitleInfo; | ||
| 128 | int iFPSScale; | ||
| 129 | int iFPSRate; | ||
| 130 | int iHeight; | ||
| 131 | int iWidth; | ||
| 132 | float fAspect; | ||
| 133 | int iChannels; | ||
| 134 | int iSampleRate; | ||
| 135 | int iBlockAlign; | ||
| 136 | int iBitRate; | ||
| 137 | int iBitsPerSample; | ||
| 138 | } stream[PVR_STREAM_MAX_STREAMS]; | ||
| 139 | } PVR_STREAM_PROPERTIES; | ||
| 140 | |||
| 141 | /*! | ||
| 142 | * @brief "C" Times of playing stream (Live TV and recordings) | ||
| 143 | * | ||
| 144 | * Structure used to interface in "C" between Kodi and Addon. | ||
| 145 | * | ||
| 146 | * See @ref cpp_kodi_addon_pvr_Defs_Stream_PVRStreamTimes for description of values. | ||
| 147 | */ | ||
| 148 | typedef struct PVR_STREAM_TIMES | ||
| 149 | { | ||
| 150 | time_t startTime; | ||
| 151 | int64_t ptsStart; | ||
| 152 | int64_t ptsBegin; | ||
| 153 | int64_t ptsEnd; | ||
| 154 | } PVR_STREAM_TIMES; | ||
| 155 | |||
| 156 | #ifdef __cplusplus | ||
| 157 | } | ||
| 158 | #endif /* __cplusplus */ | ||
| 159 | |||
| 160 | #endif /* !C_API_ADDONINSTANCE_PVR_STREAM_H */ | ||
diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_timers.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_timers.h new file mode 100644 index 0000000..209726d --- /dev/null +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_timers.h | |||
| @@ -0,0 +1,412 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2005-2018 Team Kodi | ||
| 3 | * This file is part of Kodi - https://kodi.tv | ||
| 4 | * | ||
| 5 | * SPDX-License-Identifier: GPL-2.0-or-later | ||
| 6 | * See LICENSES/README.md for more information. | ||
| 7 | */ | ||
| 8 | |||
| 9 | #pragma once | ||
| 10 | |||
| 11 | #ifndef C_API_ADDONINSTANCE_PVR_TIMERS_H | ||
| 12 | #define C_API_ADDONINSTANCE_PVR_TIMERS_H | ||
| 13 | |||
| 14 | #include "pvr_defines.h" | ||
| 15 | |||
| 16 | #include <stdbool.h> | ||
| 17 | #include <stdint.h> | ||
| 18 | #include <time.h> | ||
| 19 | |||
| 20 | //¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ | ||
| 21 | // "C" Definitions group 6 - PVR timers | ||
| 22 | #ifdef __cplusplus | ||
| 23 | extern "C" | ||
| 24 | { | ||
| 25 | #endif /* __cplusplus */ | ||
| 26 | |||
| 27 | //============================================================================ | ||
| 28 | /// @defgroup cpp_kodi_addon_pvr_Defs_Timer_PVR_TIMER_ definition PVR_TIMER (various) | ||
| 29 | /// @ingroup cpp_kodi_addon_pvr_Defs_Timer | ||
| 30 | /// @brief **PVR timer various different definitions**\n | ||
| 31 | /// This mostly used on @ref cpp_kodi_addon_pvr_Defs_Timer_PVRTimer "kodi::addon::PVRTimer" | ||
| 32 | /// to define default or not available. | ||
| 33 | /// | ||
| 34 | ///@{ | ||
| 35 | |||
| 36 | //============================================================================ | ||
| 37 | /// @brief Numeric PVR timer type definitions (@ref kodi::addon::PVRTimer::SetTimerType() | ||
| 38 | /// values). | ||
| 39 | /// | ||
| 40 | /// "Null" value for a numeric timer type. | ||
| 41 | #define PVR_TIMER_TYPE_NONE 0 | ||
| 42 | //---------------------------------------------------------------------------- | ||
| 43 | |||
| 44 | //============================================================================ | ||
| 45 | /// @brief Special @ref kodi::addon::PVRTimer::SetClientIndex() value to indicate | ||
| 46 | /// that a timer has not (yet) a valid client index. | ||
| 47 | /// | ||
| 48 | /// Timer has not (yet) a valid client index. | ||
| 49 | #define PVR_TIMER_NO_CLIENT_INDEX 0 | ||
| 50 | //---------------------------------------------------------------------------- | ||
| 51 | |||
| 52 | //============================================================================ | ||
| 53 | /// @brief Special @ref kodi::addon::PVRTimer::SetParentClientIndex() value to | ||
| 54 | /// indicate that a timer has no parent. | ||
| 55 | /// | ||
| 56 | /// Timer has no parent; it was not scheduled by a repeating timer. | ||
| 57 | #define PVR_TIMER_NO_PARENT PVR_TIMER_NO_CLIENT_INDEX | ||
| 58 | //---------------------------------------------------------------------------- | ||
| 59 | |||
| 60 | //============================================================================ | ||
| 61 | /// @brief Special @ref kodi::addon::PVRTimer::SetEPGUid() value to indicate | ||
| 62 | /// that a timer has no EPG event uid. | ||
| 63 | /// | ||
| 64 | /// Timer has no EPG event unique identifier. | ||
| 65 | #define PVR_TIMER_NO_EPG_UID EPG_TAG_INVALID_UID | ||
| 66 | //---------------------------------------------------------------------------- | ||
| 67 | |||
| 68 | //============================================================================ | ||
| 69 | /// @brief Special @ref kodi::addon::PVRTimer::SetClientChannelUid() value to | ||
| 70 | /// indicate "any channel". Useful for some repeating timer types. | ||
| 71 | /// | ||
| 72 | /// denotes "any channel", not a specific one. | ||
| 73 | /// | ||
| 74 | #define PVR_TIMER_ANY_CHANNEL -1 | ||
| 75 | //---------------------------------------------------------------------------- | ||
| 76 | |||
| 77 | //============================================================================ | ||
| 78 | /// @brief Value where set in background to inform that related part not used. | ||
| 79 | /// | ||
| 80 | /// Normally this related parts need not to set by this as it is default. | ||
| 81 | #define PVR_TIMER_VALUE_NOT_AVAILABLE -1 | ||
| 82 | //---------------------------------------------------------------------------- | ||
| 83 | |||
| 84 | ///@} | ||
| 85 | //---------------------------------------------------------------------------- | ||
| 86 | |||
| 87 | |||
| 88 | //============================================================================ | ||
| 89 | /// @defgroup cpp_kodi_addon_pvr_Defs_Timer_PVR_TIMER_TYPES enum PVR_TIMER_TYPES | ||
| 90 | /// @ingroup cpp_kodi_addon_pvr_Defs_Timer | ||
| 91 | /// @brief **PVR timer type attributes (@ref kodi::addon::PVRTimerType::SetAttributes() values).**\n | ||
| 92 | /// To defines the attributes for a type. These values are bit fields that can be | ||
| 93 | /// used together. | ||
| 94 | /// | ||
| 95 | ///-------------------------------------------------------------------------- | ||
| 96 | /// | ||
| 97 | /// **Example:** | ||
| 98 | /// ~~~~~~~~~~~~~{.cpp} | ||
| 99 | /// kodi::addon::PVRTimerType tag; | ||
| 100 | /// tag.SetAttributes(PVR_TIMER_TYPE_IS_MANUAL | PVR_TIMER_TYPE_IS_REPEATING); | ||
| 101 | /// ~~~~~~~~~~~~~ | ||
| 102 | /// | ||
| 103 | ///@{ | ||
| 104 | typedef enum PVR_TIMER_TYPES | ||
| 105 | { | ||
| 106 | /// @brief __0000 0000 0000 0000 0000 0000 0000 0000__ :\n Empty attribute value. | ||
| 107 | PVR_TIMER_TYPE_ATTRIBUTE_NONE = 0, | ||
| 108 | |||
| 109 | /// @brief __0000 0000 0000 0000 0000 0000 0000 0001__ :\n Defines whether this is a type for | ||
| 110 | /// manual (time-based) or epg-based timers. | ||
| 111 | PVR_TIMER_TYPE_IS_MANUAL = (1 << 0), | ||
| 112 | |||
| 113 | /// @brief __0000 0000 0000 0000 0000 0000 0000 0010__ :\n Defines whether this is a type for | ||
| 114 | /// repeating or one-shot timers. | ||
| 115 | PVR_TIMER_TYPE_IS_REPEATING = (1 << 1), | ||
| 116 | |||
| 117 | /// @brief __0000 0000 0000 0000 0000 0000 0000 0100__ :\n Timers of this type must not be edited | ||
| 118 | /// by Kodi. | ||
| 119 | PVR_TIMER_TYPE_IS_READONLY = (1 << 2), | ||
| 120 | |||
| 121 | /// @brief __0000 0000 0000 0000 0000 0000 0000 1000__ :\n Timers of this type must not be created | ||
| 122 | /// by Kodi. All other operations are allowed, though. | ||
| 123 | PVR_TIMER_TYPE_FORBIDS_NEW_INSTANCES = (1 << 3), | ||
| 124 | |||
| 125 | /// @brief __0000 0000 0000 0000 0000 0000 0001 0000__ :\n This type supports enabling/disabling | ||
| 126 | /// of the timer (@ref kodi::addon::PVRTimer::SetState() with | ||
| 127 | /// @ref PVR_TIMER_STATE_SCHEDULED | @ref PVR_TIMER_STATE_DISABLED). | ||
| 128 | PVR_TIMER_TYPE_SUPPORTS_ENABLE_DISABLE = (1 << 4), | ||
| 129 | |||
| 130 | /// @brief __0000 0000 0000 0000 0000 0000 0010 0000__ :\n This type supports channels | ||
| 131 | /// (@ref kodi::addon::PVRTimer::SetClientChannelUid()). | ||
| 132 | PVR_TIMER_TYPE_SUPPORTS_CHANNELS = (1 << 5), | ||
| 133 | |||
| 134 | /// @brief __0000 0000 0000 0000 0000 0000 0100 0000__ :\n This type supports a recording start | ||
| 135 | /// time (@ref kodi::addon::PVRTimer::SetStartTime()). | ||
| 136 | PVR_TIMER_TYPE_SUPPORTS_START_TIME = (1 << 6), | ||
| 137 | |||
| 138 | /// @brief __0000 0000 0000 0000 0000 0000 1000 0000__ :\n This type supports matching epg episode | ||
| 139 | /// title using@ref kodi::addon::PVRTimer::SetEPGSearchString(). | ||
| 140 | PVR_TIMER_TYPE_SUPPORTS_TITLE_EPG_MATCH = (1 << 7), | ||
| 141 | |||
| 142 | /// @brief __0000 0000 0000 0000 0000 0001 0000 0000__ :\n This type supports matching "more" epg | ||
| 143 | /// data (not just episode title) using @ref kodi::addon::PVRTimer::SetEPGSearchString(). | ||
| 144 | /// Setting @ref PVR_TIMER_TYPE_SUPPORTS_FULLTEXT_EPG_MATCH implies | ||
| 145 | /// @ref PVR_TIMER_TYPE_SUPPORTS_TITLE_EPG_MATCH. | ||
| 146 | PVR_TIMER_TYPE_SUPPORTS_FULLTEXT_EPG_MATCH = (1 << 8), | ||
| 147 | |||
| 148 | /// @brief __0000 0000 0000 0000 0000 0010 0000 0000__ :\n This type supports a first day the | ||
| 149 | /// timer gets active (@ref kodi::addon::PVRTimer::SetFirstDay()). | ||
| 150 | PVR_TIMER_TYPE_SUPPORTS_FIRST_DAY = (1 << 9), | ||
| 151 | |||
| 152 | /// @brief __0000 0000 0000 0000 0000 0100 0000 0000__ :\n This type supports weekdays for | ||
| 153 | /// defining the recording schedule (@ref kodi::addon::PVRTimer::SetWeekdays()). | ||
| 154 | PVR_TIMER_TYPE_SUPPORTS_WEEKDAYS = (1 << 10), | ||
| 155 | |||
| 156 | /// @brief __0000 0000 0000 0000 0000 1000 0000 0000__ :\n This type supports the <b>"record only new episodes"</b> feature | ||
| 157 | /// (@ref kodi::addon::PVRTimer::SetPreventDuplicateEpisodes()). | ||
| 158 | PVR_TIMER_TYPE_SUPPORTS_RECORD_ONLY_NEW_EPISODES = (1 << 11), | ||
| 159 | |||
| 160 | /// @brief __0000 0000 0000 0000 0001 0000 0000 0000__ :\n This type supports pre and post record time (@ref kodi::addon::PVRTimer::SetMarginStart(), | ||
| 161 | /// @ref kodi::addon::PVRTimer::SetMarginEnd()). | ||
| 162 | PVR_TIMER_TYPE_SUPPORTS_START_END_MARGIN = (1 << 12), | ||
| 163 | |||
| 164 | /// @brief __0000 0000 0000 0000 0010 0000 0000 0000__ :\n This type supports recording priority (@ref kodi::addon::PVRTimer::SetPriority()). | ||
| 165 | PVR_TIMER_TYPE_SUPPORTS_PRIORITY = (1 << 13), | ||
| 166 | |||
| 167 | /// @brief __0000 0000 0000 0000 0100 0000 0000 0000__ :\n This type supports recording lifetime (@ref kodi::addon::PVRTimer::SetLifetime()). | ||
| 168 | PVR_TIMER_TYPE_SUPPORTS_LIFETIME = (1 << 14), | ||
| 169 | |||
| 170 | /// @brief __0000 0000 0000 0000 1000 0000 0000 0000__ :\n This type supports placing recordings in user defined folders | ||
| 171 | /// (@ref kodi::addon::PVRTimer::SetDirectory()). | ||
| 172 | PVR_TIMER_TYPE_SUPPORTS_RECORDING_FOLDERS = (1 << 15), | ||
| 173 | |||
| 174 | /// @brief __0000 0000 0000 0001 0000 0000 0000 0000__ :\n This type supports a list of recording groups | ||
| 175 | /// (@ref kodi::addon::PVRTimer::SetRecordingGroup()). | ||
| 176 | PVR_TIMER_TYPE_SUPPORTS_RECORDING_GROUP = (1 << 16), | ||
| 177 | |||
| 178 | /// @brief __0000 0000 0000 0010 0000 0000 0000 0000__ :\n This type supports a recording end time (@ref kodi::addon::PVRTimer::SetEndTime()). | ||
| 179 | PVR_TIMER_TYPE_SUPPORTS_END_TIME = (1 << 17), | ||
| 180 | |||
| 181 | /// @brief __0000 0000 0000 0100 0000 0000 0000 0000__ :\n Enables an 'Any Time' over-ride option for start time | ||
| 182 | /// (using @ref kodi::addon::PVRTimer::SetStartAnyTime()). | ||
| 183 | PVR_TIMER_TYPE_SUPPORTS_START_ANYTIME = (1 << 18), | ||
| 184 | |||
| 185 | /// @brief __0000 0000 0000 1000 0000 0000 0000 0000__ :\n Enables a separate <b>'Any Time'</b> over-ride for end time | ||
| 186 | /// (using @ref kodi::addon::PVRTimer::SetEndAnyTime()). | ||
| 187 | PVR_TIMER_TYPE_SUPPORTS_END_ANYTIME = (1 << 19), | ||
| 188 | |||
| 189 | /// @brief __0000 0000 0001 0000 0000 0000 0000 0000__ :\n This type supports specifying a maximum recordings setting' | ||
| 190 | /// (@ref kodi::addon::PVRTimer::SetMaxRecordings()). | ||
| 191 | PVR_TIMER_TYPE_SUPPORTS_MAX_RECORDINGS = (1 << 20), | ||
| 192 | |||
| 193 | /// @brief __0000 0000 0010 0000 0000 0000 0000 0000__ :\n This type should not appear on any create menus which don't | ||
| 194 | /// provide an associated @ref cpp_kodi_addon_pvr_Defs_epg_PVREPGTag "EPG tag". | ||
| 195 | PVR_TIMER_TYPE_REQUIRES_EPG_TAG_ON_CREATE = (1 << 21), | ||
| 196 | |||
| 197 | /// @brief __0000 0000 0100 0000 0000 0000 0000 0000__ :\n This type should not appear on any create menus which provide an | ||
| 198 | /// associated @ref cpp_kodi_addon_pvr_Defs_epg_PVREPGTag "EPG tag". | ||
| 199 | PVR_TIMER_TYPE_FORBIDS_EPG_TAG_ON_CREATE = (1 << 22), | ||
| 200 | |||
| 201 | /// @brief __0000 0000 1000 0000 0000 0000 0000 0000__ :\n This type should not appear on any create menus unless associated | ||
| 202 | /// with an @ref cpp_kodi_addon_pvr_Defs_epg_PVREPGTag "EPG tag" with | ||
| 203 | /// 'series' attributes. | ||
| 204 | /// | ||
| 205 | /// Following conditions allow this: | ||
| 206 | /// - @ref kodi::addon::PVREPGTag::SetFlags() have flag @ref EPG_TAG_FLAG_IS_SERIES | ||
| 207 | /// - @ref kodi::addon::PVREPGTag::SetSeriesNumber() > 0 | ||
| 208 | /// - @ref kodi::addon::PVREPGTag::SetEpisodeNumber() > 0 | ||
| 209 | /// - @ref kodi::addon::PVREPGTag::SetEpisodePartNumber() > 0 | ||
| 210 | /// | ||
| 211 | /// Implies @ref PVR_TIMER_TYPE_REQUIRES_EPG_TAG_ON_CREATE. | ||
| 212 | PVR_TIMER_TYPE_REQUIRES_EPG_SERIES_ON_CREATE = (1 << 23), | ||
| 213 | |||
| 214 | /// @brief __0000 0001 0000 0000 0000 0000 0000 0000__ :\n This type supports 'any channel', for example when defining a timer | ||
| 215 | /// rule that should match any channel instaed of a particular channel. | ||
| 216 | PVR_TIMER_TYPE_SUPPORTS_ANY_CHANNEL = (1 << 24), | ||
| 217 | |||
| 218 | /// @brief __0000 0010 0000 0000 0000 0000 0000 0000__ :\n This type should not appear on any create menus which don't provide | ||
| 219 | /// an associated @ref cpp_kodi_addon_pvr_Defs_epg_PVREPGTag "EPG tag" with | ||
| 220 | /// a series link. | ||
| 221 | PVR_TIMER_TYPE_REQUIRES_EPG_SERIESLINK_ON_CREATE = (1 << 25), | ||
| 222 | |||
| 223 | /// @brief __0000 0100 0000 0000 0000 0000 0000 0000__ :\n This type allows deletion of an otherwise read-only timer. | ||
| 224 | PVR_TIMER_TYPE_SUPPORTS_READONLY_DELETE = (1 << 26), | ||
| 225 | |||
| 226 | /// @brief __0000 1000 0000 0000 0000 0000 0000 0000__ :\n Timers of this type do trigger a reminder if time is up. | ||
| 227 | PVR_TIMER_TYPE_IS_REMINDER = (1 << 27), | ||
| 228 | |||
| 229 | /// @brief __0001 0000 0000 0000 0000 0000 0000 0000__ :\n This type supports pre record time (@ref kodi::addon::PVRTimer::SetMarginStart()). | ||
| 230 | PVR_TIMER_TYPE_SUPPORTS_START_MARGIN = (1 << 28), | ||
| 231 | |||
| 232 | /// @brief __0010 0000 0000 0000 0000 0000 0000 0000__ :\n This type supports post record time (@ref kodi::addon::PVRTimer::SetMarginEnd()). | ||
| 233 | PVR_TIMER_TYPE_SUPPORTS_END_MARGIN = (1 << 29), | ||
| 234 | } PVR_TIMER_TYPES; | ||
| 235 | ///@} | ||
| 236 | //---------------------------------------------------------------------------- | ||
| 237 | |||
| 238 | //============================================================================ | ||
| 239 | /// @defgroup cpp_kodi_addon_pvr_Defs_Timer_PVR_WEEKDAY enum PVR_WEEKDAY | ||
| 240 | /// @ingroup cpp_kodi_addon_pvr_Defs_Timer | ||
| 241 | /// @brief **PVR timer weekdays** (@ref kodi::addon::PVRTimer::SetWeekdays() **values**)\n | ||
| 242 | /// Used to select the days of a week you want. | ||
| 243 | /// | ||
| 244 | /// It can be also used to select several days e.g.: | ||
| 245 | /// ~~~~~~~~~~~~~{.cpp} | ||
| 246 | /// ... | ||
| 247 | /// unsigned int day = PVR_WEEKDAY_MONDAY | PVR_WEEKDAY_SATURDAY; | ||
| 248 | /// ... | ||
| 249 | /// ~~~~~~~~~~~~~ | ||
| 250 | /// | ||
| 251 | ///@{ | ||
| 252 | typedef enum PVR_WEEKDAYS | ||
| 253 | { | ||
| 254 | /// @brief __0000 0000__ : Nothing selected. | ||
| 255 | PVR_WEEKDAY_NONE = 0, | ||
| 256 | |||
| 257 | /// @brief __0000 0001__ : To select Monday. | ||
| 258 | PVR_WEEKDAY_MONDAY = (1 << 0), | ||
| 259 | |||
| 260 | /// @brief __0000 0010__ : To select Tuesday. | ||
| 261 | PVR_WEEKDAY_TUESDAY = (1 << 1), | ||
| 262 | |||
| 263 | /// @brief __0000 0100__ : To select Wednesday. | ||
| 264 | PVR_WEEKDAY_WEDNESDAY = (1 << 2), | ||
| 265 | |||
| 266 | /// @brief __0000 1000__ : To select Thursday. | ||
| 267 | PVR_WEEKDAY_THURSDAY = (1 << 3), | ||
| 268 | |||
| 269 | /// @brief __0001 0000__ : To select Friday. | ||
| 270 | PVR_WEEKDAY_FRIDAY = (1 << 4), | ||
| 271 | |||
| 272 | /// @brief __0010 0000__ : To select Saturday. | ||
| 273 | PVR_WEEKDAY_SATURDAY = (1 << 5), | ||
| 274 | |||
| 275 | /// @brief __0100 0000__ : To select Sunday. | ||
| 276 | PVR_WEEKDAY_SUNDAY = (1 << 6), | ||
| 277 | |||
| 278 | /// @brief __0111 1111__ : To select all days of week. | ||
| 279 | PVR_WEEKDAY_ALLDAYS = PVR_WEEKDAY_MONDAY | PVR_WEEKDAY_TUESDAY | PVR_WEEKDAY_WEDNESDAY | | ||
| 280 | PVR_WEEKDAY_THURSDAY | PVR_WEEKDAY_FRIDAY | PVR_WEEKDAY_SATURDAY | | ||
| 281 | PVR_WEEKDAY_SUNDAY | ||
| 282 | } PVR_WEEKDAY; | ||
| 283 | ///@} | ||
| 284 | //---------------------------------------------------------------------------- | ||
| 285 | |||
| 286 | //============================================================================ | ||
| 287 | /// @defgroup cpp_kodi_addon_pvr_Defs_Timer_PVR_TIMER_STATE enum PVR_TIMER_STATE | ||
| 288 | /// @ingroup cpp_kodi_addon_pvr_Defs_Timer | ||
| 289 | /// @brief **PVR timer states**\n | ||
| 290 | /// To set within @ref cpp_kodi_addon_pvr_Defs_Timer_PVRTimer "kodi::addon::PVRTimer" | ||
| 291 | /// the needed state about. | ||
| 292 | /// | ||
| 293 | ///@{ | ||
| 294 | typedef enum PVR_TIMER_STATE | ||
| 295 | { | ||
| 296 | /// @brief __0__ : The timer was just created on the backend and is not yet active. | ||
| 297 | /// | ||
| 298 | /// This state must not be used for timers just created on the client side. | ||
| 299 | PVR_TIMER_STATE_NEW = 0, | ||
| 300 | |||
| 301 | /// @brief __1__ : The timer is scheduled for recording. | ||
| 302 | PVR_TIMER_STATE_SCHEDULED = 1, | ||
| 303 | |||
| 304 | /// @brief __2__ : The timer is currently recordings. | ||
| 305 | PVR_TIMER_STATE_RECORDING = 2, | ||
| 306 | |||
| 307 | /// @brief __3__ : The recording completed successfully. | ||
| 308 | PVR_TIMER_STATE_COMPLETED = 3, | ||
| 309 | |||
| 310 | /// @brief __4__ : Recording started, but was aborted. | ||
| 311 | PVR_TIMER_STATE_ABORTED = 4, | ||
| 312 | |||
| 313 | /// @brief __5__ : The timer was scheduled, but was canceled. | ||
| 314 | PVR_TIMER_STATE_CANCELLED = 5, | ||
| 315 | |||
| 316 | /// @brief __6__ : The scheduled timer conflicts with another one, but will be | ||
| 317 | /// recorded. | ||
| 318 | PVR_TIMER_STATE_CONFLICT_OK = 6, | ||
| 319 | |||
| 320 | /// @brief __7__ : The scheduled timer conflicts with another one and won't be | ||
| 321 | /// recorded. | ||
| 322 | PVR_TIMER_STATE_CONFLICT_NOK = 7, | ||
| 323 | |||
| 324 | /// @brief __8__ : The timer is scheduled, but can't be recorded for some reason. | ||
| 325 | PVR_TIMER_STATE_ERROR = 8, | ||
| 326 | |||
| 327 | /// @brief __9__ : The timer was disabled by the user, can be enabled via setting | ||
| 328 | /// the state to @ref PVR_TIMER_STATE_SCHEDULED. | ||
| 329 | PVR_TIMER_STATE_DISABLED = 9, | ||
| 330 | } PVR_TIMER_STATE; | ||
| 331 | ///@} | ||
| 332 | //---------------------------------------------------------------------------- | ||
| 333 | |||
| 334 | /*! | ||
| 335 | * @brief "C" PVR add-on timer event. | ||
| 336 | * | ||
| 337 | * Structure used to interface in "C" between Kodi and Addon. | ||
| 338 | * | ||
| 339 | * See @ref cpp_kodi_addon_pvr_Defs_Timer_PVRTimer "kodi::addon::PVRTimer" for | ||
| 340 | * description of values. | ||
| 341 | */ | ||
| 342 | typedef struct PVR_TIMER | ||
| 343 | { | ||
| 344 | unsigned int iClientIndex; | ||
| 345 | unsigned int iParentClientIndex; | ||
| 346 | int iClientChannelUid; | ||
| 347 | time_t startTime; | ||
| 348 | time_t endTime; | ||
| 349 | bool bStartAnyTime; | ||
| 350 | bool bEndAnyTime; | ||
| 351 | enum PVR_TIMER_STATE state; | ||
| 352 | unsigned int iTimerType; | ||
| 353 | char strTitle[PVR_ADDON_NAME_STRING_LENGTH]; | ||
| 354 | char strEpgSearchString[PVR_ADDON_NAME_STRING_LENGTH]; | ||
| 355 | bool bFullTextEpgSearch; | ||
| 356 | char strDirectory[PVR_ADDON_URL_STRING_LENGTH]; | ||
| 357 | char strSummary[PVR_ADDON_DESC_STRING_LENGTH]; | ||
| 358 | int iPriority; | ||
| 359 | int iLifetime; | ||
| 360 | int iMaxRecordings; | ||
| 361 | unsigned int iRecordingGroup; | ||
| 362 | time_t firstDay; | ||
| 363 | unsigned int iWeekdays; | ||
| 364 | unsigned int iPreventDuplicateEpisodes; | ||
| 365 | unsigned int iEpgUid; | ||
| 366 | unsigned int iMarginStart; | ||
| 367 | unsigned int iMarginEnd; | ||
| 368 | int iGenreType; | ||
| 369 | int iGenreSubType; | ||
| 370 | char strSeriesLink[PVR_ADDON_URL_STRING_LENGTH]; | ||
| 371 | } PVR_TIMER; | ||
| 372 | |||
| 373 | /*! | ||
| 374 | * @brief "C" PVR add-on timer event type. | ||
| 375 | * | ||
| 376 | * Structure used to interface in "C" between Kodi and Addon. | ||
| 377 | * | ||
| 378 | * See @ref cpp_kodi_addon_pvr_Defs_Timer_PVRTimerType "kodi::addon::PVRTimerType" for | ||
| 379 | * description of values. | ||
| 380 | */ | ||
| 381 | typedef struct PVR_TIMER_TYPE | ||
| 382 | { | ||
| 383 | unsigned int iId; | ||
| 384 | uint64_t iAttributes; | ||
| 385 | char strDescription[PVR_ADDON_TIMERTYPE_STRING_LENGTH]; | ||
| 386 | |||
| 387 | unsigned int iPrioritiesSize; | ||
| 388 | struct PVR_ATTRIBUTE_INT_VALUE priorities[PVR_ADDON_TIMERTYPE_VALUES_ARRAY_SIZE]; | ||
| 389 | int iPrioritiesDefault; | ||
| 390 | |||
| 391 | unsigned int iLifetimesSize; | ||
| 392 | struct PVR_ATTRIBUTE_INT_VALUE lifetimes[PVR_ADDON_TIMERTYPE_VALUES_ARRAY_SIZE]; | ||
| 393 | int iLifetimesDefault; | ||
| 394 | |||
| 395 | unsigned int iPreventDuplicateEpisodesSize; | ||
| 396 | struct PVR_ATTRIBUTE_INT_VALUE preventDuplicateEpisodes[PVR_ADDON_TIMERTYPE_VALUES_ARRAY_SIZE]; | ||
| 397 | unsigned int iPreventDuplicateEpisodesDefault; | ||
| 398 | |||
| 399 | unsigned int iRecordingGroupSize; | ||
| 400 | struct PVR_ATTRIBUTE_INT_VALUE recordingGroup[PVR_ADDON_TIMERTYPE_VALUES_ARRAY_SIZE]; | ||
| 401 | unsigned int iRecordingGroupDefault; | ||
| 402 | |||
| 403 | unsigned int iMaxRecordingsSize; | ||
| 404 | struct PVR_ATTRIBUTE_INT_VALUE maxRecordings[PVR_ADDON_TIMERTYPE_VALUES_ARRAY_SIZE_SMALL]; | ||
| 405 | int iMaxRecordingsDefault; | ||
| 406 | } PVR_TIMER_TYPE; | ||
| 407 | |||
| 408 | #ifdef __cplusplus | ||
| 409 | } | ||
| 410 | #endif /* __cplusplus */ | ||
| 411 | |||
| 412 | #endif /* !C_API_ADDONINSTANCE_PVR_TIMERS_H */ | ||
diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/screensaver.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/screensaver.h new file mode 100644 index 0000000..32cf6e1 --- /dev/null +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/screensaver.h | |||
| @@ -0,0 +1,75 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2005-2020 Team Kodi | ||
| 3 | * This file is part of Kodi - https://kodi.tv | ||
| 4 | * | ||
| 5 | * SPDX-License-Identifier: GPL-2.0-or-later | ||
| 6 | * See LICENSES/README.md for more information. | ||
| 7 | */ | ||
| 8 | |||
| 9 | #pragma once | ||
| 10 | |||
| 11 | #include "../addon_base.h" | ||
| 12 | |||
| 13 | #ifdef __cplusplus | ||
| 14 | extern "C" | ||
| 15 | { | ||
| 16 | #endif /* __cplusplus */ | ||
| 17 | |||
| 18 | struct AddonInstance_Screensaver; | ||
| 19 | |||
| 20 | /*! | ||
| 21 | * @brief Screensaver properties | ||
| 22 | * | ||
| 23 | * Not to be used outside this header. | ||
| 24 | */ | ||
| 25 | typedef struct AddonProps_Screensaver | ||
| 26 | { | ||
| 27 | ADDON_HARDWARE_CONTEXT device; | ||
| 28 | int x; | ||
| 29 | int y; | ||
| 30 | int width; | ||
| 31 | int height; | ||
| 32 | float pixelRatio; | ||
| 33 | const char* name; | ||
| 34 | const char* presets; | ||
| 35 | const char* profile; | ||
| 36 | } AddonProps_Screensaver; | ||
| 37 | |||
| 38 | /*! | ||
| 39 | * @brief Screensaver callbacks | ||
| 40 | * | ||
| 41 | * Not to be used outside this header. | ||
| 42 | */ | ||
| 43 | typedef struct AddonToKodiFuncTable_Screensaver | ||
| 44 | { | ||
| 45 | KODI_HANDLE kodiInstance; | ||
| 46 | } AddonToKodiFuncTable_Screensaver; | ||
| 47 | |||
| 48 | /*! | ||
| 49 | * @brief Screensaver function hooks | ||
| 50 | * | ||
| 51 | * Not to be used outside this header. | ||
| 52 | */ | ||
| 53 | typedef struct KodiToAddonFuncTable_Screensaver | ||
| 54 | { | ||
| 55 | KODI_HANDLE addonInstance; | ||
| 56 | bool(__cdecl* Start)(struct AddonInstance_Screensaver* instance); | ||
| 57 | void(__cdecl* Stop)(struct AddonInstance_Screensaver* instance); | ||
| 58 | void(__cdecl* Render)(struct AddonInstance_Screensaver* instance); | ||
| 59 | } KodiToAddonFuncTable_Screensaver; | ||
| 60 | |||
| 61 | /*! | ||
| 62 | * @brief Screensaver instance | ||
| 63 | * | ||
| 64 | * Not to be used outside this header. | ||
| 65 | */ | ||
| 66 | typedef struct AddonInstance_Screensaver | ||
| 67 | { | ||
| 68 | struct AddonProps_Screensaver* props; | ||
| 69 | struct AddonToKodiFuncTable_Screensaver* toKodi; | ||
| 70 | struct KodiToAddonFuncTable_Screensaver* toAddon; | ||
| 71 | } AddonInstance_Screensaver; | ||
| 72 | |||
| 73 | #ifdef __cplusplus | ||
| 74 | } /* extern "C" */ | ||
| 75 | #endif /* __cplusplus */ | ||
diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/vfs.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/vfs.h new file mode 100644 index 0000000..a6c3f44 --- /dev/null +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/vfs.h | |||
| @@ -0,0 +1,149 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2005-2020 Team Kodi | ||
| 3 | * | ||
| 4 | * SPDX-License-Identifier: GPL-2.0-or-later | ||
| 5 | * See LICENSES/README.md for more information. | ||
| 6 | */ | ||
| 7 | |||
| 8 | #pragma once | ||
| 9 | |||
| 10 | #ifndef C_API_ADDONINSTANCE_VFS_H | ||
| 11 | #define C_API_ADDONINSTANCE_VFS_H | ||
| 12 | |||
| 13 | #include "../addon_base.h" | ||
| 14 | #include "../filesystem.h" | ||
| 15 | |||
| 16 | #define VFS_FILE_HANDLE void* | ||
| 17 | |||
| 18 | #ifdef __cplusplus | ||
| 19 | extern "C" | ||
| 20 | { | ||
| 21 | #endif /* __cplusplus */ | ||
| 22 | |||
| 23 | struct VFSURL | ||
| 24 | { | ||
| 25 | const char* url; | ||
| 26 | const char* domain; | ||
| 27 | const char* hostname; | ||
| 28 | const char* filename; | ||
| 29 | unsigned int port; | ||
| 30 | const char* options; | ||
| 31 | const char* username; | ||
| 32 | const char* password; | ||
| 33 | const char* redacted; | ||
| 34 | const char* sharename; | ||
| 35 | const char* protocol; | ||
| 36 | }; | ||
| 37 | |||
| 38 | typedef struct VFSGetDirectoryCallbacks /* internal */ | ||
| 39 | { | ||
| 40 | bool(__cdecl* get_keyboard_input)(KODI_HANDLE ctx, | ||
| 41 | const char* heading, | ||
| 42 | char** input, | ||
| 43 | bool hidden_input); | ||
| 44 | void(__cdecl* set_error_dialog)(KODI_HANDLE ctx, | ||
| 45 | const char* heading, | ||
| 46 | const char* line1, | ||
| 47 | const char* line2, | ||
| 48 | const char* line3); | ||
| 49 | void(__cdecl* require_authentication)(KODI_HANDLE ctx, const char* url); | ||
| 50 | KODI_HANDLE ctx; | ||
| 51 | } VFSGetDirectoryCallbacks; | ||
| 52 | |||
| 53 | typedef struct AddonProps_VFSEntry /* internal */ | ||
| 54 | { | ||
| 55 | int dummy; | ||
| 56 | } AddonProps_VFSEntry; | ||
| 57 | |||
| 58 | typedef struct AddonToKodiFuncTable_VFSEntry /* internal */ | ||
| 59 | { | ||
| 60 | KODI_HANDLE kodiInstance; | ||
| 61 | } AddonToKodiFuncTable_VFSEntry; | ||
| 62 | |||
| 63 | struct AddonInstance_VFSEntry; | ||
| 64 | typedef struct KodiToAddonFuncTable_VFSEntry /* internal */ | ||
| 65 | { | ||
| 66 | KODI_HANDLE addonInstance; | ||
| 67 | |||
| 68 | VFS_FILE_HANDLE(__cdecl* open) | ||
| 69 | (const struct AddonInstance_VFSEntry* instance, const struct VFSURL* url); | ||
| 70 | VFS_FILE_HANDLE(__cdecl* open_for_write) | ||
| 71 | (const struct AddonInstance_VFSEntry* instance, const struct VFSURL* url, bool overwrite); | ||
| 72 | ssize_t(__cdecl* read)(const struct AddonInstance_VFSEntry* instance, | ||
| 73 | VFS_FILE_HANDLE context, | ||
| 74 | uint8_t* buffer, | ||
| 75 | size_t buf_size); | ||
| 76 | ssize_t(__cdecl* write)(const struct AddonInstance_VFSEntry* instance, | ||
| 77 | VFS_FILE_HANDLE context, | ||
| 78 | const uint8_t* buffer, | ||
| 79 | size_t buf_size); | ||
| 80 | int64_t(__cdecl* seek)(const struct AddonInstance_VFSEntry* instance, | ||
| 81 | VFS_FILE_HANDLE context, | ||
| 82 | int64_t position, | ||
| 83 | int whence); | ||
| 84 | int(__cdecl* truncate)(const struct AddonInstance_VFSEntry* instance, | ||
| 85 | VFS_FILE_HANDLE context, | ||
| 86 | int64_t size); | ||
| 87 | int64_t(__cdecl* get_length)(const struct AddonInstance_VFSEntry* instance, | ||
| 88 | VFS_FILE_HANDLE context); | ||
| 89 | int64_t(__cdecl* get_position)(const struct AddonInstance_VFSEntry* instance, | ||
| 90 | VFS_FILE_HANDLE context); | ||
| 91 | int(__cdecl* get_chunk_size)(const struct AddonInstance_VFSEntry* instance, | ||
| 92 | VFS_FILE_HANDLE context); | ||
| 93 | bool(__cdecl* io_control_get_seek_possible)(const struct AddonInstance_VFSEntry* instance, | ||
| 94 | VFS_FILE_HANDLE context); | ||
| 95 | bool(__cdecl* io_control_get_cache_status)(const struct AddonInstance_VFSEntry* instance, | ||
| 96 | VFS_FILE_HANDLE context, | ||
| 97 | VFS_CACHE_STATUS_DATA* status); | ||
| 98 | bool(__cdecl* io_control_set_cache_rate)(const struct AddonInstance_VFSEntry* instance, | ||
| 99 | VFS_FILE_HANDLE context, | ||
| 100 | unsigned int rate); | ||
| 101 | bool(__cdecl* io_control_set_retry)(const struct AddonInstance_VFSEntry* instance, | ||
| 102 | VFS_FILE_HANDLE context, | ||
| 103 | bool retry); | ||
| 104 | int(__cdecl* stat)(const struct AddonInstance_VFSEntry* instance, | ||
| 105 | const struct VFSURL* url, | ||
| 106 | struct STAT_STRUCTURE* buffer); | ||
| 107 | bool(__cdecl* close)(const struct AddonInstance_VFSEntry* instance, VFS_FILE_HANDLE context); | ||
| 108 | |||
| 109 | bool(__cdecl* exists)(const struct AddonInstance_VFSEntry* instance, const struct VFSURL* url); | ||
| 110 | void(__cdecl* clear_out_idle)(const struct AddonInstance_VFSEntry* instance); | ||
| 111 | void(__cdecl* disconnect_all)(const struct AddonInstance_VFSEntry* instance); | ||
| 112 | bool(__cdecl* delete_it)(const struct AddonInstance_VFSEntry* instance, | ||
| 113 | const struct VFSURL* url); | ||
| 114 | bool(__cdecl* rename)(const struct AddonInstance_VFSEntry* instance, | ||
| 115 | const struct VFSURL* url, | ||
| 116 | const struct VFSURL* url2); | ||
| 117 | bool(__cdecl* directory_exists)(const struct AddonInstance_VFSEntry* instance, | ||
| 118 | const struct VFSURL* url); | ||
| 119 | bool(__cdecl* remove_directory)(const struct AddonInstance_VFSEntry* instance, | ||
| 120 | const struct VFSURL* url); | ||
| 121 | bool(__cdecl* create_directory)(const struct AddonInstance_VFSEntry* instance, | ||
| 122 | const struct VFSURL* url); | ||
| 123 | bool(__cdecl* get_directory)(const struct AddonInstance_VFSEntry* instance, | ||
| 124 | const struct VFSURL* url, | ||
| 125 | struct VFSDirEntry** entries, | ||
| 126 | int* num_entries, | ||
| 127 | struct VFSGetDirectoryCallbacks* callbacks); | ||
| 128 | bool(__cdecl* contains_files)(const struct AddonInstance_VFSEntry* instance, | ||
| 129 | const struct VFSURL* url, | ||
| 130 | struct VFSDirEntry** entries, | ||
| 131 | int* num_entries, | ||
| 132 | char* rootpath); | ||
| 133 | void(__cdecl* free_directory)(const struct AddonInstance_VFSEntry* instance, | ||
| 134 | struct VFSDirEntry* entries, | ||
| 135 | int num_entries); | ||
| 136 | } KodiToAddonFuncTable_VFSEntry; | ||
| 137 | |||
| 138 | typedef struct AddonInstance_VFSEntry /* internal */ | ||
| 139 | { | ||
| 140 | struct AddonProps_VFSEntry* props; | ||
| 141 | struct AddonToKodiFuncTable_VFSEntry* toKodi; | ||
| 142 | struct KodiToAddonFuncTable_VFSEntry* toAddon; | ||
| 143 | } AddonInstance_VFSEntry; | ||
| 144 | |||
| 145 | #ifdef __cplusplus | ||
| 146 | } /* extern "C" */ | ||
| 147 | #endif /* __cplusplus */ | ||
| 148 | |||
| 149 | #endif /* !C_API_ADDONINSTANCE_VFS_H */ | ||
diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/visualization.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/visualization.h new file mode 100644 index 0000000..913aad8 --- /dev/null +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/visualization.h | |||
| @@ -0,0 +1,117 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2005-2020 Team Kodi | ||
| 3 | * This file is part of Kodi - https://kodi.tv | ||
| 4 | * | ||
| 5 | * SPDX-License-Identifier: GPL-2.0-or-later | ||
| 6 | * See LICENSES/README.md for more information. | ||
| 7 | */ | ||
| 8 | |||
| 9 | #pragma once | ||
| 10 | |||
| 11 | #include "../addon_base.h" | ||
| 12 | |||
| 13 | #define VIZ_LYRICS_SIZE 32768 | ||
| 14 | |||
| 15 | #ifdef __cplusplus | ||
| 16 | extern "C" | ||
| 17 | { | ||
| 18 | #endif /* __cplusplus */ | ||
| 19 | |||
| 20 | struct VIS_INFO | ||
| 21 | { | ||
| 22 | bool bWantsFreq; | ||
| 23 | int iSyncDelay; | ||
| 24 | }; | ||
| 25 | |||
| 26 | struct VIS_TRACK | ||
| 27 | { | ||
| 28 | const char *title; | ||
| 29 | const char *artist; | ||
| 30 | const char *album; | ||
| 31 | const char *albumArtist; | ||
| 32 | const char *genre; | ||
| 33 | const char *comment; | ||
| 34 | const char *lyrics; | ||
| 35 | |||
| 36 | const char *reserved1; | ||
| 37 | const char *reserved2; | ||
| 38 | |||
| 39 | int trackNumber; | ||
| 40 | int discNumber; | ||
| 41 | int duration; | ||
| 42 | int year; | ||
| 43 | int rating; | ||
| 44 | |||
| 45 | int reserved3; | ||
| 46 | int reserved4; | ||
| 47 | }; | ||
| 48 | |||
| 49 | typedef struct AddonProps_Visualization | ||
| 50 | { | ||
| 51 | ADDON_HARDWARE_CONTEXT device; | ||
| 52 | int x; | ||
| 53 | int y; | ||
| 54 | int width; | ||
| 55 | int height; | ||
| 56 | float pixelRatio; | ||
| 57 | const char* name; | ||
| 58 | const char* presets; | ||
| 59 | const char* profile; | ||
| 60 | } AddonProps_Visualization; | ||
| 61 | |||
| 62 | typedef struct AddonToKodiFuncTable_Visualization | ||
| 63 | { | ||
| 64 | KODI_HANDLE kodiInstance; | ||
| 65 | void(__cdecl* transfer_preset)(KODI_HANDLE kodiInstance, const char* preset); | ||
| 66 | void(__cdecl* clear_presets)(KODI_HANDLE kodiInstance); | ||
| 67 | } AddonToKodiFuncTable_Visualization; | ||
| 68 | |||
| 69 | struct AddonInstance_Visualization; | ||
| 70 | |||
| 71 | typedef struct KodiToAddonFuncTable_Visualization | ||
| 72 | { | ||
| 73 | KODI_HANDLE addonInstance; | ||
| 74 | bool(__cdecl* start)(const struct AddonInstance_Visualization* instance, | ||
| 75 | int channels, | ||
| 76 | int samples_per_sec, | ||
| 77 | int bits_per_sample, | ||
| 78 | const char* song_name); | ||
| 79 | void(__cdecl* stop)(const struct AddonInstance_Visualization* instance); | ||
| 80 | |||
| 81 | void(__cdecl* get_info)(const struct AddonInstance_Visualization* instance, | ||
| 82 | struct VIS_INFO* info); | ||
| 83 | |||
| 84 | void(__cdecl* audio_data)(const struct AddonInstance_Visualization* instance, | ||
| 85 | const float* audio_data, | ||
| 86 | int audio_data_length, | ||
| 87 | float* freq_data, | ||
| 88 | int freq_data_length); | ||
| 89 | bool(__cdecl* is_dirty)(const struct AddonInstance_Visualization* instance); | ||
| 90 | void(__cdecl* render)(const struct AddonInstance_Visualization* instance); | ||
| 91 | |||
| 92 | unsigned int(__cdecl* get_presets)(const struct AddonInstance_Visualization* instance); | ||
| 93 | int(__cdecl* get_active_preset)(const struct AddonInstance_Visualization* instance); | ||
| 94 | bool(__cdecl* prev_preset)(const struct AddonInstance_Visualization* instance); | ||
| 95 | bool(__cdecl* next_preset)(const struct AddonInstance_Visualization* instance); | ||
| 96 | bool(__cdecl* load_preset)(const struct AddonInstance_Visualization* instance, int select); | ||
| 97 | bool(__cdecl* random_preset)(const struct AddonInstance_Visualization* instance); | ||
| 98 | bool(__cdecl* lock_preset)(const struct AddonInstance_Visualization* instance); | ||
| 99 | bool(__cdecl* rate_preset)(const struct AddonInstance_Visualization* instance, bool plus_minus); | ||
| 100 | bool(__cdecl* is_locked)(const struct AddonInstance_Visualization* instance); | ||
| 101 | |||
| 102 | bool(__cdecl* update_albumart)(const struct AddonInstance_Visualization* instance, | ||
| 103 | const char* albumart); | ||
| 104 | bool(__cdecl* update_track)(const struct AddonInstance_Visualization* instance, | ||
| 105 | const struct VIS_TRACK* track); | ||
| 106 | } KodiToAddonFuncTable_Visualization; | ||
| 107 | |||
| 108 | typedef struct AddonInstance_Visualization | ||
| 109 | { | ||
| 110 | struct AddonProps_Visualization* props; | ||
| 111 | struct AddonToKodiFuncTable_Visualization* toKodi; | ||
| 112 | struct KodiToAddonFuncTable_Visualization* toAddon; | ||
| 113 | } AddonInstance_Visualization; | ||
| 114 | |||
| 115 | #ifdef __cplusplus | ||
| 116 | } /* extern "C" */ | ||
| 117 | #endif /* __cplusplus */ | ||
diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon_base.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon_base.h new file mode 100644 index 0000000..faa99fa --- /dev/null +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon_base.h | |||
| @@ -0,0 +1,264 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2005-2019 Team Kodi | ||
| 3 | * This file is part of Kodi - https://kodi.tv | ||
| 4 | * | ||
| 5 | * SPDX-License-Identifier: GPL-2.0-or-later | ||
| 6 | * See LICENSES/README.md for more information. | ||
| 7 | */ | ||
| 8 | |||
| 9 | #pragma once | ||
| 10 | |||
| 11 | #ifndef C_API_ADDON_BASE_H | ||
| 12 | #define C_API_ADDON_BASE_H | ||
| 13 | |||
| 14 | #if !defined(NOMINMAX) | ||
| 15 | #define NOMINMAX | ||
| 16 | #endif | ||
| 17 | |||
| 18 | #include "stdbool.h" | ||
| 19 | #include "stdint.h" | ||
| 20 | |||
| 21 | #ifndef TARGET_WINDOWS | ||
| 22 | #ifndef __cdecl | ||
| 23 | #define __cdecl | ||
| 24 | #endif | ||
| 25 | #ifndef __declspec | ||
| 26 | #define __declspec(X) | ||
| 27 | #endif | ||
| 28 | #endif | ||
| 29 | |||
| 30 | #undef ATTRIBUTE_PACKED | ||
| 31 | #undef PRAGMA_PACK_BEGIN | ||
| 32 | #undef PRAGMA_PACK_END | ||
| 33 | |||
| 34 | #if defined(__GNUC__) | ||
| 35 | #define ATTRIBUTE_PACKED __attribute__((packed)) | ||
| 36 | #define PRAGMA_PACK 0 | ||
| 37 | #define ATTRIBUTE_HIDDEN __attribute__((visibility("hidden"))) | ||
| 38 | #endif | ||
| 39 | |||
| 40 | #if !defined(ATTRIBUTE_PACKED) | ||
| 41 | #define ATTRIBUTE_PACKED | ||
| 42 | #define PRAGMA_PACK 1 | ||
| 43 | #endif | ||
| 44 | |||
| 45 | #if !defined(ATTRIBUTE_HIDDEN) | ||
| 46 | #define ATTRIBUTE_HIDDEN | ||
| 47 | #endif | ||
| 48 | |||
| 49 | #ifdef _MSC_VER | ||
| 50 | #define ATTRIBUTE_FORCEINLINE __forceinline | ||
| 51 | #elif defined(__GNUC__) | ||
| 52 | #define ATTRIBUTE_FORCEINLINE inline __attribute__((__always_inline__)) | ||
| 53 | #elif defined(__CLANG__) | ||
| 54 | #if __has_attribute(__always_inline__) | ||
| 55 | #define ATTRIBUTE_FORCEINLINE inline __attribute__((__always_inline__)) | ||
| 56 | #else | ||
| 57 | #define ATTRIBUTE_FORCEINLINE inline | ||
| 58 | #endif | ||
| 59 | #else | ||
| 60 | #define ATTRIBUTE_FORCEINLINE inline | ||
| 61 | #endif | ||
| 62 | |||
| 63 | // Hardware specific device context interface | ||
| 64 | #define ADDON_HARDWARE_CONTEXT void* | ||
| 65 | |||
| 66 | /* | ||
| 67 | * To have a on add-on and kodi itself handled string always on known size! | ||
| 68 | */ | ||
| 69 | #define ADDON_STANDARD_STRING_LENGTH 1024 | ||
| 70 | #define ADDON_STANDARD_STRING_LENGTH_SMALL 256 | ||
| 71 | |||
| 72 | #ifdef __cplusplus | ||
| 73 | extern "C" | ||
| 74 | { | ||
| 75 | #endif /* __cplusplus */ | ||
| 76 | |||
| 77 | //============================================================================ | ||
| 78 | /// @ingroup cpp_kodi_addon_addonbase | ||
| 79 | /// @brief Return value of functions in @ref cpp_kodi_addon_addonbase "kodi::addon::CAddonBase" | ||
| 80 | /// and associated classes. | ||
| 81 | /// | ||
| 82 | ///@{ | ||
| 83 | typedef enum ADDON_STATUS | ||
| 84 | { | ||
| 85 | /// @brief For everything OK and no error | ||
| 86 | ADDON_STATUS_OK, | ||
| 87 | |||
| 88 | /// @brief A needed connection was lost | ||
| 89 | ADDON_STATUS_LOST_CONNECTION, | ||
| 90 | |||
| 91 | /// @brief Addon needs a restart inside Kodi | ||
| 92 | ADDON_STATUS_NEED_RESTART, | ||
| 93 | |||
| 94 | /// @brief Necessary settings are not yet set | ||
| 95 | ADDON_STATUS_NEED_SETTINGS, | ||
| 96 | |||
| 97 | /// @brief Unknown and incomprehensible error | ||
| 98 | ADDON_STATUS_UNKNOWN, | ||
| 99 | |||
| 100 | /// @brief Permanent failure, like failing to resolve methods | ||
| 101 | ADDON_STATUS_PERMANENT_FAILURE, | ||
| 102 | |||
| 103 | /* internal used return error if function becomes not used from child on | ||
| 104 | * addon */ | ||
| 105 | ADDON_STATUS_NOT_IMPLEMENTED | ||
| 106 | } ADDON_STATUS; | ||
| 107 | ///@} | ||
| 108 | //---------------------------------------------------------------------------- | ||
| 109 | |||
| 110 | //============================================================================ | ||
| 111 | /// @defgroup cpp_kodi_Defs_AddonLog enum AddonLog | ||
| 112 | /// @ingroup cpp_kodi_Defs | ||
| 113 | /// @brief **Log file type definitions**\n | ||
| 114 | /// These define the types of log entries given with @ref kodi::Log() to Kodi. | ||
| 115 | /// | ||
| 116 | /// ------------------------------------------------------------------------- | ||
| 117 | /// | ||
| 118 | /// **Example:** | ||
| 119 | /// ~~~~~~~~~~~~~{.cpp} | ||
| 120 | /// #include <kodi/General.h> | ||
| 121 | /// | ||
| 122 | /// kodi::Log(ADDON_LOG_ERROR, "%s: There is an error occurred!", __func__); | ||
| 123 | /// | ||
| 124 | /// ~~~~~~~~~~~~~ | ||
| 125 | /// | ||
| 126 | ///@{ | ||
| 127 | typedef enum AddonLog | ||
| 128 | { | ||
| 129 | /// @brief **0** : To include debug information in the log file. | ||
| 130 | ADDON_LOG_DEBUG = 0, | ||
| 131 | |||
| 132 | /// @brief **1** : To include information messages in the log file. | ||
| 133 | ADDON_LOG_INFO = 1, | ||
| 134 | |||
| 135 | /// @brief **2** : To write warnings in the log file. | ||
| 136 | ADDON_LOG_WARNING = 2, | ||
| 137 | |||
| 138 | /// @brief **3** : To report error messages in the log file. | ||
| 139 | ADDON_LOG_ERROR = 3, | ||
| 140 | |||
| 141 | /// @brief **4** : To notify fatal unrecoverable errors, which can may also indicate | ||
| 142 | /// upcoming crashes. | ||
| 143 | ADDON_LOG_FATAL = 4 | ||
| 144 | } AddonLog; | ||
| 145 | ///@} | ||
| 146 | //---------------------------------------------------------------------------- | ||
| 147 | |||
| 148 | /*! @brief Standard undefined pointer handle */ | ||
| 149 | typedef void* KODI_HANDLE; | ||
| 150 | |||
| 151 | /*! | ||
| 152 | * @brief Handle used to return data from the PVR add-on to CPVRClient | ||
| 153 | */ | ||
| 154 | struct ADDON_HANDLE_STRUCT | ||
| 155 | { | ||
| 156 | void* callerAddress; /*!< address of the caller */ | ||
| 157 | void* dataAddress; /*!< address to store data in */ | ||
| 158 | int dataIdentifier; /*!< parameter to pass back when calling the callback */ | ||
| 159 | }; | ||
| 160 | typedef struct ADDON_HANDLE_STRUCT* ADDON_HANDLE; | ||
| 161 | |||
| 162 | /*! | ||
| 163 | * @brief Callback function tables from addon to Kodi | ||
| 164 | * Set complete from Kodi! | ||
| 165 | */ | ||
| 166 | struct AddonToKodiFuncTable_kodi; | ||
| 167 | struct AddonToKodiFuncTable_kodi_audioengine; | ||
| 168 | struct AddonToKodiFuncTable_kodi_filesystem; | ||
| 169 | struct AddonToKodiFuncTable_kodi_network; | ||
| 170 | struct AddonToKodiFuncTable_kodi_gui; | ||
| 171 | typedef struct AddonToKodiFuncTable_Addon | ||
| 172 | { | ||
| 173 | // Pointer inside Kodi, used on callback functions to give related handle | ||
| 174 | // class, for this ADDON::CAddonDll inside Kodi. | ||
| 175 | KODI_HANDLE kodiBase; | ||
| 176 | |||
| 177 | // Function addresses used for callbacks from addon to Kodi | ||
| 178 | char* (*get_type_version)(void* kodiBase, int type); | ||
| 179 | |||
| 180 | void (*free_string)(void* kodiBase, char* str); | ||
| 181 | void (*free_string_array)(void* kodiBase, char** arr, int numElements); | ||
| 182 | char* (*get_addon_path)(void* kodiBase); | ||
| 183 | char* (*get_base_user_path)(void* kodiBase); | ||
| 184 | void (*addon_log_msg)(void* kodiBase, const int loglevel, const char* msg); | ||
| 185 | |||
| 186 | bool (*get_setting_bool)(void* kodiBase, const char* id, bool* value); | ||
| 187 | bool (*get_setting_int)(void* kodiBase, const char* id, int* value); | ||
| 188 | bool (*get_setting_float)(void* kodiBase, const char* id, float* value); | ||
| 189 | bool (*get_setting_string)(void* kodiBase, const char* id, char** value); | ||
| 190 | |||
| 191 | bool (*set_setting_bool)(void* kodiBase, const char* id, bool value); | ||
| 192 | bool (*set_setting_int)(void* kodiBase, const char* id, int value); | ||
| 193 | bool (*set_setting_float)(void* kodiBase, const char* id, float value); | ||
| 194 | bool (*set_setting_string)(void* kodiBase, const char* id, const char* value); | ||
| 195 | |||
| 196 | void* (*get_interface)(void* kodiBase, const char* name, const char* version); | ||
| 197 | |||
| 198 | struct AddonToKodiFuncTable_kodi* kodi; | ||
| 199 | struct AddonToKodiFuncTable_kodi_audioengine* kodi_audioengine; | ||
| 200 | struct AddonToKodiFuncTable_kodi_filesystem* kodi_filesystem; | ||
| 201 | struct AddonToKodiFuncTable_kodi_gui* kodi_gui; | ||
| 202 | struct AddonToKodiFuncTable_kodi_network* kodi_network; | ||
| 203 | |||
| 204 | // Move up by min version change about | ||
| 205 | bool (*is_setting_using_default)(void* kodiBase, const char* id); | ||
| 206 | } AddonToKodiFuncTable_Addon; | ||
| 207 | |||
| 208 | /*! | ||
| 209 | * @brief Function tables from Kodi to addon | ||
| 210 | */ | ||
| 211 | typedef struct KodiToAddonFuncTable_Addon | ||
| 212 | { | ||
| 213 | void (*destroy)(); | ||
| 214 | ADDON_STATUS (*get_status)(); | ||
| 215 | ADDON_STATUS(*create_instance) | ||
| 216 | (int instanceType, | ||
| 217 | const char* instanceID, | ||
| 218 | KODI_HANDLE instance, | ||
| 219 | const char* version, | ||
| 220 | KODI_HANDLE* addonInstance, | ||
| 221 | KODI_HANDLE parent); | ||
| 222 | void (*destroy_instance)(int instanceType, KODI_HANDLE instance); | ||
| 223 | ADDON_STATUS (*set_setting)(const char* settingName, const void* settingValue); | ||
| 224 | } KodiToAddonFuncTable_Addon; | ||
| 225 | |||
| 226 | /*! | ||
| 227 | * @brief Main structure passed from kodi to addon with basic information needed to | ||
| 228 | * create add-on. | ||
| 229 | */ | ||
| 230 | typedef struct AddonGlobalInterface | ||
| 231 | { | ||
| 232 | // String with full path where add-on is installed (without his name on end) | ||
| 233 | // Set from Kodi! | ||
| 234 | const char* libBasePath; | ||
| 235 | |||
| 236 | // Master API version of Kodi itself (ADDON_GLOBAL_VERSION_MAIN) | ||
| 237 | const char* kodi_base_api_version; | ||
| 238 | |||
| 239 | // Pointer of first created instance, used in case this add-on goes with single way | ||
| 240 | // Set from Kodi! | ||
| 241 | KODI_HANDLE firstKodiInstance; | ||
| 242 | |||
| 243 | // Pointer to master base class inside add-on | ||
| 244 | // Set from addon header (kodi::addon::CAddonBase)! | ||
| 245 | KODI_HANDLE addonBase; | ||
| 246 | |||
| 247 | // Pointer to a instance used on single way (together with this class) | ||
| 248 | // Set from addon header (kodi::addon::IAddonInstance)! | ||
| 249 | KODI_HANDLE globalSingleInstance; | ||
| 250 | |||
| 251 | // Callback function tables from addon to Kodi | ||
| 252 | // Set from Kodi! | ||
| 253 | AddonToKodiFuncTable_Addon* toKodi; | ||
| 254 | |||
| 255 | // Function tables from Kodi to addon | ||
| 256 | // Set from addon header! | ||
| 257 | KodiToAddonFuncTable_Addon* toAddon; | ||
| 258 | } AddonGlobalInterface; | ||
| 259 | |||
| 260 | #ifdef __cplusplus | ||
| 261 | } | ||
| 262 | #endif /* __cplusplus */ | ||
| 263 | |||
| 264 | #endif /* !C_API_ADDON_BASE_H */ | ||
diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/audio_engine.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/audio_engine.h new file mode 100644 index 0000000..97510f7 --- /dev/null +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/audio_engine.h | |||
| @@ -0,0 +1,314 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2005-2019 Team Kodi | ||
| 3 | * This file is part of Kodi - https://kodi.tv | ||
| 4 | * | ||
| 5 | * SPDX-License-Identifier: GPL-2.0-or-later | ||
| 6 | * See LICENSES/README.md for more information. | ||
| 7 | */ | ||
| 8 | |||
| 9 | #pragma once | ||
| 10 | |||
| 11 | #ifndef C_API_AUDIO_ENGINE_H | ||
| 12 | #define C_API_AUDIO_ENGINE_H | ||
| 13 | |||
| 14 | #include <stdbool.h> | ||
| 15 | #include <stdint.h> | ||
| 16 | |||
| 17 | #ifdef __cplusplus | ||
| 18 | extern "C" | ||
| 19 | { | ||
| 20 | #endif /* __cplusplus */ | ||
| 21 | |||
| 22 | //¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ | ||
| 23 | // "C" Definitions, structures and enumerators of audio engine | ||
| 24 | //{{{ | ||
| 25 | |||
| 26 | //============================================================================ | ||
| 27 | /// @defgroup cpp_kodi_audioengine_Defs_AudioEngineStreamOptions enum AudioEngineStreamOptions | ||
| 28 | /// @ingroup cpp_kodi_audioengine_Defs | ||
| 29 | /// @brief **Bit options to pass to CAEStream**\n | ||
| 30 | /// A bit field of stream options. | ||
| 31 | /// | ||
| 32 | /// | ||
| 33 | /// ------------------------------------------------------------------------ | ||
| 34 | /// | ||
| 35 | /// **Usage example:** | ||
| 36 | /// ~~~~~~~~~~~~~{.cpp} | ||
| 37 | /// // Here only as minimal, "format" must be set to wanted types | ||
| 38 | /// kodi::audioengine::AudioEngineFormat format; | ||
| 39 | /// m_audioengine = new kodi::audioengine::CAEStream(format, AUDIO_STREAM_FORCE_RESAMPLE | AUDIO_STREAM_AUTOSTART); | ||
| 40 | /// ~~~~~~~~~~~~~ | ||
| 41 | /// | ||
| 42 | ///@{ | ||
| 43 | typedef enum AudioEngineStreamOptions | ||
| 44 | { | ||
| 45 | /// force resample even if rates match | ||
| 46 | AUDIO_STREAM_FORCE_RESAMPLE = 1 << 0, | ||
| 47 | /// create the stream paused | ||
| 48 | AUDIO_STREAM_PAUSED = 1 << 1, | ||
| 49 | /// autostart the stream when enough data is buffered | ||
| 50 | AUDIO_STREAM_AUTOSTART = 1 << 2, | ||
| 51 | } AudioEngineStreamOptions; | ||
| 52 | ///@} | ||
| 53 | //---------------------------------------------------------------------------- | ||
| 54 | |||
| 55 | //============================================================================ | ||
| 56 | /// @defgroup cpp_kodi_audioengine_Defs_AudioEngineChannel enum AudioEngineChannel | ||
| 57 | /// @ingroup cpp_kodi_audioengine_Defs | ||
| 58 | /// @brief **The possible channels**\n | ||
| 59 | /// Used to set available or used channels on stream. | ||
| 60 | /// | ||
| 61 | /// | ||
| 62 | /// ------------------------------------------------------------------------ | ||
| 63 | /// | ||
| 64 | /// **Usage example:** | ||
| 65 | /// ~~~~~~~~~~~~~{.cpp} | ||
| 66 | /// kodi::audioengine::AudioEngineFormat format; | ||
| 67 | /// format.SetChannelLayout(std::vector<AudioEngineChannel>(AUDIOENGINE_CH_FL, AUDIOENGINE_CH_FR)); | ||
| 68 | /// ~~~~~~~~~~~~~ | ||
| 69 | /// | ||
| 70 | ///@{ | ||
| 71 | enum AudioEngineChannel | ||
| 72 | { | ||
| 73 | /// Used inside to indicate the end of a list and not for addon use directly. | ||
| 74 | AUDIOENGINE_CH_NULL = -1, | ||
| 75 | /// RAW Audio format | ||
| 76 | AUDIOENGINE_CH_RAW, | ||
| 77 | /// Front left | ||
| 78 | AUDIOENGINE_CH_FL, | ||
| 79 | /// Front right | ||
| 80 | AUDIOENGINE_CH_FR, | ||
| 81 | /// Front center | ||
| 82 | AUDIOENGINE_CH_FC, | ||
| 83 | /// LFE / Subwoofer | ||
| 84 | AUDIOENGINE_CH_LFE, | ||
| 85 | /// Back left | ||
| 86 | AUDIOENGINE_CH_BL, | ||
| 87 | /// Back right | ||
| 88 | AUDIOENGINE_CH_BR, | ||
| 89 | /// Front left over center | ||
| 90 | AUDIOENGINE_CH_FLOC, | ||
| 91 | /// Front right over center | ||
| 92 | AUDIOENGINE_CH_FROC, | ||
| 93 | /// Back center | ||
| 94 | AUDIOENGINE_CH_BC, | ||
| 95 | /// Side left | ||
| 96 | AUDIOENGINE_CH_SL, | ||
| 97 | /// Side right | ||
| 98 | AUDIOENGINE_CH_SR, | ||
| 99 | /// Top front left | ||
| 100 | AUDIOENGINE_CH_TFL, | ||
| 101 | /// Top front right | ||
| 102 | AUDIOENGINE_CH_TFR, | ||
| 103 | /// Top front center | ||
| 104 | AUDIOENGINE_CH_TFC, | ||
| 105 | /// Top center | ||
| 106 | AUDIOENGINE_CH_TC, | ||
| 107 | /// Top back left | ||
| 108 | AUDIOENGINE_CH_TBL, | ||
| 109 | /// Top back right | ||
| 110 | AUDIOENGINE_CH_TBR, | ||
| 111 | /// Top back center | ||
| 112 | AUDIOENGINE_CH_TBC, | ||
| 113 | /// Back left over center | ||
| 114 | AUDIOENGINE_CH_BLOC, | ||
| 115 | /// Back right over center | ||
| 116 | AUDIOENGINE_CH_BROC, | ||
| 117 | /// Maximum possible value, to use e.g. as size inside list | ||
| 118 | AUDIOENGINE_CH_MAX | ||
| 119 | }; | ||
| 120 | ///@} | ||
| 121 | //---------------------------------------------------------------------------- | ||
| 122 | |||
| 123 | //============================================================================ | ||
| 124 | /// @defgroup cpp_kodi_audioengine_Defs_AudioEngineDataFormat enum AudioEngineDataFormat | ||
| 125 | /// @ingroup cpp_kodi_audioengine_Defs | ||
| 126 | /// @brief **Audio sample formats**\n | ||
| 127 | /// The bit layout of the audio data. | ||
| 128 | /// | ||
| 129 | /// LE = Little Endian, BE = Big Endian, NE = Native Endian | ||
| 130 | /// | ||
| 131 | /// For planar sample formats, each audio channel is in a separate data plane, | ||
| 132 | /// and linesize is the buffer size, in bytes, for a single plane. All data | ||
| 133 | /// planes must be the same size. For packed sample formats, only the first | ||
| 134 | /// data plane is used, and samples for each channel are interleaved. In this | ||
| 135 | /// case, linesize is the buffer size, in bytes, for the 1 plane. | ||
| 136 | /// | ||
| 137 | /// @note This is ordered from the worst to best preferred formats | ||
| 138 | /// | ||
| 139 | /// | ||
| 140 | /// ------------------------------------------------------------------------ | ||
| 141 | /// | ||
| 142 | /// **Usage example:** | ||
| 143 | /// ~~~~~~~~~~~~~{.cpp} | ||
| 144 | /// kodi::audioengine::AudioEngineFormat format; | ||
| 145 | /// format.SetDataFormat(AUDIOENGINE_FMT_FLOATP); | ||
| 146 | /// ~~~~~~~~~~~~~ | ||
| 147 | /// | ||
| 148 | ///@{ | ||
| 149 | enum AudioEngineDataFormat | ||
| 150 | { | ||
| 151 | /// To define format as invalid | ||
| 152 | AUDIOENGINE_FMT_INVALID = -1, | ||
| 153 | |||
| 154 | /// Unsigned integer 8 bit | ||
| 155 | AUDIOENGINE_FMT_U8, | ||
| 156 | |||
| 157 | /// Big Endian signed integer 16 bit | ||
| 158 | AUDIOENGINE_FMT_S16BE, | ||
| 159 | /// Little Endian signed integer 16 bit | ||
| 160 | AUDIOENGINE_FMT_S16LE, | ||
| 161 | /// Native Endian signed integer 16 bit | ||
| 162 | AUDIOENGINE_FMT_S16NE, | ||
| 163 | |||
| 164 | /// Big Endian signed integer 32 bit | ||
| 165 | AUDIOENGINE_FMT_S32BE, | ||
| 166 | /// Little Endian signed integer 32 bit | ||
| 167 | AUDIOENGINE_FMT_S32LE, | ||
| 168 | /// Native Endian signed integer 32 bit | ||
| 169 | AUDIOENGINE_FMT_S32NE, | ||
| 170 | |||
| 171 | /// Big Endian signed integer 24 bit (in 4 bytes) | ||
| 172 | AUDIOENGINE_FMT_S24BE4, | ||
| 173 | /// Little Endian signed integer 24 bit (in 4 bytes) | ||
| 174 | AUDIOENGINE_FMT_S24LE4, | ||
| 175 | /// Native Endian signed integer 24 bit (in 4 bytes) | ||
| 176 | AUDIOENGINE_FMT_S24NE4, | ||
| 177 | /// S32 with bits_per_sample < 32 | ||
| 178 | AUDIOENGINE_FMT_S24NE4MSB, | ||
| 179 | |||
| 180 | /// Big Endian signed integer 24 bit (3 bytes) | ||
| 181 | AUDIOENGINE_FMT_S24BE3, | ||
| 182 | /// Little Endian signed integer 24 bit (3 bytes) | ||
| 183 | AUDIOENGINE_FMT_S24LE3, | ||
| 184 | /// Native Endian signed integer 24 bit (3 bytes) | ||
| 185 | AUDIOENGINE_FMT_S24NE3, | ||
| 186 | |||
| 187 | /// Double floating point | ||
| 188 | AUDIOENGINE_FMT_DOUBLE, | ||
| 189 | /// Floating point | ||
| 190 | AUDIOENGINE_FMT_FLOAT, | ||
| 191 | |||
| 192 | /// **Bitstream**\n | ||
| 193 | /// RAW Audio format | ||
| 194 | AUDIOENGINE_FMT_RAW, | ||
| 195 | |||
| 196 | /// **Planar format**\n | ||
| 197 | /// Unsigned byte | ||
| 198 | AUDIOENGINE_FMT_U8P, | ||
| 199 | /// **Planar format**\n | ||
| 200 | /// Native Endian signed 16 bit | ||
| 201 | AUDIOENGINE_FMT_S16NEP, | ||
| 202 | /// **Planar format**\n | ||
| 203 | /// Native Endian signed 32 bit | ||
| 204 | AUDIOENGINE_FMT_S32NEP, | ||
| 205 | /// **Planar format**\n | ||
| 206 | /// Native Endian signed integer 24 bit (in 4 bytes) | ||
| 207 | AUDIOENGINE_FMT_S24NE4P, | ||
| 208 | /// **Planar format**\n | ||
| 209 | /// S32 with bits_per_sample < 32 | ||
| 210 | AUDIOENGINE_FMT_S24NE4MSBP, | ||
| 211 | /// **Planar format**\n | ||
| 212 | /// Native Endian signed integer 24 bit (in 3 bytes) | ||
| 213 | AUDIOENGINE_FMT_S24NE3P, | ||
| 214 | /// **Planar format**\n | ||
| 215 | /// Double floating point | ||
| 216 | AUDIOENGINE_FMT_DOUBLEP, | ||
| 217 | /// **Planar format**\n | ||
| 218 | /// Floating point | ||
| 219 | AUDIOENGINE_FMT_FLOATP, | ||
| 220 | |||
| 221 | /// Amount of sample formats. | ||
| 222 | AUDIOENGINE_FMT_MAX | ||
| 223 | }; | ||
| 224 | ///@} | ||
| 225 | //---------------------------------------------------------------------------- | ||
| 226 | |||
| 227 | /*! | ||
| 228 | * @brief Internal API structure which are used for data exchange between | ||
| 229 | * Kodi and addon. | ||
| 230 | */ | ||
| 231 | struct AUDIO_ENGINE_FORMAT | ||
| 232 | { | ||
| 233 | /*! The stream's data format (eg, AUDIOENGINE_FMT_S16LE) */ | ||
| 234 | enum AudioEngineDataFormat m_dataFormat; | ||
| 235 | |||
| 236 | /*! The stream's sample rate (eg, 48000) */ | ||
| 237 | unsigned int m_sampleRate; | ||
| 238 | |||
| 239 | /*! The encoded streams sample rate if a bitstream, otherwise undefined */ | ||
| 240 | unsigned int m_encodedRate; | ||
| 241 | |||
| 242 | /*! The amount of used speaker channels */ | ||
| 243 | unsigned int m_channelCount; | ||
| 244 | |||
| 245 | /*! The stream's channel layout */ | ||
| 246 | enum AudioEngineChannel m_channels[AUDIOENGINE_CH_MAX]; | ||
| 247 | |||
| 248 | /*! The number of frames per period */ | ||
| 249 | unsigned int m_frames; | ||
| 250 | |||
| 251 | /*! The size of one frame in bytes */ | ||
| 252 | unsigned int m_frameSize; | ||
| 253 | }; | ||
| 254 | |||
| 255 | /* A stream handle pointer, which is only used internally by the addon stream handle */ | ||
| 256 | typedef void AEStreamHandle; | ||
| 257 | |||
| 258 | //}}} | ||
| 259 | |||
| 260 | //¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ | ||
| 261 | // "C" Internal interface tables for intercommunications between addon and kodi | ||
| 262 | //{{{ | ||
| 263 | |||
| 264 | /* | ||
| 265 | * Function address structure, not need to visible on dev kit doxygen | ||
| 266 | * documentation | ||
| 267 | */ | ||
| 268 | typedef struct AddonToKodiFuncTable_kodi_audioengine | ||
| 269 | { | ||
| 270 | AEStreamHandle* (*make_stream)(void* kodiBase, | ||
| 271 | struct AUDIO_ENGINE_FORMAT* format, | ||
| 272 | unsigned int options); | ||
| 273 | void (*free_stream)(void* kodiBase, AEStreamHandle* stream); | ||
| 274 | bool (*get_current_sink_format)(void* kodiBase, struct AUDIO_ENGINE_FORMAT* sink_format); | ||
| 275 | |||
| 276 | // Audio Engine Stream definitions | ||
| 277 | unsigned int (*aestream_get_space)(void* kodiBase, AEStreamHandle* handle); | ||
| 278 | unsigned int (*aestream_add_data)(void* kodiBase, | ||
| 279 | AEStreamHandle* handle, | ||
| 280 | uint8_t* const* data, | ||
| 281 | unsigned int offset, | ||
| 282 | unsigned int frames, | ||
| 283 | double pts, | ||
| 284 | bool hasDownmix, | ||
| 285 | double centerMixLevel); | ||
| 286 | double (*aestream_get_delay)(void* kodiBase, AEStreamHandle* handle); | ||
| 287 | bool (*aestream_is_buffering)(void* kodiBase, AEStreamHandle* handle); | ||
| 288 | double (*aestream_get_cache_time)(void* kodiBase, AEStreamHandle* handle); | ||
| 289 | double (*aestream_get_cache_total)(void* kodiBase, AEStreamHandle* handle); | ||
| 290 | void (*aestream_pause)(void* kodiBase, AEStreamHandle* handle); | ||
| 291 | void (*aestream_resume)(void* kodiBase, AEStreamHandle* handle); | ||
| 292 | void (*aestream_drain)(void* kodiBase, AEStreamHandle* handle, bool wait); | ||
| 293 | bool (*aestream_is_draining)(void* kodiBase, AEStreamHandle* handle); | ||
| 294 | bool (*aestream_is_drained)(void* kodiBase, AEStreamHandle* handle); | ||
| 295 | void (*aestream_flush)(void* kodiBase, AEStreamHandle* handle); | ||
| 296 | float (*aestream_get_volume)(void* kodiBase, AEStreamHandle* handle); | ||
| 297 | void (*aestream_set_volume)(void* kodiBase, AEStreamHandle* handle, float volume); | ||
| 298 | float (*aestream_get_amplification)(void* kodiBase, AEStreamHandle* handle); | ||
| 299 | void (*aestream_set_amplification)(void* kodiBase, AEStreamHandle* handle, float amplify); | ||
| 300 | unsigned int (*aestream_get_frame_size)(void* kodiBase, AEStreamHandle* handle); | ||
| 301 | unsigned int (*aestream_get_channel_count)(void* kodiBase, AEStreamHandle* handle); | ||
| 302 | unsigned int (*aestream_get_sample_rate)(void* kodiBase, AEStreamHandle* handle); | ||
| 303 | enum AudioEngineDataFormat (*aestream_get_data_format)(void* kodiBase, AEStreamHandle* handle); | ||
| 304 | double (*aestream_get_resample_ratio)(void* kodiBase, AEStreamHandle* handle); | ||
| 305 | void (*aestream_set_resample_ratio)(void* kodiBase, AEStreamHandle* handle, double ratio); | ||
| 306 | } AddonToKodiFuncTable_kodi_audioengine; | ||
| 307 | |||
| 308 | //}}} | ||
| 309 | |||
| 310 | #ifdef __cplusplus | ||
| 311 | } | ||
| 312 | #endif /* __cplusplus */ | ||
| 313 | |||
| 314 | #endif /* !C_API_AUDIO_ENGINE_H */ | ||
diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/filesystem.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/filesystem.h new file mode 100644 index 0000000..70f9400 --- /dev/null +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/filesystem.h | |||
| @@ -0,0 +1,325 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2005-2018 Team Kodi | ||
| 3 | * This file is part of Kodi - https://kodi.tv | ||
| 4 | * | ||
| 5 | * SPDX-License-Identifier: GPL-2.0-or-later | ||
| 6 | * See LICENSES/README.md for more information. | ||
| 7 | */ | ||
| 8 | |||
| 9 | #pragma once | ||
| 10 | |||
| 11 | #ifndef C_API_FILESYSTEM_H | ||
| 12 | #define C_API_FILESYSTEM_H | ||
| 13 | |||
| 14 | #include <stdbool.h> | ||
| 15 | #include <stdint.h> | ||
| 16 | #include <time.h> | ||
| 17 | |||
| 18 | #ifdef _WIN32 // windows | ||
| 19 | #ifndef _SSIZE_T_DEFINED | ||
| 20 | typedef intptr_t ssize_t; | ||
| 21 | #define _SSIZE_T_DEFINED | ||
| 22 | #endif // !_SSIZE_T_DEFINED | ||
| 23 | |||
| 24 | // Prevent conflicts with Windows macros where have this names. | ||
| 25 | #ifdef CreateDirectory | ||
| 26 | #undef CreateDirectory | ||
| 27 | #endif // CreateDirectory | ||
| 28 | #ifdef DeleteFile | ||
| 29 | #undef DeleteFile | ||
| 30 | #endif // DeleteFile | ||
| 31 | #ifdef RemoveDirectory | ||
| 32 | #undef RemoveDirectory | ||
| 33 | #endif // RemoveDirectory | ||
| 34 | #endif // _WIN32 | ||
| 35 | |||
| 36 | #ifdef TARGET_POSIX // Linux, Mac, FreeBSD | ||
| 37 | #include <sys/types.h> | ||
| 38 | #endif // TARGET_POSIX | ||
| 39 | |||
| 40 | #ifdef __cplusplus | ||
| 41 | extern "C" | ||
| 42 | { | ||
| 43 | #endif /* __cplusplus */ | ||
| 44 | |||
| 45 | //¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ | ||
| 46 | // "C" Definitions, structures and enumerators of filesystem | ||
| 47 | //{{{ | ||
| 48 | |||
| 49 | //============================================================================ | ||
| 50 | /// @defgroup cpp_kodi_vfs_Defs_OpenFileFlags enum OpenFileFlags | ||
| 51 | /// @ingroup cpp_kodi_vfs_Defs | ||
| 52 | /// @brief **Flags to define way how file becomes opened**\n | ||
| 53 | /// The values can be used together, e.g. <b>`file.Open("myfile", ADDON_READ_TRUNCATED | ADDON_READ_CHUNKED);`</b> | ||
| 54 | /// | ||
| 55 | /// Used on @ref kodi::vfs::CFile::OpenFile(). | ||
| 56 | /// | ||
| 57 | ///@{ | ||
| 58 | typedef enum OpenFileFlags | ||
| 59 | { | ||
| 60 | /// @brief **0000 0000 0001** :\n | ||
| 61 | /// Indicate that caller can handle truncated reads, where function | ||
| 62 | /// returns before entire buffer has been filled. | ||
| 63 | ADDON_READ_TRUNCATED = 0x01, | ||
| 64 | |||
| 65 | /// @brief **0000 0000 0010** :\n | ||
| 66 | /// Indicate that that caller support read in the minimum defined | ||
| 67 | /// chunk size, this disables internal cache then. | ||
| 68 | ADDON_READ_CHUNKED = 0x02, | ||
| 69 | |||
| 70 | /// @brief **0000 0000 0100** :\n | ||
| 71 | /// Use cache to access this file. | ||
| 72 | ADDON_READ_CACHED = 0x04, | ||
| 73 | |||
| 74 | /// @brief **0000 0000 1000** :\n | ||
| 75 | /// Open without caching. regardless to file type. | ||
| 76 | ADDON_READ_NO_CACHE = 0x08, | ||
| 77 | |||
| 78 | /// @brief **0000 0001 0000** :\n | ||
| 79 | /// Calcuate bitrate for file while reading. | ||
| 80 | ADDON_READ_BITRATE = 0x10, | ||
| 81 | |||
| 82 | /// @brief **0000 0010 0000** :\n | ||
| 83 | /// Indicate to the caller we will seek between multiple streams in | ||
| 84 | /// the file frequently. | ||
| 85 | ADDON_READ_MULTI_STREAM = 0x20, | ||
| 86 | |||
| 87 | /// @brief **0000 0100 0000** :\n | ||
| 88 | /// indicate to the caller file is audio and/or video (and e.g. may | ||
| 89 | /// grow). | ||
| 90 | ADDON_READ_AUDIO_VIDEO = 0x40, | ||
| 91 | |||
| 92 | /// @brief **0000 1000 0000** :\n | ||
| 93 | /// Indicate that caller will do write operations before reading. | ||
| 94 | ADDON_READ_AFTER_WRITE = 0x80, | ||
| 95 | |||
| 96 | /// @brief **0001 0000 0000** :\n | ||
| 97 | /// Indicate that caller want to reopen a file if its already open. | ||
| 98 | ADDON_READ_REOPEN = 0x100 | ||
| 99 | } OpenFileFlags; | ||
| 100 | ///@} | ||
| 101 | //---------------------------------------------------------------------------- | ||
| 102 | |||
| 103 | //============================================================================ | ||
| 104 | /// @defgroup cpp_kodi_vfs_Defs_CURLOptiontype enum CURLOptiontype | ||
| 105 | /// @ingroup cpp_kodi_vfs_Defs | ||
| 106 | /// @brief **CURL message types**\n | ||
| 107 | /// Used on kodi::vfs::CFile::CURLAddOption(). | ||
| 108 | /// | ||
| 109 | //@{ | ||
| 110 | typedef enum CURLOptiontype | ||
| 111 | { | ||
| 112 | /// @brief Set a general option. | ||
| 113 | ADDON_CURL_OPTION_OPTION, | ||
| 114 | |||
| 115 | /// @brief Set a protocol option. | ||
| 116 | /// | ||
| 117 | /// The following names for *ADDON_CURL_OPTION_PROTOCOL* are possible: | ||
| 118 | /// | ||
| 119 | /// | Option name | Description | ||
| 120 | /// |------------------------------------:|:-------------------------------- | ||
| 121 | /// | <b>`accept-charset`</b> | Set the "accept-charset" header | ||
| 122 | /// | <b>`acceptencoding or encoding`</b> | Set the "accept-encoding" header | ||
| 123 | /// | <b>`active-remote`</b> | Set the "active-remote" header | ||
| 124 | /// | <b>`auth`</b> | Set the authentication method. Possible values: any, anysafe, digest, ntlm | ||
| 125 | /// | <b>`connection-timeout`</b> | Set the connection timeout in seconds | ||
| 126 | /// | <b>`cookie`</b> | Set the "cookie" header | ||
| 127 | /// | <b>`customrequest`</b> | Set a custom HTTP request like DELETE | ||
| 128 | /// | <b>`noshout`</b> | Set to true if kodi detects a stream as shoutcast by mistake. | ||
| 129 | /// | <b>`postdata`</b> | Set the post body (value needs to be base64 encoded). (Implicitly sets the request to POST) | ||
| 130 | /// | <b>`referer`</b> | Set the "referer" header | ||
| 131 | /// | <b>`user-agent`</b> | Set the "user-agent" header | ||
| 132 | /// | <b>`seekable`</b> | Set the stream seekable. 1: enable, 0: disable | ||
| 133 | /// | <b>`sslcipherlist`</b> | Set list of accepted SSL ciphers. | ||
| 134 | /// | ||
| 135 | ADDON_CURL_OPTION_PROTOCOL, | ||
| 136 | |||
| 137 | /// @brief Set User and password | ||
| 138 | ADDON_CURL_OPTION_CREDENTIALS, | ||
| 139 | |||
| 140 | /// @brief Add a Header | ||
| 141 | ADDON_CURL_OPTION_HEADER | ||
| 142 | } CURLOptiontype; | ||
| 143 | //@} | ||
| 144 | //---------------------------------------------------------------------------- | ||
| 145 | |||
| 146 | //============================================================================ | ||
| 147 | /// @defgroup cpp_kodi_vfs_Defs_FilePropertyTypes enum FilePropertyTypes | ||
| 148 | /// @ingroup cpp_kodi_vfs_Defs | ||
| 149 | /// @brief **File property types**\n | ||
| 150 | /// Mostly to read internet sources. | ||
| 151 | /// | ||
| 152 | /// Used on kodi::vfs::CFile::GetPropertyValue() and kodi::vfs::CFile::GetPropertyValues(). | ||
| 153 | /// | ||
| 154 | //@{ | ||
| 155 | typedef enum FilePropertyTypes | ||
| 156 | { | ||
| 157 | /// @brief Get protocol response line. | ||
| 158 | ADDON_FILE_PROPERTY_RESPONSE_PROTOCOL, | ||
| 159 | /// @brief Get a response header. | ||
| 160 | ADDON_FILE_PROPERTY_RESPONSE_HEADER, | ||
| 161 | /// @brief Get file content type. | ||
| 162 | ADDON_FILE_PROPERTY_CONTENT_TYPE, | ||
| 163 | /// @brief Get file content charset. | ||
| 164 | ADDON_FILE_PROPERTY_CONTENT_CHARSET, | ||
| 165 | /// @brief Get file mime type. | ||
| 166 | ADDON_FILE_PROPERTY_MIME_TYPE, | ||
| 167 | /// @brief Get file effective URL (last one if redirected). | ||
| 168 | ADDON_FILE_PROPERTY_EFFECTIVE_URL | ||
| 169 | } FilePropertyTypes; | ||
| 170 | //@} | ||
| 171 | //---------------------------------------------------------------------------- | ||
| 172 | |||
| 173 | //}}} | ||
| 174 | |||
| 175 | //¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ | ||
| 176 | // "C" Internal interface tables for intercommunications between addon and kodi | ||
| 177 | //{{{ | ||
| 178 | |||
| 179 | struct KODI_HTTP_HEADER | ||
| 180 | { | ||
| 181 | void* handle; | ||
| 182 | |||
| 183 | char* (*get_value)(void* kodiBase, void* handle, const char* param); | ||
| 184 | char** (*get_values)(void* kodiBase, void* handle, const char* param, int* length); | ||
| 185 | char* (*get_header)(void* kodiBase, void* handle); | ||
| 186 | char* (*get_mime_type)(void* kodiBase, void* handle); | ||
| 187 | char* (*get_charset)(void* kodiBase, void* handle); | ||
| 188 | char* (*get_proto_line)(void* kodiBase, void* handle); | ||
| 189 | }; | ||
| 190 | |||
| 191 | struct STAT_STRUCTURE | ||
| 192 | { | ||
| 193 | /// ID of device containing file | ||
| 194 | uint32_t deviceId; | ||
| 195 | /// Total size, in bytes | ||
| 196 | uint64_t size; | ||
| 197 | /// Time of last access | ||
| 198 | time_t accessTime; | ||
| 199 | /// Time of last modification | ||
| 200 | time_t modificationTime; | ||
| 201 | /// Time of last status change | ||
| 202 | time_t statusTime; | ||
| 203 | /// The stat url is a directory | ||
| 204 | bool isDirectory; | ||
| 205 | /// The stat url is a symbolic link | ||
| 206 | bool isSymLink; | ||
| 207 | /// The stat url is block special | ||
| 208 | bool isBlock; | ||
| 209 | /// The stat url is character special | ||
| 210 | bool isCharacter; | ||
| 211 | /// The stat url is FIFO special | ||
| 212 | bool isFifo; | ||
| 213 | /// The stat url is regular | ||
| 214 | bool isRegular; | ||
| 215 | /// The stat url is socket | ||
| 216 | bool isSocket; | ||
| 217 | /// The file serial number, which distinguishes this file from all other files on the same | ||
| 218 | /// device. | ||
| 219 | uint64_t fileSerialNumber; | ||
| 220 | }; | ||
| 221 | |||
| 222 | struct VFS_CACHE_STATUS_DATA | ||
| 223 | { | ||
| 224 | uint64_t forward; | ||
| 225 | unsigned int maxrate; | ||
| 226 | unsigned int currate; | ||
| 227 | bool lowspeed; | ||
| 228 | }; | ||
| 229 | |||
| 230 | struct VFSProperty | ||
| 231 | { | ||
| 232 | char* name; | ||
| 233 | char* val; | ||
| 234 | }; | ||
| 235 | |||
| 236 | struct VFSDirEntry | ||
| 237 | { | ||
| 238 | char* label; //!< item label | ||
| 239 | char* title; //!< item title | ||
| 240 | char* path; //!< item path | ||
| 241 | unsigned int num_props; //!< Number of properties attached to item | ||
| 242 | struct VFSProperty* properties; //!< Properties | ||
| 243 | time_t date_time; //!< file creation date & time | ||
| 244 | bool folder; //!< Item is a folder | ||
| 245 | uint64_t size; //!< Size of file represented by item | ||
| 246 | }; | ||
| 247 | |||
| 248 | typedef struct AddonToKodiFuncTable_kodi_filesystem | ||
| 249 | { | ||
| 250 | bool (*can_open_directory)(void* kodiBase, const char* url); | ||
| 251 | bool (*create_directory)(void* kodiBase, const char* path); | ||
| 252 | bool (*remove_directory)(void* kodiBase, const char* path); | ||
| 253 | bool (*directory_exists)(void* kodiBase, const char* path); | ||
| 254 | bool (*get_directory)(void* kodiBase, | ||
| 255 | const char* path, | ||
| 256 | const char* mask, | ||
| 257 | struct VFSDirEntry** items, | ||
| 258 | unsigned int* num_items); | ||
| 259 | void (*free_directory)(void* kodiBase, struct VFSDirEntry* items, unsigned int num_items); | ||
| 260 | |||
| 261 | bool (*file_exists)(void* kodiBase, const char* filename, bool useCache); | ||
| 262 | bool (*stat_file)(void* kodiBase, const char* filename, struct STAT_STRUCTURE* buffer); | ||
| 263 | bool (*delete_file)(void* kodiBase, const char* filename); | ||
| 264 | bool (*rename_file)(void* kodiBase, const char* filename, const char* newFileName); | ||
| 265 | bool (*copy_file)(void* kodiBase, const char* filename, const char* dest); | ||
| 266 | |||
| 267 | char* (*get_file_md5)(void* kodiBase, const char* filename); | ||
| 268 | char* (*get_cache_thumb_name)(void* kodiBase, const char* filename); | ||
| 269 | char* (*make_legal_filename)(void* kodiBase, const char* filename); | ||
| 270 | char* (*make_legal_path)(void* kodiBase, const char* path); | ||
| 271 | char* (*translate_special_protocol)(void* kodiBase, const char* strSource); | ||
| 272 | bool (*is_internet_stream)(void* kodiBase, const char* path, bool strictCheck); | ||
| 273 | bool (*is_on_lan)(void* kodiBase, const char* path); | ||
| 274 | bool (*is_remote)(void* kodiBase, const char* path); | ||
| 275 | bool (*is_local)(void* kodiBase, const char* path); | ||
| 276 | bool (*is_url)(void* kodiBase, const char* path); | ||
| 277 | bool (*get_http_header)(void* kodiBase, const char* url, struct KODI_HTTP_HEADER* headers); | ||
| 278 | bool (*get_mime_type)(void* kodiBase, const char* url, char** content, const char* useragent); | ||
| 279 | bool (*get_content_type)(void* kodiBase, | ||
| 280 | const char* url, | ||
| 281 | char** content, | ||
| 282 | const char* useragent); | ||
| 283 | bool (*get_cookies)(void* kodiBase, const char* url, char** cookies); | ||
| 284 | bool (*http_header_create)(void* kodiBase, struct KODI_HTTP_HEADER* headers); | ||
| 285 | void (*http_header_free)(void* kodiBase, struct KODI_HTTP_HEADER* headers); | ||
| 286 | |||
| 287 | void* (*open_file)(void* kodiBase, const char* filename, unsigned int flags); | ||
| 288 | void* (*open_file_for_write)(void* kodiBase, const char* filename, bool overwrite); | ||
| 289 | ssize_t (*read_file)(void* kodiBase, void* file, void* ptr, size_t size); | ||
| 290 | bool (*read_file_string)(void* kodiBase, void* file, char* szLine, int iLineLength); | ||
| 291 | ssize_t (*write_file)(void* kodiBase, void* file, const void* ptr, size_t size); | ||
| 292 | void (*flush_file)(void* kodiBase, void* file); | ||
| 293 | int64_t (*seek_file)(void* kodiBase, void* file, int64_t position, int whence); | ||
| 294 | int (*truncate_file)(void* kodiBase, void* file, int64_t size); | ||
| 295 | int64_t (*get_file_position)(void* kodiBase, void* file); | ||
| 296 | int64_t (*get_file_length)(void* kodiBase, void* file); | ||
| 297 | double (*get_file_download_speed)(void* kodiBase, void* file); | ||
| 298 | void (*close_file)(void* kodiBase, void* file); | ||
| 299 | int (*get_file_chunk_size)(void* kodiBase, void* file); | ||
| 300 | bool (*io_control_get_seek_possible)(void* kodiBase, void* file); | ||
| 301 | bool (*io_control_get_cache_status)(void* kodiBase, | ||
| 302 | void* file, | ||
| 303 | struct VFS_CACHE_STATUS_DATA* status); | ||
| 304 | bool (*io_control_set_cache_rate)(void* kodiBase, void* file, unsigned int rate); | ||
| 305 | bool (*io_control_set_retry)(void* kodiBase, void* file, bool retry); | ||
| 306 | char** (*get_property_values)( | ||
| 307 | void* kodiBase, void* file, int type, const char* name, int* numValues); | ||
| 308 | |||
| 309 | void* (*curl_create)(void* kodiBase, const char* url); | ||
| 310 | bool (*curl_add_option)( | ||
| 311 | void* kodiBase, void* file, int type, const char* name, const char* value); | ||
| 312 | bool (*curl_open)(void* kodiBase, void* file, unsigned int flags); | ||
| 313 | |||
| 314 | bool (*get_disk_space)( | ||
| 315 | void* kodiBase, const char* path, uint64_t* capacity, uint64_t* free, uint64_t* available); | ||
| 316 | bool (*remove_directory_recursive)(void* kodiBase, const char* path); | ||
| 317 | } AddonToKodiFuncTable_kodi_filesystem; | ||
| 318 | |||
| 319 | //}}} | ||
| 320 | |||
| 321 | #ifdef __cplusplus | ||
| 322 | } /* extern "C" */ | ||
| 323 | #endif /* __cplusplus */ | ||
| 324 | |||
| 325 | #endif /* !C_API_FILESYSTEM_H */ | ||
diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/general.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/general.h new file mode 100644 index 0000000..12afd02 --- /dev/null +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/general.h | |||
| @@ -0,0 +1,130 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2005-2018 Team Kodi | ||
| 3 | * This file is part of Kodi - https://kodi.tv | ||
| 4 | * | ||
| 5 | * SPDX-License-Identifier: GPL-2.0-or-later | ||
| 6 | * See LICENSES/README.md for more information. | ||
| 7 | */ | ||
| 8 | |||
| 9 | #pragma once | ||
| 10 | |||
| 11 | #ifndef C_API_GENERAL_H | ||
| 12 | #define C_API_GENERAL_H | ||
| 13 | |||
| 14 | #include <stdbool.h> | ||
| 15 | |||
| 16 | #ifdef __cplusplus | ||
| 17 | extern "C" | ||
| 18 | { | ||
| 19 | #endif /* __cplusplus */ | ||
| 20 | |||
| 21 | //============================================================================ | ||
| 22 | /// \ingroup cpp_kodi_Defs | ||
| 23 | /// @brief For kodi::CurrentKeyboardLayout used defines | ||
| 24 | /// | ||
| 25 | typedef enum StdKbButtons | ||
| 26 | { | ||
| 27 | /// The quantity of buttons per row on Kodi's standard keyboard | ||
| 28 | STD_KB_BUTTONS_PER_ROW = 20, | ||
| 29 | /// The quantity of rows on Kodi's standard keyboard | ||
| 30 | STD_KB_BUTTONS_MAX_ROWS = 4, | ||
| 31 | /// Keyboard layout type, this for initial standard | ||
| 32 | STD_KB_MODIFIER_KEY_NONE = 0x00, | ||
| 33 | /// Keyboard layout type, this for shift controled layout (uppercase) | ||
| 34 | STD_KB_MODIFIER_KEY_SHIFT = 0x01, | ||
| 35 | /// Keyboard layout type, this to show symbols | ||
| 36 | STD_KB_MODIFIER_KEY_SYMBOL = 0x02 | ||
| 37 | } StdKbButtons; | ||
| 38 | //---------------------------------------------------------------------------- | ||
| 39 | |||
| 40 | //============================================================================ | ||
| 41 | /// \ingroup cpp_kodi_Defs | ||
| 42 | /// @brief For kodi::QueueNotification() used message types | ||
| 43 | /// | ||
| 44 | typedef enum QueueMsg | ||
| 45 | { | ||
| 46 | /// Show info notification message | ||
| 47 | QUEUE_INFO, | ||
| 48 | /// Show warning notification message | ||
| 49 | QUEUE_WARNING, | ||
| 50 | /// Show error notification message | ||
| 51 | QUEUE_ERROR, | ||
| 52 | /// Show with own given image and parts if set on values | ||
| 53 | QUEUE_OWN_STYLE | ||
| 54 | } QueueMsg; | ||
| 55 | //---------------------------------------------------------------------------- | ||
| 56 | |||
| 57 | //============================================================================ | ||
| 58 | /// \ingroup cpp_kodi_Defs | ||
| 59 | /// @brief Format codes to get string from them. | ||
| 60 | /// | ||
| 61 | /// Used on kodi::GetLanguage(). | ||
| 62 | /// | ||
| 63 | typedef enum LangFormats | ||
| 64 | { | ||
| 65 | /// two letter code as defined in ISO 639-1 | ||
| 66 | LANG_FMT_ISO_639_1, | ||
| 67 | /// three letter code as defined in ISO 639-2/T or ISO 639-2/B | ||
| 68 | LANG_FMT_ISO_639_2, | ||
| 69 | /// full language name in English | ||
| 70 | LANG_FMT_ENGLISH_NAME | ||
| 71 | } LangFormats; | ||
| 72 | //---------------------------------------------------------------------------- | ||
| 73 | |||
| 74 | /* | ||
| 75 | * For interface between add-on and kodi. | ||
| 76 | * | ||
| 77 | * This structure defines the addresses of functions stored inside Kodi which | ||
| 78 | * are then available for the add-on to call | ||
| 79 | * | ||
| 80 | * All function pointers there are used by the C++ interface functions below. | ||
| 81 | * You find the set of them on xbmc/addons/interfaces/General.cpp | ||
| 82 | * | ||
| 83 | * Note: For add-on development itself this is not needed | ||
| 84 | */ | ||
| 85 | typedef struct AddonKeyboardKeyTable | ||
| 86 | { | ||
| 87 | char* keys[STD_KB_BUTTONS_MAX_ROWS][STD_KB_BUTTONS_PER_ROW]; | ||
| 88 | } AddonKeyboardKeyTable; | ||
| 89 | typedef struct AddonToKodiFuncTable_kodi | ||
| 90 | { | ||
| 91 | char* (*get_addon_info)(void* kodiBase, const char* id); | ||
| 92 | bool (*open_settings_dialog)(void* kodiBase); | ||
| 93 | char* (*unknown_to_utf8)(void* kodiBase, const char* source, bool* ret, bool failOnBadChar); | ||
| 94 | char* (*get_localized_string)(void* kodiBase, long label_id); | ||
| 95 | char* (*get_language)(void* kodiBase, int format, bool region); | ||
| 96 | bool (*queue_notification)(void* kodiBase, | ||
| 97 | int type, | ||
| 98 | const char* header, | ||
| 99 | const char* message, | ||
| 100 | const char* imageFile, | ||
| 101 | unsigned int displayTime, | ||
| 102 | bool withSound, | ||
| 103 | unsigned int messageTime); | ||
| 104 | void (*get_md5)(void* kodiBase, const char* text, char* md5); | ||
| 105 | char* (*get_temp_path)(void* kodiBase); | ||
| 106 | char* (*get_region)(void* kodiBase, const char* id); | ||
| 107 | void (*get_free_mem)(void* kodiBase, long* free, long* total, bool as_bytes); | ||
| 108 | int (*get_global_idle_time)(void* kodiBase); | ||
| 109 | bool (*is_addon_avilable)(void* kodiBase, const char* id, char** version, bool* enabled); | ||
| 110 | void (*kodi_version)(void* kodiBase, | ||
| 111 | char** compile_name, | ||
| 112 | int* major, | ||
| 113 | int* minor, | ||
| 114 | char** revision, | ||
| 115 | char** tag, | ||
| 116 | char** tagversion); | ||
| 117 | char* (*get_current_skin_id)(void* kodiBase); | ||
| 118 | bool (*get_keyboard_layout)(void* kodiBase, | ||
| 119 | char** layout_name, | ||
| 120 | int modifier_key, | ||
| 121 | struct AddonKeyboardKeyTable* layout); | ||
| 122 | bool (*change_keyboard_layout)(void* kodiBase, char** layout_name); | ||
| 123 | } AddonToKodiFuncTable_kodi; | ||
| 124 | |||
| 125 | |||
| 126 | #ifdef __cplusplus | ||
| 127 | } /* extern "C" */ | ||
| 128 | #endif /* __cplusplus */ | ||
| 129 | |||
| 130 | #endif /* !C_API_GENERAL_H */ | ||
diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/CMakeLists.txt b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/CMakeLists.txt new file mode 100644 index 0000000..53c4e60 --- /dev/null +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/CMakeLists.txt | |||
| @@ -0,0 +1,8 @@ | |||
| 1 | set(HEADERS definitions.h | ||
| 2 | general.h | ||
| 3 | list_item.h | ||
| 4 | window.h) | ||
| 5 | |||
| 6 | if(NOT ENABLE_STATIC_LIBS) | ||
| 7 | core_add_library(addons_kodi-dev-kit_include_kodi_c-api_gui) | ||
| 8 | endif() | ||
diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/CMakeLists.txt b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/CMakeLists.txt new file mode 100644 index 0000000..2e6cd53 --- /dev/null +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/CMakeLists.txt | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | set(HEADERS button.h | ||
| 2 | edit.h | ||
| 3 | fade_label.h | ||
| 4 | image.h | ||
| 5 | label.h | ||
| 6 | progress.h | ||
| 7 | radio_button.h | ||
| 8 | rendering.h | ||
| 9 | settings_slider.h | ||
| 10 | slider.h | ||
| 11 | spin.h | ||
| 12 | text_box.h) | ||
| 13 | |||
| 14 | if(NOT ENABLE_STATIC_LIBS) | ||
| 15 | core_add_library(addons_kodi-dev-kit_include_kodi_c-api_gui_controls) | ||
| 16 | endif() | ||
diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/button.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/button.h new file mode 100644 index 0000000..84fd822 --- /dev/null +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/button.h | |||
| @@ -0,0 +1,35 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2005-2020 Team Kodi | ||
| 3 | * This file is part of Kodi - https://kodi.tv | ||
| 4 | * | ||
| 5 | * SPDX-License-Identifier: GPL-2.0-or-later | ||
| 6 | * See LICENSES/README.md for more information. | ||
| 7 | */ | ||
| 8 | |||
| 9 | #pragma once | ||
| 10 | |||
| 11 | #ifndef C_API_GUI_CONTROLS_BUTTON_H | ||
| 12 | #define C_API_GUI_CONTROLS_BUTTON_H | ||
| 13 | |||
| 14 | #include "../definitions.h" | ||
| 15 | |||
| 16 | #ifdef __cplusplus | ||
| 17 | extern "C" | ||
| 18 | { | ||
| 19 | #endif /* __cplusplus */ | ||
| 20 | |||
| 21 | typedef struct AddonToKodiFuncTable_kodi_gui_control_button | ||
| 22 | { | ||
| 23 | void (*set_visible)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle, bool visible); | ||
| 24 | void (*set_enabled)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle, bool enabled); | ||
| 25 | void (*set_label)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle, const char* label); | ||
| 26 | char* (*get_label)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle); | ||
| 27 | void (*set_label2)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle, const char* label); | ||
| 28 | char* (*get_label2)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle); | ||
| 29 | } AddonToKodiFuncTable_kodi_gui_control_button; | ||
| 30 | |||
| 31 | #ifdef __cplusplus | ||
| 32 | } /* extern "C" */ | ||
| 33 | #endif /* __cplusplus */ | ||
| 34 | |||
| 35 | #endif /* !C_API_GUI_CONTROLS_BUTTON_H */ | ||
diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/edit.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/edit.h new file mode 100644 index 0000000..ca38b27 --- /dev/null +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/edit.h | |||
| @@ -0,0 +1,79 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2005-2020 Team Kodi | ||
| 3 | * This file is part of Kodi - https://kodi.tv | ||
| 4 | * | ||
| 5 | * SPDX-License-Identifier: GPL-2.0-or-later | ||
| 6 | * See LICENSES/README.md for more information. | ||
| 7 | */ | ||
| 8 | |||
| 9 | #pragma once | ||
| 10 | |||
| 11 | #ifndef C_API_GUI_CONTROLS_EDIT_H | ||
| 12 | #define C_API_GUI_CONTROLS_EDIT_H | ||
| 13 | |||
| 14 | #include "../definitions.h" | ||
| 15 | |||
| 16 | #ifdef __cplusplus | ||
| 17 | extern "C" | ||
| 18 | { | ||
| 19 | #endif /* __cplusplus */ | ||
| 20 | |||
| 21 | //============================================================================ | ||
| 22 | /// @ingroup cpp_kodi_gui_windows_controls_CEdit_Defs | ||
| 23 | /// @{ | ||
| 24 | /// @anchor AddonGUIInputType | ||
| 25 | /// @brief Text input types used on kodi::gui::controls::CEdit | ||
| 26 | enum AddonGUIInputType | ||
| 27 | { | ||
| 28 | /// Text inside edit control only readable | ||
| 29 | ADDON_INPUT_TYPE_READONLY = -1, | ||
| 30 | /// Normal text entries | ||
| 31 | ADDON_INPUT_TYPE_TEXT = 0, | ||
| 32 | /// To use on edit control only numeric numbers | ||
| 33 | ADDON_INPUT_TYPE_NUMBER, | ||
| 34 | /// To insert seconds | ||
| 35 | ADDON_INPUT_TYPE_SECONDS, | ||
| 36 | /// To insert time | ||
| 37 | ADDON_INPUT_TYPE_TIME, | ||
| 38 | /// To insert a date | ||
| 39 | ADDON_INPUT_TYPE_DATE, | ||
| 40 | /// Used for write in IP addresses | ||
| 41 | ADDON_INPUT_TYPE_IPADDRESS, | ||
| 42 | /// Text field used as password entry field with not visible text | ||
| 43 | ADDON_INPUT_TYPE_PASSWORD, | ||
| 44 | /// Text field used as password entry field with not visible text but | ||
| 45 | /// returned as MD5 value | ||
| 46 | ADDON_INPUT_TYPE_PASSWORD_MD5, | ||
| 47 | /// Use text field for search purpose | ||
| 48 | ADDON_INPUT_TYPE_SEARCH, | ||
| 49 | /// Text field as filter | ||
| 50 | ADDON_INPUT_TYPE_FILTER, | ||
| 51 | /// | ||
| 52 | ADDON_INPUT_TYPE_PASSWORD_NUMBER_VERIFY_NEW | ||
| 53 | }; | ||
| 54 | /// @} | ||
| 55 | //---------------------------------------------------------------------------- | ||
| 56 | |||
| 57 | typedef struct AddonToKodiFuncTable_kodi_gui_control_edit | ||
| 58 | { | ||
| 59 | void (*set_visible)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle, bool visible); | ||
| 60 | void (*set_enabled)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle, bool enabled); | ||
| 61 | void (*set_label)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle, const char* label); | ||
| 62 | char* (*get_label)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle); | ||
| 63 | void (*set_text)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle, const char* text); | ||
| 64 | char* (*get_text)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle); | ||
| 65 | void (*set_cursor_position)(KODI_HANDLE kodiBase, | ||
| 66 | KODI_GUI_CONTROL_HANDLE handle, | ||
| 67 | unsigned int position); | ||
| 68 | unsigned int (*get_cursor_position)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle); | ||
| 69 | void (*set_input_type)(KODI_HANDLE kodiBase, | ||
| 70 | KODI_GUI_CONTROL_HANDLE handle, | ||
| 71 | int type, | ||
| 72 | const char* heading); | ||
| 73 | } AddonToKodiFuncTable_kodi_gui_control_edit; | ||
| 74 | |||
| 75 | #ifdef __cplusplus | ||
| 76 | } /* extern "C" */ | ||
| 77 | #endif /* __cplusplus */ | ||
| 78 | |||
| 79 | #endif /* !C_API_GUI_CONTROLS_EDIT_H */ | ||
diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/fade_label.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/fade_label.h new file mode 100644 index 0000000..fea014b --- /dev/null +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/fade_label.h | |||
| @@ -0,0 +1,34 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2005-2020 Team Kodi | ||
| 3 | * This file is part of Kodi - https://kodi.tv | ||
| 4 | * | ||
| 5 | * SPDX-License-Identifier: GPL-2.0-or-later | ||
| 6 | * See LICENSES/README.md for more information. | ||
| 7 | */ | ||
| 8 | |||
| 9 | #pragma once | ||
| 10 | |||
| 11 | #ifndef C_API_GUI_CONTROLS_FADE_LABEL_H | ||
| 12 | #define C_API_GUI_CONTROLS_FADE_LABEL_H | ||
| 13 | |||
| 14 | #include "../definitions.h" | ||
| 15 | |||
| 16 | #ifdef __cplusplus | ||
| 17 | extern "C" | ||
| 18 | { | ||
| 19 | #endif /* __cplusplus */ | ||
| 20 | |||
| 21 | typedef struct AddonToKodiFuncTable_kodi_gui_control_fade_label | ||
| 22 | { | ||
| 23 | void (*set_visible)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle, bool visible); | ||
| 24 | void (*add_label)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle, const char* text); | ||
| 25 | char* (*get_label)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle); | ||
| 26 | void (*set_scrolling)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle, bool scroll); | ||
| 27 | void (*reset)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle); | ||
| 28 | } AddonToKodiFuncTable_kodi_gui_control_fade_label; | ||
| 29 | |||
| 30 | #ifdef __cplusplus | ||
| 31 | } /* extern "C" */ | ||
| 32 | #endif /* __cplusplus */ | ||
| 33 | |||
| 34 | #endif /* !C_API_GUI_CONTROLS_FADE_LABEL_H */ | ||
diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/image.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/image.h new file mode 100644 index 0000000..4a46e6d --- /dev/null +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/image.h | |||
| @@ -0,0 +1,37 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2005-2020 Team Kodi | ||
| 3 | * This file is part of Kodi - https://kodi.tv | ||
| 4 | * | ||
| 5 | * SPDX-License-Identifier: GPL-2.0-or-later | ||
| 6 | * See LICENSES/README.md for more information. | ||
| 7 | */ | ||
| 8 | |||
| 9 | #pragma once | ||
| 10 | |||
| 11 | #ifndef C_API_GUI_CONTROLS_IMAGE_H | ||
| 12 | #define C_API_GUI_CONTROLS_IMAGE_H | ||
| 13 | |||
| 14 | #include "../definitions.h" | ||
| 15 | |||
| 16 | #ifdef __cplusplus | ||
| 17 | extern "C" | ||
| 18 | { | ||
| 19 | #endif /* __cplusplus */ | ||
| 20 | |||
| 21 | typedef struct AddonToKodiFuncTable_kodi_gui_control_image | ||
| 22 | { | ||
| 23 | void (*set_visible)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle, bool visible); | ||
| 24 | void (*set_filename)(KODI_HANDLE kodiBase, | ||
| 25 | KODI_GUI_CONTROL_HANDLE handle, | ||
| 26 | const char* filename, | ||
| 27 | bool use_cache); | ||
| 28 | void (*set_color_diffuse)(KODI_HANDLE kodiBase, | ||
| 29 | KODI_GUI_CONTROL_HANDLE handle, | ||
| 30 | uint32_t color_diffuse); | ||
| 31 | } AddonToKodiFuncTable_kodi_gui_control_image; | ||
| 32 | |||
| 33 | #ifdef __cplusplus | ||
| 34 | } /* extern "C" */ | ||
| 35 | #endif /* __cplusplus */ | ||
| 36 | |||
| 37 | #endif /* !C_API_GUI_CONTROLS_IMAGE_H */ | ||
diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/label.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/label.h new file mode 100644 index 0000000..d8a9fe4 --- /dev/null +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/label.h | |||
| @@ -0,0 +1,32 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2005-2020 Team Kodi | ||
| 3 | * This file is part of Kodi - https://kodi.tv | ||
| 4 | * | ||
| 5 | * SPDX-License-Identifier: GPL-2.0-or-later | ||
| 6 | * See LICENSES/README.md for more information. | ||
| 7 | */ | ||
| 8 | |||
| 9 | #pragma once | ||
| 10 | |||
| 11 | #ifndef C_API_GUI_CONTROLS_LABEL_H | ||
| 12 | #define C_API_GUI_CONTROLS_LABEL_H | ||
| 13 | |||
| 14 | #include "../definitions.h" | ||
| 15 | |||
| 16 | #ifdef __cplusplus | ||
| 17 | extern "C" | ||
| 18 | { | ||
| 19 | #endif /* __cplusplus */ | ||
| 20 | |||
| 21 | typedef struct AddonToKodiFuncTable_kodi_gui_control_label | ||
| 22 | { | ||
| 23 | void (*set_visible)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle, bool visible); | ||
| 24 | void (*set_label)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle, const char* text); | ||
| 25 | char* (*get_label)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle); | ||
| 26 | } AddonToKodiFuncTable_kodi_gui_control_label; | ||
| 27 | |||
| 28 | #ifdef __cplusplus | ||
| 29 | } /* extern "C" */ | ||
| 30 | #endif /* __cplusplus */ | ||
| 31 | |||
| 32 | #endif /* !C_API_GUI_CONTROLS_LABEL_H */ | ||
diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/progress.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/progress.h new file mode 100644 index 0000000..88638e0 --- /dev/null +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/progress.h | |||
| @@ -0,0 +1,32 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2005-2020 Team Kodi | ||
| 3 | * This file is part of Kodi - https://kodi.tv | ||
| 4 | * | ||
| 5 | * SPDX-License-Identifier: GPL-2.0-or-later | ||
| 6 | * See LICENSES/README.md for more information. | ||
| 7 | */ | ||
| 8 | |||
| 9 | #pragma once | ||
| 10 | |||
| 11 | #ifndef C_API_GUI_CONTROLS_PROGRESS_H | ||
| 12 | #define C_API_GUI_CONTROLS_PROGRESS_H | ||
| 13 | |||
| 14 | #include "../definitions.h" | ||
| 15 | |||
| 16 | #ifdef __cplusplus | ||
| 17 | extern "C" | ||
| 18 | { | ||
| 19 | #endif /* __cplusplus */ | ||
| 20 | |||
| 21 | typedef struct AddonToKodiFuncTable_kodi_gui_control_progress | ||
| 22 | { | ||
| 23 | void (*set_visible)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle, bool visible); | ||
| 24 | void (*set_percentage)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle, float percent); | ||
| 25 | float (*get_percentage)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle); | ||
| 26 | } AddonToKodiFuncTable_kodi_gui_control_progress; | ||
| 27 | |||
| 28 | #ifdef __cplusplus | ||
| 29 | } /* extern "C" */ | ||
| 30 | #endif /* __cplusplus */ | ||
| 31 | |||
| 32 | #endif /* !C_API_GUI_CONTROLS_PROGRESS_H */ | ||
diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/radio_button.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/radio_button.h new file mode 100644 index 0000000..a672d95 --- /dev/null +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/radio_button.h | |||
| @@ -0,0 +1,35 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2005-2020 Team Kodi | ||
| 3 | * This file is part of Kodi - https://kodi.tv | ||
| 4 | * | ||
| 5 | * SPDX-License-Identifier: GPL-2.0-or-later | ||
| 6 | * See LICENSES/README.md for more information. | ||
| 7 | */ | ||
| 8 | |||
| 9 | #pragma once | ||
| 10 | |||
| 11 | #ifndef C_API_GUI_CONTROLS_RADIO_BUTTON_H | ||
| 12 | #define C_API_GUI_CONTROLS_RADIO_BUTTON_H | ||
| 13 | |||
| 14 | #include "../definitions.h" | ||
| 15 | |||
| 16 | #ifdef __cplusplus | ||
| 17 | extern "C" | ||
| 18 | { | ||
| 19 | #endif /* __cplusplus */ | ||
| 20 | |||
| 21 | typedef struct AddonToKodiFuncTable_kodi_gui_control_radio_button | ||
| 22 | { | ||
| 23 | void (*set_visible)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle, bool visible); | ||
| 24 | void (*set_enabled)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle, bool enabled); | ||
| 25 | void (*set_label)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle, const char* text); | ||
| 26 | char* (*get_label)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle); | ||
| 27 | void (*set_selected)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle, bool selected); | ||
| 28 | bool (*is_selected)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle); | ||
| 29 | } AddonToKodiFuncTable_kodi_gui_control_radio_button; | ||
| 30 | |||
| 31 | #ifdef __cplusplus | ||
| 32 | } /* extern "C" */ | ||
| 33 | #endif /* __cplusplus */ | ||
| 34 | |||
| 35 | #endif /* !C_API_GUI_CONTROLS_RADIO_BUTTON_H */ | ||
diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/rendering.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/rendering.h new file mode 100644 index 0000000..d4053a6 --- /dev/null +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/rendering.h | |||
| @@ -0,0 +1,38 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2005-2020 Team Kodi | ||
| 3 | * This file is part of Kodi - https://kodi.tv | ||
| 4 | * | ||
| 5 | * SPDX-License-Identifier: GPL-2.0-or-later | ||
| 6 | * See LICENSES/README.md for more information. | ||
| 7 | */ | ||
| 8 | |||
| 9 | #pragma once | ||
| 10 | |||
| 11 | #ifndef C_API_GUI_CONTROLS_RENDERING_H | ||
| 12 | #define C_API_GUI_CONTROLS_RENDERING_H | ||
| 13 | |||
| 14 | #include "../definitions.h" | ||
| 15 | |||
| 16 | #ifdef __cplusplus | ||
| 17 | extern "C" | ||
| 18 | { | ||
| 19 | #endif /* __cplusplus */ | ||
| 20 | |||
| 21 | typedef struct AddonToKodiFuncTable_kodi_gui_control_rendering | ||
| 22 | { | ||
| 23 | void (*set_callbacks)( | ||
| 24 | KODI_HANDLE kodiBase, | ||
| 25 | KODI_GUI_CONTROL_HANDLE handle, | ||
| 26 | KODI_GUI_CLIENT_HANDLE clienthandle, | ||
| 27 | bool (*createCB)(KODI_GUI_CLIENT_HANDLE, int, int, int, int, ADDON_HARDWARE_CONTEXT), | ||
| 28 | void (*renderCB)(KODI_GUI_CLIENT_HANDLE), | ||
| 29 | void (*stopCB)(KODI_GUI_CLIENT_HANDLE), | ||
| 30 | bool (*dirtyCB)(KODI_GUI_CLIENT_HANDLE)); | ||
| 31 | void (*destroy)(void* kodiBase, KODI_GUI_CONTROL_HANDLE handle); | ||
| 32 | } AddonToKodiFuncTable_kodi_gui_control_rendering; | ||
| 33 | |||
| 34 | #ifdef __cplusplus | ||
| 35 | } /* extern "C" */ | ||
| 36 | #endif /* __cplusplus */ | ||
| 37 | |||
| 38 | #endif /* !C_API_GUI_CONTROLS_RENDERING_H */ | ||
diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/settings_slider.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/settings_slider.h new file mode 100644 index 0000000..2cbc972 --- /dev/null +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/settings_slider.h | |||
| @@ -0,0 +1,48 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2005-2020 Team Kodi | ||
| 3 | * This file is part of Kodi - https://kodi.tv | ||
| 4 | * | ||
| 5 | * SPDX-License-Identifier: GPL-2.0-or-later | ||
| 6 | * See LICENSES/README.md for more information. | ||
| 7 | */ | ||
| 8 | |||
| 9 | #pragma once | ||
| 10 | |||
| 11 | #ifndef C_API_GUI_CONTROLS_SETTINGS_SLIDER_H | ||
| 12 | #define C_API_GUI_CONTROLS_SETTINGS_SLIDER_H | ||
| 13 | |||
| 14 | #include "../definitions.h" | ||
| 15 | |||
| 16 | #ifdef __cplusplus | ||
| 17 | extern "C" | ||
| 18 | { | ||
| 19 | #endif /* __cplusplus */ | ||
| 20 | |||
| 21 | typedef struct AddonToKodiFuncTable_kodi_gui_control_settings_slider | ||
| 22 | { | ||
| 23 | void (*set_visible)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle, bool visible); | ||
| 24 | void (*set_enabled)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle, bool enabled); | ||
| 25 | void (*set_text)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle, const char* label); | ||
| 26 | void (*reset)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle); | ||
| 27 | void (*set_int_range)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle, int start, int end); | ||
| 28 | void (*set_int_value)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle, int value); | ||
| 29 | int (*get_int_value)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle); | ||
| 30 | void (*set_int_interval)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle, int interval); | ||
| 31 | void (*set_percentage)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle, float percent); | ||
| 32 | float (*get_percentage)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle); | ||
| 33 | void (*set_float_range)(KODI_HANDLE kodiBase, | ||
| 34 | KODI_GUI_CONTROL_HANDLE handle, | ||
| 35 | float start, | ||
| 36 | float end); | ||
| 37 | void (*set_float_value)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle, float value); | ||
| 38 | float (*get_float_value)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle); | ||
| 39 | void (*set_float_interval)(KODI_HANDLE kodiBase, | ||
| 40 | KODI_GUI_CONTROL_HANDLE handle, | ||
| 41 | float interval); | ||
| 42 | } AddonToKodiFuncTable_kodi_gui_control_settings_slider; | ||
| 43 | |||
| 44 | #ifdef __cplusplus | ||
| 45 | } /* extern "C" */ | ||
| 46 | #endif /* __cplusplus */ | ||
| 47 | |||
| 48 | #endif /* !C_API_GUI_CONTROLS_SETTINGS_SLIDER_H */ | ||
diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/slider.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/slider.h new file mode 100644 index 0000000..0a67208 --- /dev/null +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/slider.h | |||
| @@ -0,0 +1,48 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2005-2020 Team Kodi | ||
| 3 | * This file is part of Kodi - https://kodi.tv | ||
| 4 | * | ||
| 5 | * SPDX-License-Identifier: GPL-2.0-or-later | ||
| 6 | * See LICENSES/README.md for more information. | ||
| 7 | */ | ||
| 8 | |||
| 9 | #pragma once | ||
| 10 | |||
| 11 | #ifndef C_API_GUI_CONTROLS_SLIDER_H | ||
| 12 | #define C_API_GUI_CONTROLS_SLIDER_H | ||
| 13 | |||
| 14 | #include "../definitions.h" | ||
| 15 | |||
| 16 | #ifdef __cplusplus | ||
| 17 | extern "C" | ||
| 18 | { | ||
| 19 | #endif /* __cplusplus */ | ||
| 20 | |||
| 21 | typedef struct AddonToKodiFuncTable_kodi_gui_control_slider | ||
| 22 | { | ||
| 23 | void (*set_visible)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle, bool visible); | ||
| 24 | void (*set_enabled)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle, bool enabled); | ||
| 25 | void (*reset)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle); | ||
| 26 | char* (*get_description)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle); | ||
| 27 | void (*set_int_range)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle, int start, int end); | ||
| 28 | void (*set_int_value)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle, int value); | ||
| 29 | int (*get_int_value)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle); | ||
| 30 | void (*set_int_interval)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle, int interval); | ||
| 31 | void (*set_percentage)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle, float percent); | ||
| 32 | float (*get_percentage)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle); | ||
| 33 | void (*set_float_range)(KODI_HANDLE kodiBase, | ||
| 34 | KODI_GUI_CONTROL_HANDLE handle, | ||
| 35 | float start, | ||
| 36 | float end); | ||
| 37 | void (*set_float_value)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle, float value); | ||
| 38 | float (*get_float_value)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle); | ||
| 39 | void (*set_float_interval)(KODI_HANDLE kodiBase, | ||
| 40 | KODI_GUI_CONTROL_HANDLE handle, | ||
| 41 | float interval); | ||
| 42 | } AddonToKodiFuncTable_kodi_gui_control_slider; | ||
| 43 | |||
| 44 | #ifdef __cplusplus | ||
| 45 | } /* extern "C" */ | ||
| 46 | #endif /* __cplusplus */ | ||
| 47 | |||
| 48 | #endif /* !C_API_GUI_CONTROLS_SLIDER_H */ | ||
diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/spin.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/spin.h new file mode 100644 index 0000000..d5e5c86 --- /dev/null +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/spin.h | |||
| @@ -0,0 +1,58 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2005-2020 Team Kodi | ||
| 3 | * This file is part of Kodi - https://kodi.tv | ||
| 4 | * | ||
| 5 | * SPDX-License-Identifier: GPL-2.0-or-later | ||
| 6 | * See LICENSES/README.md for more information. | ||
| 7 | */ | ||
| 8 | |||
| 9 | #pragma once | ||
| 10 | |||
| 11 | #ifndef C_API_GUI_CONTROLS_SPIN_H | ||
| 12 | #define C_API_GUI_CONTROLS_SPIN_H | ||
| 13 | |||
| 14 | #include "../definitions.h" | ||
| 15 | |||
| 16 | #ifdef __cplusplus | ||
| 17 | extern "C" | ||
| 18 | { | ||
| 19 | #endif /* __cplusplus */ | ||
| 20 | |||
| 21 | typedef struct AddonToKodiFuncTable_kodi_gui_control_spin | ||
| 22 | { | ||
| 23 | void (*set_visible)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle, bool visible); | ||
| 24 | void (*set_enabled)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle, bool enabled); | ||
| 25 | void (*set_text)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle, const char* text); | ||
| 26 | void (*reset)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle); | ||
| 27 | void (*set_type)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle, int type); | ||
| 28 | void (*add_string_label)(KODI_HANDLE kodiBase, | ||
| 29 | KODI_GUI_CONTROL_HANDLE handle, | ||
| 30 | const char* label, | ||
| 31 | const char* value); | ||
| 32 | void (*set_string_value)(KODI_HANDLE kodiBase, | ||
| 33 | KODI_GUI_CONTROL_HANDLE handle, | ||
| 34 | const char* value); | ||
| 35 | char* (*get_string_value)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle); | ||
| 36 | void (*add_int_label)(KODI_HANDLE kodiBase, | ||
| 37 | KODI_GUI_CONTROL_HANDLE handle, | ||
| 38 | const char* label, | ||
| 39 | int value); | ||
| 40 | void (*set_int_range)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle, int start, int end); | ||
| 41 | void (*set_int_value)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle, int value); | ||
| 42 | int (*get_int_value)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle); | ||
| 43 | void (*set_float_range)(KODI_HANDLE kodiBase, | ||
| 44 | KODI_GUI_CONTROL_HANDLE handle, | ||
| 45 | float start, | ||
| 46 | float end); | ||
| 47 | void (*set_float_value)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle, float value); | ||
| 48 | float (*get_float_value)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle); | ||
| 49 | void (*set_float_interval)(KODI_HANDLE kodiBase, | ||
| 50 | KODI_GUI_CONTROL_HANDLE handle, | ||
| 51 | float interval); | ||
| 52 | } AddonToKodiFuncTable_kodi_gui_control_spin; | ||
| 53 | |||
| 54 | #ifdef __cplusplus | ||
| 55 | } /* extern "C" */ | ||
| 56 | #endif /* __cplusplus */ | ||
| 57 | |||
| 58 | #endif /* !C_API_GUI_CONTROLS_SPIN_H */ | ||
diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/text_box.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/text_box.h new file mode 100644 index 0000000..276d04c --- /dev/null +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/text_box.h | |||
| @@ -0,0 +1,36 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2005-2020 Team Kodi | ||
| 3 | * This file is part of Kodi - https://kodi.tv | ||
| 4 | * | ||
| 5 | * SPDX-License-Identifier: GPL-2.0-or-later | ||
| 6 | * See LICENSES/README.md for more information. | ||
| 7 | */ | ||
| 8 | |||
| 9 | #pragma once | ||
| 10 | |||
| 11 | #ifndef C_API_GUI_CONTROLS_TEXT_BOX_H | ||
| 12 | #define C_API_GUI_CONTROLS_TEXT_BOX_H | ||
| 13 | |||
| 14 | #include "../definitions.h" | ||
| 15 | |||
| 16 | #ifdef __cplusplus | ||
| 17 | extern "C" | ||
| 18 | { | ||
| 19 | #endif /* __cplusplus */ | ||
| 20 | |||
| 21 | typedef struct AddonToKodiFuncTable_kodi_gui_control_text_box | ||
| 22 | { | ||
| 23 | void (*set_visible)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle, bool visible); | ||
| 24 | void (*reset)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle); | ||
| 25 | void (*set_text)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle, const char* text); | ||
| 26 | char* (*get_text)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle); | ||
| 27 | void (*scroll)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle, unsigned int scroll); | ||
| 28 | void (*set_auto_scrolling)( | ||
| 29 | KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle, int delay, int time, int repeat); | ||
| 30 | } AddonToKodiFuncTable_kodi_gui_control_text_box; | ||
| 31 | |||
| 32 | #ifdef __cplusplus | ||
| 33 | } /* extern "C" */ | ||
| 34 | #endif /* __cplusplus */ | ||
| 35 | |||
| 36 | #endif /* !C_API_GUI_CONTROLS_TEXT_BOX_H */ | ||
diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/definitions.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/definitions.h new file mode 100644 index 0000000..ec60bc2 --- /dev/null +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/definitions.h | |||
| @@ -0,0 +1,106 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2005-2018 Team Kodi | ||
| 3 | * This file is part of Kodi - https://kodi.tv | ||
| 4 | * | ||
| 5 | * SPDX-License-Identifier: GPL-2.0-or-later | ||
| 6 | * See LICENSES/README.md for more information. | ||
| 7 | */ | ||
| 8 | |||
| 9 | #pragma once | ||
| 10 | |||
| 11 | #ifndef C_API_GUI_DEFINITIONS_H | ||
| 12 | #define C_API_GUI_DEFINITIONS_H | ||
| 13 | |||
| 14 | #include "../addon_base.h" | ||
| 15 | |||
| 16 | #ifdef __cplusplus | ||
| 17 | extern "C" | ||
| 18 | { | ||
| 19 | #endif /* __cplusplus */ | ||
| 20 | |||
| 21 | typedef void* KODI_GUI_HANDLE; | ||
| 22 | typedef void* KODI_GUI_CLIENT_HANDLE; | ||
| 23 | typedef void* KODI_GUI_CONTROL_HANDLE; | ||
| 24 | typedef void* KODI_GUI_LISTITEM_HANDLE; | ||
| 25 | typedef void* KODI_GUI_WINDOW_HANDLE; | ||
| 26 | |||
| 27 | struct AddonToKodiFuncTable_kodi_gui_general; | ||
| 28 | struct AddonToKodiFuncTable_kodi_gui_control_button; | ||
| 29 | struct AddonToKodiFuncTable_kodi_gui_control_edit; | ||
| 30 | struct AddonToKodiFuncTable_kodi_gui_control_fade_label; | ||
| 31 | struct AddonToKodiFuncTable_kodi_gui_control_label; | ||
| 32 | struct AddonToKodiFuncTable_kodi_gui_control_image; | ||
| 33 | struct AddonToKodiFuncTable_kodi_gui_control_progress; | ||
| 34 | struct AddonToKodiFuncTable_kodi_gui_control_radio_button; | ||
| 35 | struct AddonToKodiFuncTable_kodi_gui_control_rendering; | ||
| 36 | struct AddonToKodiFuncTable_kodi_gui_control_settings_slider; | ||
| 37 | struct AddonToKodiFuncTable_kodi_gui_control_slider; | ||
| 38 | struct AddonToKodiFuncTable_kodi_gui_control_spin; | ||
| 39 | struct AddonToKodiFuncTable_kodi_gui_control_text_box; | ||
| 40 | struct AddonToKodiFuncTable_kodi_gui_dialogContextMenu; | ||
| 41 | struct AddonToKodiFuncTable_kodi_gui_dialogExtendedProgress; | ||
| 42 | struct AddonToKodiFuncTable_kodi_gui_dialogFileBrowser; | ||
| 43 | struct AddonToKodiFuncTable_kodi_gui_dialogKeyboard; | ||
| 44 | struct AddonToKodiFuncTable_kodi_gui_dialogNumeric; | ||
| 45 | struct AddonToKodiFuncTable_kodi_gui_dialogOK; | ||
| 46 | struct AddonToKodiFuncTable_kodi_gui_dialogProgress; | ||
| 47 | struct AddonToKodiFuncTable_kodi_gui_dialogSelect; | ||
| 48 | struct AddonToKodiFuncTable_kodi_gui_dialogTextViewer; | ||
| 49 | struct AddonToKodiFuncTable_kodi_gui_dialogYesNo; | ||
| 50 | struct AddonToKodiFuncTable_kodi_gui_listItem; | ||
| 51 | struct AddonToKodiFuncTable_kodi_gui_window; | ||
| 52 | |||
| 53 | typedef struct AddonToKodiFuncTable_kodi_gui | ||
| 54 | { | ||
| 55 | struct AddonToKodiFuncTable_kodi_gui_general* general; | ||
| 56 | struct AddonToKodiFuncTable_kodi_gui_control_button* control_button; | ||
| 57 | struct AddonToKodiFuncTable_kodi_gui_control_edit* control_edit; | ||
| 58 | struct AddonToKodiFuncTable_kodi_gui_control_fade_label* control_fade_label; | ||
| 59 | struct AddonToKodiFuncTable_kodi_gui_control_label* control_label; | ||
| 60 | struct AddonToKodiFuncTable_kodi_gui_control_image* control_image; | ||
| 61 | struct AddonToKodiFuncTable_kodi_gui_control_progress* control_progress; | ||
| 62 | struct AddonToKodiFuncTable_kodi_gui_control_radio_button* control_radio_button; | ||
| 63 | struct AddonToKodiFuncTable_kodi_gui_control_rendering* control_rendering; | ||
| 64 | struct AddonToKodiFuncTable_kodi_gui_control_settings_slider* control_settings_slider; | ||
| 65 | struct AddonToKodiFuncTable_kodi_gui_control_slider* control_slider; | ||
| 66 | struct AddonToKodiFuncTable_kodi_gui_control_spin* control_spin; | ||
| 67 | struct AddonToKodiFuncTable_kodi_gui_control_text_box* control_text_box; | ||
| 68 | KODI_HANDLE control_dummy1; | ||
| 69 | KODI_HANDLE control_dummy2; | ||
| 70 | KODI_HANDLE control_dummy3; | ||
| 71 | KODI_HANDLE control_dummy4; | ||
| 72 | KODI_HANDLE control_dummy5; | ||
| 73 | KODI_HANDLE control_dummy6; | ||
| 74 | KODI_HANDLE control_dummy7; | ||
| 75 | KODI_HANDLE control_dummy8; | ||
| 76 | KODI_HANDLE control_dummy9; | ||
| 77 | KODI_HANDLE control_dummy10; /* This and above used to add new controls */ | ||
| 78 | struct AddonToKodiFuncTable_kodi_gui_dialogContextMenu* dialogContextMenu; | ||
| 79 | struct AddonToKodiFuncTable_kodi_gui_dialogExtendedProgress* dialogExtendedProgress; | ||
| 80 | struct AddonToKodiFuncTable_kodi_gui_dialogFileBrowser* dialogFileBrowser; | ||
| 81 | struct AddonToKodiFuncTable_kodi_gui_dialogKeyboard* dialogKeyboard; | ||
| 82 | struct AddonToKodiFuncTable_kodi_gui_dialogNumeric* dialogNumeric; | ||
| 83 | struct AddonToKodiFuncTable_kodi_gui_dialogOK* dialogOK; | ||
| 84 | struct AddonToKodiFuncTable_kodi_gui_dialogProgress* dialogProgress; | ||
| 85 | struct AddonToKodiFuncTable_kodi_gui_dialogSelect* dialogSelect; | ||
| 86 | struct AddonToKodiFuncTable_kodi_gui_dialogTextViewer* dialogTextViewer; | ||
| 87 | struct AddonToKodiFuncTable_kodi_gui_dialogYesNo* dialogYesNo; | ||
| 88 | KODI_HANDLE dialog_dummy1; | ||
| 89 | KODI_HANDLE dialog_dummy2; | ||
| 90 | KODI_HANDLE dialog_dummy3; | ||
| 91 | KODI_HANDLE dialog_dummy4; | ||
| 92 | KODI_HANDLE dialog_dummy5; | ||
| 93 | KODI_HANDLE dialog_dummy6; | ||
| 94 | KODI_HANDLE dialog_dummy7; | ||
| 95 | KODI_HANDLE dialog_dummy8; | ||
| 96 | KODI_HANDLE dialog_dummy9; | ||
| 97 | KODI_HANDLE dialog_dummy10; /* This and above used to add new dialogs */ | ||
| 98 | struct AddonToKodiFuncTable_kodi_gui_listItem* listItem; | ||
| 99 | struct AddonToKodiFuncTable_kodi_gui_window* window; | ||
| 100 | } AddonToKodiFuncTable_kodi_gui; | ||
| 101 | |||
| 102 | #ifdef __cplusplus | ||
| 103 | } /* extern "C" */ | ||
| 104 | #endif /* __cplusplus */ | ||
| 105 | |||
| 106 | #endif /* !C_API_GUI_DEFINITIONS_H */ | ||
diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/CMakeLists.txt b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/CMakeLists.txt new file mode 100644 index 0000000..bc35e91 --- /dev/null +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/CMakeLists.txt | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | set(HEADERS context_menu.h | ||
| 2 | extended_progress.h | ||
| 3 | filebrowser.h | ||
| 4 | keyboard.h | ||
| 5 | numeric.h | ||
| 6 | ok.h | ||
| 7 | progress.h | ||
| 8 | select.h | ||
| 9 | text_viewer.h | ||
| 10 | yes_no.h) | ||
| 11 | |||
| 12 | if(NOT ENABLE_STATIC_LIBS) | ||
| 13 | core_add_library(addons_kodi-dev-kit_include_kodi_c-api_gui_dialogs) | ||
| 14 | endif() | ||
diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/context_menu.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/context_menu.h new file mode 100644 index 0000000..8bb5370 --- /dev/null +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/context_menu.h | |||
| @@ -0,0 +1,33 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2005-2020 Team Kodi | ||
| 3 | * This file is part of Kodi - https://kodi.tv | ||
| 4 | * | ||
| 5 | * SPDX-License-Identifier: GPL-2.0-or-later | ||
| 6 | * See LICENSES/README.md for more information. | ||
| 7 | */ | ||
| 8 | |||
| 9 | #pragma once | ||
| 10 | |||
| 11 | #ifndef C_API_GUI_DIALOGS_CONTEXT_MENU_H | ||
| 12 | #define C_API_GUI_DIALOGS_CONTEXT_MENU_H | ||
| 13 | |||
| 14 | #include "../definitions.h" | ||
| 15 | |||
| 16 | #ifdef __cplusplus | ||
| 17 | extern "C" | ||
| 18 | { | ||
| 19 | #endif /* __cplusplus */ | ||
| 20 | |||
| 21 | typedef struct AddonToKodiFuncTable_kodi_gui_dialogContextMenu | ||
| 22 | { | ||
| 23 | int (*open)(KODI_HANDLE kodiBase, | ||
| 24 | const char* heading, | ||
| 25 | const char* entries[], | ||
| 26 | unsigned int size); | ||
| 27 | } AddonToKodiFuncTable_kodi_gui_dialogContextMenu; | ||
| 28 | |||
| 29 | #ifdef __cplusplus | ||
| 30 | } /* extern "C" */ | ||
| 31 | #endif /* __cplusplus */ | ||
| 32 | |||
| 33 | #endif /* !C_API_GUI_DIALOGS_CONTEXT_MENU_H */ | ||
diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/extended_progress.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/extended_progress.h new file mode 100644 index 0000000..e53588f --- /dev/null +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/extended_progress.h | |||
| @@ -0,0 +1,43 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2005-2020 Team Kodi | ||
| 3 | * This file is part of Kodi - https://kodi.tv | ||
| 4 | * | ||
| 5 | * SPDX-License-Identifier: GPL-2.0-or-later | ||
| 6 | * See LICENSES/README.md for more information. | ||
| 7 | */ | ||
| 8 | |||
| 9 | #pragma once | ||
| 10 | |||
| 11 | #ifndef C_API_GUI_DIALOGS_EXTENDED_PROGRESS_H | ||
| 12 | #define C_API_GUI_DIALOGS_EXTENDED_PROGRESS_H | ||
| 13 | |||
| 14 | #include "../definitions.h" | ||
| 15 | |||
| 16 | #ifdef __cplusplus | ||
| 17 | extern "C" | ||
| 18 | { | ||
| 19 | #endif /* __cplusplus */ | ||
| 20 | |||
| 21 | typedef struct AddonToKodiFuncTable_kodi_gui_dialogExtendedProgress | ||
| 22 | { | ||
| 23 | KODI_GUI_HANDLE (*new_dialog)(KODI_HANDLE kodiBase, const char* title); | ||
| 24 | void (*delete_dialog)(KODI_HANDLE kodiBase, KODI_GUI_HANDLE handle); | ||
| 25 | char* (*get_title)(KODI_HANDLE kodiBase, KODI_GUI_HANDLE handle); | ||
| 26 | void (*set_title)(KODI_HANDLE kodiBase, KODI_GUI_HANDLE handle, const char* title); | ||
| 27 | char* (*get_text)(KODI_HANDLE kodiBase, KODI_GUI_HANDLE handle); | ||
| 28 | void (*set_text)(KODI_HANDLE kodiBase, KODI_GUI_HANDLE handle, const char* text); | ||
| 29 | bool (*is_finished)(KODI_HANDLE kodiBase, KODI_GUI_HANDLE handle); | ||
| 30 | void (*mark_finished)(KODI_HANDLE kodiBase, KODI_GUI_HANDLE handle); | ||
| 31 | float (*get_percentage)(KODI_HANDLE kodiBase, KODI_GUI_HANDLE handle); | ||
| 32 | void (*set_percentage)(KODI_HANDLE kodiBase, KODI_GUI_HANDLE handle, float percentage); | ||
| 33 | void (*set_progress)(KODI_HANDLE kodiBase, | ||
| 34 | KODI_GUI_HANDLE handle, | ||
| 35 | int currentItem, | ||
| 36 | int itemCount); | ||
| 37 | } AddonToKodiFuncTable_kodi_gui_dialogExtendedProgress; | ||
| 38 | |||
| 39 | #ifdef __cplusplus | ||
| 40 | } /* extern "C" */ | ||
| 41 | #endif /* __cplusplus */ | ||
| 42 | |||
| 43 | #endif /* !C_API_GUI_DIALOGS_EXTENDED_PROGRESS_H */ | ||
diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/filebrowser.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/filebrowser.h new file mode 100644 index 0000000..7ae4fac --- /dev/null +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/filebrowser.h | |||
| @@ -0,0 +1,77 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2005-2020 Team Kodi | ||
| 3 | * This file is part of Kodi - https://kodi.tv | ||
| 4 | * | ||
| 5 | * SPDX-License-Identifier: GPL-2.0-or-later | ||
| 6 | * See LICENSES/README.md for more information. | ||
| 7 | */ | ||
| 8 | |||
| 9 | #pragma once | ||
| 10 | |||
| 11 | #ifndef C_API_GUI_DIALOGS_FILEBROWSER_H | ||
| 12 | #define C_API_GUI_DIALOGS_FILEBROWSER_H | ||
| 13 | |||
| 14 | #include "../definitions.h" | ||
| 15 | |||
| 16 | #ifdef __cplusplus | ||
| 17 | extern "C" | ||
| 18 | { | ||
| 19 | #endif /* __cplusplus */ | ||
| 20 | |||
| 21 | typedef struct AddonToKodiFuncTable_kodi_gui_dialogFileBrowser | ||
| 22 | { | ||
| 23 | bool (*show_and_get_directory)(KODI_HANDLE kodiBase, | ||
| 24 | const char* shares, | ||
| 25 | const char* heading, | ||
| 26 | const char* path_in, | ||
| 27 | char** path_out, | ||
| 28 | bool writeOnly); | ||
| 29 | bool (*show_and_get_file)(KODI_HANDLE kodiBase, | ||
| 30 | const char* shares, | ||
| 31 | const char* mask, | ||
| 32 | const char* heading, | ||
| 33 | const char* path_in, | ||
| 34 | char** path_out, | ||
| 35 | bool use_thumbs, | ||
| 36 | bool use_file_directories); | ||
| 37 | bool (*show_and_get_file_from_dir)(KODI_HANDLE kodiBase, | ||
| 38 | const char* directory, | ||
| 39 | const char* mask, | ||
| 40 | const char* heading, | ||
| 41 | const char* path_in, | ||
| 42 | char** path_out, | ||
| 43 | bool use_thumbs, | ||
| 44 | bool use_file_directories, | ||
| 45 | bool singleList); | ||
| 46 | bool (*show_and_get_file_list)(KODI_HANDLE kodiBase, | ||
| 47 | const char* shares, | ||
| 48 | const char* mask, | ||
| 49 | const char* heading, | ||
| 50 | char*** file_list, | ||
| 51 | unsigned int* entries, | ||
| 52 | bool use_thumbs, | ||
| 53 | bool use_file_directories); | ||
| 54 | bool (*show_and_get_source)(KODI_HANDLE kodiBase, | ||
| 55 | const char* path_in, | ||
| 56 | char** path_out, | ||
| 57 | bool allow_network_shares, | ||
| 58 | const char* additional_share, | ||
| 59 | const char* type); | ||
| 60 | bool (*show_and_get_image)(KODI_HANDLE kodiBase, | ||
| 61 | const char* shares, | ||
| 62 | const char* heading, | ||
| 63 | const char* path_in, | ||
| 64 | char** path_out); | ||
| 65 | bool (*show_and_get_image_list)(KODI_HANDLE kodiBase, | ||
| 66 | const char* shares, | ||
| 67 | const char* heading, | ||
| 68 | char*** file_list, | ||
| 69 | unsigned int* entries); | ||
| 70 | void (*clear_file_list)(KODI_HANDLE kodiBase, char*** file_list, unsigned int entries); | ||
| 71 | } AddonToKodiFuncTable_kodi_gui_dialogFileBrowser; | ||
| 72 | |||
| 73 | #ifdef __cplusplus | ||
| 74 | } /* extern "C" */ | ||
| 75 | #endif /* __cplusplus */ | ||
| 76 | |||
| 77 | #endif /* !C_API_GUI_DIALOGS_FILEBROWSER_H */ | ||
diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/keyboard.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/keyboard.h new file mode 100644 index 0000000..fc3c34c --- /dev/null +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/keyboard.h | |||
| @@ -0,0 +1,74 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2005-2020 Team Kodi | ||
| 3 | * This file is part of Kodi - https://kodi.tv | ||
| 4 | * | ||
| 5 | * SPDX-License-Identifier: GPL-2.0-or-later | ||
| 6 | * See LICENSES/README.md for more information. | ||
| 7 | */ | ||
| 8 | |||
| 9 | #pragma once | ||
| 10 | |||
| 11 | #ifndef C_API_GUI_DIALOGS_KEYBOARD_H | ||
| 12 | #define C_API_GUI_DIALOGS_KEYBOARD_H | ||
| 13 | |||
| 14 | #include "../definitions.h" | ||
| 15 | |||
| 16 | #ifdef __cplusplus | ||
| 17 | extern "C" | ||
| 18 | { | ||
| 19 | #endif /* __cplusplus */ | ||
| 20 | |||
| 21 | typedef struct AddonToKodiFuncTable_kodi_gui_dialogKeyboard | ||
| 22 | { | ||
| 23 | bool (*show_and_get_input_with_head)(KODI_HANDLE kodiBase, | ||
| 24 | const char* text_in, | ||
| 25 | char** text_out, | ||
| 26 | const char* heading, | ||
| 27 | bool allow_empty_result, | ||
| 28 | bool hiddenInput, | ||
| 29 | unsigned int auto_close_ms); | ||
| 30 | bool (*show_and_get_input)(KODI_HANDLE kodiBase, | ||
| 31 | const char* text_in, | ||
| 32 | char** text_out, | ||
| 33 | bool allow_empty_result, | ||
| 34 | unsigned int auto_close_ms); | ||
| 35 | bool (*show_and_get_new_password_with_head)(KODI_HANDLE kodiBase, | ||
| 36 | const char* password_in, | ||
| 37 | char** password_out, | ||
| 38 | const char* heading, | ||
| 39 | bool allow_empty_result, | ||
| 40 | unsigned int auto_close_ms); | ||
| 41 | bool (*show_and_get_new_password)(KODI_HANDLE kodiBase, | ||
| 42 | const char* password_in, | ||
| 43 | char** password_out, | ||
| 44 | unsigned int auto_close_ms); | ||
| 45 | bool (*show_and_verify_new_password_with_head)(KODI_HANDLE kodiBase, | ||
| 46 | char** password_out, | ||
| 47 | const char* heading, | ||
| 48 | bool allow_empty_result, | ||
| 49 | unsigned int auto_close_ms); | ||
| 50 | bool (*show_and_verify_new_password)(KODI_HANDLE kodiBase, | ||
| 51 | char** password_out, | ||
| 52 | unsigned int auto_close_ms); | ||
| 53 | int (*show_and_verify_password)(KODI_HANDLE kodiBase, | ||
| 54 | const char* password_in, | ||
| 55 | char** password_out, | ||
| 56 | const char* heading, | ||
| 57 | int retries, | ||
| 58 | unsigned int auto_close_ms); | ||
| 59 | bool (*show_and_get_filter)(KODI_HANDLE kodiBase, | ||
| 60 | const char* text_in, | ||
| 61 | char** text_out, | ||
| 62 | bool searching, | ||
| 63 | unsigned int auto_close_ms); | ||
| 64 | bool (*send_text_to_active_keyboard)(KODI_HANDLE kodiBase, | ||
| 65 | const char* text, | ||
| 66 | bool close_keyboard); | ||
| 67 | bool (*is_keyboard_activated)(KODI_HANDLE kodiBase); | ||
| 68 | } AddonToKodiFuncTable_kodi_gui_dialogKeyboard; | ||
| 69 | |||
| 70 | #ifdef __cplusplus | ||
| 71 | } /* extern "C" */ | ||
| 72 | #endif /* __cplusplus */ | ||
| 73 | |||
| 74 | #endif /* !C_API_GUI_DIALOGS_KEYBOARD_H */ | ||
diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/numeric.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/numeric.h new file mode 100644 index 0000000..df23cd7 --- /dev/null +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/numeric.h | |||
| @@ -0,0 +1,54 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2005-2020 Team Kodi | ||
| 3 | * This file is part of Kodi - https://kodi.tv | ||
| 4 | * | ||
| 5 | * SPDX-License-Identifier: GPL-2.0-or-later | ||
| 6 | * See LICENSES/README.md for more information. | ||
| 7 | */ | ||
| 8 | |||
| 9 | #pragma once | ||
| 10 | |||
| 11 | #ifndef C_API_GUI_DIALOGS_NUMERIC_H | ||
| 12 | #define C_API_GUI_DIALOGS_NUMERIC_H | ||
| 13 | |||
| 14 | #include "../definitions.h" | ||
| 15 | |||
| 16 | #ifdef __cplusplus | ||
| 17 | extern "C" | ||
| 18 | { | ||
| 19 | #endif /* __cplusplus */ | ||
| 20 | |||
| 21 | typedef struct AddonToKodiFuncTable_kodi_gui_dialogNumeric | ||
| 22 | { | ||
| 23 | bool (*show_and_verify_new_password)(KODI_HANDLE kodiBase, char** password); | ||
| 24 | int (*show_and_verify_password)(KODI_HANDLE kodiBase, | ||
| 25 | const char* password, | ||
| 26 | const char* heading, | ||
| 27 | int retries); | ||
| 28 | bool (*show_and_verify_input)(KODI_HANDLE kodiBase, | ||
| 29 | const char* verify_in, | ||
| 30 | char** verify_out, | ||
| 31 | const char* heading, | ||
| 32 | bool verify_input); | ||
| 33 | bool (*show_and_get_time)(KODI_HANDLE kodiBase, struct tm* time, const char* heading); | ||
| 34 | bool (*show_and_get_date)(KODI_HANDLE kodiBase, struct tm* date, const char* heading); | ||
| 35 | bool (*show_and_get_ip_address)(KODI_HANDLE kodiBase, | ||
| 36 | const char* ip_address_in, | ||
| 37 | char** ip_address_out, | ||
| 38 | const char* heading); | ||
| 39 | bool (*show_and_get_number)(KODI_HANDLE kodiBase, | ||
| 40 | const char* input_in, | ||
| 41 | char** input_out, | ||
| 42 | const char* heading, | ||
| 43 | unsigned int auto_close_ms); | ||
| 44 | bool (*show_and_get_seconds)(KODI_HANDLE kodiBase, | ||
| 45 | const char* time_in, | ||
| 46 | char** time_out, | ||
| 47 | const char* heading); | ||
| 48 | } AddonToKodiFuncTable_kodi_gui_dialogNumeric; | ||
| 49 | |||
| 50 | #ifdef __cplusplus | ||
| 51 | } /* extern "C" */ | ||
| 52 | #endif /* __cplusplus */ | ||
| 53 | |||
| 54 | #endif /* !C_API_GUI_DIALOGS_NUMERIC_H */ | ||
diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/ok.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/ok.h new file mode 100644 index 0000000..9f37051 --- /dev/null +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/ok.h | |||
| @@ -0,0 +1,37 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2005-2020 Team Kodi | ||
| 3 | * This file is part of Kodi - https://kodi.tv | ||
| 4 | * | ||
| 5 | * SPDX-License-Identifier: GPL-2.0-or-later | ||
| 6 | * See LICENSES/README.md for more information. | ||
| 7 | */ | ||
| 8 | |||
| 9 | #pragma once | ||
| 10 | |||
| 11 | #ifndef C_API_GUI_DIALOGS_OK_H | ||
| 12 | #define C_API_GUI_DIALOGS_OK_H | ||
| 13 | |||
| 14 | #include "../definitions.h" | ||
| 15 | |||
| 16 | #ifdef __cplusplus | ||
| 17 | extern "C" | ||
| 18 | { | ||
| 19 | #endif /* __cplusplus */ | ||
| 20 | |||
| 21 | typedef struct AddonToKodiFuncTable_kodi_gui_dialogOK | ||
| 22 | { | ||
| 23 | void (*show_and_get_input_single_text)(KODI_HANDLE kodiBase, | ||
| 24 | const char* heading, | ||
| 25 | const char* text); | ||
| 26 | void (*show_and_get_input_line_text)(KODI_HANDLE kodiBase, | ||
| 27 | const char* heading, | ||
| 28 | const char* line0, | ||
| 29 | const char* line1, | ||
| 30 | const char* line2); | ||
| 31 | } AddonToKodiFuncTable_kodi_gui_dialogOK; | ||
| 32 | |||
| 33 | #ifdef __cplusplus | ||
| 34 | } /* extern "C" */ | ||
| 35 | #endif /* __cplusplus */ | ||
| 36 | |||
| 37 | #endif /* !C_API_GUI_DIALOGS_OK_H */ | ||
diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/progress.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/progress.h new file mode 100644 index 0000000..f1c8972 --- /dev/null +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/progress.h | |||
| @@ -0,0 +1,45 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2005-2020 Team Kodi | ||
| 3 | * This file is part of Kodi - https://kodi.tv | ||
| 4 | * | ||
| 5 | * SPDX-License-Identifier: GPL-2.0-or-later | ||
| 6 | * See LICENSES/README.md for more information. | ||
| 7 | */ | ||
| 8 | |||
| 9 | #pragma once | ||
| 10 | |||
| 11 | #ifndef C_API_GUI_DIALOGS_PROGRESS_H | ||
| 12 | #define C_API_GUI_DIALOGS_PROGRESS_H | ||
| 13 | |||
| 14 | #include "../definitions.h" | ||
| 15 | |||
| 16 | #ifdef __cplusplus | ||
| 17 | extern "C" | ||
| 18 | { | ||
| 19 | #endif /* __cplusplus */ | ||
| 20 | |||
| 21 | typedef struct AddonToKodiFuncTable_kodi_gui_dialogProgress | ||
| 22 | { | ||
| 23 | KODI_GUI_HANDLE (*new_dialog)(KODI_HANDLE kodiBase); | ||
| 24 | void (*delete_dialog)(KODI_HANDLE kodiBase, KODI_GUI_HANDLE handle); | ||
| 25 | void (*open)(KODI_HANDLE kodiBase, KODI_GUI_HANDLE handle); | ||
| 26 | void (*set_heading)(KODI_HANDLE kodiBase, KODI_GUI_HANDLE handle, const char* heading); | ||
| 27 | void (*set_line)(KODI_HANDLE kodiBase, | ||
| 28 | KODI_GUI_HANDLE handle, | ||
| 29 | unsigned int lineNo, | ||
| 30 | const char* line); | ||
| 31 | void (*set_can_cancel)(KODI_HANDLE kodiBase, KODI_GUI_HANDLE handle, bool canCancel); | ||
| 32 | bool (*is_canceled)(KODI_HANDLE kodiBase, KODI_GUI_HANDLE handle); | ||
| 33 | void (*set_percentage)(KODI_HANDLE kodiBase, KODI_GUI_HANDLE handle, int percentage); | ||
| 34 | int (*get_percentage)(KODI_HANDLE kodiBase, KODI_GUI_HANDLE handle); | ||
| 35 | void (*show_progress_bar)(KODI_HANDLE kodiBase, KODI_GUI_HANDLE handle, bool pnOff); | ||
| 36 | void (*set_progress_max)(KODI_HANDLE kodiBase, KODI_GUI_HANDLE handle, int max); | ||
| 37 | void (*set_progress_advance)(KODI_HANDLE kodiBase, KODI_GUI_HANDLE handle, int nSteps); | ||
| 38 | bool (*abort)(KODI_HANDLE kodiBase, KODI_GUI_HANDLE handle); | ||
| 39 | } AddonToKodiFuncTable_kodi_gui_dialogProgress; | ||
| 40 | |||
| 41 | #ifdef __cplusplus | ||
| 42 | } /* extern "C" */ | ||
| 43 | #endif /* __cplusplus */ | ||
| 44 | |||
| 45 | #endif /* !C_API_GUI_DIALOGS_PROGRESS_H */ | ||
diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/select.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/select.h new file mode 100644 index 0000000..41ab82f --- /dev/null +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/select.h | |||
| @@ -0,0 +1,42 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2005-2020 Team Kodi | ||
| 3 | * This file is part of Kodi - https://kodi.tv | ||
| 4 | * | ||
| 5 | * SPDX-License-Identifier: GPL-2.0-or-later | ||
| 6 | * See LICENSES/README.md for more information. | ||
| 7 | */ | ||
| 8 | |||
| 9 | #pragma once | ||
| 10 | |||
| 11 | #ifndef C_API_GUI_DIALOGS_SELECT_H | ||
| 12 | #define C_API_GUI_DIALOGS_SELECT_H | ||
| 13 | |||
| 14 | #include "../definitions.h" | ||
| 15 | |||
| 16 | #ifdef __cplusplus | ||
| 17 | extern "C" | ||
| 18 | { | ||
| 19 | #endif /* __cplusplus */ | ||
| 20 | |||
| 21 | typedef struct AddonToKodiFuncTable_kodi_gui_dialogSelect | ||
| 22 | { | ||
| 23 | int (*open)(KODI_HANDLE kodiBase, | ||
| 24 | const char* heading, | ||
| 25 | const char* entries[], | ||
| 26 | unsigned int size, | ||
| 27 | int selected, | ||
| 28 | unsigned int autoclose); | ||
| 29 | bool (*open_multi_select)(KODI_HANDLE kodiBase, | ||
| 30 | const char* heading, | ||
| 31 | const char* entryIDs[], | ||
| 32 | const char* entryNames[], | ||
| 33 | bool entriesSelected[], | ||
| 34 | unsigned int size, | ||
| 35 | unsigned int autoclose); | ||
| 36 | } AddonToKodiFuncTable_kodi_gui_dialogSelect; | ||
| 37 | |||
| 38 | #ifdef __cplusplus | ||
| 39 | } /* extern "C" */ | ||
| 40 | #endif /* __cplusplus */ | ||
| 41 | |||
| 42 | #endif /* !C_API_GUI_DIALOGS_SELECT_H */ | ||
diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/text_viewer.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/text_viewer.h new file mode 100644 index 0000000..eb38b0b --- /dev/null +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/text_viewer.h | |||
| @@ -0,0 +1,30 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2005-2020 Team Kodi | ||
| 3 | * This file is part of Kodi - https://kodi.tv | ||
| 4 | * | ||
| 5 | * SPDX-License-Identifier: GPL-2.0-or-later | ||
| 6 | * See LICENSES/README.md for more information. | ||
| 7 | */ | ||
| 8 | |||
| 9 | #pragma once | ||
| 10 | |||
| 11 | #ifndef C_API_GUI_DIALOGS_TEXT_VIEWER_H | ||
| 12 | #define C_API_GUI_DIALOGS_TEXT_VIEWER_H | ||
| 13 | |||
| 14 | #include "../definitions.h" | ||
| 15 | |||
| 16 | #ifdef __cplusplus | ||
| 17 | extern "C" | ||
| 18 | { | ||
| 19 | #endif /* __cplusplus */ | ||
| 20 | |||
| 21 | typedef struct AddonToKodiFuncTable_kodi_gui_dialogTextViewer | ||
| 22 | { | ||
| 23 | void (*open)(KODI_HANDLE kodiBase, const char* heading, const char* text); | ||
| 24 | } AddonToKodiFuncTable_kodi_gui_dialogTextViewer; | ||
| 25 | |||
| 26 | #ifdef __cplusplus | ||
| 27 | } /* extern "C" */ | ||
| 28 | #endif /* __cplusplus */ | ||
| 29 | |||
| 30 | #endif /* !C_API_GUI_DIALOGS_TEXT_VIEWER_H */ | ||
diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/yes_no.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/yes_no.h new file mode 100644 index 0000000..01ed806 --- /dev/null +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/yes_no.h | |||
| @@ -0,0 +1,50 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2005-2020 Team Kodi | ||
| 3 | * This file is part of Kodi - https://kodi.tv | ||
| 4 | * | ||
| 5 | * SPDX-License-Identifier: GPL-2.0-or-later | ||
| 6 | * See LICENSES/README.md for more information. | ||
| 7 | */ | ||
| 8 | |||
| 9 | #pragma once | ||
| 10 | |||
| 11 | #ifndef C_API_GUI_DIALOGS_YES_NO_H | ||
| 12 | #define C_API_GUI_DIALOGS_YES_NO_H | ||
| 13 | |||
| 14 | #include "../definitions.h" | ||
| 15 | |||
| 16 | #ifdef __cplusplus | ||
| 17 | extern "C" | ||
| 18 | { | ||
| 19 | #endif /* __cplusplus */ | ||
| 20 | |||
| 21 | typedef struct AddonToKodiFuncTable_kodi_gui_dialogYesNo | ||
| 22 | { | ||
| 23 | bool (*show_and_get_input_single_text)(KODI_HANDLE kodiBase, | ||
| 24 | const char* heading, | ||
| 25 | const char* text, | ||
| 26 | bool* canceled, | ||
| 27 | const char* noLabel, | ||
| 28 | const char* yesLabel); | ||
| 29 | bool (*show_and_get_input_line_text)(KODI_HANDLE kodiBase, | ||
| 30 | const char* heading, | ||
| 31 | const char* line0, | ||
| 32 | const char* line1, | ||
| 33 | const char* line2, | ||
| 34 | const char* noLabel, | ||
| 35 | const char* yesLabel); | ||
| 36 | bool (*show_and_get_input_line_button_text)(KODI_HANDLE kodiBase, | ||
| 37 | const char* heading, | ||
| 38 | const char* line0, | ||
| 39 | const char* line1, | ||
| 40 | const char* line2, | ||
| 41 | bool* canceled, | ||
| 42 | const char* noLabel, | ||
| 43 | const char* yesLabel); | ||
| 44 | } AddonToKodiFuncTable_kodi_gui_dialogYesNo; | ||
| 45 | |||
| 46 | #ifdef __cplusplus | ||
| 47 | } /* extern "C" */ | ||
| 48 | #endif /* __cplusplus */ | ||
| 49 | |||
| 50 | #endif /* !C_API_GUI_DIALOGS_YES_NO_H */ | ||
diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/general.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/general.h new file mode 100644 index 0000000..d0d256c --- /dev/null +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/general.h | |||
| @@ -0,0 +1,37 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2005-2020 Team Kodi | ||
| 3 | * This file is part of Kodi - https://kodi.tv | ||
| 4 | * | ||
| 5 | * SPDX-License-Identifier: GPL-2.0-or-later | ||
| 6 | * See LICENSES/README.md for more information. | ||
| 7 | */ | ||
| 8 | |||
| 9 | #pragma once | ||
| 10 | |||
| 11 | #ifndef C_API_GUI_GENERAL_H | ||
| 12 | #define C_API_GUI_GENERAL_H | ||
| 13 | |||
| 14 | #include "definitions.h" | ||
| 15 | |||
| 16 | #ifdef __cplusplus | ||
| 17 | extern "C" | ||
| 18 | { | ||
| 19 | #endif /* __cplusplus */ | ||
| 20 | |||
| 21 | typedef struct AddonToKodiFuncTable_kodi_gui_general | ||
| 22 | { | ||
| 23 | void (*lock)(); | ||
| 24 | void (*unlock)(); | ||
| 25 | int (*get_screen_height)(KODI_HANDLE kodiBase); | ||
| 26 | int (*get_screen_width)(KODI_HANDLE kodiBase); | ||
| 27 | int (*get_video_resolution)(KODI_HANDLE kodiBase); | ||
| 28 | int (*get_current_window_dialog_id)(KODI_HANDLE kodiBase); | ||
| 29 | int (*get_current_window_id)(KODI_HANDLE kodiBase); | ||
| 30 | ADDON_HARDWARE_CONTEXT (*get_hw_context)(KODI_HANDLE kodiBase); | ||
| 31 | } AddonToKodiFuncTable_kodi_gui_general; | ||
| 32 | |||
| 33 | #ifdef __cplusplus | ||
| 34 | } /* extern "C" */ | ||
| 35 | #endif /* __cplusplus */ | ||
| 36 | |||
| 37 | #endif /* !C_API_GUI_GENERAL_H */ | ||
diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/input/CMakeLists.txt b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/input/CMakeLists.txt new file mode 100644 index 0000000..c0bbd11 --- /dev/null +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/input/CMakeLists.txt | |||
| @@ -0,0 +1,5 @@ | |||
| 1 | set(HEADERS action_ids.h) | ||
| 2 | |||
| 3 | if(NOT ENABLE_STATIC_LIBS) | ||
| 4 | core_add_library(addons_kodi-dev-kit_include_kodi_c-api_gui_input) | ||
| 5 | endif() | ||
diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/input/action_ids.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/input/action_ids.h new file mode 100644 index 0000000..274f3d9 --- /dev/null +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/input/action_ids.h | |||
| @@ -0,0 +1,763 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2005-2020 Team Kodi | ||
| 3 | * This file is part of Kodi - https://kodi.tv | ||
| 4 | * | ||
| 5 | * SPDX-License-Identifier: GPL-2.0-or-later | ||
| 6 | * See LICENSES/README.md for more information. | ||
| 7 | */ | ||
| 8 | |||
| 9 | #pragma once | ||
| 10 | |||
| 11 | #ifndef C_API_GUI_ACTION_IDS_H | ||
| 12 | #define C_API_GUI_ACTION_IDS_H | ||
| 13 | |||
| 14 | /// @defgroup cpp_kodi_gui_Defs_action_ids enum ADDON_ACTION | ||
| 15 | /// @ingroup cpp_kodi_gui_Defs | ||
| 16 | /// @brief **Action Id's**\n | ||
| 17 | /// Actions that we have defined. | ||
| 18 | /// | ||
| 19 | ///@{ | ||
| 20 | enum ADDON_ACTION | ||
| 21 | { | ||
| 22 | /// @ingroup cpp_kodi_gui_key_action_ids | ||
| 23 | ///@{ | ||
| 24 | |||
| 25 | /// @brief <b>`0 `</b>: None. | ||
| 26 | ADDON_ACTION_NONE = 0, | ||
| 27 | |||
| 28 | /// @brief <b>`1 `</b>: Move left. | ||
| 29 | ADDON_ACTION_MOVE_LEFT = 1, | ||
| 30 | |||
| 31 | /// @brief <b>`2 `</b>: Move right. | ||
| 32 | ADDON_ACTION_MOVE_RIGHT = 2, | ||
| 33 | |||
| 34 | /// @brief <b>`3 `</b>: Move up. | ||
| 35 | ADDON_ACTION_MOVE_UP = 3, | ||
| 36 | |||
| 37 | /// @brief <b>`4 `</b>: Move down. | ||
| 38 | ADDON_ACTION_MOVE_DOWN = 4, | ||
| 39 | |||
| 40 | /// @brief <b>`5 `</b>: Page up. | ||
| 41 | ADDON_ACTION_PAGE_UP = 5, | ||
| 42 | |||
| 43 | /// @brief <b>`6 `</b>: Page down. | ||
| 44 | ADDON_ACTION_PAGE_DOWN = 6, | ||
| 45 | |||
| 46 | /// @brief <b>`7 `</b>: Select item. | ||
| 47 | ADDON_ACTION_SELECT_ITEM = 7, | ||
| 48 | |||
| 49 | /// @brief <b>`8 `</b>: Highlight item. | ||
| 50 | ADDON_ACTION_HIGHLIGHT_ITEM = 8, | ||
| 51 | |||
| 52 | /// @brief <b>`9 `</b>: Parent directory. | ||
| 53 | ADDON_ACTION_PARENT_DIR = 9, | ||
| 54 | |||
| 55 | /// @brief <b>`10 `</b>: Previous menu. | ||
| 56 | ADDON_ACTION_PREVIOUS_MENU = 10, | ||
| 57 | |||
| 58 | /// @brief <b>`11 `</b>: Show info. | ||
| 59 | ADDON_ACTION_SHOW_INFO = 11, | ||
| 60 | |||
| 61 | /// @brief <b>`12 `</b>: Pause. | ||
| 62 | ADDON_ACTION_PAUSE = 12, | ||
| 63 | |||
| 64 | /// @brief <b>`13 `</b>: Stop. | ||
| 65 | ADDON_ACTION_STOP = 13, | ||
| 66 | |||
| 67 | /// @brief <b>`14 `</b>: Next item. | ||
| 68 | ADDON_ACTION_NEXT_ITEM = 14, | ||
| 69 | |||
| 70 | /// @brief <b>`15 `</b>: Previous item. | ||
| 71 | ADDON_ACTION_PREV_ITEM = 15, | ||
| 72 | |||
| 73 | /// @brief <b>`16 `</b>: Can be used to specify specific action in a window, Playback control is handled in ADDON_ACTION_PLAYER_* | ||
| 74 | ADDON_ACTION_FORWARD = 16, | ||
| 75 | |||
| 76 | /// @brief <b>`17 `</b>: Can be used to specify specific action in a window, Playback control is handled in ADDON_ACTION_PLAYER_* | ||
| 77 | ADDON_ACTION_REWIND = 17, | ||
| 78 | |||
| 79 | /// @brief <b>`18 `</b>: Toggle between GUI and movie or GUI and visualisation. | ||
| 80 | ADDON_ACTION_SHOW_GUI = 18, | ||
| 81 | |||
| 82 | /// @brief <b>`19 `</b>: Toggle quick-access zoom modes. Can b used in videoFullScreen.zml window id=2005 | ||
| 83 | ADDON_ACTION_ASPECT_RATIO = 19, | ||
| 84 | |||
| 85 | /// @brief <b>`20 `</b>: Seek +1% in the movie. Can b used in videoFullScreen.xml window id=2005 | ||
| 86 | ADDON_ACTION_STEP_FORWARD = 20, | ||
| 87 | |||
| 88 | /// @brief <b>`21 `</b>: Seek -1% in the movie. Can b used in videoFullScreen.xml window id=2005 | ||
| 89 | ADDON_ACTION_STEP_BACK = 21, | ||
| 90 | |||
| 91 | /// @brief <b>`22 `</b>: Seek +10% in the movie. Can b used in videoFullScreen.xml window id=2005 | ||
| 92 | ADDON_ACTION_BIG_STEP_FORWARD = 22, | ||
| 93 | |||
| 94 | /// @brief <b>`23 `</b>: Seek -10% in the movie. Can b used in videoFullScreen.xml window id=2005 | ||
| 95 | ADDON_ACTION_BIG_STEP_BACK = 23, | ||
| 96 | |||
| 97 | /// @brief <b>`24 `</b>: Show/hide OSD. Can b used in videoFullScreen.xml window id=2005 | ||
| 98 | ADDON_ACTION_SHOW_OSD = 24, | ||
| 99 | |||
| 100 | /// @brief <b>`25 `</b>: Turn subtitles on/off. Can b used in videoFullScreen.xml window id=2005 | ||
| 101 | ADDON_ACTION_SHOW_SUBTITLES = 25, | ||
| 102 | |||
| 103 | /// @brief <b>`26 `</b>: Switch to next subtitle of movie. Can b used in videoFullScreen.xml window id=2005 | ||
| 104 | ADDON_ACTION_NEXT_SUBTITLE = 26, | ||
| 105 | |||
| 106 | /// @brief <b>`27 `</b>: Show debug info for VideoPlayer | ||
| 107 | ADDON_ACTION_PLAYER_DEBUG = 27, | ||
| 108 | |||
| 109 | /// @brief <b>`28 `</b>: Show next picture of slideshow. Can b used in slideshow.xml window id=2007 | ||
| 110 | ADDON_ACTION_NEXT_PICTURE = 28, | ||
| 111 | |||
| 112 | /// @brief <b>`29 `</b>: Show previous picture of slideshow. Can b used in slideshow.xml window id=2007 | ||
| 113 | ADDON_ACTION_PREV_PICTURE = 29, | ||
| 114 | |||
| 115 | /// @brief <b>`30 `</b>: Zoom in picture during slideshow. Can b used in slideshow.xml window id=2007 | ||
| 116 | ADDON_ACTION_ZOOM_OUT = 30, | ||
| 117 | |||
| 118 | /// @brief <b>`31 `</b>: Zoom out picture during slideshow. Can b used in slideshow.xml window id=2007 | ||
| 119 | ADDON_ACTION_ZOOM_IN = 31, | ||
| 120 | |||
| 121 | /// @brief <b>`32 `</b>: Used to toggle between source view and destination view. Can be used in myfiles.xml window id=3 | ||
| 122 | ADDON_ACTION_TOGGLE_SOURCE_DEST = 32, | ||
| 123 | |||
| 124 | /// @brief <b>`33 `</b>: Used to toggle between current view and playlist view. Can b used in all mymusic xml files | ||
| 125 | ADDON_ACTION_SHOW_PLAYLIST = 33, | ||
| 126 | |||
| 127 | /// @brief <b>`34 `</b>: Used to queue a item to the playlist. Can b used in all mymusic xml files | ||
| 128 | ADDON_ACTION_QUEUE_ITEM = 34, | ||
| 129 | |||
| 130 | /// @brief <b>`35 `</b>: Not used anymore | ||
| 131 | ADDON_ACTION_REMOVE_ITEM = 35, | ||
| 132 | |||
| 133 | /// @brief <b>`36 `</b>: Not used anymore | ||
| 134 | ADDON_ACTION_SHOW_FULLSCREEN = 36, | ||
| 135 | |||
| 136 | /// @brief <b>`37 `</b>: Zoom 1x picture during slideshow. Can b used in slideshow.xml window id=2007 | ||
| 137 | ADDON_ACTION_ZOOM_LEVEL_NORMAL = 37, | ||
| 138 | |||
| 139 | /// @brief <b>`38 `</b>: Zoom 2x picture during slideshow. Can b used in slideshow.xml window id=2007 | ||
| 140 | ADDON_ACTION_ZOOM_LEVEL_1 = 38, | ||
| 141 | |||
| 142 | /// @brief <b>`39 `</b>: Zoom 3x picture during slideshow. Can b used in slideshow.xml window id=2007 | ||
| 143 | ADDON_ACTION_ZOOM_LEVEL_2 = 39, | ||
| 144 | |||
| 145 | /// @brief <b>`40 `</b>: Zoom 4x picture during slideshow. Can b used in slideshow.xml window id=2007 | ||
| 146 | ADDON_ACTION_ZOOM_LEVEL_3 = 40, | ||
| 147 | |||
| 148 | /// @brief <b>`41 `</b>: Zoom 5x picture during slideshow. Can b used in slideshow.xml window id=2007 | ||
| 149 | ADDON_ACTION_ZOOM_LEVEL_4 = 41, | ||
| 150 | |||
| 151 | /// @brief <b>`42 `</b>: Zoom 6x picture during slideshow. Can b used in slideshow.xml window id=2007 | ||
| 152 | ADDON_ACTION_ZOOM_LEVEL_5 = 42, | ||
| 153 | |||
| 154 | /// @brief <b>`43 `</b>: Zoom 7x picture during slideshow. Can b used in slideshow.xml window id=2007 | ||
| 155 | ADDON_ACTION_ZOOM_LEVEL_6 = 43, | ||
| 156 | |||
| 157 | /// @brief <b>`44 `</b>: Zoom 8x picture during slideshow. Can b used in slideshow.xml window id=2007 | ||
| 158 | ADDON_ACTION_ZOOM_LEVEL_7 = 44, | ||
| 159 | |||
| 160 | /// @brief <b>`45 `</b>: Zoom 9x picture during slideshow. Can b used in slideshow.xml window id=2007 | ||
| 161 | ADDON_ACTION_ZOOM_LEVEL_8 = 45, | ||
| 162 | |||
| 163 | /// @brief <b>`46 `</b>: Zoom 10x picture during slideshow. Can b used in slideshow.xml window id=2007 | ||
| 164 | ADDON_ACTION_ZOOM_LEVEL_9 = 46, | ||
| 165 | |||
| 166 | /// @brief <b>`47 `</b>: Select next arrow. Can b used in: settingsScreenCalibration.xml windowid=11 | ||
| 167 | ADDON_ACTION_CALIBRATE_SWAP_ARROWS = 47, | ||
| 168 | |||
| 169 | /// @brief <b>`48 `</b>: Reset calibration to defaults. Can b used in: `settingsScreenCalibration.xml` windowid=11/settingsUICalibration.xml windowid=10 | ||
| 170 | ADDON_ACTION_CALIBRATE_RESET = 48, | ||
| 171 | |||
| 172 | /// @brief <b>`49 `</b>: Analog thumbstick move. Can b used in: `slideshow.xml` | ||
| 173 | /// windowid=2007/settingsScreenCalibration.xml windowid=11/settingsUICalibration.xml | ||
| 174 | /// windowid=10 | ||
| 175 | /// @note see also ADDON_ACTION_ANALOG_MOVE_X_LEFT, ADDON_ACTION_ANALOG_MOVE_X_RIGHT, | ||
| 176 | /// ADDON_ACTION_ANALOG_MOVE_Y_UP, ADDON_ACTION_ANALOG_MOVE_Y_DOWN | ||
| 177 | ADDON_ACTION_ANALOG_MOVE = 49, | ||
| 178 | |||
| 179 | /// @brief <b>`50 `</b>: Rotate current picture clockwise during slideshow. Can be used in slideshow.xml window id=2007 | ||
| 180 | ADDON_ACTION_ROTATE_PICTURE_CW = 50, | ||
| 181 | |||
| 182 | /// @brief <b>`51 `</b>: Rotate current picture counterclockwise during slideshow. Can be used in slideshow.xml window id=2007 | ||
| 183 | ADDON_ACTION_ROTATE_PICTURE_CCW = 51, | ||
| 184 | |||
| 185 | /// @brief <b>`52 `</b>: Decrease subtitle/movie Delay. Can b used in videoFullScreen.xml window id=2005 | ||
| 186 | ADDON_ACTION_SUBTITLE_DELAY_MIN = 52, | ||
| 187 | |||
| 188 | /// @brief <b>`53 `</b>: Increase subtitle/movie Delay. Can b used in videoFullScreen.xml window id=2005 | ||
| 189 | ADDON_ACTION_SUBTITLE_DELAY_PLUS = 53, | ||
| 190 | |||
| 191 | /// @brief <b>`54 `</b>: Increase avsync delay. Can b used in videoFullScreen.xml window id=2005 | ||
| 192 | ADDON_ACTION_AUDIO_DELAY_MIN = 54, | ||
| 193 | |||
| 194 | /// @brief <b>`55 `</b>: Decrease avsync delay. Can b used in videoFullScreen.xml window id=2005 | ||
| 195 | ADDON_ACTION_AUDIO_DELAY_PLUS = 55, | ||
| 196 | |||
| 197 | /// @brief <b>`56 `</b>: Select next language in movie. Can b used in videoFullScreen.xml window id=2005 | ||
| 198 | ADDON_ACTION_AUDIO_NEXT_LANGUAGE = 56, | ||
| 199 | |||
| 200 | /// @brief <b>`57 `</b>: Switch 2 next resolution. Can b used during screen calibration settingsScreenCalibration.xml windowid=11 | ||
| 201 | ADDON_ACTION_CHANGE_RESOLUTION = 57, | ||
| 202 | |||
| 203 | /// @brief <b>`58 `</b>: remote keys 0-9. are used by multiple windows | ||
| 204 | /// for example in videoFullScreen.xml window id=2005 you can | ||
| 205 | /// enter time (mmss) to jump to particular point in the movie | ||
| 206 | /// with spincontrols you can enter 3digit number to quickly set | ||
| 207 | /// spincontrol to desired value | ||
| 208 | /// | ||
| 209 | /// Remote key 0 | ||
| 210 | ADDON_ACTION_REMOTE_0 = 58, | ||
| 211 | |||
| 212 | /// @brief <b>`59 `</b>: Remote key 1 | ||
| 213 | ADDON_ACTION_REMOTE_1 = 59, | ||
| 214 | |||
| 215 | /// @brief <b>`60 `</b>: Remote key 2 | ||
| 216 | ADDON_ACTION_REMOTE_2 = 60, | ||
| 217 | |||
| 218 | /// @brief <b>`61 `</b>: Remote key 3 | ||
| 219 | ADDON_ACTION_REMOTE_3 = 61, | ||
| 220 | |||
| 221 | /// @brief <b>`62 `</b>: Remote key 4 | ||
| 222 | ADDON_ACTION_REMOTE_4 = 62, | ||
| 223 | |||
| 224 | /// @brief <b>`63 `</b>: Remote key 5 | ||
| 225 | ADDON_ACTION_REMOTE_5 = 63, | ||
| 226 | |||
| 227 | /// @brief <b>`64 `</b>: Remote key 6 | ||
| 228 | ADDON_ACTION_REMOTE_6 = 64, | ||
| 229 | |||
| 230 | /// @brief <b>`65 `</b>: Remote key 7 | ||
| 231 | ADDON_ACTION_REMOTE_7 = 65, | ||
| 232 | |||
| 233 | /// @brief <b>`66 `</b>: Remote key 8 | ||
| 234 | ADDON_ACTION_REMOTE_8 = 66, | ||
| 235 | |||
| 236 | /// @brief <b>`67 `</b>: Remote key 9 | ||
| 237 | ADDON_ACTION_REMOTE_9 = 67, | ||
| 238 | |||
| 239 | /// @brief <b>`69 `</b>: Show player process info (video decoder, pixel format, pvr signal strength and the like | ||
| 240 | ADDON_ACTION_PLAYER_PROCESS_INFO = 69, | ||
| 241 | |||
| 242 | /// @brief <b>`70 `</b>: Program select. | ||
| 243 | ADDON_ACTION_PLAYER_PROGRAM_SELECT = 70, | ||
| 244 | |||
| 245 | /// @brief <b>`71 `</b>: Resolution select. | ||
| 246 | ADDON_ACTION_PLAYER_RESOLUTION_SELECT = 71, | ||
| 247 | |||
| 248 | /// @brief <b>`76 `</b>: Jumps a few seconds back during playback of movie. Can b used in videoFullScreen.xml window id=2005 | ||
| 249 | ADDON_ACTION_SMALL_STEP_BACK = 76, | ||
| 250 | |||
| 251 | /// @brief <b>`77 `</b>: FF in current file played. global action, can be used anywhere | ||
| 252 | ADDON_ACTION_PLAYER_FORWARD = 77, | ||
| 253 | |||
| 254 | /// @brief <b>`78 `</b>: RW in current file played. global action, can be used anywhere | ||
| 255 | ADDON_ACTION_PLAYER_REWIND = 78, | ||
| 256 | |||
| 257 | /// @brief <b>`79 `</b>: Play current song. Unpauses song and sets playspeed to 1x. global action, can be used anywhere | ||
| 258 | ADDON_ACTION_PLAYER_PLAY = 79, | ||
| 259 | |||
| 260 | /// @brief <b>`80 `</b>: Delete current selected item. Can be used in myfiles.xml window id=3 and in myvideoTitle.xml window id=25 | ||
| 261 | ADDON_ACTION_DELETE_ITEM = 80, | ||
| 262 | |||
| 263 | /// @brief <b>`81 `</b>: Copy current selected item. Can be used in myfiles.xml window id=3 | ||
| 264 | ADDON_ACTION_COPY_ITEM = 81, | ||
| 265 | |||
| 266 | /// @brief <b>`82 `</b>: move current selected item. Can be used in myfiles.xml window id=3 | ||
| 267 | ADDON_ACTION_MOVE_ITEM = 82, | ||
| 268 | |||
| 269 | /// @brief <b>`85 `</b>: Take a screenshot. | ||
| 270 | ADDON_ACTION_TAKE_SCREENSHOT = 85, | ||
| 271 | |||
| 272 | /// @brief <b>`87 `</b>: Rename item. | ||
| 273 | ADDON_ACTION_RENAME_ITEM = 87, | ||
| 274 | |||
| 275 | /// @brief <b>`87 `</b>: Volume up. | ||
| 276 | ADDON_ACTION_VOLUME_UP = 88, | ||
| 277 | |||
| 278 | /// @brief <b>`87 `</b>: Volume down. | ||
| 279 | ADDON_ACTION_VOLUME_DOWN = 89, | ||
| 280 | |||
| 281 | /// @brief <b>`90 `</b>: Volume amplication. | ||
| 282 | ADDON_ACTION_VOLAMP = 90, | ||
| 283 | |||
| 284 | /// @brief <b>`90 `</b>: Mute. | ||
| 285 | ADDON_ACTION_MUTE = 91, | ||
| 286 | |||
| 287 | /// @brief <b>`90 `</b>: Nav back. | ||
| 288 | ADDON_ACTION_NAV_BACK = 92, | ||
| 289 | |||
| 290 | /// @brief <b>`90 `</b>: Volume amp up, | ||
| 291 | ADDON_ACTION_VOLAMP_UP = 93, | ||
| 292 | |||
| 293 | /// @brief <b>`94 `</b>: Volume amp down. | ||
| 294 | ADDON_ACTION_VOLAMP_DOWN = 94, | ||
| 295 | |||
| 296 | /// @brief <b>`95 `</b>: Creates an episode bookmark on the currently playing video file containing more than one | ||
| 297 | /// episode | ||
| 298 | ADDON_ACTION_CREATE_EPISODE_BOOKMARK = 95, | ||
| 299 | |||
| 300 | /// @brief <b>`96 `</b>: Creates a bookmark of the currently playing video file | ||
| 301 | ADDON_ACTION_CREATE_BOOKMARK = 96, | ||
| 302 | |||
| 303 | /// @brief <b>`97 `</b>: Goto the next chapter, if not available perform a big step forward | ||
| 304 | ADDON_ACTION_CHAPTER_OR_BIG_STEP_FORWARD = 97, | ||
| 305 | |||
| 306 | /// @brief <b>`98 `</b>: Goto the previous chapter, if not available perform a big step back | ||
| 307 | ADDON_ACTION_CHAPTER_OR_BIG_STEP_BACK = 98, | ||
| 308 | |||
| 309 | /// @brief <b>`99 `</b>: Switch to next subtitle of movie, but will not enable/disable the subtitles. Can be used | ||
| 310 | /// in videoFullScreen.xml window id=2005 | ||
| 311 | ADDON_ACTION_CYCLE_SUBTITLE = 99, | ||
| 312 | |||
| 313 | /// @brief <b>`100`</b>: Mouse action values start. | ||
| 314 | /// | ||
| 315 | /// Ends with @ref ADDON_ACTION_MOUSE_END. | ||
| 316 | ADDON_ACTION_MOUSE_START = 100, | ||
| 317 | |||
| 318 | /// @brief <b>`100`</b>: Mouse left click. | ||
| 319 | ADDON_ACTION_MOUSE_LEFT_CLICK = 100, | ||
| 320 | |||
| 321 | /// @brief <b>`101`</b>: Mouse right click. | ||
| 322 | ADDON_ACTION_MOUSE_RIGHT_CLICK = 101, | ||
| 323 | |||
| 324 | /// @brief <b>`102`</b>: Mouse middle click. | ||
| 325 | ADDON_ACTION_MOUSE_MIDDLE_CLICK = 102, | ||
| 326 | |||
| 327 | /// @brief <b>`103`</b>: Mouse double click. | ||
| 328 | ADDON_ACTION_MOUSE_DOUBLE_CLICK = 103, | ||
| 329 | |||
| 330 | /// @brief <b>`104`</b>: Mouse wheel up. | ||
| 331 | ADDON_ACTION_MOUSE_WHEEL_UP = 104, | ||
| 332 | |||
| 333 | /// @brief <b>`105`</b>: Mouse wheel down. | ||
| 334 | ADDON_ACTION_MOUSE_WHEEL_DOWN = 105, | ||
| 335 | |||
| 336 | /// @brief <b>`106`</b>: Mouse drag. | ||
| 337 | ADDON_ACTION_MOUSE_DRAG = 106, | ||
| 338 | |||
| 339 | /// @brief <b>`107`</b>: Mouse move. | ||
| 340 | ADDON_ACTION_MOUSE_MOVE = 107, | ||
| 341 | |||
| 342 | /// @brief <b>`108`</b>: Mouse long click. | ||
| 343 | ADDON_ACTION_MOUSE_LONG_CLICK = 108, | ||
| 344 | |||
| 345 | /// @brief <b>`109`</b>: Mouse drag end. | ||
| 346 | ADDON_ACTION_MOUSE_DRAG_END = 109, | ||
| 347 | |||
| 348 | /// @brief <b>`109`</b>: Mouse action values end. | ||
| 349 | /// | ||
| 350 | /// Starts with @ref ADDON_ACTION_MOUSE_START. | ||
| 351 | ADDON_ACTION_MOUSE_END = 109, | ||
| 352 | |||
| 353 | /// @brief <b>`110`</b>: Backspace. | ||
| 354 | ADDON_ACTION_BACKSPACE = 110, | ||
| 355 | |||
| 356 | /// @brief <b>`111`</b>: Scroll up. | ||
| 357 | ADDON_ACTION_SCROLL_UP = 111, | ||
| 358 | |||
| 359 | /// @brief <b>`112`</b>: Scroll down. | ||
| 360 | ADDON_ACTION_SCROLL_DOWN = 112, | ||
| 361 | |||
| 362 | /// @brief <b>`113`</b>: Analog forward. | ||
| 363 | ADDON_ACTION_ANALOG_FORWARD = 113, | ||
| 364 | |||
| 365 | /// @brief <b>`114`</b>: Analog rewind. | ||
| 366 | ADDON_ACTION_ANALOG_REWIND = 114, | ||
| 367 | |||
| 368 | /// @brief <b>`115`</b>: move item up in playlist | ||
| 369 | ADDON_ACTION_MOVE_ITEM_UP = 115, | ||
| 370 | |||
| 371 | /// @brief <b>`116`</b>: move item down in playlist | ||
| 372 | ADDON_ACTION_MOVE_ITEM_DOWN = 116, | ||
| 373 | |||
| 374 | /// @brief <b>`117`</b>: pops up the context menu | ||
| 375 | ADDON_ACTION_CONTEXT_MENU = 117, | ||
| 376 | |||
| 377 | /// @brief <b>`118`</b>: stuff for virtual keyboard shortcuts | ||
| 378 | ADDON_ACTION_SHIFT = 118, | ||
| 379 | |||
| 380 | /// @brief <b>`119`</b>: stuff for virtual keyboard shortcuts | ||
| 381 | ADDON_ACTION_SYMBOLS = 119, | ||
| 382 | |||
| 383 | /// @brief <b>`120`</b>: stuff for virtual keyboard shortcuts | ||
| 384 | ADDON_ACTION_CURSOR_LEFT = 120, | ||
| 385 | |||
| 386 | /// @brief <b>`121`</b>: stuff for virtual keyboard shortcuts | ||
| 387 | ADDON_ACTION_CURSOR_RIGHT = 121, | ||
| 388 | |||
| 389 | /// @brief <b>`122`</b>: Build in function | ||
| 390 | ADDON_ACTION_BUILT_IN_FUNCTION = 122, | ||
| 391 | |||
| 392 | /// @brief <b>`114`</b>: Displays current time, can be used in videoFullScreen.xml window id=2005 | ||
| 393 | ADDON_ACTION_SHOW_OSD_TIME = 123, | ||
| 394 | |||
| 395 | /// @brief <b>`124`</b>: Seeks forward, and displays the seek bar. | ||
| 396 | ADDON_ACTION_ANALOG_SEEK_FORWARD = 124, | ||
| 397 | |||
| 398 | /// @brief <b>`125`</b>: Seeks backward, and displays the seek bar. | ||
| 399 | ADDON_ACTION_ANALOG_SEEK_BACK = 125, | ||
| 400 | |||
| 401 | /// @brief <b>`126`</b>: Visualization preset show. | ||
| 402 | ADDON_ACTION_VIS_PRESET_SHOW = 126, | ||
| 403 | |||
| 404 | /// @brief <b>`128`</b>: Visualization preset next. | ||
| 405 | ADDON_ACTION_VIS_PRESET_NEXT = 128, | ||
| 406 | |||
| 407 | /// @brief <b>`129`</b>: Visualization preset previous. | ||
| 408 | ADDON_ACTION_VIS_PRESET_PREV = 129, | ||
| 409 | |||
| 410 | /// @brief <b>`130`</b>: Visualization preset lock. | ||
| 411 | ADDON_ACTION_VIS_PRESET_LOCK = 130, | ||
| 412 | |||
| 413 | /// @brief <b>`131`</b>: Visualization preset random. | ||
| 414 | ADDON_ACTION_VIS_PRESET_RANDOM = 131, | ||
| 415 | |||
| 416 | /// @brief <b>`132`</b>: Visualization preset plus. | ||
| 417 | ADDON_ACTION_VIS_RATE_PRESET_PLUS = 132, | ||
| 418 | |||
| 419 | /// @brief <b>`133`</b>: Visualization preset minus. | ||
| 420 | ADDON_ACTION_VIS_RATE_PRESET_MINUS = 133, | ||
| 421 | |||
| 422 | /// @brief <b>`134`</b>: Show Videomenu | ||
| 423 | ADDON_ACTION_SHOW_VIDEOMENU = 134, | ||
| 424 | |||
| 425 | /// @brief <b>`135`</b>: Enter. | ||
| 426 | ADDON_ACTION_ENTER = 135, | ||
| 427 | |||
| 428 | /// @brief <b>`136`</b>: Increase rating. | ||
| 429 | ADDON_ACTION_INCREASE_RATING = 136, | ||
| 430 | |||
| 431 | /// @brief <b>`137`</b>: Decrease rating. | ||
| 432 | ADDON_ACTION_DECREASE_RATING = 137, | ||
| 433 | |||
| 434 | /// @brief <b>`138`</b>: Switch to next scene/cutpoint in movie. | ||
| 435 | ADDON_ACTION_NEXT_SCENE = 138, | ||
| 436 | |||
| 437 | /// @brief <b>`139`</b>: Switch to previous scene/cutpoint in movie. | ||
| 438 | ADDON_ACTION_PREV_SCENE = 139, | ||
| 439 | |||
| 440 | /// @brief <b>`140`</b>: Jump through a list or container to next letter. | ||
| 441 | ADDON_ACTION_NEXT_LETTER = 140, | ||
| 442 | |||
| 443 | /// @brief <b>`141`</b>: Jump through a list or container to previous letter. | ||
| 444 | ADDON_ACTION_PREV_LETTER = 141, | ||
| 445 | |||
| 446 | /// @brief <b>`142`</b>: Jump direct to a particular letter using SMS-style input | ||
| 447 | /// | ||
| 448 | /// Jump to SMS2. | ||
| 449 | ADDON_ACTION_JUMP_SMS2 = 142, | ||
| 450 | |||
| 451 | /// @brief <b>`143`</b>: Jump to SMS3. | ||
| 452 | ADDON_ACTION_JUMP_SMS3 = 143, | ||
| 453 | |||
| 454 | /// @brief <b>`144`</b>: Jump to SMS4. | ||
| 455 | ADDON_ACTION_JUMP_SMS4 = 144, | ||
| 456 | |||
| 457 | /// @brief <b>`145`</b>: Jump to SMS5. | ||
| 458 | ADDON_ACTION_JUMP_SMS5 = 145, | ||
| 459 | |||
| 460 | /// @brief <b>`146`</b>: Jump to SMS6. | ||
| 461 | ADDON_ACTION_JUMP_SMS6 = 146, | ||
| 462 | |||
| 463 | /// @brief <b>`147`</b>: Jump to SMS7. | ||
| 464 | ADDON_ACTION_JUMP_SMS7 = 147, | ||
| 465 | |||
| 466 | /// @brief <b>`148`</b>: Jump to SMS8. | ||
| 467 | ADDON_ACTION_JUMP_SMS8 = 148, | ||
| 468 | |||
| 469 | /// @brief <b>`149`</b>: Jump to SMS9. | ||
| 470 | ADDON_ACTION_JUMP_SMS9 = 149, | ||
| 471 | |||
| 472 | /// @brief <b>`150`</b>: Filter clear. | ||
| 473 | ADDON_ACTION_FILTER_CLEAR = 150, | ||
| 474 | |||
| 475 | /// @brief <b>`151`</b>: Filter SMS2. | ||
| 476 | ADDON_ACTION_FILTER_SMS2 = 151, | ||
| 477 | |||
| 478 | /// @brief <b>`152`</b>: Filter SMS3. | ||
| 479 | ADDON_ACTION_FILTER_SMS3 = 152, | ||
| 480 | |||
| 481 | /// @brief <b>`153`</b>: Filter SMS4. | ||
| 482 | ADDON_ACTION_FILTER_SMS4 = 153, | ||
| 483 | |||
| 484 | /// @brief <b>`154`</b>: Filter SMS5. | ||
| 485 | ADDON_ACTION_FILTER_SMS5 = 154, | ||
| 486 | |||
| 487 | /// @brief <b>`155`</b>: Filter SMS6. | ||
| 488 | ADDON_ACTION_FILTER_SMS6 = 155, | ||
| 489 | |||
| 490 | /// @brief <b>`156`</b>: Filter SMS7. | ||
| 491 | ADDON_ACTION_FILTER_SMS7 = 156, | ||
| 492 | |||
| 493 | /// @brief <b>`157`</b>: Filter SMS8. | ||
| 494 | ADDON_ACTION_FILTER_SMS8 = 157, | ||
| 495 | |||
| 496 | /// @brief <b>`158`</b>: Filter SMS9. | ||
| 497 | ADDON_ACTION_FILTER_SMS9 = 158, | ||
| 498 | |||
| 499 | /// @brief <b>`159`</b>: First page. | ||
| 500 | ADDON_ACTION_FIRST_PAGE = 159, | ||
| 501 | |||
| 502 | /// @brief <b>`160`</b>: Last page. | ||
| 503 | ADDON_ACTION_LAST_PAGE = 160, | ||
| 504 | |||
| 505 | /// @brief <b>`161`</b>: Audio delay. | ||
| 506 | ADDON_ACTION_AUDIO_DELAY = 161, | ||
| 507 | |||
| 508 | /// @brief <b>`162`</b>: Subtitle delay. | ||
| 509 | ADDON_ACTION_SUBTITLE_DELAY = 162, | ||
| 510 | |||
| 511 | /// @brief <b>`163`</b>: Menu. | ||
| 512 | ADDON_ACTION_MENU = 163, | ||
| 513 | |||
| 514 | /// @brief <b>`164`</b>: Set rating. | ||
| 515 | ADDON_ACTION_SET_RATING = 164, | ||
| 516 | |||
| 517 | /// @brief <b>`170`</b>: Record. | ||
| 518 | ADDON_ACTION_RECORD = 170, | ||
| 519 | |||
| 520 | /// @brief <b>`180`</b>: Paste. | ||
| 521 | ADDON_ACTION_PASTE = 180, | ||
| 522 | |||
| 523 | /// @brief <b>`181`</b>: Next control. | ||
| 524 | ADDON_ACTION_NEXT_CONTROL = 181, | ||
| 525 | |||
| 526 | /// @brief <b>`182`</b>: Previous control. | ||
| 527 | ADDON_ACTION_PREV_CONTROL = 182, | ||
| 528 | |||
| 529 | /// @brief <b>`183`</b>: Channel switch. | ||
| 530 | ADDON_ACTION_CHANNEL_SWITCH = 183, | ||
| 531 | |||
| 532 | /// @brief <b>`184`</b>: Channel up. | ||
| 533 | ADDON_ACTION_CHANNEL_UP = 184, | ||
| 534 | |||
| 535 | /// @brief <b>`185`</b>: Channel down. | ||
| 536 | ADDON_ACTION_CHANNEL_DOWN = 185, | ||
| 537 | |||
| 538 | /// @brief <b>`186`</b>: Next channel group. | ||
| 539 | ADDON_ACTION_NEXT_CHANNELGROUP = 186, | ||
| 540 | |||
| 541 | /// @brief <b>`187`</b>: Previous channel group. | ||
| 542 | ADDON_ACTION_PREVIOUS_CHANNELGROUP = 187, | ||
| 543 | |||
| 544 | /// @brief <b>`188`</b>: PVR play. | ||
| 545 | ADDON_ACTION_PVR_PLAY = 188, | ||
| 546 | |||
| 547 | /// @brief <b>`189`</b>: PVR play TV. | ||
| 548 | ADDON_ACTION_PVR_PLAY_TV = 189, | ||
| 549 | |||
| 550 | /// @brief <b>`190`</b>: PVR play radio. | ||
| 551 | ADDON_ACTION_PVR_PLAY_RADIO = 190, | ||
| 552 | |||
| 553 | /// @brief <b>`191`</b>: PVR show timer rule. | ||
| 554 | ADDON_ACTION_PVR_SHOW_TIMER_RULE = 191, | ||
| 555 | |||
| 556 | /// @brief <b>`192`</b>: Channel number sep | ||
| 557 | ADDON_ACTION_CHANNEL_NUMBER_SEP = 192, | ||
| 558 | |||
| 559 | /// @brief <b>`193`</b>: PVR announce reminders | ||
| 560 | ADDON_ACTION_PVR_ANNOUNCE_REMINDERS = 193, | ||
| 561 | |||
| 562 | /// @brief <b>`199`</b>: Switch 2 desktop resolution | ||
| 563 | ADDON_ACTION_TOGGLE_FULLSCREEN = 199, | ||
| 564 | |||
| 565 | /// @brief <b>`200`</b>: Toggle watched status (videos) | ||
| 566 | ADDON_ACTION_TOGGLE_WATCHED = 200, | ||
| 567 | |||
| 568 | /// @brief <b>`201`</b>: Scan item | ||
| 569 | ADDON_ACTION_SCAN_ITEM = 201, | ||
| 570 | |||
| 571 | /// @brief <b>`202`</b>: Switch digital <-> analog | ||
| 572 | ADDON_ACTION_TOGGLE_DIGITAL_ANALOG = 202, | ||
| 573 | |||
| 574 | /// @brief <b>`203`</b>: Reloads CButtonTranslator's keymaps | ||
| 575 | ADDON_ACTION_RELOAD_KEYMAPS = 203, | ||
| 576 | |||
| 577 | /// @brief <b>`204`</b>: Start the GUIControlProfiler running | ||
| 578 | ADDON_ACTION_GUIPROFILE_BEGIN = 204, | ||
| 579 | |||
| 580 | /// @brief <b>`215`</b>: Teletext Color button <b>Red</b> to control TopText | ||
| 581 | ADDON_ACTION_TELETEXT_RED = 215, | ||
| 582 | |||
| 583 | /// @brief <b>`216`</b>: Teletext Color button <b>Green</b> to control TopText | ||
| 584 | ADDON_ACTION_TELETEXT_GREEN = 216, | ||
| 585 | |||
| 586 | /// @brief <b>`217`</b>: Teletext Color button <b>Yellow</b> to control TopText | ||
| 587 | ADDON_ACTION_TELETEXT_YELLOW = 217, | ||
| 588 | |||
| 589 | /// @brief <b>`218`</b>: Teletext Color button <b>Blue</b> to control TopText | ||
| 590 | ADDON_ACTION_TELETEXT_BLUE = 218, | ||
| 591 | |||
| 592 | /// @brief <b>`219`</b>: Increase par. | ||
| 593 | ADDON_ACTION_INCREASE_PAR = 219, | ||
| 594 | |||
| 595 | /// @brief <b>`220`</b>: Decrease par. | ||
| 596 | ADDON_ACTION_DECREASE_PAR = 220, | ||
| 597 | |||
| 598 | /// @brief <b>`227`</b>: Shift up video image in VideoPlayer | ||
| 599 | ADDON_ACTION_VSHIFT_UP = 227, | ||
| 600 | |||
| 601 | /// @brief <b>`228`</b>: Shift down video image in VideoPlayer | ||
| 602 | ADDON_ACTION_VSHIFT_DOWN = 228, | ||
| 603 | |||
| 604 | /// @brief <b>`229`</b>: Play/pause. If playing it pauses, if paused it plays. | ||
| 605 | ADDON_ACTION_PLAYER_PLAYPAUSE = 229, | ||
| 606 | |||
| 607 | /// @brief <b>`230`</b>: Shift up subtitles in VideoPlayer | ||
| 608 | ADDON_ACTION_SUBTITLE_VSHIFT_UP = 230, | ||
| 609 | |||
| 610 | /// @brief <b>`231`</b>: Shift down subtitles in VideoPlayer | ||
| 611 | ADDON_ACTION_SUBTITLE_VSHIFT_DOWN = 231, | ||
| 612 | |||
| 613 | /// @brief <b>`232`</b>: Toggle vertical alignment of subtitles | ||
| 614 | ADDON_ACTION_SUBTITLE_ALIGN = 232, | ||
| 615 | |||
| 616 | /// @brief <b>`233`</b>: Filter. | ||
| 617 | ADDON_ACTION_FILTER = 233, | ||
| 618 | |||
| 619 | /// @brief <b>`234`</b>: Switch player. | ||
| 620 | ADDON_ACTION_SWITCH_PLAYER = 234, | ||
| 621 | |||
| 622 | /// @brief <b>`235`</b>: Stereo mode next. | ||
| 623 | ADDON_ACTION_STEREOMODE_NEXT = 235, | ||
| 624 | |||
| 625 | /// @brief <b>`236`</b>: Stereo mode previous. | ||
| 626 | ADDON_ACTION_STEREOMODE_PREVIOUS = 236, | ||
| 627 | |||
| 628 | /// @brief <b>`237`</b>: Turns 3d mode on/off. | ||
| 629 | ADDON_ACTION_STEREOMODE_TOGGLE = 237, | ||
| 630 | |||
| 631 | /// @brief <b>`238`</b>: Stereo mode select. | ||
| 632 | ADDON_ACTION_STEREOMODE_SELECT = 238, | ||
| 633 | |||
| 634 | /// @brief <b>`239`</b>: Stereo mode to mono. | ||
| 635 | ADDON_ACTION_STEREOMODE_TOMONO = 239, | ||
| 636 | |||
| 637 | /// @brief <b>`240`</b>: Stereo mode set. | ||
| 638 | ADDON_ACTION_STEREOMODE_SET = 240, | ||
| 639 | |||
| 640 | /// @brief <b>`241`</b>: Settings reset. | ||
| 641 | ADDON_ACTION_SETTINGS_RESET = 241, | ||
| 642 | |||
| 643 | /// @brief <b>`242`</b>: Settings level change. | ||
| 644 | ADDON_ACTION_SETTINGS_LEVEL_CHANGE = 242, | ||
| 645 | |||
| 646 | /// @brief <b>`243`</b>: Show autoclosing OSD. Can b used in videoFullScreen.xml window id=2005 | ||
| 647 | ADDON_ACTION_TRIGGER_OSD = 243, | ||
| 648 | |||
| 649 | /// @brief <b>`244`</b>: Input text. | ||
| 650 | ADDON_ACTION_INPUT_TEXT = 244, | ||
| 651 | |||
| 652 | /// @brief <b>`245`</b>: Volume set. | ||
| 653 | ADDON_ACTION_VOLUME_SET = 245, | ||
| 654 | |||
| 655 | /// @brief <b>`246`</b>: Toggle commercial skip. | ||
| 656 | ADDON_ACTION_TOGGLE_COMMSKIP = 246, | ||
| 657 | |||
| 658 | /// @brief <b>`247`</b>: Browse for subtitle. Can be used in videofullscreen | ||
| 659 | ADDON_ACTION_BROWSE_SUBTITLE = 247, | ||
| 660 | |||
| 661 | /// @brief <b>`248`</b>: Send a reset command to the active game | ||
| 662 | ADDON_ACTION_PLAYER_RESET = 248, | ||
| 663 | |||
| 664 | /// @brief <b>`249`</b>: Toggle font. Used in TextViewer dialog | ||
| 665 | ADDON_ACTION_TOGGLE_FONT = 249, | ||
| 666 | |||
| 667 | /// @brief <b>`250`</b>: Cycle video streams. Used in videofullscreen. | ||
| 668 | ADDON_ACTION_VIDEO_NEXT_STREAM = 250, | ||
| 669 | |||
| 670 | /// @brief <b>`251`</b>: Used to queue an item to the next position in the playlist | ||
| 671 | ADDON_ACTION_QUEUE_ITEM_NEXT = 251, | ||
| 672 | |||
| 673 | /// @brief <b>`247`</b>: Toggle display HDR on/off | ||
| 674 | ADDON_ACTION_HDR_TOGGLE = 260, | ||
| 675 | |||
| 676 | /// @brief <b>`300`</b>: Voice actions | ||
| 677 | ADDON_ACTION_VOICE_RECOGNIZE = 300, | ||
| 678 | |||
| 679 | // Number 347 used om front by ADDON_ACTION_BROWSE_SUBTITLE | ||
| 680 | |||
| 681 | /// @brief <b>`401`</b>: Touch actions | ||
| 682 | ADDON_ACTION_TOUCH_TAP = 401, | ||
| 683 | |||
| 684 | /// @brief <b>`410`</b>: Touch actions | ||
| 685 | ADDON_ACTION_TOUCH_TAP_TEN = 410, | ||
| 686 | |||
| 687 | /// @brief <b>`411`</b>: Touch actions | ||
| 688 | ADDON_ACTION_TOUCH_LONGPRESS = 411, | ||
| 689 | |||
| 690 | /// @brief <b>`412`</b>: Touch actions | ||
| 691 | ADDON_ACTION_TOUCH_LONGPRESS_TEN = 420, | ||
| 692 | |||
| 693 | /// @brief <b>`500`</b>: Gesture notify. | ||
| 694 | ADDON_ACTION_GESTURE_NOTIFY = 500, | ||
| 695 | |||
| 696 | /// @brief <b>`501`</b>: Gesture begin. | ||
| 697 | ADDON_ACTION_GESTURE_BEGIN = 501, | ||
| 698 | |||
| 699 | /// @brief <b>`502`</b>: Send action with point and currentPinchScale (fingers together < 1.0 -> fingers apart > 1.0) | ||
| 700 | ADDON_ACTION_GESTURE_ZOOM = 502, | ||
| 701 | |||
| 702 | /// @brief <b>`503`</b>: Gesture rotate. | ||
| 703 | ADDON_ACTION_GESTURE_ROTATE = 503, | ||
| 704 | |||
| 705 | /// @brief <b>`504`</b>: Gesture pan. | ||
| 706 | ADDON_ACTION_GESTURE_PAN = 504, | ||
| 707 | |||
| 708 | /// @brief <b>`505`</b>: Gesture was interrupted in unspecified state | ||
| 709 | ADDON_ACTION_GESTURE_ABORT = 505, | ||
| 710 | |||
| 711 | /// @brief <b>`511`</b>: Gesture swipe left. | ||
| 712 | ADDON_ACTION_GESTURE_SWIPE_LEFT = 511, | ||
| 713 | |||
| 714 | /// @brief <b>`520`</b>: Gesture swipe left ten | ||
| 715 | ADDON_ACTION_GESTURE_SWIPE_LEFT_TEN = 520, | ||
| 716 | |||
| 717 | /// @brief <b>`521`</b>: Gesture swipe right | ||
| 718 | ADDON_ACTION_GESTURE_SWIPE_RIGHT = 521, | ||
| 719 | |||
| 720 | /// @brief <b>`530`</b>: Gesture swipe right ten | ||
| 721 | ADDON_ACTION_GESTURE_SWIPE_RIGHT_TEN = 530, | ||
| 722 | |||
| 723 | /// @brief <b>`531`</b>: Gesture swipe up | ||
| 724 | ADDON_ACTION_GESTURE_SWIPE_UP = 531, | ||
| 725 | |||
| 726 | /// @brief <b>`540`</b>: Gesture swipe up ten | ||
| 727 | ADDON_ACTION_GESTURE_SWIPE_UP_TEN = 540, | ||
| 728 | |||
| 729 | /// @brief <b>`541`</b>: Gesture swipe down. | ||
| 730 | ADDON_ACTION_GESTURE_SWIPE_DOWN = 541, | ||
| 731 | |||
| 732 | /// @brief <b>`550`</b>: Gesture swipe down ten. | ||
| 733 | ADDON_ACTION_GESTURE_SWIPE_DOWN_TEN = 550, | ||
| 734 | |||
| 735 | /// @brief <b>`599`</b>: 5xx is reserved for additional gesture actions | ||
| 736 | ADDON_ACTION_GESTURE_END = 599, | ||
| 737 | |||
| 738 | // other, non-gesture actions | ||
| 739 | |||
| 740 | /// @brief <b>`601`</b>: Analog thumbstick move, horizontal axis, left; see ADDON_ACTION_ANALOG_MOVE | ||
| 741 | ADDON_ACTION_ANALOG_MOVE_X_LEFT = 601, | ||
| 742 | |||
| 743 | /// @brief <b>`602`</b>: Analog thumbstick move, horizontal axis, right; see ADDON_ACTION_ANALOG_MOVE | ||
| 744 | ADDON_ACTION_ANALOG_MOVE_X_RIGHT = 602, | ||
| 745 | |||
| 746 | /// @brief <b>`603`</b>: Analog thumbstick move, vertical axis, up; see ADDON_ACTION_ANALOG_MOVE | ||
| 747 | ADDON_ACTION_ANALOG_MOVE_Y_UP = 603, | ||
| 748 | |||
| 749 | /// @brief <b>`604`</b>: Analog thumbstick move, vertical axis, down; see ADDON_ACTION_ANALOG_MOVE | ||
| 750 | ADDON_ACTION_ANALOG_MOVE_Y_DOWN = 604, | ||
| 751 | |||
| 752 | /// @brief <b>`998`</b>: ERROR action is used to play an error sound. | ||
| 753 | ADDON_ACTION_ERROR = 998, | ||
| 754 | |||
| 755 | /// @brief <b>`999`</b>: The NOOP action can be specified to disable an input event. This is | ||
| 756 | /// useful in user keyboard.xml etc to disable actions specified in the | ||
| 757 | /// system mappings. | ||
| 758 | ADDON_ACTION_NOOP = 999 | ||
| 759 | ///@} | ||
| 760 | }; | ||
| 761 | ///@} | ||
| 762 | |||
| 763 | #endif /* !C_API_GUI_ACTION_IDS_H */ | ||
diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/list_item.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/list_item.h new file mode 100644 index 0000000..f0c4dc7 --- /dev/null +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/list_item.h | |||
| @@ -0,0 +1,54 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2005-2020 Team Kodi | ||
| 3 | * This file is part of Kodi - https://kodi.tv | ||
| 4 | * | ||
| 5 | * SPDX-License-Identifier: GPL-2.0-or-later | ||
| 6 | * See LICENSES/README.md for more information. | ||
| 7 | */ | ||
| 8 | |||
| 9 | #pragma once | ||
| 10 | |||
| 11 | #ifndef C_API_GUI_LIST_ITEM_H | ||
| 12 | #define C_API_GUI_LIST_ITEM_H | ||
| 13 | |||
| 14 | #include "definitions.h" | ||
| 15 | |||
| 16 | #ifdef __cplusplus | ||
| 17 | extern "C" | ||
| 18 | { | ||
| 19 | #endif /* __cplusplus */ | ||
| 20 | |||
| 21 | typedef struct AddonToKodiFuncTable_kodi_gui_listItem | ||
| 22 | { | ||
| 23 | KODI_GUI_LISTITEM_HANDLE(*create) | ||
| 24 | (KODI_HANDLE kodiBase, | ||
| 25 | const char* label, | ||
| 26 | const char* label2, | ||
| 27 | const char* path); | ||
| 28 | void (*destroy)(KODI_HANDLE kodiBase, KODI_GUI_LISTITEM_HANDLE handle); | ||
| 29 | |||
| 30 | char* (*get_label)(KODI_HANDLE kodiBase, KODI_GUI_LISTITEM_HANDLE handle); | ||
| 31 | void (*set_label)(KODI_HANDLE kodiBase, KODI_GUI_LISTITEM_HANDLE handle, const char* label); | ||
| 32 | char* (*get_label2)(KODI_HANDLE kodiBase, KODI_GUI_LISTITEM_HANDLE handle); | ||
| 33 | void (*set_label2)(KODI_HANDLE kodiBase, KODI_GUI_LISTITEM_HANDLE handle, const char* label); | ||
| 34 | char* (*get_art)(KODI_HANDLE kodiBase, KODI_GUI_LISTITEM_HANDLE handle, const char* type); | ||
| 35 | void (*set_art)(KODI_HANDLE kodiBase, | ||
| 36 | KODI_GUI_LISTITEM_HANDLE handle, | ||
| 37 | const char* type, | ||
| 38 | const char* image); | ||
| 39 | char* (*get_path)(KODI_HANDLE kodiBase, KODI_GUI_LISTITEM_HANDLE handle); | ||
| 40 | void (*set_path)(KODI_HANDLE kodiBase, KODI_GUI_LISTITEM_HANDLE handle, const char* path); | ||
| 41 | char* (*get_property)(KODI_HANDLE kodiBase, KODI_GUI_LISTITEM_HANDLE handle, const char* key); | ||
| 42 | void (*set_property)(KODI_HANDLE kodiBase, | ||
| 43 | KODI_GUI_LISTITEM_HANDLE handle, | ||
| 44 | const char* key, | ||
| 45 | const char* value); | ||
| 46 | void (*select)(KODI_HANDLE kodiBase, KODI_GUI_LISTITEM_HANDLE handle, bool select); | ||
| 47 | bool (*is_selected)(KODI_HANDLE kodiBase, KODI_GUI_LISTITEM_HANDLE handle); | ||
| 48 | } AddonToKodiFuncTable_kodi_gui_listItem; | ||
| 49 | |||
| 50 | #ifdef __cplusplus | ||
| 51 | } /* extern "C" */ | ||
| 52 | #endif /* __cplusplus */ | ||
| 53 | |||
| 54 | #endif /* !C_API_GUI_LIST_ITEM_H */ | ||
diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/window.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/window.h new file mode 100644 index 0000000..0f844f5 --- /dev/null +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/window.h | |||
| @@ -0,0 +1,183 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2005-2020 Team Kodi | ||
| 3 | * This file is part of Kodi - https://kodi.tv | ||
| 4 | * | ||
| 5 | * SPDX-License-Identifier: GPL-2.0-or-later | ||
| 6 | * See LICENSES/README.md for more information. | ||
| 7 | */ | ||
| 8 | |||
| 9 | #pragma once | ||
| 10 | |||
| 11 | #ifndef C_API_GUI_WINDOW_H | ||
| 12 | #define C_API_GUI_WINDOW_H | ||
| 13 | |||
| 14 | #include "definitions.h" | ||
| 15 | #include "input/action_ids.h" | ||
| 16 | |||
| 17 | #include <stddef.h> | ||
| 18 | |||
| 19 | #define ADDON_MAX_CONTEXT_ENTRIES 20 | ||
| 20 | #define ADDON_MAX_CONTEXT_ENTRY_NAME_LENGTH 80 | ||
| 21 | |||
| 22 | #ifdef __cplusplus | ||
| 23 | extern "C" | ||
| 24 | { | ||
| 25 | #endif /* __cplusplus */ | ||
| 26 | |||
| 27 | typedef struct gui_context_menu_pair | ||
| 28 | { | ||
| 29 | unsigned int id; | ||
| 30 | char name[ADDON_MAX_CONTEXT_ENTRY_NAME_LENGTH]; | ||
| 31 | } gui_context_menu_pair; | ||
| 32 | |||
| 33 | typedef struct AddonToKodiFuncTable_kodi_gui_window | ||
| 34 | { | ||
| 35 | /* Window creation functions */ | ||
| 36 | KODI_GUI_WINDOW_HANDLE(*create) | ||
| 37 | (KODI_HANDLE kodiBase, | ||
| 38 | const char* xml_filename, | ||
| 39 | const char* default_skin, | ||
| 40 | bool as_dialog, | ||
| 41 | bool is_media); | ||
| 42 | void (*destroy)(KODI_HANDLE kodiBase, KODI_GUI_WINDOW_HANDLE handle); | ||
| 43 | |||
| 44 | void (*set_callbacks)(KODI_HANDLE kodiBase, | ||
| 45 | KODI_GUI_WINDOW_HANDLE handle, | ||
| 46 | KODI_GUI_CLIENT_HANDLE clienthandle, | ||
| 47 | bool (*CBInit)(KODI_GUI_CLIENT_HANDLE), | ||
| 48 | bool (*CBFocus)(KODI_GUI_CLIENT_HANDLE, int), | ||
| 49 | bool (*CBClick)(KODI_GUI_CLIENT_HANDLE, int), | ||
| 50 | bool (*CBOnAction)(KODI_GUI_CLIENT_HANDLE, enum ADDON_ACTION), | ||
| 51 | void (*CBGetContextButtons)( | ||
| 52 | KODI_GUI_CLIENT_HANDLE, int, gui_context_menu_pair*, unsigned int*), | ||
| 53 | bool (*CBOnContextButton)(KODI_GUI_CLIENT_HANDLE, int, unsigned int)); | ||
| 54 | bool (*show)(KODI_HANDLE kodiBase, KODI_GUI_WINDOW_HANDLE handle); | ||
| 55 | bool (*close)(KODI_HANDLE kodiBase, KODI_GUI_WINDOW_HANDLE handle); | ||
| 56 | bool (*do_modal)(KODI_HANDLE kodiBase, KODI_GUI_WINDOW_HANDLE handle); | ||
| 57 | |||
| 58 | /* Window control functions */ | ||
| 59 | bool (*set_focus_id)(KODI_HANDLE kodiBase, KODI_GUI_WINDOW_HANDLE handle, int control_id); | ||
| 60 | int (*get_focus_id)(KODI_HANDLE kodiBase, KODI_GUI_WINDOW_HANDLE handle); | ||
| 61 | void (*set_control_label)(KODI_HANDLE kodiBase, | ||
| 62 | KODI_GUI_WINDOW_HANDLE handle, | ||
| 63 | int control_id, | ||
| 64 | const char* label); | ||
| 65 | void (*set_control_visible)(KODI_HANDLE kodiBase, | ||
| 66 | KODI_GUI_WINDOW_HANDLE handle, | ||
| 67 | int control_id, | ||
| 68 | bool visible); | ||
| 69 | void (*set_control_selected)(KODI_HANDLE kodiBase, | ||
| 70 | KODI_GUI_WINDOW_HANDLE handle, | ||
| 71 | int control_id, | ||
| 72 | bool selected); | ||
| 73 | |||
| 74 | /* Window property functions */ | ||
| 75 | void (*set_property)(KODI_HANDLE kodiBase, | ||
| 76 | KODI_GUI_WINDOW_HANDLE handle, | ||
| 77 | const char* key, | ||
| 78 | const char* value); | ||
| 79 | void (*set_property_int)(KODI_HANDLE kodiBase, | ||
| 80 | KODI_GUI_WINDOW_HANDLE handle, | ||
| 81 | const char* key, | ||
| 82 | int value); | ||
| 83 | void (*set_property_bool)(KODI_HANDLE kodiBase, | ||
| 84 | KODI_GUI_WINDOW_HANDLE handle, | ||
| 85 | const char* key, | ||
| 86 | bool value); | ||
| 87 | void (*set_property_double)(KODI_HANDLE kodiBase, | ||
| 88 | KODI_GUI_WINDOW_HANDLE handle, | ||
| 89 | const char* key, | ||
| 90 | double value); | ||
| 91 | char* (*get_property)(KODI_HANDLE kodiBase, KODI_GUI_WINDOW_HANDLE handle, const char* key); | ||
| 92 | int (*get_property_int)(KODI_HANDLE kodiBase, KODI_GUI_WINDOW_HANDLE handle, const char* key); | ||
| 93 | bool (*get_property_bool)(KODI_HANDLE kodiBase, KODI_GUI_WINDOW_HANDLE handle, const char* key); | ||
| 94 | double (*get_property_double)(KODI_HANDLE kodiBase, | ||
| 95 | KODI_GUI_WINDOW_HANDLE handle, | ||
| 96 | const char* key); | ||
| 97 | void (*clear_properties)(KODI_HANDLE kodiBase, KODI_GUI_WINDOW_HANDLE handle); | ||
| 98 | void (*clear_property)(KODI_HANDLE kodiBase, KODI_GUI_WINDOW_HANDLE handle, const char* key); | ||
| 99 | |||
| 100 | /* List item functions */ | ||
| 101 | void (*clear_item_list)(KODI_HANDLE kodiBase, KODI_GUI_WINDOW_HANDLE handle); | ||
| 102 | void (*add_list_item)(KODI_HANDLE kodiBase, | ||
| 103 | KODI_GUI_WINDOW_HANDLE handle, | ||
| 104 | KODI_GUI_LISTITEM_HANDLE item, | ||
| 105 | int list_position); | ||
| 106 | void (*remove_list_item_from_position)(KODI_HANDLE kodiBase, | ||
| 107 | KODI_GUI_WINDOW_HANDLE handle, | ||
| 108 | int list_position); | ||
| 109 | void (*remove_list_item)(KODI_HANDLE kodiBase, | ||
| 110 | KODI_GUI_WINDOW_HANDLE handle, | ||
| 111 | KODI_GUI_LISTITEM_HANDLE item); | ||
| 112 | KODI_GUI_LISTITEM_HANDLE(*get_list_item) | ||
| 113 | (KODI_HANDLE kodiBase, KODI_GUI_WINDOW_HANDLE handle, int list_position); | ||
| 114 | void (*set_current_list_position)(KODI_HANDLE kodiBase, | ||
| 115 | KODI_GUI_WINDOW_HANDLE handle, | ||
| 116 | int list_position); | ||
| 117 | int (*get_current_list_position)(KODI_HANDLE kodiBase, KODI_GUI_WINDOW_HANDLE handle); | ||
| 118 | int (*get_list_size)(KODI_HANDLE kodiBase, KODI_GUI_WINDOW_HANDLE handle); | ||
| 119 | void (*set_container_property)(KODI_HANDLE kodiBase, | ||
| 120 | KODI_GUI_WINDOW_HANDLE handle, | ||
| 121 | const char* key, | ||
| 122 | const char* value); | ||
| 123 | void (*set_container_content)(KODI_HANDLE kodiBase, | ||
| 124 | KODI_GUI_WINDOW_HANDLE handle, | ||
| 125 | const char* value); | ||
| 126 | int (*get_current_container_id)(KODI_HANDLE kodiBase, KODI_GUI_WINDOW_HANDLE handle); | ||
| 127 | |||
| 128 | /* Various functions */ | ||
| 129 | void (*mark_dirty_region)(KODI_HANDLE kodiBase, KODI_GUI_WINDOW_HANDLE handle); | ||
| 130 | |||
| 131 | /* GUI control access functions */ | ||
| 132 | KODI_GUI_CONTROL_HANDLE(*get_control_button) | ||
| 133 | (KODI_HANDLE kodiBase, KODI_GUI_WINDOW_HANDLE handle, int control_id); | ||
| 134 | KODI_GUI_CONTROL_HANDLE(*get_control_edit) | ||
| 135 | (KODI_HANDLE kodiBase, KODI_GUI_WINDOW_HANDLE handle, int control_id); | ||
| 136 | KODI_GUI_CONTROL_HANDLE(*get_control_fade_label) | ||
| 137 | (KODI_HANDLE kodiBase, KODI_GUI_WINDOW_HANDLE handle, int control_id); | ||
| 138 | KODI_GUI_CONTROL_HANDLE(*get_control_image) | ||
| 139 | (KODI_HANDLE kodiBase, KODI_GUI_WINDOW_HANDLE handle, int control_id); | ||
| 140 | KODI_GUI_CONTROL_HANDLE(*get_control_label) | ||
| 141 | (KODI_HANDLE kodiBase, KODI_GUI_WINDOW_HANDLE handle, int control_id); | ||
| 142 | KODI_GUI_CONTROL_HANDLE(*get_control_progress) | ||
| 143 | (KODI_HANDLE kodiBase, KODI_GUI_WINDOW_HANDLE handle, int control_id); | ||
| 144 | KODI_GUI_CONTROL_HANDLE(*get_control_radio_button) | ||
| 145 | (KODI_HANDLE kodiBase, KODI_GUI_WINDOW_HANDLE handle, int control_id); | ||
| 146 | KODI_GUI_CONTROL_HANDLE(*get_control_render_addon) | ||
| 147 | (KODI_HANDLE kodiBase, KODI_GUI_WINDOW_HANDLE handle, int control_id); | ||
| 148 | KODI_GUI_CONTROL_HANDLE(*get_control_settings_slider) | ||
| 149 | (KODI_HANDLE kodiBase, KODI_GUI_WINDOW_HANDLE handle, int control_id); | ||
| 150 | KODI_GUI_CONTROL_HANDLE(*get_control_slider) | ||
| 151 | (KODI_HANDLE kodiBase, KODI_GUI_WINDOW_HANDLE handle, int control_id); | ||
| 152 | KODI_GUI_CONTROL_HANDLE(*get_control_spin) | ||
| 153 | (KODI_HANDLE kodiBase, KODI_GUI_WINDOW_HANDLE handle, int control_id); | ||
| 154 | KODI_GUI_CONTROL_HANDLE(*get_control_text_box) | ||
| 155 | (KODI_HANDLE kodiBase, KODI_GUI_WINDOW_HANDLE handle, int control_id); | ||
| 156 | KODI_GUI_CONTROL_HANDLE(*get_control_dummy1) | ||
| 157 | (KODI_HANDLE kodiBase, KODI_GUI_WINDOW_HANDLE handle, int control_id); | ||
| 158 | KODI_GUI_CONTROL_HANDLE(*get_control_dummy2) | ||
| 159 | (KODI_HANDLE kodiBase, KODI_GUI_WINDOW_HANDLE handle, int control_id); | ||
| 160 | KODI_GUI_CONTROL_HANDLE(*get_control_dummy3) | ||
| 161 | (KODI_HANDLE kodiBase, KODI_GUI_WINDOW_HANDLE handle, int control_id); | ||
| 162 | KODI_GUI_CONTROL_HANDLE(*get_control_dummy4) | ||
| 163 | (KODI_HANDLE kodiBase, KODI_GUI_WINDOW_HANDLE handle, int control_id); | ||
| 164 | KODI_GUI_CONTROL_HANDLE(*get_control_dummy5) | ||
| 165 | (KODI_HANDLE kodiBase, KODI_GUI_WINDOW_HANDLE handle, int control_id); | ||
| 166 | KODI_GUI_CONTROL_HANDLE(*get_control_dummy6) | ||
| 167 | (KODI_HANDLE kodiBase, KODI_GUI_WINDOW_HANDLE handle, int control_id); | ||
| 168 | KODI_GUI_CONTROL_HANDLE(*get_control_dummy7) | ||
| 169 | (KODI_HANDLE kodiBase, KODI_GUI_WINDOW_HANDLE handle, int control_id); | ||
| 170 | KODI_GUI_CONTROL_HANDLE(*get_control_dummy8) | ||
| 171 | (KODI_HANDLE kodiBase, KODI_GUI_WINDOW_HANDLE handle, int control_id); | ||
| 172 | KODI_GUI_CONTROL_HANDLE(*get_control_dummy9) | ||
| 173 | (KODI_HANDLE kodiBase, KODI_GUI_WINDOW_HANDLE handle, int control_id); | ||
| 174 | KODI_GUI_CONTROL_HANDLE(*get_control_dummy10) | ||
| 175 | (KODI_HANDLE kodiBase, KODI_GUI_WINDOW_HANDLE handle, int control_id); | ||
| 176 | /* This above used to add new get_control_* functions */ | ||
| 177 | } AddonToKodiFuncTable_kodi_gui_window; | ||
| 178 | |||
| 179 | #ifdef __cplusplus | ||
| 180 | } /* extern "C" */ | ||
| 181 | #endif /* __cplusplus */ | ||
| 182 | |||
| 183 | #endif /* !C_API_GUI_WINDOW_H */ | ||
diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/network.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/network.h new file mode 100644 index 0000000..88d5231 --- /dev/null +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/network.h | |||
| @@ -0,0 +1,48 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2005-2018 Team Kodi | ||
| 3 | * This file is part of Kodi - https://kodi.tv | ||
| 4 | * | ||
| 5 | * SPDX-License-Identifier: GPL-2.0-or-later | ||
| 6 | * See LICENSES/README.md for more information. | ||
| 7 | */ | ||
| 8 | |||
| 9 | #pragma once | ||
| 10 | |||
| 11 | #ifndef C_API_NETWORK_H | ||
| 12 | #define C_API_NETWORK_H | ||
| 13 | |||
| 14 | #include <stdbool.h> | ||
| 15 | |||
| 16 | #ifdef __cplusplus | ||
| 17 | extern "C" | ||
| 18 | { | ||
| 19 | #endif /* __cplusplus */ | ||
| 20 | |||
| 21 | /* | ||
| 22 | * For interface between add-on and kodi. | ||
| 23 | * | ||
| 24 | * This structure defines the addresses of functions stored inside Kodi which | ||
| 25 | * are then available for the add-on to call | ||
| 26 | * | ||
| 27 | * All function pointers there are used by the C++ interface functions below. | ||
| 28 | * You find the set of them on xbmc/addons/interfaces/General.cpp | ||
| 29 | * | ||
| 30 | * Note: For add-on development itself this is not needed | ||
| 31 | */ | ||
| 32 | typedef struct AddonToKodiFuncTable_kodi_network | ||
| 33 | { | ||
| 34 | bool (*wake_on_lan)(void* kodiBase, const char* mac); | ||
| 35 | char* (*get_ip_address)(void* kodiBase); | ||
| 36 | char* (*dns_lookup)(void* kodiBase, const char* url, bool* ret); | ||
| 37 | char* (*url_encode)(void* kodiBase, const char* url); | ||
| 38 | char* (*get_hostname)(void* kodiBase); | ||
| 39 | bool (*is_local_host)(void* kodiBase, const char* hostname); | ||
| 40 | bool (*is_host_on_lan)(void* kodiBase, const char* hostname, bool offLineCheck); | ||
| 41 | char* (*get_user_agent)(void* kodiBase); | ||
| 42 | } AddonToKodiFuncTable_kodi_network; | ||
| 43 | |||
| 44 | #ifdef __cplusplus | ||
| 45 | } /* extern "C" */ | ||
| 46 | #endif /* __cplusplus */ | ||
| 47 | |||
| 48 | #endif /* C_API_NETWORK_H */ | ||
diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/platform/android/system.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/platform/android/system.h new file mode 100644 index 0000000..568a2fd --- /dev/null +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/platform/android/system.h | |||
| @@ -0,0 +1,34 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2005-2020 Team Kodi | ||
| 3 | * This file is part of Kodi - https://kodi.tv | ||
| 4 | * | ||
| 5 | * SPDX-License-Identifier: GPL-2.0-or-later | ||
| 6 | * See LICENSES/README.md for more information. | ||
| 7 | */ | ||
| 8 | |||
| 9 | #pragma once | ||
| 10 | |||
| 11 | #ifndef C_API_PLATFORM_ANDROID_H | ||
| 12 | #define C_API_PLATFORM_ANDROID_H | ||
| 13 | |||
| 14 | #define INTERFACE_ANDROID_SYSTEM_NAME "ANDROID_SYSTEM" | ||
| 15 | #define INTERFACE_ANDROID_SYSTEM_VERSION "1.0.2" | ||
| 16 | #define INTERFACE_ANDROID_SYSTEM_VERSION_MIN "1.0.1" | ||
| 17 | |||
| 18 | #ifdef __cplusplus | ||
| 19 | extern "C" | ||
| 20 | { | ||
| 21 | #endif /* __cplusplus */ | ||
| 22 | |||
| 23 | struct AddonToKodiFuncTable_android_system | ||
| 24 | { | ||
| 25 | void* (*get_jni_env)(); | ||
| 26 | int (*get_sdk_version)(); | ||
| 27 | const char *(*get_class_name)(); | ||
| 28 | }; | ||
| 29 | |||
| 30 | #ifdef __cplusplus | ||
| 31 | } | ||
| 32 | #endif /* __cplusplus */ | ||
| 33 | |||
| 34 | #endif /* !C_API_PLATFORM_ANDROID_H */ | ||
