diff options
Diffstat (limited to 'xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance')
21 files changed, 4914 insertions, 0 deletions
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 */ | ||
