diff options
| author | manuel <manuel@mausz.at> | 2020-07-02 23:09:26 +0200 |
|---|---|---|
| committer | manuel <manuel@mausz.at> | 2020-07-02 23:09:26 +0200 |
| commit | 5f8335c1e49ce108ef3481863833c98efa00411b (patch) | |
| tree | f02b5c1c9765bb6a14c8eb42bb4f81b9face0b55 /xbmc/addons/kodi-addon-dev-kit/include/kodi/c-api/addon-instance | |
| parent | e317daf081a1048904fdf0b548946fa3ba6593a7 (diff) | |
| download | kodi-pvr-build-5f8335c1e49ce108ef3481863833c98efa00411b.tar.gz kodi-pvr-build-5f8335c1e49ce108ef3481863833c98efa00411b.tar.bz2 kodi-pvr-build-5f8335c1e49ce108ef3481863833c98efa00411b.zip | |
Diffstat (limited to 'xbmc/addons/kodi-addon-dev-kit/include/kodi/c-api/addon-instance')
14 files changed, 2424 insertions, 0 deletions
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/c-api/addon-instance/CMakeLists.txt b/xbmc/addons/kodi-addon-dev-kit/include/kodi/c-api/addon-instance/CMakeLists.txt new file mode 100644 index 0000000..dfcfe66 --- /dev/null +++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/c-api/addon-instance/CMakeLists.txt | |||
| @@ -0,0 +1,6 @@ | |||
| 1 | set(HEADERS image_decoder.h | ||
| 2 | pvr.h) | ||
| 3 | |||
| 4 | if(NOT ENABLE_STATIC_LIBS) | ||
| 5 | core_add_library(addons_kodi-addon-dev-kit_include_kodi_c-api_addon-instance) | ||
| 6 | endif() | ||
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/c-api/addon-instance/image_decoder.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/c-api/addon-instance/image_decoder.h new file mode 100644 index 0000000..595a5dc --- /dev/null +++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/c-api/addon-instance/image_decoder.h | |||
| @@ -0,0 +1,78 @@ | |||
| 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 | #include "../addon_base.h" | ||
| 12 | |||
| 13 | #ifdef __cplusplus | ||
| 14 | extern "C" | ||
| 15 | { | ||
| 16 | #endif /* __cplusplus */ | ||
| 17 | |||
| 18 | //============================================================================ | ||
| 19 | /// @ingroup cpp_kodi_addon_imagedecoder_Defs | ||
| 20 | /// @brief **Image format types**\n | ||
| 21 | /// Used to define wanted target format where image decoder should give to | ||
| 22 | /// Kodi. | ||
| 23 | /// | ||
| 24 | typedef enum ImageFormat | ||
| 25 | { | ||
| 26 | /// @brief A 32-bit ARGB pixel format, with alpha, that uses 8 bits per | ||
| 27 | /// channel, ARGBARGB... | ||
| 28 | ADDON_IMG_FMT_A8R8G8B8 = 1, | ||
| 29 | |||
| 30 | /// @brief A 8, alpha only, 8bpp, AAA... | ||
| 31 | ADDON_IMG_FMT_A8 = 2, | ||
| 32 | |||
| 33 | /// @brief RGBA 8:8:8:8, with alpha, 32bpp, RGBARGBA... | ||
| 34 | ADDON_IMG_FMT_RGBA8 = 3, | ||
| 35 | |||
| 36 | /// @brief RGB 8:8:8, with alpha, 24bpp, RGBRGB... | ||
| 37 | ADDON_IMG_FMT_RGB8 = 4 | ||
| 38 | } ImageFormat; | ||
| 39 | //---------------------------------------------------------------------------- | ||
| 40 | |||
| 41 | typedef struct AddonProps_ImageDecoder | ||
| 42 | { | ||
| 43 | const char* mimetype; | ||
| 44 | } AddonProps_ImageDecoder; | ||
| 45 | |||
| 46 | typedef struct AddonToKodiFuncTable_ImageDecoder | ||
| 47 | { | ||
| 48 | KODI_HANDLE kodi_instance; | ||
| 49 | } AddonToKodiFuncTable_ImageDecoder; | ||
| 50 | |||
| 51 | struct AddonInstance_ImageDecoder; | ||
| 52 | typedef struct KodiToAddonFuncTable_ImageDecoder | ||
| 53 | { | ||
| 54 | KODI_HANDLE addonInstance; | ||
| 55 | bool(__cdecl* load_image_from_memory)(const struct AddonInstance_ImageDecoder* instance, | ||
| 56 | unsigned char* buffer, | ||
| 57 | unsigned int buf_size, | ||
| 58 | unsigned int* width, | ||
| 59 | unsigned int* height); | ||
| 60 | |||
| 61 | bool(__cdecl* decode)(const struct AddonInstance_ImageDecoder* instance, | ||
| 62 | unsigned char* pixels, | ||
| 63 | unsigned int width, | ||
| 64 | unsigned int height, | ||
| 65 | unsigned int pitch, | ||
| 66 | enum ImageFormat format); | ||
| 67 | } KodiToAddonFuncTable_ImageDecoder; | ||
| 68 | |||
| 69 | typedef struct AddonInstance_ImageDecoder | ||
| 70 | { | ||
| 71 | struct AddonProps_ImageDecoder* props; | ||
| 72 | struct AddonToKodiFuncTable_ImageDecoder* toKodi; | ||
| 73 | struct KodiToAddonFuncTable_ImageDecoder* toAddon; | ||
| 74 | } AddonInstance_ImageDecoder; | ||
| 75 | |||
| 76 | #ifdef __cplusplus | ||
| 77 | } /* extern "C" */ | ||
| 78 | #endif /* __cplusplus */ | ||
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/c-api/addon-instance/pvr.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/c-api/addon-instance/pvr.h new file mode 100644 index 0000000..2d255ad --- /dev/null +++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/c-api/addon-instance/pvr.h | |||
| @@ -0,0 +1,327 @@ | |||
| 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 | #include "../../AddonBase.h" | ||
| 12 | #include "pvr/pvr_channel_groups.h" | ||
| 13 | #include "pvr/pvr_channels.h" | ||
| 14 | #include "pvr/pvr_defines.h" | ||
| 15 | #include "pvr/pvr_edl.h" | ||
| 16 | #include "pvr/pvr_epg.h" | ||
| 17 | #include "pvr/pvr_general.h" | ||
| 18 | #include "pvr/pvr_menu_hook.h" | ||
| 19 | #include "pvr/pvr_recordings.h" | ||
| 20 | #include "pvr/pvr_stream.h" | ||
| 21 | #include "pvr/pvr_timers.h" | ||
| 22 | |||
| 23 | //¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ | ||
| 24 | // "C" main interface function tables between Kodi and addon | ||
| 25 | // | ||
| 26 | // Values related to all parts and not used direct on addon, are to define here. | ||
| 27 | // | ||
| 28 | #ifdef __cplusplus | ||
| 29 | extern "C" | ||
| 30 | { | ||
| 31 | #endif /* __cplusplus */ | ||
| 32 | |||
| 33 | /*! | ||
| 34 | * @internal | ||
| 35 | * @brief PVR "C" basis API interface | ||
| 36 | * | ||
| 37 | * This field contains things that are exchanged between Kodi and Addon | ||
| 38 | * and is the basis of the PVR-side "C" API. | ||
| 39 | * | ||
| 40 | * @warning Care should be taken when making changes in this fields!\n | ||
| 41 | * Changes can destroy API in addons that have already been created. If a | ||
| 42 | * necessary change or new feature is added, the version of the PVR | ||
| 43 | * at @ref ADDON_INSTANCE_VERSION_PVR_MIN must be increased too.\n | ||
| 44 | * \n | ||
| 45 | * Conditional changes can be made in some places, without min PVR version | ||
| 46 | * increase. The add-on should then use CreateInstanceEx and add partial tests | ||
| 47 | * for this in the C++ header. | ||
| 48 | * | ||
| 49 | * Have by add of new parts a look about **Doxygen** `\\ingroup`, so that | ||
| 50 | * added parts included in documentation. | ||
| 51 | * | ||
| 52 | * If you add addon side related documentation, where his dev need know, | ||
| 53 | * use `///`. For parts only for Kodi make it like here. | ||
| 54 | * | ||
| 55 | * @endinternal | ||
| 56 | */ | ||
| 57 | |||
| 58 | struct AddonInstance_PVR; | ||
| 59 | |||
| 60 | /*! | ||
| 61 | * @brief Structure to define typical standard values | ||
| 62 | */ | ||
| 63 | typedef struct AddonProperties_PVR | ||
| 64 | { | ||
| 65 | const char* strUserPath; | ||
| 66 | const char* strClientPath; | ||
| 67 | int iEpgMaxDays; | ||
| 68 | } AddonProperties_PVR; | ||
| 69 | |||
| 70 | /*! | ||
| 71 | * @brief Structure to transfer the methods from Kodi to addon | ||
| 72 | */ | ||
| 73 | typedef struct AddonToKodiFuncTable_PVR | ||
| 74 | { | ||
| 75 | // Pointer inside Kodi where used from him to find his class | ||
| 76 | KODI_HANDLE kodiInstance; | ||
| 77 | |||
| 78 | //--==----==----==----==----==----==----==----==----==----==----==----==----== | ||
| 79 | // General callback functions | ||
| 80 | void (*AddMenuHook)(void* kodiInstance, const struct PVR_MENUHOOK* hook); | ||
| 81 | void (*RecordingNotification)(void* kodiInstance, | ||
| 82 | const char* name, | ||
| 83 | const char* fileName, | ||
| 84 | bool on); | ||
| 85 | void (*ConnectionStateChange)(void* kodiInstance, | ||
| 86 | const char* strConnectionString, | ||
| 87 | enum PVR_CONNECTION_STATE newState, | ||
| 88 | const char* strMessage); | ||
| 89 | void (*EpgEventStateChange)(void* kodiInstance, | ||
| 90 | struct EPG_TAG* tag, | ||
| 91 | enum EPG_EVENT_STATE newState); | ||
| 92 | |||
| 93 | //--==----==----==----==----==----==----==----==----==----==----==----==----== | ||
| 94 | // Transfer functions where give data back to Kodi, e.g. GetChannels calls TransferChannelEntry | ||
| 95 | void (*TransferChannelEntry)(void* kodiInstance, | ||
| 96 | const ADDON_HANDLE handle, | ||
| 97 | const struct PVR_CHANNEL* chan); | ||
| 98 | void (*TransferChannelGroup)(void* kodiInstance, | ||
| 99 | const ADDON_HANDLE handle, | ||
| 100 | const struct PVR_CHANNEL_GROUP* group); | ||
| 101 | void (*TransferChannelGroupMember)(void* kodiInstance, | ||
| 102 | const ADDON_HANDLE handle, | ||
| 103 | const struct PVR_CHANNEL_GROUP_MEMBER* member); | ||
| 104 | void (*TransferEpgEntry)(void* kodiInstance, | ||
| 105 | const ADDON_HANDLE handle, | ||
| 106 | const struct EPG_TAG* epgentry); | ||
| 107 | void (*TransferRecordingEntry)(void* kodiInstance, | ||
| 108 | const ADDON_HANDLE handle, | ||
| 109 | const struct PVR_RECORDING* recording); | ||
| 110 | void (*TransferTimerEntry)(void* kodiInstance, | ||
| 111 | const ADDON_HANDLE handle, | ||
| 112 | const struct PVR_TIMER* timer); | ||
| 113 | |||
| 114 | //--==----==----==----==----==----==----==----==----==----==----==----==----== | ||
| 115 | // Kodi inform interface functions | ||
| 116 | void (*TriggerChannelUpdate)(void* kodiInstance); | ||
| 117 | void (*TriggerChannelGroupsUpdate)(void* kodiInstance); | ||
| 118 | void (*TriggerEpgUpdate)(void* kodiInstance, unsigned int iChannelUid); | ||
| 119 | void (*TriggerRecordingUpdate)(void* kodiInstance); | ||
| 120 | void (*TriggerTimerUpdate)(void* kodiInstance); | ||
| 121 | |||
| 122 | //--==----==----==----==----==----==----==----==----==----==----==----==----== | ||
| 123 | // Stream demux interface functions | ||
| 124 | void (*FreeDemuxPacket)(void* kodiInstance, struct DemuxPacket* pPacket); | ||
| 125 | struct DemuxPacket* (*AllocateDemuxPacket)(void* kodiInstance, int iDataSize); | ||
| 126 | struct PVR_CODEC (*GetCodecByName)(const void* kodiInstance, const char* strCodecName); | ||
| 127 | |||
| 128 | //--==----==----==----==----==----==----==----==----==----==----==----==----== | ||
| 129 | // New functions becomes added below and can be on another API change (where | ||
| 130 | // breaks min API version) moved up. | ||
| 131 | } AddonToKodiFuncTable_PVR; | ||
| 132 | |||
| 133 | /*! | ||
| 134 | * @brief Structure to transfer the methods from addon to Kodi | ||
| 135 | */ | ||
| 136 | typedef struct KodiToAddonFuncTable_PVR | ||
| 137 | { | ||
| 138 | // Pointer inside addon where used on them to find his instance class (currently unused!) | ||
| 139 | KODI_HANDLE addonInstance; | ||
| 140 | |||
| 141 | //--==----==----==----==----==----==----==----==----==----==----==----==----== | ||
| 142 | // General interface functions | ||
| 143 | enum PVR_ERROR(__cdecl* GetCapabilities)(const struct AddonInstance_PVR*, | ||
| 144 | struct PVR_ADDON_CAPABILITIES*); | ||
| 145 | enum PVR_ERROR(__cdecl* GetBackendName)(const struct AddonInstance_PVR*, char*, int); | ||
| 146 | enum PVR_ERROR(__cdecl* GetBackendVersion)(const struct AddonInstance_PVR*, char*, int); | ||
| 147 | enum PVR_ERROR(__cdecl* GetBackendHostname)(const struct AddonInstance_PVR*, char*, int); | ||
| 148 | enum PVR_ERROR(__cdecl* GetConnectionString)(const struct AddonInstance_PVR*, char*, int); | ||
| 149 | enum PVR_ERROR(__cdecl* GetDriveSpace)(const struct AddonInstance_PVR*, uint64_t*, uint64_t*); | ||
| 150 | enum PVR_ERROR(__cdecl* CallSettingsMenuHook)(const struct AddonInstance_PVR*, | ||
| 151 | const struct PVR_MENUHOOK*); | ||
| 152 | |||
| 153 | //--==----==----==----==----==----==----==----==----==----==----==----==----== | ||
| 154 | // Channel interface functions | ||
| 155 | |||
| 156 | enum PVR_ERROR(__cdecl* GetChannelsAmount)(const struct AddonInstance_PVR*, int*); | ||
| 157 | enum PVR_ERROR(__cdecl* GetChannels)(const struct AddonInstance_PVR*, ADDON_HANDLE, bool); | ||
| 158 | enum PVR_ERROR(__cdecl* GetChannelStreamProperties)(const struct AddonInstance_PVR*, | ||
| 159 | const struct PVR_CHANNEL*, | ||
| 160 | struct PVR_NAMED_VALUE*, | ||
| 161 | unsigned int*); | ||
| 162 | enum PVR_ERROR(__cdecl* GetSignalStatus)(const struct AddonInstance_PVR*, | ||
| 163 | int, | ||
| 164 | struct PVR_SIGNAL_STATUS*); | ||
| 165 | enum PVR_ERROR(__cdecl* GetDescrambleInfo)(const struct AddonInstance_PVR*, | ||
| 166 | int, | ||
| 167 | struct PVR_DESCRAMBLE_INFO*); | ||
| 168 | |||
| 169 | //--==----==----==----==----==----==----==----==----==----==----==----==----== | ||
| 170 | // Channel group interface functions | ||
| 171 | enum PVR_ERROR(__cdecl* GetChannelGroupsAmount)(const struct AddonInstance_PVR*, int*); | ||
| 172 | enum PVR_ERROR(__cdecl* GetChannelGroups)(const struct AddonInstance_PVR*, ADDON_HANDLE, bool); | ||
| 173 | enum PVR_ERROR(__cdecl* GetChannelGroupMembers)(const struct AddonInstance_PVR*, | ||
| 174 | ADDON_HANDLE, | ||
| 175 | const struct PVR_CHANNEL_GROUP*); | ||
| 176 | |||
| 177 | //--==----==----==----==----==----==----==----==----==----==----==----==----== | ||
| 178 | // Channel edit interface functions | ||
| 179 | enum PVR_ERROR(__cdecl* DeleteChannel)(const struct AddonInstance_PVR*, | ||
| 180 | const struct PVR_CHANNEL*); | ||
| 181 | enum PVR_ERROR(__cdecl* RenameChannel)(const struct AddonInstance_PVR*, | ||
| 182 | const struct PVR_CHANNEL*); | ||
| 183 | enum PVR_ERROR(__cdecl* OpenDialogChannelSettings)(const struct AddonInstance_PVR*, | ||
| 184 | const struct PVR_CHANNEL*); | ||
| 185 | enum PVR_ERROR(__cdecl* OpenDialogChannelAdd)(const struct AddonInstance_PVR*, | ||
| 186 | const struct PVR_CHANNEL*); | ||
| 187 | enum PVR_ERROR(__cdecl* OpenDialogChannelScan)(const struct AddonInstance_PVR*); | ||
| 188 | enum PVR_ERROR(__cdecl* CallChannelMenuHook)(const struct AddonInstance_PVR*, | ||
| 189 | const PVR_MENUHOOK*, | ||
| 190 | const PVR_CHANNEL*); | ||
| 191 | |||
| 192 | //--==----==----==----==----==----==----==----==----==----==----==----==----== | ||
| 193 | // EPG interface functions | ||
| 194 | enum PVR_ERROR(__cdecl* GetEPGForChannel)( | ||
| 195 | const struct AddonInstance_PVR*, ADDON_HANDLE, int, time_t, time_t); | ||
| 196 | enum PVR_ERROR(__cdecl* IsEPGTagRecordable)(const struct AddonInstance_PVR*, | ||
| 197 | const struct EPG_TAG*, | ||
| 198 | bool*); | ||
| 199 | enum PVR_ERROR(__cdecl* IsEPGTagPlayable)(const struct AddonInstance_PVR*, | ||
| 200 | const struct EPG_TAG*, | ||
| 201 | bool*); | ||
| 202 | enum PVR_ERROR(__cdecl* GetEPGTagEdl)(const struct AddonInstance_PVR*, | ||
| 203 | const struct EPG_TAG*, | ||
| 204 | struct PVR_EDL_ENTRY[], | ||
| 205 | int*); | ||
| 206 | enum PVR_ERROR(__cdecl* GetEPGTagStreamProperties)(const struct AddonInstance_PVR*, | ||
| 207 | const struct EPG_TAG*, | ||
| 208 | struct PVR_NAMED_VALUE*, | ||
| 209 | unsigned int*); | ||
| 210 | enum PVR_ERROR(__cdecl* SetEPGTimeFrame)(const struct AddonInstance_PVR*, int); | ||
| 211 | enum PVR_ERROR(__cdecl* CallEPGMenuHook)(const struct AddonInstance_PVR*, | ||
| 212 | const struct PVR_MENUHOOK*, | ||
| 213 | const struct EPG_TAG*); | ||
| 214 | |||
| 215 | //--==----==----==----==----==----==----==----==----==----==----==----==----== | ||
| 216 | // Recording interface functions | ||
| 217 | enum PVR_ERROR(__cdecl* GetRecordingsAmount)(const struct AddonInstance_PVR*, bool, int*); | ||
| 218 | enum PVR_ERROR(__cdecl* GetRecordings)(const struct AddonInstance_PVR*, ADDON_HANDLE, bool); | ||
| 219 | enum PVR_ERROR(__cdecl* DeleteRecording)(const struct AddonInstance_PVR*, | ||
| 220 | const struct PVR_RECORDING*); | ||
| 221 | enum PVR_ERROR(__cdecl* UndeleteRecording)(const struct AddonInstance_PVR*, | ||
| 222 | const struct PVR_RECORDING*); | ||
| 223 | enum PVR_ERROR(__cdecl* DeleteAllRecordingsFromTrash)(const struct AddonInstance_PVR*); | ||
| 224 | enum PVR_ERROR(__cdecl* RenameRecording)(const struct AddonInstance_PVR*, | ||
| 225 | const struct PVR_RECORDING*); | ||
| 226 | enum PVR_ERROR(__cdecl* SetRecordingLifetime)(const struct AddonInstance_PVR*, | ||
| 227 | const struct PVR_RECORDING*); | ||
| 228 | enum PVR_ERROR(__cdecl* SetRecordingPlayCount)(const struct AddonInstance_PVR*, | ||
| 229 | const struct PVR_RECORDING*, | ||
| 230 | int); | ||
| 231 | enum PVR_ERROR(__cdecl* SetRecordingLastPlayedPosition)(const struct AddonInstance_PVR*, | ||
| 232 | const struct PVR_RECORDING*, | ||
| 233 | int); | ||
| 234 | enum PVR_ERROR(__cdecl* GetRecordingLastPlayedPosition)(const struct AddonInstance_PVR*, | ||
| 235 | const struct PVR_RECORDING*, | ||
| 236 | int*); | ||
| 237 | enum PVR_ERROR(__cdecl* GetRecordingEdl)(const struct AddonInstance_PVR*, | ||
| 238 | const struct PVR_RECORDING*, | ||
| 239 | struct PVR_EDL_ENTRY[], | ||
| 240 | int*); | ||
| 241 | enum PVR_ERROR(__cdecl* GetRecordingSize)(const struct AddonInstance_PVR*, | ||
| 242 | const PVR_RECORDING*, | ||
| 243 | int64_t*); | ||
| 244 | enum PVR_ERROR(__cdecl* GetRecordingStreamProperties)(const struct AddonInstance_PVR*, | ||
| 245 | const struct PVR_RECORDING*, | ||
| 246 | struct PVR_NAMED_VALUE*, | ||
| 247 | unsigned int*); | ||
| 248 | enum PVR_ERROR(__cdecl* CallRecordingMenuHook)(const struct AddonInstance_PVR*, | ||
| 249 | const struct PVR_MENUHOOK*, | ||
| 250 | const struct PVR_RECORDING*); | ||
| 251 | |||
| 252 | //--==----==----==----==----==----==----==----==----==----==----==----==----== | ||
| 253 | // Timer interface functions | ||
| 254 | enum PVR_ERROR(__cdecl* GetTimerTypes)(const struct AddonInstance_PVR*, | ||
| 255 | struct PVR_TIMER_TYPE[], | ||
| 256 | int*); | ||
| 257 | enum PVR_ERROR(__cdecl* GetTimersAmount)(const struct AddonInstance_PVR*, int*); | ||
| 258 | enum PVR_ERROR(__cdecl* GetTimers)(const struct AddonInstance_PVR*, ADDON_HANDLE); | ||
| 259 | enum PVR_ERROR(__cdecl* AddTimer)(const struct AddonInstance_PVR*, const struct PVR_TIMER*); | ||
| 260 | enum PVR_ERROR(__cdecl* DeleteTimer)(const struct AddonInstance_PVR*, | ||
| 261 | const struct PVR_TIMER*, | ||
| 262 | bool); | ||
| 263 | enum PVR_ERROR(__cdecl* UpdateTimer)(const struct AddonInstance_PVR*, const struct PVR_TIMER*); | ||
| 264 | enum PVR_ERROR(__cdecl* CallTimerMenuHook)(const struct AddonInstance_PVR*, | ||
| 265 | const struct PVR_MENUHOOK*, | ||
| 266 | const struct PVR_TIMER*); | ||
| 267 | |||
| 268 | //--==----==----==----==----==----==----==----==----==----==----==----==----== | ||
| 269 | // Powersaving interface functions | ||
| 270 | enum PVR_ERROR(__cdecl* OnSystemSleep)(const struct AddonInstance_PVR*); | ||
| 271 | enum PVR_ERROR(__cdecl* OnSystemWake)(const struct AddonInstance_PVR*); | ||
| 272 | enum PVR_ERROR(__cdecl* OnPowerSavingActivated)(const struct AddonInstance_PVR*); | ||
| 273 | enum PVR_ERROR(__cdecl* OnPowerSavingDeactivated)(const struct AddonInstance_PVR*); | ||
| 274 | |||
| 275 | //--==----==----==----==----==----==----==----==----==----==----==----==----== | ||
| 276 | // Live stream read interface functions | ||
| 277 | bool(__cdecl* OpenLiveStream)(const struct AddonInstance_PVR*, const struct PVR_CHANNEL*); | ||
| 278 | void(__cdecl* CloseLiveStream)(const struct AddonInstance_PVR*); | ||
| 279 | int(__cdecl* ReadLiveStream)(const struct AddonInstance_PVR*, unsigned char*, unsigned int); | ||
| 280 | int64_t(__cdecl* SeekLiveStream)(const struct AddonInstance_PVR*, int64_t, int); | ||
| 281 | int64_t(__cdecl* LengthLiveStream)(const struct AddonInstance_PVR*); | ||
| 282 | |||
| 283 | //--==----==----==----==----==----==----==----==----==----==----==----==----== | ||
| 284 | // Recording stream read interface functions | ||
| 285 | bool(__cdecl* OpenRecordedStream)(const struct AddonInstance_PVR*, const struct PVR_RECORDING*); | ||
| 286 | void(__cdecl* CloseRecordedStream)(const struct AddonInstance_PVR*); | ||
| 287 | int(__cdecl* ReadRecordedStream)(const struct AddonInstance_PVR*, unsigned char*, unsigned int); | ||
| 288 | int64_t(__cdecl* SeekRecordedStream)(const struct AddonInstance_PVR*, int64_t, int); | ||
| 289 | int64_t(__cdecl* LengthRecordedStream)(const struct AddonInstance_PVR*); | ||
| 290 | |||
| 291 | //--==----==----==----==----==----==----==----==----==----==----==----==----== | ||
| 292 | // Stream demux interface functions | ||
| 293 | enum PVR_ERROR(__cdecl* GetStreamProperties)(const struct AddonInstance_PVR*, | ||
| 294 | struct PVR_STREAM_PROPERTIES*); | ||
| 295 | struct DemuxPacket*(__cdecl* DemuxRead)(const struct AddonInstance_PVR*); | ||
| 296 | void(__cdecl* DemuxReset)(const struct AddonInstance_PVR*); | ||
| 297 | void(__cdecl* DemuxAbort)(const struct AddonInstance_PVR*); | ||
| 298 | void(__cdecl* DemuxFlush)(const struct AddonInstance_PVR*); | ||
| 299 | void(__cdecl* SetSpeed)(const struct AddonInstance_PVR*, int); | ||
| 300 | void(__cdecl* FillBuffer)(const struct AddonInstance_PVR*, bool); | ||
| 301 | bool(__cdecl* SeekTime)(const struct AddonInstance_PVR*, double, bool, double*); | ||
| 302 | |||
| 303 | //--==----==----==----==----==----==----==----==----==----==----==----==----== | ||
| 304 | // General stream interface functions | ||
| 305 | bool(__cdecl* CanPauseStream)(const struct AddonInstance_PVR*); | ||
| 306 | void(__cdecl* PauseStream)(const struct AddonInstance_PVR*, bool); | ||
| 307 | bool(__cdecl* CanSeekStream)(const struct AddonInstance_PVR*); | ||
| 308 | bool(__cdecl* IsRealTimeStream)(const struct AddonInstance_PVR*); | ||
| 309 | enum PVR_ERROR(__cdecl* GetStreamTimes)(const struct AddonInstance_PVR*, | ||
| 310 | struct PVR_STREAM_TIMES*); | ||
| 311 | enum PVR_ERROR(__cdecl* GetStreamReadChunkSize)(const struct AddonInstance_PVR*, int*); | ||
| 312 | |||
| 313 | //--==----==----==----==----==----==----==----==----==----==----==----==----== | ||
| 314 | // New functions becomes added below and can be on another API change (where | ||
| 315 | // breaks min API version) moved up. | ||
| 316 | } KodiToAddonFuncTable_PVR; | ||
| 317 | |||
| 318 | typedef struct AddonInstance_PVR | ||
| 319 | { | ||
| 320 | struct AddonProperties_PVR* props; | ||
| 321 | struct AddonToKodiFuncTable_PVR* toKodi; | ||
| 322 | struct KodiToAddonFuncTable_PVR* toAddon; | ||
| 323 | } AddonInstance_PVR; | ||
| 324 | |||
| 325 | #ifdef __cplusplus | ||
| 326 | } | ||
| 327 | #endif /* __cplusplus */ | ||
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/c-api/addon-instance/pvr/CMakeLists.txt b/xbmc/addons/kodi-addon-dev-kit/include/kodi/c-api/addon-instance/pvr/CMakeLists.txt new file mode 100644 index 0000000..6617084 --- /dev/null +++ b/xbmc/addons/kodi-addon-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-addon-dev-kit_include_kodi_c-api_addon-instance_pvr) | ||
| 14 | endif() | ||
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_channel_groups.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_channel_groups.h new file mode 100644 index 0000000..36f9ed6 --- /dev/null +++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_channel_groups.h | |||
| @@ -0,0 +1,54 @@ | |||
| 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 | #include "pvr_defines.h" | ||
| 12 | |||
| 13 | #include <stdbool.h> | ||
| 14 | |||
| 15 | //¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ | ||
| 16 | // "C" Definitions group 3 - PVR channel group | ||
| 17 | #ifdef __cplusplus | ||
| 18 | extern "C" | ||
| 19 | { | ||
| 20 | #endif /* __cplusplus */ | ||
| 21 | |||
| 22 | /*! | ||
| 23 | * @brief "C" PVR add-on channel group. | ||
| 24 | * | ||
| 25 | * Structure used to interface in "C" between Kodi and Addon. | ||
| 26 | * | ||
| 27 | * See @ref kodi::addon::PVRChannelGroup for description of values. | ||
| 28 | */ | ||
| 29 | typedef struct PVR_CHANNEL_GROUP | ||
| 30 | { | ||
| 31 | char strGroupName[PVR_ADDON_NAME_STRING_LENGTH]; | ||
| 32 | bool bIsRadio; | ||
| 33 | unsigned int iPosition; | ||
| 34 | } PVR_CHANNEL_GROUP; | ||
| 35 | |||
| 36 | /*! | ||
| 37 | * @brief "C" PVR add-on channel group member. | ||
| 38 | * | ||
| 39 | * Structure used to interface in "C" between Kodi and Addon. | ||
| 40 | * | ||
| 41 | * See @ref kodi::addon::PVRChannelGroupMember for description of values. | ||
| 42 | */ | ||
| 43 | typedef struct PVR_CHANNEL_GROUP_MEMBER | ||
| 44 | { | ||
| 45 | char strGroupName[PVR_ADDON_NAME_STRING_LENGTH]; | ||
| 46 | unsigned int iChannelUniqueId; | ||
| 47 | unsigned int iChannelNumber; | ||
| 48 | unsigned int iSubChannelNumber; | ||
| 49 | int iOrder; | ||
| 50 | } PVR_CHANNEL_GROUP_MEMBER; | ||
| 51 | |||
| 52 | #ifdef __cplusplus | ||
| 53 | } | ||
| 54 | #endif /* __cplusplus */ | ||
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_channels.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_channels.h new file mode 100644 index 0000000..a2ce591 --- /dev/null +++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_channels.h | |||
| @@ -0,0 +1,104 @@ | |||
| 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 | #include "pvr_defines.h" | ||
| 12 | |||
| 13 | #include <stdbool.h> | ||
| 14 | |||
| 15 | //¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ | ||
| 16 | // "C" Definitions group 2 - PVR channel | ||
| 17 | #ifdef __cplusplus | ||
| 18 | extern "C" | ||
| 19 | { | ||
| 20 | #endif /* __cplusplus */ | ||
| 21 | |||
| 22 | //============================================================================ | ||
| 23 | /// @ingroup cpp_kodi_addon_pvr_Defs_Channel | ||
| 24 | /// @brief Denotes that no channel uid is available. | ||
| 25 | /// | ||
| 26 | /// Special @ref kodi::addon::PVRTimer::SetClientChannelUid() and | ||
| 27 | /// @ref kodi::addon::PVRRecording::SetChannelUid() value to indicate that no | ||
| 28 | /// channel uid is available. | ||
| 29 | #define PVR_CHANNEL_INVALID_UID -1 | ||
| 30 | //---------------------------------------------------------------------------- | ||
| 31 | |||
| 32 | /*! | ||
| 33 | * @brief "C" PVR add-on channel. | ||
| 34 | * | ||
| 35 | * Structure used to interface in "C" between Kodi and Addon. | ||
| 36 | * | ||
| 37 | * See @ref kodi::addon::PVRChannel for description of values. | ||
| 38 | */ | ||
| 39 | typedef struct PVR_CHANNEL | ||
| 40 | { | ||
| 41 | unsigned int iUniqueId; | ||
| 42 | bool bIsRadio; | ||
| 43 | unsigned int iChannelNumber; | ||
| 44 | unsigned int iSubChannelNumber; | ||
| 45 | char strChannelName[PVR_ADDON_NAME_STRING_LENGTH]; | ||
| 46 | char strMimeType[PVR_ADDON_INPUT_FORMAT_STRING_LENGTH]; | ||
| 47 | unsigned int iEncryptionSystem; | ||
| 48 | char strIconPath[PVR_ADDON_URL_STRING_LENGTH]; | ||
| 49 | bool bIsHidden; | ||
| 50 | bool bHasArchive; | ||
| 51 | int iOrder; | ||
| 52 | } PVR_CHANNEL; | ||
| 53 | |||
| 54 | /*! | ||
| 55 | * @brief "C" PVR add-on signal status information. | ||
| 56 | * | ||
| 57 | * Structure used to interface in "C" between Kodi and Addon. | ||
| 58 | * | ||
| 59 | * See @ref kodi::addon::PVRSignalStatus for description of values. | ||
| 60 | */ | ||
| 61 | typedef struct PVR_SIGNAL_STATUS | ||
| 62 | { | ||
| 63 | char strAdapterName[PVR_ADDON_NAME_STRING_LENGTH]; | ||
| 64 | char strAdapterStatus[PVR_ADDON_NAME_STRING_LENGTH]; | ||
| 65 | char strServiceName[PVR_ADDON_NAME_STRING_LENGTH]; | ||
| 66 | char strProviderName[PVR_ADDON_NAME_STRING_LENGTH]; | ||
| 67 | char strMuxName[PVR_ADDON_NAME_STRING_LENGTH]; | ||
| 68 | int iSNR; | ||
| 69 | int iSignal; | ||
| 70 | long iBER; | ||
| 71 | long iUNC; | ||
| 72 | } PVR_SIGNAL_STATUS; | ||
| 73 | |||
| 74 | //============================================================================ | ||
| 75 | /// @ingroup cpp_kodi_addon_pvr_Defs_Channel_PVRDescrambleInfo | ||
| 76 | /// @brief Special @ref cpp_kodi_addon_pvr_Defs_Channel_PVRDescrambleInfo | ||
| 77 | /// value to indicate that a struct member's value is not available | ||
| 78 | /// | ||
| 79 | #define PVR_DESCRAMBLE_INFO_NOT_AVAILABLE -1 | ||
| 80 | //---------------------------------------------------------------------------- | ||
| 81 | |||
| 82 | /*! | ||
| 83 | * @brief "C" PVR add-on descramble information. | ||
| 84 | * | ||
| 85 | * Structure used to interface in "C" between Kodi and Addon. | ||
| 86 | * | ||
| 87 | * See @ref kodi::addon::PVRDescrambleInfo for description of values. | ||
| 88 | */ | ||
| 89 | typedef struct PVR_DESCRAMBLE_INFO | ||
| 90 | { | ||
| 91 | int iPid; | ||
| 92 | int iCaid; | ||
| 93 | int iProvid; | ||
| 94 | int iEcmTime; | ||
| 95 | int iHops; | ||
| 96 | char strCardSystem[PVR_ADDON_DESCRAMBLE_INFO_STRING_LENGTH]; | ||
| 97 | char strReader[PVR_ADDON_DESCRAMBLE_INFO_STRING_LENGTH]; | ||
| 98 | char strFrom[PVR_ADDON_DESCRAMBLE_INFO_STRING_LENGTH]; | ||
| 99 | char strProtocol[PVR_ADDON_DESCRAMBLE_INFO_STRING_LENGTH]; | ||
| 100 | } PVR_DESCRAMBLE_INFO; | ||
| 101 | |||
| 102 | #ifdef __cplusplus | ||
| 103 | } | ||
| 104 | #endif /* __cplusplus */ | ||
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_defines.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_defines.h new file mode 100644 index 0000000..af1daae --- /dev/null +++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_defines.h | |||
| @@ -0,0 +1,61 @@ | |||
| 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 | //¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ | ||
| 12 | // "C" Standard PVR definitions | ||
| 13 | // | ||
| 14 | // Values related to all parts and not used direct on addon, are to define here. | ||
| 15 | // | ||
| 16 | #ifdef __cplusplus | ||
| 17 | extern "C" | ||
| 18 | { | ||
| 19 | #endif /* __cplusplus */ | ||
| 20 | |||
| 21 | /*! | ||
| 22 | * @brief API array sizes which are used for data exchange between | ||
| 23 | * Kodi and addon. | ||
| 24 | */ | ||
| 25 | ///@{ | ||
| 26 | #define PVR_ADDON_NAME_STRING_LENGTH 1024 | ||
| 27 | #define PVR_ADDON_URL_STRING_LENGTH 1024 | ||
| 28 | #define PVR_ADDON_DESC_STRING_LENGTH 1024 | ||
| 29 | #define PVR_ADDON_INPUT_FORMAT_STRING_LENGTH 32 | ||
| 30 | #define PVR_ADDON_EDL_LENGTH 32 | ||
| 31 | #define PVR_ADDON_TIMERTYPE_ARRAY_SIZE 32 | ||
| 32 | #define PVR_ADDON_TIMERTYPE_VALUES_ARRAY_SIZE 512 | ||
| 33 | #define PVR_ADDON_TIMERTYPE_VALUES_ARRAY_SIZE_SMALL 128 | ||
| 34 | #define PVR_ADDON_TIMERTYPE_STRING_LENGTH 128 | ||
| 35 | #define PVR_ADDON_ATTRIBUTE_DESC_LENGTH 128 | ||
| 36 | #define PVR_ADDON_ATTRIBUTE_VALUES_ARRAY_SIZE 512 | ||
| 37 | #define PVR_ADDON_DESCRAMBLE_INFO_STRING_LENGTH 64 | ||
| 38 | #define PVR_ADDON_DATE_STRING_LENGTH 32 | ||
| 39 | ///@} | ||
| 40 | |||
| 41 | /*! | ||
| 42 | * @brief "C" Representation of a general attribute integer value. | ||
| 43 | */ | ||
| 44 | typedef struct PVR_ATTRIBUTE_INT_VALUE | ||
| 45 | { | ||
| 46 | int iValue; | ||
| 47 | char strDescription[PVR_ADDON_ATTRIBUTE_DESC_LENGTH]; | ||
| 48 | } PVR_ATTRIBUTE_INT_VALUE; | ||
| 49 | |||
| 50 | /*! | ||
| 51 | * @brief "C" Representation of a named value. | ||
| 52 | */ | ||
| 53 | typedef struct PVR_NAMED_VALUE | ||
| 54 | { | ||
| 55 | char strName[PVR_ADDON_NAME_STRING_LENGTH]; | ||
| 56 | char strValue[PVR_ADDON_NAME_STRING_LENGTH]; | ||
| 57 | } PVR_NAMED_VALUE; | ||
| 58 | |||
| 59 | #ifdef __cplusplus | ||
| 60 | } | ||
| 61 | #endif /* __cplusplus */ | ||
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_edl.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_edl.h new file mode 100644 index 0000000..8378eaf --- /dev/null +++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_edl.h | |||
| @@ -0,0 +1,62 @@ | |||
| 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 | #include "pvr_defines.h" | ||
| 12 | |||
| 13 | #include <stdint.h> | ||
| 14 | |||
| 15 | //¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ | ||
| 16 | // "C" Definitions group 8 - PVR Edit definition list (EDL) | ||
| 17 | #ifdef __cplusplus | ||
| 18 | extern "C" | ||
| 19 | { | ||
| 20 | #endif /* __cplusplus */ | ||
| 21 | |||
| 22 | //============================================================================ | ||
| 23 | /// @defgroup cpp_kodi_addon_pvr_Defs_EDLEntry_PVR_EDL_TYPE enum PVR_EDL_TYPE | ||
| 24 | /// @ingroup cpp_kodi_addon_pvr_Defs_EDLEntry | ||
| 25 | /// @brief **Edit definition list types**\n | ||
| 26 | /// Possible type values for @ref cpp_kodi_addon_pvr_Defs_EDLEntry_PVREDLEntry. | ||
| 27 | /// | ||
| 28 | ///@{ | ||
| 29 | typedef enum PVR_EDL_TYPE | ||
| 30 | { | ||
| 31 | /// @brief __0__ : cut (completely remove content) | ||
| 32 | PVR_EDL_TYPE_CUT = 0, | ||
| 33 | |||
| 34 | /// @brief __1__ : mute audio | ||
| 35 | PVR_EDL_TYPE_MUTE = 1, | ||
| 36 | |||
| 37 | /// @brief __2__ : scene markers (chapter seeking) | ||
| 38 | PVR_EDL_TYPE_SCENE = 2, | ||
| 39 | |||
| 40 | /// @brief __3__ : commercial breaks | ||
| 41 | PVR_EDL_TYPE_COMBREAK = 3 | ||
| 42 | } PVR_EDL_TYPE; | ||
| 43 | ///@} | ||
| 44 | //---------------------------------------------------------------------------- | ||
| 45 | |||
| 46 | /*! | ||
| 47 | * @brief "C" Edit definition list entry. | ||
| 48 | * | ||
| 49 | * Structure used to interface in "C" between Kodi and Addon. | ||
| 50 | * | ||
| 51 | * See @ref kodi::addon::PVREDLEntry for description of values. | ||
| 52 | */ | ||
| 53 | typedef struct PVR_EDL_ENTRY | ||
| 54 | { | ||
| 55 | int64_t start; | ||
| 56 | int64_t end; | ||
| 57 | enum PVR_EDL_TYPE type; | ||
| 58 | } PVR_EDL_ENTRY; | ||
| 59 | |||
| 60 | #ifdef __cplusplus | ||
| 61 | } | ||
| 62 | #endif /* __cplusplus */ | ||
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_epg.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_epg.h new file mode 100644 index 0000000..57c603f --- /dev/null +++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_epg.h | |||
| @@ -0,0 +1,653 @@ | |||
| 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 | #include "pvr_defines.h" | ||
| 12 | |||
| 13 | #include <time.h> | ||
| 14 | |||
| 15 | //¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ | ||
| 16 | // "C" Definitions group 4 - PVR EPG | ||
| 17 | #ifdef __cplusplus | ||
| 18 | extern "C" | ||
| 19 | { | ||
| 20 | #endif /* __cplusplus */ | ||
| 21 | |||
| 22 | //============================================================================ | ||
| 23 | /// @defgroup cpp_kodi_addon_pvr_Defs_epg_EPG_EVENT enum EPG_EVENT_CONTENTMASK (and sub types) | ||
| 24 | /// @ingroup cpp_kodi_addon_pvr_Defs_epg | ||
| 25 | /// @brief **EPG entry content event types.**\n | ||
| 26 | /// These ID's come from the DVB-SI EIT table "content descriptor" | ||
| 27 | /// Also known under the name "E-book genre assignments". | ||
| 28 | /// | ||
| 29 | /// 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) | ||
| 30 | /// about. | ||
| 31 | /// | ||
| 32 | /// Values used by this functions: | ||
| 33 | /// - @ref kodi::addon::PVREPGTag::SetGenreType() | ||
| 34 | /// - @ref kodi::addon::PVREPGTag::SetGenreSubType() | ||
| 35 | /// - @ref kodi::addon::PVRRecording::SetGenreType() | ||
| 36 | /// - @ref kodi::addon::PVRRecording::SetGenreSubType() | ||
| 37 | /// | ||
| 38 | /// Following types are listed here: | ||
| 39 | /// | emum Type | Description | ||
| 40 | /// |-----------|-------------------- | ||
| 41 | /// | @ref EPG_EVENT_CONTENTMASK | EPG entry main content to use. | ||
| 42 | /// | @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>. | ||
| 43 | /// | @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>. | ||
| 44 | /// | @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>. | ||
| 45 | /// | @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>. | ||
| 46 | /// | @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>. | ||
| 47 | /// | @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>. | ||
| 48 | /// | @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>. | ||
| 49 | /// | @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>. | ||
| 50 | /// | @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>. | ||
| 51 | /// | @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>. | ||
| 52 | /// | @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>. | ||
| 53 | ///@{ | ||
| 54 | |||
| 55 | //============================================================================ | ||
| 56 | /// @ingroup cpp_kodi_addon_pvr_Defs_epg_EPG_EVENT | ||
| 57 | /// @brief EPG entry main content to use. | ||
| 58 | /// | ||
| 59 | ///@{ | ||
| 60 | typedef enum EPG_EVENT_CONTENTMASK | ||
| 61 | { | ||
| 62 | /// @brief __0x00__ : Undefined content mask entry. | ||
| 63 | EPG_EVENT_CONTENTMASK_UNDEFINED = 0x00, | ||
| 64 | |||
| 65 | /// @brief __0x10__ : Movie/Drama.\n | ||
| 66 | /// \n | ||
| 67 | /// See @ref EPG_EVENT_CONTENTSUBMASK_MOVIEDRAMA about related sub types. | ||
| 68 | EPG_EVENT_CONTENTMASK_MOVIEDRAMA = 0x10, | ||
| 69 | |||
| 70 | /// @brief __0x20__ : News/Current affairs.\n | ||
| 71 | /// \n | ||
| 72 | /// See @ref EPG_EVENT_CONTENTSUBMASK_NEWSCURRENTAFFAIRS about related sub types. | ||
| 73 | EPG_EVENT_CONTENTMASK_NEWSCURRENTAFFAIRS = 0x20, | ||
| 74 | |||
| 75 | /// @brief __0x30__ : Show/Game show.\n | ||
| 76 | /// \n | ||
| 77 | /// See @ref EPG_EVENT_CONTENTSUBMASK_SHOW about related sub types. | ||
| 78 | EPG_EVENT_CONTENTMASK_SHOW = 0x30, | ||
| 79 | |||
| 80 | /// @brief __0x40__ : Sports.\n | ||
| 81 | /// \n | ||
| 82 | /// See @ref EPG_EVENT_CONTENTSUBMASK_SPORTS about related sub types. | ||
| 83 | EPG_EVENT_CONTENTMASK_SPORTS = 0x40, | ||
| 84 | |||
| 85 | /// @brief __0x50__ : Children's/Youth programmes.\n | ||
| 86 | /// \n | ||
| 87 | /// See @ref EPG_EVENT_CONTENTSUBMASK_CHILDRENYOUTH about related sub types. | ||
| 88 | EPG_EVENT_CONTENTMASK_CHILDRENYOUTH = 0x50, | ||
| 89 | |||
| 90 | /// @brief __0x60__ : Music/Ballet/Dance.\n | ||
| 91 | /// \n | ||
| 92 | /// See @ref EPG_EVENT_CONTENTSUBMASK_MUSICBALLETDANCE about related sub types. | ||
| 93 | EPG_EVENT_CONTENTMASK_MUSICBALLETDANCE = 0x60, | ||
| 94 | |||
| 95 | /// @brief __0x70__ : Arts/Culture (without music).\n | ||
| 96 | /// \n | ||
| 97 | /// See @ref EPG_EVENT_CONTENTSUBMASK_ARTSCULTURE about related sub types. | ||
| 98 | EPG_EVENT_CONTENTMASK_ARTSCULTURE = 0x70, | ||
| 99 | |||
| 100 | /// @brief __0x80__ : Social/Political issues/Economics.\n | ||
| 101 | /// \n | ||
| 102 | /// See @ref EPG_EVENT_CONTENTSUBMASK_SOCIALPOLITICALECONOMICS about related sub types. | ||
| 103 | EPG_EVENT_CONTENTMASK_SOCIALPOLITICALECONOMICS = 0x80, | ||
| 104 | |||
| 105 | /// @brief __0x90__ : Education/Science/Factual topics.\n | ||
| 106 | /// \n | ||
| 107 | /// See @ref EPG_EVENT_CONTENTSUBMASK_EDUCATIONALSCIENCE about related sub types. | ||
| 108 | EPG_EVENT_CONTENTMASK_EDUCATIONALSCIENCE = 0x90, | ||
| 109 | |||
| 110 | /// @brief __0xA0__ : Leisure hobbies.\n | ||
| 111 | /// \n | ||
| 112 | /// See @ref EPG_EVENT_CONTENTSUBMASK_LEISUREHOBBIES about related sub types. | ||
| 113 | EPG_EVENT_CONTENTMASK_LEISUREHOBBIES = 0xA0, | ||
| 114 | |||
| 115 | /// @brief __0xB0__ : Special characteristics.\n | ||
| 116 | /// \n | ||
| 117 | /// See @ref EPG_EVENT_CONTENTSUBMASK_SPECIAL about related sub types. | ||
| 118 | EPG_EVENT_CONTENTMASK_SPECIAL = 0xB0, | ||
| 119 | |||
| 120 | /// @brief __0xF0__ User defined. | ||
| 121 | EPG_EVENT_CONTENTMASK_USERDEFINED = 0xF0, | ||
| 122 | |||
| 123 | /// @brief Used to override standard genre types with a own name about.\n | ||
| 124 | /// \n | ||
| 125 | /// Set to this value @ref EPG_GENRE_USE_STRING on following places: | ||
| 126 | /// - @ref kodi::addon::PVREPGTag::SetGenreType() | ||
| 127 | /// - @ref kodi::addon::PVREPGTag::SetGenreSubType() | ||
| 128 | /// - @ref kodi::addon::PVRRecording::SetGenreType() | ||
| 129 | /// - @ref kodi::addon::PVRRecording::SetGenreSubType() | ||
| 130 | /// | ||
| 131 | /// @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) | ||
| 132 | /// conform. | ||
| 133 | /// | ||
| 134 | /// @note This is a own Kodi definition to set that genre is given by own | ||
| 135 | /// string. Used on @ref kodi::addon::PVREPGTag::SetGenreDescription() and | ||
| 136 | /// @ref kodi::addon::PVRRecording::SetGenreDescription() | ||
| 137 | EPG_GENRE_USE_STRING = 0x100 | ||
| 138 | } EPG_EVENT_CONTENTMASK; | ||
| 139 | ///@} | ||
| 140 | //---------------------------------------------------------------------------- | ||
| 141 | |||
| 142 | //============================================================================ | ||
| 143 | /// @ingroup cpp_kodi_addon_pvr_Defs_epg_EPG_EVENT | ||
| 144 | /// @brief EPG entry sub content to @ref EPG_EVENT_CONTENTMASK_MOVIEDRAMA event | ||
| 145 | /// types for sub type of <b>"Movie/Drama"</b>. | ||
| 146 | /// | ||
| 147 | ///@{ | ||
| 148 | typedef enum EPG_EVENT_CONTENTSUBMASK_MOVIEDRAMA | ||
| 149 | { | ||
| 150 | /// @brief __0x0__ : Movie/drama (general). | ||
| 151 | EPG_EVENT_CONTENTSUBMASK_MOVIEDRAMA_GENERAL = 0x0, | ||
| 152 | |||
| 153 | /// @brief __0x1__ : Detective/thriller. | ||
| 154 | EPG_EVENT_CONTENTSUBMASK_MOVIEDRAMA_DETECTIVE_THRILLER = 0x1, | ||
| 155 | |||
| 156 | /// @brief __0x2__ : Adventure/western/war. | ||
| 157 | EPG_EVENT_CONTENTSUBMASK_MOVIEDRAMA_ADVENTURE_WESTERN_WAR = 0x2, | ||
| 158 | |||
| 159 | /// @brief __0x3__ : Science fiction/fantasy/horror. | ||
| 160 | EPG_EVENT_CONTENTSUBMASK_MOVIEDRAMA_SCIENCEFICTION_FANTASY_HORROR = 0x3, | ||
| 161 | |||
| 162 | /// @brief __0x4__ : Comedy. | ||
| 163 | EPG_EVENT_CONTENTSUBMASK_MOVIEDRAMA_COMEDY = 0x4, | ||
| 164 | |||
| 165 | /// @brief __0x5__ : Soap/melodrama/folkloric. | ||
| 166 | EPG_EVENT_CONTENTSUBMASK_MOVIEDRAMA_SOAP_MELODRAMA_FOLKLORIC = 0x5, | ||
| 167 | |||
| 168 | /// @brief __0x6__ : Romance. | ||
| 169 | EPG_EVENT_CONTENTSUBMASK_MOVIEDRAMA_ROMANCE = 0x6, | ||
| 170 | |||
| 171 | /// @brief __0x7__ : Serious/classical/religious/historical movie/drama. | ||
| 172 | EPG_EVENT_CONTENTSUBMASK_MOVIEDRAMA_SERIOUS_CLASSICAL_RELIGIOUS_HISTORICAL = 0x7, | ||
| 173 | |||
| 174 | /// @brief __0x8__ : Adult movie/drama. | ||
| 175 | EPG_EVENT_CONTENTSUBMASK_MOVIEDRAMA_ADULT = 0x8, | ||
| 176 | |||
| 177 | /// @brief __0xF__ : User defined. | ||
| 178 | EPG_EVENT_CONTENTSUBMASK_MOVIEDRAMA_USERDEFINED = 0xF | ||
| 179 | } EPG_EVENT_CONTENTSUBMASK_MOVIEDRAMA; | ||
| 180 | ///@} | ||
| 181 | //---------------------------------------------------------------------------- | ||
| 182 | |||
| 183 | //============================================================================ | ||
| 184 | /// @ingroup cpp_kodi_addon_pvr_Defs_epg_EPG_EVENT | ||
| 185 | /// @brief EPG entry sub content to @ref EPG_EVENT_CONTENTMASK_NEWSCURRENTAFFAIRS event | ||
| 186 | /// types for sub type of <b>"News/Current affairs"</b>. | ||
| 187 | /// | ||
| 188 | typedef enum EPG_EVENT_CONTENTSUBMASK_NEWSCURRENTAFFAIRS | ||
| 189 | { | ||
| 190 | /// @brief __0x0__ : News/current affairs (general). | ||
| 191 | EPG_EVENT_CONTENTSUBMASK_NEWSCURRENTAFFAIRS_GENERAL = 0x0, | ||
| 192 | |||
| 193 | /// @brief __0x1__ : News/weather report. | ||
| 194 | EPG_EVENT_CONTENTSUBMASK_NEWSCURRENTAFFAIRS_WEATHER = 0x1, | ||
| 195 | |||
| 196 | /// @brief __0x2__ : News magazine. | ||
| 197 | EPG_EVENT_CONTENTSUBMASK_NEWSCURRENTAFFAIRS_MAGAZINE = 0x2, | ||
| 198 | |||
| 199 | /// @brief __0x3__ : Documentary. | ||
| 200 | EPG_EVENT_CONTENTSUBMASK_NEWSCURRENTAFFAIRS_DOCUMENTARY = 0x3, | ||
| 201 | |||
| 202 | /// @brief __0x4__ : Discussion/interview/debate | ||
| 203 | EPG_EVENT_CONTENTSUBMASK_NEWSCURRENTAFFAIRS_DISCUSSION_INTERVIEW_DEBATE = 0x4, | ||
| 204 | |||
| 205 | /// @brief __0xF__ : User defined. | ||
| 206 | EPG_EVENT_CONTENTSUBMASK_NEWSCURRENTAFFAIRS_USERDEFINED = 0xF | ||
| 207 | } EPG_EVENT_CONTENTSUBMASK_NEWSCURRENTAFFAIRS; | ||
| 208 | //---------------------------------------------------------------------------- | ||
| 209 | |||
| 210 | //============================================================================ | ||
| 211 | /// @ingroup cpp_kodi_addon_pvr_Defs_epg_EPG_EVENT | ||
| 212 | /// @brief EPG entry sub content to @ref EPG_EVENT_CONTENTMASK_SHOW event | ||
| 213 | /// types for sub type of <b>"Show/Game show"</b>. | ||
| 214 | /// | ||
| 215 | typedef enum EPG_EVENT_CONTENTSUBMASK_SHOW | ||
| 216 | { | ||
| 217 | /// @brief __0x0__ : Show/game show (general). | ||
| 218 | EPG_EVENT_CONTENTSUBMASK_SHOW_GENERAL = 0x0, | ||
| 219 | |||
| 220 | /// @brief __0x1__ : Game show/quiz/contest. | ||
| 221 | EPG_EVENT_CONTENTSUBMASK_SHOW_GAMESHOW_QUIZ_CONTEST = 0x1, | ||
| 222 | |||
| 223 | /// @brief __0x2__ : Variety show. | ||
| 224 | EPG_EVENT_CONTENTSUBMASK_SHOW_VARIETY_SHOW = 0x2, | ||
| 225 | |||
| 226 | /// @brief __0x3__ : Talk show. | ||
| 227 | EPG_EVENT_CONTENTSUBMASK_SHOW_TALK_SHOW = 0x3, | ||
| 228 | |||
| 229 | /// @brief __0xF__ : User defined. | ||
| 230 | EPG_EVENT_CONTENTSUBMASK_SHOW_USERDEFINED = 0xF | ||
| 231 | } EPG_EVENT_CONTENTSUBMASK_SHOW; | ||
| 232 | //---------------------------------------------------------------------------- | ||
| 233 | |||
| 234 | //============================================================================ | ||
| 235 | /// @ingroup cpp_kodi_addon_pvr_Defs_epg_EPG_EVENT | ||
| 236 | /// @brief EPG entry sub content to @ref EPG_EVENT_CONTENTMASK_SPORTS event | ||
| 237 | /// types for sub type of <b>"Sports"</b>. | ||
| 238 | /// | ||
| 239 | typedef enum EPG_EVENT_CONTENTSUBMASK_SPORTS | ||
| 240 | { | ||
| 241 | /// @brief __0x0__ : Sports (general). | ||
| 242 | EPG_EVENT_CONTENTSUBMASK_SPORTS_GENERAL = 0x0, | ||
| 243 | |||
| 244 | /// @brief __0x1__ : Special events (Olympic Games, World Cup, etc.). | ||
| 245 | EPG_EVENT_CONTENTSUBMASK_SPORTS_OLYMPICGAMES_WORLDCUP = 0x1, | ||
| 246 | |||
| 247 | /// @brief __0x2__ : Sports magazines. | ||
| 248 | EPG_EVENT_CONTENTSUBMASK_SPORTS_SPORTS_MAGAZINES = 0x2, | ||
| 249 | |||
| 250 | /// @brief __0x3__ : Football/soccer. | ||
| 251 | EPG_EVENT_CONTENTSUBMASK_SPORTS_FOOTBALL_SOCCER = 0x3, | ||
| 252 | |||
| 253 | /// @brief __0x4__ : Tennis/squash. | ||
| 254 | EPG_EVENT_CONTENTSUBMASK_SPORTS_TENNIS_SQUASH = 0x4, | ||
| 255 | |||
| 256 | /// @brief __0x5__ : Team sports (excluding football). | ||
| 257 | EPG_EVENT_CONTENTSUBMASK_SPORTS_TEAMSPORTS = 0x5, | ||
| 258 | |||
| 259 | /// @brief __0x6__ : Athletics. | ||
| 260 | EPG_EVENT_CONTENTSUBMASK_SPORTS_ATHLETICS = 0x6, | ||
| 261 | |||
| 262 | /// @brief __0x7__ : Motor sport. | ||
| 263 | EPG_EVENT_CONTENTSUBMASK_SPORTS_MOTORSPORT = 0x7, | ||
| 264 | |||
| 265 | /// @brief __0x8__ : Water sport. | ||
| 266 | EPG_EVENT_CONTENTSUBMASK_SPORTS_WATERSPORT = 0x8, | ||
| 267 | |||
| 268 | /// @brief __0x9__ : Winter sports. | ||
| 269 | EPG_EVENT_CONTENTSUBMASK_SPORTS_WINTERSPORTS = 0x9, | ||
| 270 | |||
| 271 | /// @brief __0xA__ : Equestrian. | ||
| 272 | EPG_EVENT_CONTENTSUBMASK_SPORTS_EQUESTRIAN = 0xA, | ||
| 273 | |||
| 274 | /// @brief __0xB__ : Martial sports. | ||
| 275 | EPG_EVENT_CONTENTSUBMASK_SPORTS_MARTIALSPORTS = 0xB, | ||
| 276 | |||
| 277 | /// @brief __0xF__ : User defined. | ||
| 278 | EPG_EVENT_CONTENTSUBMASK_SPORTS_USERDEFINED = 0xF | ||
| 279 | } EPG_EVENT_CONTENTSUBMASK_SPORTS; | ||
| 280 | //---------------------------------------------------------------------------- | ||
| 281 | |||
| 282 | //============================================================================ | ||
| 283 | /// @ingroup cpp_kodi_addon_pvr_Defs_epg_EPG_EVENT | ||
| 284 | /// @brief EPG entry sub content to @ref EPG_EVENT_CONTENTMASK_CHILDRENYOUTH event | ||
| 285 | /// types for sub type of <b>"Children's/Youth programmes"</b>. | ||
| 286 | /// | ||
| 287 | typedef enum EPG_EVENT_CONTENTSUBMASK_CHILDRENYOUTH | ||
| 288 | { | ||
| 289 | /// @brief __0x0__ : Children's/youth programmes (general). | ||
| 290 | EPG_EVENT_CONTENTSUBMASK_CHILDRENYOUTH_GENERAL = 0x0, | ||
| 291 | |||
| 292 | /// @brief __0x1__ : Pre-school children's programmes. | ||
| 293 | EPG_EVENT_CONTENTSUBMASK_CHILDRENYOUTH_PRESCHOOL_CHILDREN = 0x1, | ||
| 294 | |||
| 295 | /// @brief __0x2__ : Entertainment programmes for 6 to 14. | ||
| 296 | EPG_EVENT_CONTENTSUBMASK_CHILDRENYOUTH_ENTERTAIN_6TO14 = 0x2, | ||
| 297 | |||
| 298 | /// @brief __0x3__ : Entertainment programmes for 10 to 16. | ||
| 299 | EPG_EVENT_CONTENTSUBMASK_CHILDRENYOUTH_ENTERTAIN_10TO16 = 0x3, | ||
| 300 | |||
| 301 | /// @brief __0x4__ : Informational/educational/school programmes. | ||
| 302 | EPG_EVENT_CONTENTSUBMASK_CHILDRENYOUTH_INFORMATIONAL_EDUCATIONAL_SCHOOL = 0x4, | ||
| 303 | |||
| 304 | /// @brief __0x5__ : Cartoons/puppets. | ||
| 305 | EPG_EVENT_CONTENTSUBMASK_CHILDRENYOUTH_CARTOONS_PUPPETS = 0x5, | ||
| 306 | |||
| 307 | /// @brief __0xF__ : User defined. | ||
| 308 | EPG_EVENT_CONTENTSUBMASK_CHILDRENYOUTH_USERDEFINED = 0xF | ||
| 309 | } EPG_EVENT_CONTENTSUBMASK_CHILDRENYOUTH; | ||
| 310 | //---------------------------------------------------------------------------- | ||
| 311 | |||
| 312 | //============================================================================ | ||
| 313 | /// @ingroup cpp_kodi_addon_pvr_Defs_epg_EPG_EVENT | ||
| 314 | /// @brief EPG entry sub content to @ref EPG_EVENT_CONTENTMASK_MUSICBALLETDANCE event | ||
| 315 | /// types for sub type of <b>"Music/Ballet/Dance"</b>. | ||
| 316 | /// | ||
| 317 | typedef enum EPG_EVENT_CONTENTSUBMASK_MUSICBALLETDANCE | ||
| 318 | { | ||
| 319 | /// @brief __0x0__ : Music/ballet/dance (general). | ||
| 320 | EPG_EVENT_CONTENTSUBMASK_MUSICBALLETDANCE_GENERAL = 0x0, | ||
| 321 | |||
| 322 | /// @brief __0x1__ : Rock/pop. | ||
| 323 | EPG_EVENT_CONTENTSUBMASK_MUSICBALLETDANCE_ROCKPOP = 0x1, | ||
| 324 | |||
| 325 | /// @brief __0x2__ : Serious music/classical music. | ||
| 326 | EPG_EVENT_CONTENTSUBMASK_MUSICBALLETDANCE_SERIOUSMUSIC_CLASSICALMUSIC = 0x2, | ||
| 327 | |||
| 328 | /// @brief __0x3__ : Folk/traditional music. | ||
| 329 | EPG_EVENT_CONTENTSUBMASK_MUSICBALLETDANCE_FOLK_TRADITIONAL_MUSIC = 0x3, | ||
| 330 | |||
| 331 | /// @brief __0x4__ : Jazz. | ||
| 332 | EPG_EVENT_CONTENTSUBMASK_MUSICBALLETDANCE_JAZZ = 0x4, | ||
| 333 | |||
| 334 | /// @brief __0x5__ : Musical/opera. | ||
| 335 | EPG_EVENT_CONTENTSUBMASK_MUSICBALLETDANCE_MUSICAL_OPERA = 0x5, | ||
| 336 | |||
| 337 | /// @brief __0x6__ : Ballet. | ||
| 338 | EPG_EVENT_CONTENTSUBMASK_MUSICBALLETDANCE_BALLET = 0x6, | ||
| 339 | |||
| 340 | /// @brief __0xF__ : User defined. | ||
| 341 | EPG_EVENT_CONTENTSUBMASK_MUSICBALLETDANCE_USERDEFINED = 0xF | ||
| 342 | } EPG_EVENT_CONTENTSUBMASK_MUSICBALLETDANCE; | ||
| 343 | //---------------------------------------------------------------------------- | ||
| 344 | |||
| 345 | //============================================================================ | ||
| 346 | /// @ingroup cpp_kodi_addon_pvr_Defs_epg_EPG_EVENT | ||
| 347 | /// @brief EPG entry sub content to @ref EPG_EVENT_CONTENTMASK_ARTSCULTURE event | ||
| 348 | /// types for sub type of <b>"Arts/Culture (without music)"</b>. | ||
| 349 | /// | ||
| 350 | typedef enum EPG_EVENT_CONTENTSUBMASK_ARTSCULTURE | ||
| 351 | { | ||
| 352 | /// @brief __0x0__ : Arts/culture (without music, general). | ||
| 353 | EPG_EVENT_CONTENTSUBMASK_ARTSCULTURE_GENERAL = 0x0, | ||
| 354 | |||
| 355 | /// @brief __0x1__ : Performing arts. | ||
| 356 | EPG_EVENT_CONTENTSUBMASK_ARTSCULTURE_PERFORMINGARTS = 0x1, | ||
| 357 | |||
| 358 | /// @brief __0x2__ : Fine arts. | ||
| 359 | EPG_EVENT_CONTENTSUBMASK_ARTSCULTURE_FINEARTS = 0x2, | ||
| 360 | |||
| 361 | /// @brief __0x3__ : Religion. | ||
| 362 | EPG_EVENT_CONTENTSUBMASK_ARTSCULTURE_RELIGION = 0x3, | ||
| 363 | |||
| 364 | /// @brief __0x4__ : Popular culture/traditional arts. | ||
| 365 | EPG_EVENT_CONTENTSUBMASK_ARTSCULTURE_POPULARCULTURE_TRADITIONALARTS = 0x4, | ||
| 366 | |||
| 367 | /// @brief __0x5__ : Literature. | ||
| 368 | EPG_EVENT_CONTENTSUBMASK_ARTSCULTURE_LITERATURE = 0x5, | ||
| 369 | |||
| 370 | /// @brief __0x6__ : Film/cinema. | ||
| 371 | EPG_EVENT_CONTENTSUBMASK_ARTSCULTURE_FILM_CINEMA = 0x6, | ||
| 372 | |||
| 373 | /// @brief __0x7__ : Experimental film/video. | ||
| 374 | EPG_EVENT_CONTENTSUBMASK_ARTSCULTURE_EXPERIMENTALFILM_VIDEO = 0x7, | ||
| 375 | |||
| 376 | /// @brief __0x8__ : Broadcasting/press. | ||
| 377 | EPG_EVENT_CONTENTSUBMASK_ARTSCULTURE_BROADCASTING_PRESS = 0x8, | ||
| 378 | |||
| 379 | /// @brief __0x9__ : New media. | ||
| 380 | EPG_EVENT_CONTENTSUBMASK_ARTSCULTURE_NEWMEDIA = 0x9, | ||
| 381 | |||
| 382 | /// @brief __0xA__ : Arts/culture magazines. | ||
| 383 | EPG_EVENT_CONTENTSUBMASK_ARTSCULTURE_ARTS_CULTUREMAGAZINES = 0xA, | ||
| 384 | |||
| 385 | /// @brief __0xB__ : Fashion. | ||
| 386 | EPG_EVENT_CONTENTSUBMASK_ARTSCULTURE_FASHION = 0xB, | ||
| 387 | |||
| 388 | /// @brief __0xF__ : User defined. | ||
| 389 | EPG_EVENT_CONTENTSUBMASK_ARTSCULTURE_USERDEFINED = 0xF | ||
| 390 | } EPG_EVENT_CONTENTSUBMASK_ARTSCULTURE; | ||
| 391 | //---------------------------------------------------------------------------- | ||
| 392 | |||
| 393 | //============================================================================ | ||
| 394 | /// @ingroup cpp_kodi_addon_pvr_Defs_epg_EPG_EVENT | ||
| 395 | /// @brief EPG entry sub content to @ref EPG_EVENT_CONTENTMASK_SOCIALPOLITICALECONOMICS event | ||
| 396 | /// types for sub type of <b>"Social/Political issues/Economics"</b>. | ||
| 397 | /// | ||
| 398 | typedef enum EPG_EVENT_CONTENTSUBMASK_SOCIALPOLITICALECONOMICS | ||
| 399 | { | ||
| 400 | /// @brief __0x0__ : Social/political issues/economics (general). | ||
| 401 | EPG_EVENT_CONTENTSUBMASK_SOCIALPOLITICALECONOMICS_GENERAL = 0x0, | ||
| 402 | |||
| 403 | /// @brief __0x1__ : Magazines/reports/documentary. | ||
| 404 | EPG_EVENT_CONTENTSUBMASK_SOCIALPOLITICALECONOMICS_MAGAZINES_REPORTS_DOCUMENTARY = 0x1, | ||
| 405 | |||
| 406 | /// @brief __0x2__ : Economics/social advisory. | ||
| 407 | EPG_EVENT_CONTENTSUBMASK_SOCIALPOLITICALECONOMICS_ECONOMICS_SOCIALADVISORY = 0x2, | ||
| 408 | |||
| 409 | /// @brief __0x3__ : Remarkable people. | ||
| 410 | EPG_EVENT_CONTENTSUBMASK_SOCIALPOLITICALECONOMICS_REMARKABLEPEOPLE = 0x3, | ||
| 411 | |||
| 412 | /// @brief __0xF__ : User defined. | ||
| 413 | EPG_EVENT_CONTENTSUBMASK_SOCIALPOLITICALECONOMICS_USERDEFINED = 0xF | ||
| 414 | } EPG_EVENT_CONTENTSUBMASK_SOCIALPOLITICALECONOMICS; | ||
| 415 | //---------------------------------------------------------------------------- | ||
| 416 | |||
| 417 | //============================================================================ | ||
| 418 | /// @ingroup cpp_kodi_addon_pvr_Defs_epg_EPG_EVENT | ||
| 419 | /// @brief EPG entry sub content to @ref EPG_EVENT_CONTENTMASK_EDUCATIONALSCIENCE event | ||
| 420 | /// types for sub type of <b>"Education/Science/Factual topics"</b>. | ||
| 421 | /// | ||
| 422 | typedef enum EPG_EVENT_CONTENTSUBMASK_EDUCATIONALSCIENCE | ||
| 423 | { | ||
| 424 | /// @brief __0x0__ : Education/science/factual topics (general). | ||
| 425 | EPG_EVENT_CONTENTSUBMASK_EDUCATIONALSCIENCE_GENERAL = 0x0, | ||
| 426 | |||
| 427 | /// @brief __0x1__ : Nature/animals/environment. | ||
| 428 | EPG_EVENT_CONTENTSUBMASK_EDUCATIONALSCIENCE_NATURE_ANIMALS_ENVIRONMENT = 0x1, | ||
| 429 | |||
| 430 | /// @brief __0x2__ : Technology/natural sciences. | ||
| 431 | EPG_EVENT_CONTENTSUBMASK_EDUCATIONALSCIENCE_TECHNOLOGY_NATURALSCIENCES = 0x2, | ||
| 432 | |||
| 433 | /// @brief __0x3__ : Medicine/physiology/psychology. | ||
| 434 | EPG_EVENT_CONTENTSUBMASK_EDUCATIONALSCIENCE_MEDICINE_PHYSIOLOGY_PSYCHOLOGY = 0x3, | ||
| 435 | |||
| 436 | /// @brief __0x4__ : Foreign countries/expeditions. | ||
| 437 | EPG_EVENT_CONTENTSUBMASK_EDUCATIONALSCIENCE_FOREIGNCOUNTRIES_EXPEDITIONS = 0x4, | ||
| 438 | |||
| 439 | /// @brief __0x5__ : Social/spiritual sciences. | ||
| 440 | EPG_EVENT_CONTENTSUBMASK_EDUCATIONALSCIENCE_SOCIAL_SPIRITUALSCIENCES = 0x5, | ||
| 441 | |||
| 442 | /// @brief __0x6__ : Further education. | ||
| 443 | EPG_EVENT_CONTENTSUBMASK_EDUCATIONALSCIENCE_FURTHEREDUCATION = 0x6, | ||
| 444 | |||
| 445 | /// @brief __0x7__ : Languages. | ||
| 446 | EPG_EVENT_CONTENTSUBMASK_EDUCATIONALSCIENCE_LANGUAGES = 0x7, | ||
| 447 | |||
| 448 | /// @brief __0xF__ : User defined. | ||
| 449 | EPG_EVENT_CONTENTSUBMASK_EDUCATIONALSCIENCE_USERDEFINED = 0xF | ||
| 450 | } EPG_EVENT_CONTENTSUBMASK_EDUCATIONALSCIENCE; | ||
| 451 | //---------------------------------------------------------------------------- | ||
| 452 | |||
| 453 | //============================================================================ | ||
| 454 | /// @ingroup cpp_kodi_addon_pvr_Defs_epg_EPG_EVENT | ||
| 455 | /// @brief EPG entry sub content to @ref EPG_EVENT_CONTENTMASK_LEISUREHOBBIES event | ||
| 456 | /// types for sub type of <b>"Leisure hobbies"</b>. | ||
| 457 | /// | ||
| 458 | typedef enum EPG_EVENT_CONTENTSUBMASK_LEISUREHOBBIES | ||
| 459 | { | ||
| 460 | /// @brief __0x0__ : Leisure hobbies (general) . | ||
| 461 | EPG_EVENT_CONTENTSUBMASK_LEISUREHOBBIES_GENERAL = 0x0, | ||
| 462 | |||
| 463 | /// @brief __0x1__ : Tourism/travel. | ||
| 464 | EPG_EVENT_CONTENTSUBMASK_LEISUREHOBBIES_TOURISM_TRAVEL = 0x1, | ||
| 465 | |||
| 466 | /// @brief __0x2__ : Handicraft. | ||
| 467 | EPG_EVENT_CONTENTSUBMASK_LEISUREHOBBIES_HANDICRAFT = 0x2, | ||
| 468 | |||
| 469 | /// @brief __0x3__ : Motoring. | ||
| 470 | EPG_EVENT_CONTENTSUBMASK_LEISUREHOBBIES_MOTORING = 0x3, | ||
| 471 | |||
| 472 | /// @brief __0x4__ : Fitness and health. | ||
| 473 | EPG_EVENT_CONTENTSUBMASK_LEISUREHOBBIES_FITNESSANDHEALTH = 0x4, | ||
| 474 | |||
| 475 | /// @brief __0x5__ : Cooking. | ||
| 476 | EPG_EVENT_CONTENTSUBMASK_LEISUREHOBBIES_COOKING = 0x5, | ||
| 477 | |||
| 478 | /// @brief __0x6__ : Advertisement/shopping. | ||
| 479 | EPG_EVENT_CONTENTSUBMASK_LEISUREHOBBIES_ADVERTISEMENT_SHOPPING = 0x6, | ||
| 480 | |||
| 481 | /// @brief __0x7__ : Gardening. | ||
| 482 | EPG_EVENT_CONTENTSUBMASK_LEISUREHOBBIES_GARDENING = 0x7, | ||
| 483 | |||
| 484 | /// @brief __0xF__ : User defined. | ||
| 485 | EPG_EVENT_CONTENTSUBMASK_LEISUREHOBBIES_USERDEFINED = 0xF | ||
| 486 | } EPG_EVENT_CONTENTSUBMASK_LEISUREHOBBIES; | ||
| 487 | //---------------------------------------------------------------------------- | ||
| 488 | |||
| 489 | //============================================================================ | ||
| 490 | /// @ingroup cpp_kodi_addon_pvr_Defs_epg_EPG_EVENT | ||
| 491 | /// @brief EPG entry sub content to @ref EPG_EVENT_CONTENTMASK_SPECIAL event | ||
| 492 | /// types for sub type of <b>"Special characteristics"</b>. | ||
| 493 | /// | ||
| 494 | typedef enum EPG_EVENT_CONTENTSUBMASK_SPECIAL | ||
| 495 | { | ||
| 496 | /// @brief __0x0__ : Special characteristics / Original language (general). | ||
| 497 | EPG_EVENT_CONTENTSUBMASK_SPECIAL_GENERAL = 0x0, | ||
| 498 | |||
| 499 | /// @brief __0x1__ : Black and white. | ||
| 500 | EPG_EVENT_CONTENTSUBMASK_SPECIAL_BLACKANDWHITE = 0x1, | ||
| 501 | |||
| 502 | /// @brief __0x2__ : Unpublished. | ||
| 503 | EPG_EVENT_CONTENTSUBMASK_SPECIAL_UNPUBLISHED = 0x2, | ||
| 504 | |||
| 505 | /// @brief __0x3__ : Live broadcast. | ||
| 506 | EPG_EVENT_CONTENTSUBMASK_SPECIAL_LIVEBROADCAST = 0x3, | ||
| 507 | |||
| 508 | /// @brief __0x4__ : Plano-stereoscopic. | ||
| 509 | EPG_EVENT_CONTENTSUBMASK_SPECIAL_PLANOSTEREOSCOPIC = 0x4, | ||
| 510 | |||
| 511 | /// @brief __0x5__ : Local or regional. | ||
| 512 | EPG_EVENT_CONTENTSUBMASK_SPECIAL_LOCALORREGIONAL = 0x5, | ||
| 513 | |||
| 514 | /// @brief __0xF__ : User defined. | ||
| 515 | EPG_EVENT_CONTENTSUBMASK_SPECIAL_USERDEFINED = 0xF | ||
| 516 | } EPG_EVENT_CONTENTSUBMASK_SPECIAL; | ||
| 517 | //---------------------------------------------------------------------------- | ||
| 518 | |||
| 519 | ///@} | ||
| 520 | |||
| 521 | //============================================================================ | ||
| 522 | /// @ingroup cpp_kodi_addon_pvr_Defs_epg | ||
| 523 | /// @brief Separator to use in strings containing different tokens, for example | ||
| 524 | /// writers, directors, actors of an event. | ||
| 525 | /// | ||
| 526 | #define EPG_STRING_TOKEN_SEPARATOR "," | ||
| 527 | //---------------------------------------------------------------------------- | ||
| 528 | |||
| 529 | //============================================================================ | ||
| 530 | /// @defgroup cpp_kodi_addon_pvr_Defs_epg_EPG_TAG_FLAG enum EPG_TAG_FLAG | ||
| 531 | /// @ingroup cpp_kodi_addon_pvr_Defs_epg | ||
| 532 | /// @brief <b>Bit field of independent flags associated with the EPG entry.</b>\n | ||
| 533 | /// Values used by @ref kodi::addon::PVREPGTag::SetFlags(). | ||
| 534 | /// | ||
| 535 | /// Here's example about the use of this: | ||
| 536 | /// ~~~~~~~~~~~~~{.cpp} | ||
| 537 | /// kodi::addon::PVREPGTag tag; | ||
| 538 | /// tag.SetFlags(EPG_TAG_FLAG_IS_SERIES | EPG_TAG_FLAG_IS_NEW); | ||
| 539 | /// ~~~~~~~~~~~~~ | ||
| 540 | /// | ||
| 541 | ///@{ | ||
| 542 | typedef enum EPG_TAG_FLAG | ||
| 543 | { | ||
| 544 | /// @brief __0000 0000__ : Nothing special to say about this entry. | ||
| 545 | EPG_TAG_FLAG_UNDEFINED = 0, | ||
| 546 | |||
| 547 | /// @brief __0000 0001__ : This EPG entry is part of a series. | ||
| 548 | EPG_TAG_FLAG_IS_SERIES = (1 << 0), | ||
| 549 | |||
| 550 | /// @brief __0000 0010__ : This EPG entry will be flagged as new. | ||
| 551 | EPG_TAG_FLAG_IS_NEW = (1 << 1), | ||
| 552 | |||
| 553 | /// @brief __0000 0100__ : This EPG entry will be flagged as a premiere. | ||
| 554 | EPG_TAG_FLAG_IS_PREMIERE = (1 << 2), | ||
| 555 | |||
| 556 | /// @brief __0000 1000__ : This EPG entry will be flagged as a finale. | ||
| 557 | EPG_TAG_FLAG_IS_FINALE = (1 << 3), | ||
| 558 | |||
| 559 | /// @brief __0001 0000__ : This EPG entry will be flagged as live. | ||
| 560 | EPG_TAG_FLAG_IS_LIVE = (1 << 4), | ||
| 561 | } EPG_TAG_FLAG; | ||
| 562 | ///@} | ||
| 563 | //---------------------------------------------------------------------------- | ||
| 564 | |||
| 565 | //============================================================================ | ||
| 566 | /// @ingroup cpp_kodi_addon_pvr_Defs_epg | ||
| 567 | /// @brief Special PVREPGTag::SetUniqueBroadcastId value | ||
| 568 | /// | ||
| 569 | /// Special @ref kodi::addon::PVREPGTag::SetUniqueBroadcastId() value to | ||
| 570 | /// indicate that a tag has not a valid EPG event uid. | ||
| 571 | /// | ||
| 572 | #define EPG_TAG_INVALID_UID 0 | ||
| 573 | //---------------------------------------------------------------------------- | ||
| 574 | |||
| 575 | //============================================================================ | ||
| 576 | /// @ingroup cpp_kodi_addon_pvr_Defs_epg | ||
| 577 | /// @brief Special @ref kodi::addon::PVREPGTag::SetSeriesNumber(), @ref kodi::addon::PVREPGTag::SetEpisodeNumber() | ||
| 578 | /// and @ref kodi::addon::PVREPGTag::SetEpisodePartNumber() value to indicate | ||
| 579 | /// it is not to be used. | ||
| 580 | /// | ||
| 581 | #define EPG_TAG_INVALID_SERIES_EPISODE -1 | ||
| 582 | //---------------------------------------------------------------------------- | ||
| 583 | |||
| 584 | //============================================================================ | ||
| 585 | /// @ingroup cpp_kodi_addon_pvr_Defs_epg | ||
| 586 | /// @brief Timeframe value for use with @ref kodi::addon::CInstancePVRClient::SetEPGTimeFrame() | ||
| 587 | /// function to indicate "no timeframe". | ||
| 588 | /// | ||
| 589 | #define EPG_TIMEFRAME_UNLIMITED -1 | ||
| 590 | //---------------------------------------------------------------------------- | ||
| 591 | |||
| 592 | //============================================================================ | ||
| 593 | /// @defgroup cpp_kodi_addon_pvr_Defs_epg_EPG_EVENT_STATE enum EPG_EVENT_STATE | ||
| 594 | /// @ingroup cpp_kodi_addon_pvr_Defs_epg | ||
| 595 | /// @brief **EPG event states.**\n | ||
| 596 | /// Used with @ref kodi::addon::CInstancePVRClient::EpgEventStateChange() | ||
| 597 | /// callback. | ||
| 598 | /// | ||
| 599 | ///@{ | ||
| 600 | typedef enum EPG_EVENT_STATE | ||
| 601 | { | ||
| 602 | /// @brief __0__ : Event created. | ||
| 603 | EPG_EVENT_CREATED = 0, | ||
| 604 | |||
| 605 | /// @brief __1__ : Event updated. | ||
| 606 | EPG_EVENT_UPDATED = 1, | ||
| 607 | |||
| 608 | /// @brief __2__ : Event deleted. | ||
| 609 | EPG_EVENT_DELETED = 2, | ||
| 610 | } EPG_EVENT_STATE; | ||
| 611 | ///@} | ||
| 612 | //---------------------------------------------------------------------------- | ||
| 613 | |||
| 614 | /*! | ||
| 615 | * @brief "C" PVR add-on channel group member. | ||
| 616 | * | ||
| 617 | * Structure used to interface in "C" between Kodi and Addon. | ||
| 618 | * | ||
| 619 | * See @ref kodi::addon::PVREPGTag for description of values. | ||
| 620 | */ | ||
| 621 | typedef struct EPG_TAG | ||
| 622 | { | ||
| 623 | unsigned int iUniqueBroadcastId; | ||
| 624 | unsigned int iUniqueChannelId; | ||
| 625 | const char* strTitle; | ||
| 626 | time_t startTime; | ||
| 627 | time_t endTime; | ||
| 628 | const char* strPlotOutline; | ||
| 629 | const char* strPlot; | ||
| 630 | const char* strOriginalTitle; | ||
| 631 | const char* strCast; | ||
| 632 | const char* strDirector; | ||
| 633 | const char* strWriter; | ||
| 634 | int iYear; | ||
| 635 | const char* strIMDBNumber; | ||
| 636 | const char* strIconPath; | ||
| 637 | int iGenreType; | ||
| 638 | int iGenreSubType; | ||
| 639 | const char* strGenreDescription; | ||
| 640 | const char* strFirstAired; | ||
| 641 | int iParentalRating; | ||
| 642 | int iStarRating; | ||
| 643 | int iSeriesNumber; | ||
| 644 | int iEpisodeNumber; | ||
| 645 | int iEpisodePartNumber; | ||
| 646 | const char* strEpisodeName; | ||
| 647 | unsigned int iFlags; | ||
| 648 | const char* strSeriesLink; | ||
| 649 | } EPG_TAG; | ||
| 650 | |||
| 651 | #ifdef __cplusplus | ||
| 652 | } | ||
| 653 | #endif /* __cplusplus */ | ||
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_general.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_general.h new file mode 100644 index 0000000..52787b0 --- /dev/null +++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_general.h | |||
| @@ -0,0 +1,288 @@ | |||
| 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 | #include "pvr_defines.h" | ||
| 12 | |||
| 13 | #ifdef BUILD_KODI_ADDON | ||
| 14 | #include "../../../InputStreamConstants.h" | ||
| 15 | #else | ||
| 16 | #include "cores/VideoPlayer/Interface/Addon/InputStreamConstants.h" | ||
| 17 | #endif | ||
| 18 | |||
| 19 | //¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ | ||
| 20 | // "C" Definitions group 1 - General PVR | ||
| 21 | #ifdef __cplusplus | ||
| 22 | extern "C" | ||
| 23 | { | ||
| 24 | #endif /* __cplusplus */ | ||
| 25 | |||
| 26 | //============================================================================ | ||
| 27 | /// @defgroup cpp_kodi_addon_pvr_Defs_General_PVR_ERROR enum PVR_ERROR | ||
| 28 | /// @ingroup cpp_kodi_addon_pvr_Defs_General | ||
| 29 | /// @brief **PVR add-on error codes**\n | ||
| 30 | /// Used as return values on most PVR related functions. | ||
| 31 | /// | ||
| 32 | /// In this way, a PVR instance signals errors in its processing and, under | ||
| 33 | /// certain conditions, allows Kodi to make corrections. | ||
| 34 | /// | ||
| 35 | ///@{ | ||
| 36 | typedef enum PVR_ERROR | ||
| 37 | { | ||
| 38 | /// @brief __0__ : No error occurred. | ||
| 39 | PVR_ERROR_NO_ERROR = 0, | ||
| 40 | |||
| 41 | /// @brief __-1__ : An unknown error occurred. | ||
| 42 | PVR_ERROR_UNKNOWN = -1, | ||
| 43 | |||
| 44 | /// @brief __-2__ : The method that Kodi called is not implemented by the add-on. | ||
| 45 | PVR_ERROR_NOT_IMPLEMENTED = -2, | ||
| 46 | |||
| 47 | /// @brief __-3__ : The backend reported an error, or the add-on isn't connected. | ||
| 48 | PVR_ERROR_SERVER_ERROR = -3, | ||
| 49 | |||
| 50 | /// @brief __-4__ : The command was sent to the backend, but the response timed out. | ||
| 51 | PVR_ERROR_SERVER_TIMEOUT = -4, | ||
| 52 | |||
| 53 | /// @brief __-5__ : The command was rejected by the backend. | ||
| 54 | PVR_ERROR_REJECTED = -5, | ||
| 55 | |||
| 56 | /// @brief __-6__ : The requested item can not be added, because it's already present. | ||
| 57 | PVR_ERROR_ALREADY_PRESENT = -6, | ||
| 58 | |||
| 59 | /// @brief __-7__ : The parameters of the method that was called are invalid for this | ||
| 60 | /// operation. | ||
| 61 | PVR_ERROR_INVALID_PARAMETERS = -7, | ||
| 62 | |||
| 63 | /// @brief __-8__ : A recording is running, so the timer can't be deleted without | ||
| 64 | /// doing a forced delete. | ||
| 65 | PVR_ERROR_RECORDING_RUNNING = -8, | ||
| 66 | |||
| 67 | /// @brief __-9__ : The command failed. | ||
| 68 | PVR_ERROR_FAILED = -9, | ||
| 69 | } PVR_ERROR; | ||
| 70 | ///@} | ||
| 71 | //---------------------------------------------------------------------------- | ||
| 72 | |||
| 73 | //============================================================================ | ||
| 74 | /// @defgroup cpp_kodi_addon_pvr_Defs_General_PVR_CONNECTION_STATE enum PVR_CONNECTION_STATE | ||
| 75 | /// @ingroup cpp_kodi_addon_pvr_Defs_General | ||
| 76 | /// @brief **PVR backend connection states**\n | ||
| 77 | /// Used with @ref kodi::addon::CInstancePVRClient::ConnectionStateChange() callback. | ||
| 78 | /// | ||
| 79 | /// With this, a PVR instance signals that Kodi should perform special | ||
| 80 | /// operations. | ||
| 81 | /// | ||
| 82 | ///@{ | ||
| 83 | typedef enum PVR_CONNECTION_STATE | ||
| 84 | { | ||
| 85 | /// @brief __0__ : Unknown state (e.g. not yet tried to connect). | ||
| 86 | PVR_CONNECTION_STATE_UNKNOWN = 0, | ||
| 87 | |||
| 88 | /// @brief __1__ : Backend server is not reachable (e.g. server not existing or | ||
| 89 | /// network down). | ||
| 90 | PVR_CONNECTION_STATE_SERVER_UNREACHABLE = 1, | ||
| 91 | |||
| 92 | /// @brief __2__ : Backend server is reachable, but there is not the expected type of | ||
| 93 | /// server running (e.g. HTSP required, but FTP running at given server:port). | ||
| 94 | PVR_CONNECTION_STATE_SERVER_MISMATCH = 2, | ||
| 95 | |||
| 96 | /// @brief __3__ : Backend server is reachable, but server version does not match | ||
| 97 | /// client requirements. | ||
| 98 | PVR_CONNECTION_STATE_VERSION_MISMATCH = 3, | ||
| 99 | |||
| 100 | /// @brief __4__ : Backend server is reachable, but denies client access (e.g. due | ||
| 101 | /// to wrong credentials). | ||
| 102 | PVR_CONNECTION_STATE_ACCESS_DENIED = 4, | ||
| 103 | |||
| 104 | /// @brief __5__ : Connection to backend server is established. | ||
| 105 | PVR_CONNECTION_STATE_CONNECTED = 5, | ||
| 106 | |||
| 107 | /// @brief __6__ : No connection to backend server (e.g. due to network errors or | ||
| 108 | /// client initiated disconnect). | ||
| 109 | PVR_CONNECTION_STATE_DISCONNECTED = 6, | ||
| 110 | |||
| 111 | /// @brief __7__ : Connecting to backend. | ||
| 112 | PVR_CONNECTION_STATE_CONNECTING = 7, | ||
| 113 | } PVR_CONNECTION_STATE; | ||
| 114 | ///@} | ||
| 115 | //---------------------------------------------------------------------------- | ||
| 116 | |||
| 117 | //============================================================================ | ||
| 118 | /// @defgroup cpp_kodi_addon_pvr_Defs_General_PVR_STREAM_PROPERTY definition PVR_STREAM_PROPERTY | ||
| 119 | /// @ingroup cpp_kodi_addon_pvr_Defs_General_Inputstream | ||
| 120 | /// @brief **PVR related stream property values**\n | ||
| 121 | /// This is used to pass additional data to Kodi on a given PVR stream. | ||
| 122 | /// | ||
| 123 | /// Then transferred to livestream, recordings or EPG Tag stream using the | ||
| 124 | /// properties. | ||
| 125 | /// | ||
| 126 | /// This defines are used by: | ||
| 127 | /// - @ref kodi::addon::CInstancePVRClient::GetChannelStreamProperties() | ||
| 128 | /// - @ref kodi::addon::CInstancePVRClient::GetEPGTagStreamProperties() | ||
| 129 | /// - @ref kodi::addon::CInstancePVRClient::GetRecordingStreamProperties() | ||
| 130 | /// | ||
| 131 | /// | ||
| 132 | ///--------------------------------------------------------------------------- | ||
| 133 | /// | ||
| 134 | /// **Example:** | ||
| 135 | /// ~~~~~~~~~~~~~{.cpp} | ||
| 136 | /// ... | ||
| 137 | /// | ||
| 138 | /// PVR_ERROR CMyPVRInstance::GetChannelStreamProperties(const kodi::addon::PVRChannel& channel, | ||
| 139 | /// std::vector<PVRStreamProperty>& properties) | ||
| 140 | /// { | ||
| 141 | /// ... | ||
| 142 | /// properties.emplace_back(PVR_STREAM_PROPERTY_INPUTSTREAM, "inputstream.adaptive"); | ||
| 143 | /// properties.emplace_back("inputstream.adaptive.manifest_type", "mpd"); | ||
| 144 | /// properties.emplace_back("inputstream.adaptive.manifest_update_parameter", "full"); | ||
| 145 | /// properties.emplace_back(PVR_STREAM_PROPERTY_MIMETYPE, "application/xml+dash"); | ||
| 146 | /// return PVR_ERROR_NO_ERROR; | ||
| 147 | /// } | ||
| 148 | /// | ||
| 149 | /// ... | ||
| 150 | /// ~~~~~~~~~~~~~ | ||
| 151 | /// | ||
| 152 | ///@{ | ||
| 153 | |||
| 154 | /// @brief the URL of the stream that should be played. | ||
| 155 | /// | ||
| 156 | #define PVR_STREAM_PROPERTY_STREAMURL "streamurl" | ||
| 157 | |||
| 158 | /// @brief To define in stream properties the name of the inputstream add-on | ||
| 159 | /// that should be used. | ||
| 160 | /// | ||
| 161 | /// Leave blank to use Kodi's built-in playing capabilities or to allow ffmpeg | ||
| 162 | /// to handle directly set to @ref PVR_STREAM_PROPERTY_VALUE_INPUTSTREAMFFMPEG. | ||
| 163 | /// | ||
| 164 | #define PVR_STREAM_PROPERTY_INPUTSTREAM STREAM_PROPERTY_INPUTSTREAM | ||
| 165 | |||
| 166 | /// @brief Identification string for an input stream. | ||
| 167 | /// | ||
| 168 | /// This value can be used in addition to @ref PVR_STREAM_PROPERTY_INPUTSTREAM. | ||
| 169 | /// It is used to provide the respective inpustream addon with additional | ||
| 170 | /// identification. | ||
| 171 | /// | ||
| 172 | /// The difference between this and other stream properties is that it is also | ||
| 173 | /// passed in the associated @ref kodi::addon::CAddonBase::CreateInstance() | ||
| 174 | /// call. | ||
| 175 | /// | ||
| 176 | /// This makes it possible to select different processing classes within the | ||
| 177 | /// associated add-on. | ||
| 178 | /// | ||
| 179 | /// | ||
| 180 | ///--------------------------------------------------------------------------- | ||
| 181 | /// | ||
| 182 | /// **Example:** | ||
| 183 | /// ~~~~~~~~~~~~~{.cpp} | ||
| 184 | /// ... | ||
| 185 | /// | ||
| 186 | /// // On PVR instance of addon | ||
| 187 | /// PVR_ERROR CMyPVRInstance::GetChannelStreamProperties(const kodi::addon::PVRChannel& channel, | ||
| 188 | /// std::vector<PVRStreamProperty>& properties) | ||
| 189 | /// { | ||
| 190 | /// ... | ||
| 191 | /// // For here on example the inpustream is also inside the PVR addon | ||
| 192 | /// properties.emplace_back(PVR_STREAM_PROPERTY_INPUTSTREAM, "pvr.my_one"); | ||
| 193 | /// properties.emplace_back(PVR_STREAM_PROPERTY_INPUTSTREAM_INSTANCE_ID, "my_special_id_1"); | ||
| 194 | /// return PVR_ERROR_NO_ERROR; | ||
| 195 | /// } | ||
| 196 | /// | ||
| 197 | /// ... | ||
| 198 | /// | ||
| 199 | /// // On CAddonBase part of addon | ||
| 200 | /// ADDON_STATUS CMyAddon::CreateInstanceEx(int instanceType, | ||
| 201 | /// std::string instanceID, | ||
| 202 | /// KODI_HANDLE instance, | ||
| 203 | /// KODI_HANDLE& addonInstance | ||
| 204 | /// const std::string& version) | ||
| 205 | /// { | ||
| 206 | /// if (instanceType == ADDON_INSTANCE_INPUTSTREAM) | ||
| 207 | /// { | ||
| 208 | /// kodi::Log(ADDON_LOG_NOTICE, "Creating my special inputstream"); | ||
| 209 | /// if (instanceID == "my_special_id_1") | ||
| 210 | /// addonInstance = new CMyPVRClientInstance_Type1(instance, version); | ||
| 211 | /// else if (instanceID == "my_special_id_2") | ||
| 212 | /// addonInstance = new CMyPVRClientInstance_Type2(instance, version); | ||
| 213 | /// return ADDON_STATUS_OK; | ||
| 214 | /// } | ||
| 215 | /// else if (...) | ||
| 216 | /// { | ||
| 217 | /// ... | ||
| 218 | /// } | ||
| 219 | /// return ADDON_STATUS_UNKNOWN; | ||
| 220 | /// } | ||
| 221 | /// | ||
| 222 | /// ... | ||
| 223 | /// ~~~~~~~~~~~~~ | ||
| 224 | /// | ||
| 225 | #define PVR_STREAM_PROPERTY_INPUTSTREAM_INSTANCE_ID STREAM_PROPERTY_INPUTSTREAM_INSTANCE_ID | ||
| 226 | |||
| 227 | /// @brief the MIME type of the stream that should be played. | ||
| 228 | /// | ||
| 229 | #define PVR_STREAM_PROPERTY_MIMETYPE "mimetype" | ||
| 230 | |||
| 231 | /// @brief <b>"true"</b> to denote that the stream that should be played is a | ||
| 232 | /// realtime stream. | ||
| 233 | /// | ||
| 234 | /// Any other value indicates that this is no realtime stream. | ||
| 235 | /// | ||
| 236 | #define PVR_STREAM_PROPERTY_ISREALTIMESTREAM STREAM_PROPERTY_ISREALTIMESTREAM | ||
| 237 | |||
| 238 | /// @brief <b>"true"</b> to denote that if the stream is from an EPG tag. | ||
| 239 | /// | ||
| 240 | /// It should be played is a live stream. Otherwise if it's a EPG tag it will | ||
| 241 | /// play as normal video. | ||
| 242 | /// | ||
| 243 | #define PVR_STREAM_PROPERTY_EPGPLAYBACKASLIVE "epgplaybackaslive" | ||
| 244 | |||
| 245 | /// @brief Special value for @ref PVR_STREAM_PROPERTY_INPUTSTREAM to use | ||
| 246 | /// ffmpeg to directly play a stream URL. | ||
| 247 | #define PVR_STREAM_PROPERTY_VALUE_INPUTSTREAMFFMPEG STREAM_PROPERTY_VALUE_INPUTSTREAMFFMPEG | ||
| 248 | |||
| 249 | ///@} | ||
| 250 | //----------------------------------------------------------------------------- | ||
| 251 | |||
| 252 | /*! | ||
| 253 | * @brief "C" PVR add-on capabilities. | ||
| 254 | * | ||
| 255 | * Structure used to interface in "C" between Kodi and Addon. | ||
| 256 | * | ||
| 257 | * See @ref kodi::addon::PVRCapabilities for description of values. | ||
| 258 | */ | ||
| 259 | typedef struct PVR_ADDON_CAPABILITIES | ||
| 260 | { | ||
| 261 | bool bSupportsEPG; | ||
| 262 | bool bSupportsEPGEdl; | ||
| 263 | bool bSupportsTV; | ||
| 264 | bool bSupportsRadio; | ||
| 265 | bool bSupportsRecordings; | ||
| 266 | bool bSupportsRecordingsUndelete; | ||
| 267 | bool bSupportsTimers; | ||
| 268 | bool bSupportsChannelGroups; | ||
| 269 | bool bSupportsChannelScan; | ||
| 270 | bool bSupportsChannelSettings; | ||
| 271 | bool bHandlesInputStream; | ||
| 272 | bool bHandlesDemuxing; | ||
| 273 | bool bSupportsRecordingPlayCount; | ||
| 274 | bool bSupportsLastPlayedPosition; | ||
| 275 | bool bSupportsRecordingEdl; | ||
| 276 | bool bSupportsRecordingsRename; | ||
| 277 | bool bSupportsRecordingsLifetimeChange; | ||
| 278 | bool bSupportsDescrambleInfo; | ||
| 279 | bool bSupportsAsyncEPGTransfer; | ||
| 280 | bool bSupportsRecordingSize; | ||
| 281 | |||
| 282 | unsigned int iRecordingsLifetimesSize; | ||
| 283 | struct PVR_ATTRIBUTE_INT_VALUE recordingsLifetimeValues[PVR_ADDON_ATTRIBUTE_VALUES_ARRAY_SIZE]; | ||
| 284 | } PVR_ADDON_CAPABILITIES; | ||
| 285 | |||
| 286 | #ifdef __cplusplus | ||
| 287 | } | ||
| 288 | #endif /* __cplusplus */ | ||
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_menu_hook.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_menu_hook.h new file mode 100644 index 0000000..df2216f --- /dev/null +++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_menu_hook.h | |||
| @@ -0,0 +1,72 @@ | |||
| 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 | #include "pvr_defines.h" | ||
| 12 | |||
| 13 | //¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ | ||
| 14 | // "C" Definitions group 7 - Menu hook | ||
| 15 | #ifdef __cplusplus | ||
| 16 | extern "C" | ||
| 17 | { | ||
| 18 | #endif /* __cplusplus */ | ||
| 19 | |||
| 20 | //============================================================================ | ||
| 21 | /// @defgroup cpp_kodi_addon_pvr_Defs_Menuhook_PVR_MENUHOOK_CAT enum PVR_MENUHOOK_CAT | ||
| 22 | /// @ingroup cpp_kodi_addon_pvr_Defs_Menuhook | ||
| 23 | /// @brief **PVR context menu hook categories**\n | ||
| 24 | /// Possible menu types given to Kodi with @ref kodi::addon::CInstancePVRClient::AddMenuHook(). | ||
| 25 | /// | ||
| 26 | ///@{ | ||
| 27 | typedef enum PVR_MENUHOOK_CAT | ||
| 28 | { | ||
| 29 | /// @brief __-1__ : Unknown menu hook. | ||
| 30 | PVR_MENUHOOK_UNKNOWN = -1, | ||
| 31 | |||
| 32 | /// @brief __0__ : All categories. | ||
| 33 | PVR_MENUHOOK_ALL = 0, | ||
| 34 | |||
| 35 | /// @brief __1__ : For channels. | ||
| 36 | PVR_MENUHOOK_CHANNEL = 1, | ||
| 37 | |||
| 38 | /// @brief __2__ : For timers. | ||
| 39 | PVR_MENUHOOK_TIMER = 2, | ||
| 40 | |||
| 41 | /// @brief __3__ : For EPG. | ||
| 42 | PVR_MENUHOOK_EPG = 3, | ||
| 43 | |||
| 44 | /// @brief __4__ : For recordings. | ||
| 45 | PVR_MENUHOOK_RECORDING = 4, | ||
| 46 | |||
| 47 | /// @brief __5__ : For deleted recordings. | ||
| 48 | PVR_MENUHOOK_DELETED_RECORDING = 5, | ||
| 49 | |||
| 50 | /// @brief __6__ : For settings. | ||
| 51 | PVR_MENUHOOK_SETTING = 6, | ||
| 52 | } PVR_MENUHOOK_CAT; | ||
| 53 | ///@} | ||
| 54 | //---------------------------------------------------------------------------- | ||
| 55 | |||
| 56 | /*! | ||
| 57 | * @brief "C" PVR add-on menu hook. | ||
| 58 | * | ||
| 59 | * Structure used to interface in "C" between Kodi and Addon. | ||
| 60 | * | ||
| 61 | * See @ref kodi::addon::PVRMenuhook for description of values. | ||
| 62 | */ | ||
| 63 | typedef struct PVR_MENUHOOK | ||
| 64 | { | ||
| 65 | unsigned int iHookId; | ||
| 66 | unsigned int iLocalizedStringId; | ||
| 67 | enum PVR_MENUHOOK_CAT category; | ||
| 68 | } PVR_MENUHOOK; | ||
| 69 | |||
| 70 | #ifdef __cplusplus | ||
| 71 | } | ||
| 72 | #endif /* __cplusplus */ | ||
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_recordings.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_recordings.h new file mode 100644 index 0000000..1a7fc66 --- /dev/null +++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_recordings.h | |||
| @@ -0,0 +1,143 @@ | |||
| 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 | #include "pvr_defines.h" | ||
| 12 | |||
| 13 | #include <stdbool.h> | ||
| 14 | #include <stdint.h> | ||
| 15 | #include <time.h> | ||
| 16 | |||
| 17 | //¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ | ||
| 18 | // "C" Definitions group 5 - PVR recordings | ||
| 19 | #ifdef __cplusplus | ||
| 20 | extern "C" | ||
| 21 | { | ||
| 22 | #endif /* __cplusplus */ | ||
| 23 | |||
| 24 | //============================================================================ | ||
| 25 | /// @defgroup cpp_kodi_addon_pvr_Defs_Recording_PVR_RECORDING_FLAG enum PVR_RECORDING_FLAG | ||
| 26 | /// @ingroup cpp_kodi_addon_pvr_Defs_Recording | ||
| 27 | /// @brief **Bit field of independent flags associated with the EPG entry.**\n | ||
| 28 | /// Values used by @ref kodi::addon::PVRRecording::SetFlags(). | ||
| 29 | /// | ||
| 30 | /// Here's example about the use of this: | ||
| 31 | /// ~~~~~~~~~~~~~{.cpp} | ||
| 32 | /// kodi::addon::PVRRecording tag; | ||
| 33 | /// tag.SetFlags(PVR_RECORDING_FLAG_IS_SERIES | PVR_RECORDING_FLAG_IS_PREMIERE); | ||
| 34 | /// ~~~~~~~~~~~~~ | ||
| 35 | /// | ||
| 36 | ///@{ | ||
| 37 | typedef enum PVR_RECORDING_FLAG | ||
| 38 | { | ||
| 39 | /// @brief __0000 0000__ : Nothing special to say about this recording. | ||
| 40 | PVR_RECORDING_FLAG_UNDEFINED = 0, | ||
| 41 | |||
| 42 | /// @brief __0000 0001__ : This recording is part of a series. | ||
| 43 | PVR_RECORDING_FLAG_IS_SERIES = (1 << 0), | ||
| 44 | |||
| 45 | /// @brief __0000 0010__ : This recording will be flagged as new. | ||
| 46 | PVR_RECORDING_FLAG_IS_NEW = (1 << 1), | ||
| 47 | |||
| 48 | /// @brief __0000 0100__ : This recording will be flagged as a premiere. | ||
| 49 | PVR_RECORDING_FLAG_IS_PREMIERE = (1 << 2), | ||
| 50 | |||
| 51 | /// @brief __0000 1000__ : This recording will be flagged as a finale. | ||
| 52 | PVR_RECORDING_FLAG_IS_FINALE = (1 << 3), | ||
| 53 | |||
| 54 | /// @brief __0001 0000__ : This recording will be flagged as live. | ||
| 55 | PVR_RECORDING_FLAG_IS_LIVE = (1 << 4), | ||
| 56 | } PVR_RECORDING_FLAG; | ||
| 57 | ///@} | ||
| 58 | //---------------------------------------------------------------------------- | ||
| 59 | |||
| 60 | //============================================================================ | ||
| 61 | /// @ingroup cpp_kodi_addon_pvr_Defs_Recording_PVRRecording | ||
| 62 | /// @brief Special @ref kodi::addon::PVRRecording::SetSeriesNumber() and | ||
| 63 | /// @ref kodi::addon::PVRRecording::SetEpisodeNumber() value to indicate it is | ||
| 64 | /// not to be used. | ||
| 65 | /// | ||
| 66 | /// Used if recording has no valid season and/or episode info. | ||
| 67 | /// | ||
| 68 | #define PVR_RECORDING_INVALID_SERIES_EPISODE EPG_TAG_INVALID_SERIES_EPISODE | ||
| 69 | //---------------------------------------------------------------------------- | ||
| 70 | |||
| 71 | //============================================================================ | ||
| 72 | /// @ingroup cpp_kodi_addon_pvr_Defs_Recording_PVRRecording | ||
| 73 | /// @brief Value where set in background to inform that related part not used. | ||
| 74 | /// | ||
| 75 | /// Normally this related parts need not to set by this as it is default. | ||
| 76 | #define PVR_RECORDING_VALUE_NOT_AVAILABLE -1 | ||
| 77 | //---------------------------------------------------------------------------- | ||
| 78 | |||
| 79 | //============================================================================ | ||
| 80 | /// @defgroup cpp_kodi_addon_pvr_Defs_Recording_PVR_RECORDING_CHANNEL_TYPE enum PVR_RECORDING_CHANNEL_TYPE | ||
| 81 | /// @ingroup cpp_kodi_addon_pvr_Defs_Recording | ||
| 82 | /// @brief **PVR recording channel types**\n | ||
| 83 | /// Used on @ref kodi::addon::PVRRecording::SetChannelType() value to set related | ||
| 84 | /// type. | ||
| 85 | /// | ||
| 86 | ///@{ | ||
| 87 | typedef enum PVR_RECORDING_CHANNEL_TYPE | ||
| 88 | { | ||
| 89 | /// @brief __0__ : Unknown type. | ||
| 90 | PVR_RECORDING_CHANNEL_TYPE_UNKNOWN = 0, | ||
| 91 | |||
| 92 | /// @brief __1__ : TV channel. | ||
| 93 | PVR_RECORDING_CHANNEL_TYPE_TV = 1, | ||
| 94 | |||
| 95 | /// @brief __2__ : Radio channel. | ||
| 96 | PVR_RECORDING_CHANNEL_TYPE_RADIO = 2, | ||
| 97 | } PVR_RECORDING_CHANNEL_TYPE; | ||
| 98 | ///@} | ||
| 99 | //---------------------------------------------------------------------------- | ||
| 100 | |||
| 101 | /*! | ||
| 102 | * @brief "C" PVR add-on recording. | ||
| 103 | * | ||
| 104 | * Structure used to interface in "C" between Kodi and Addon. | ||
| 105 | * | ||
| 106 | * See @ref kodi::addon::PVRRecording for description of values. | ||
| 107 | */ | ||
| 108 | typedef struct PVR_RECORDING | ||
| 109 | { | ||
| 110 | char strRecordingId[PVR_ADDON_NAME_STRING_LENGTH]; | ||
| 111 | char strTitle[PVR_ADDON_NAME_STRING_LENGTH]; | ||
| 112 | char strEpisodeName[PVR_ADDON_NAME_STRING_LENGTH]; | ||
| 113 | int iSeriesNumber; | ||
| 114 | int iEpisodeNumber; | ||
| 115 | int iYear; | ||
| 116 | char strDirectory[PVR_ADDON_URL_STRING_LENGTH]; | ||
| 117 | char strPlotOutline[PVR_ADDON_DESC_STRING_LENGTH]; | ||
| 118 | char strPlot[PVR_ADDON_DESC_STRING_LENGTH]; | ||
| 119 | char strGenreDescription[PVR_ADDON_DESC_STRING_LENGTH]; | ||
| 120 | char strChannelName[PVR_ADDON_NAME_STRING_LENGTH]; | ||
| 121 | char strIconPath[PVR_ADDON_URL_STRING_LENGTH]; | ||
| 122 | char strThumbnailPath[PVR_ADDON_URL_STRING_LENGTH]; | ||
| 123 | char strFanartPath[PVR_ADDON_URL_STRING_LENGTH]; | ||
| 124 | time_t recordingTime; | ||
| 125 | int iDuration; | ||
| 126 | int iPriority; | ||
| 127 | int iLifetime; | ||
| 128 | int iGenreType; | ||
| 129 | int iGenreSubType; | ||
| 130 | int iPlayCount; | ||
| 131 | int iLastPlayedPosition; | ||
| 132 | bool bIsDeleted; | ||
| 133 | unsigned int iEpgEventId; | ||
| 134 | int iChannelUid; | ||
| 135 | enum PVR_RECORDING_CHANNEL_TYPE channelType; | ||
| 136 | char strFirstAired[PVR_ADDON_DATE_STRING_LENGTH]; | ||
| 137 | unsigned int iFlags; | ||
| 138 | int64_t sizeInBytes; | ||
| 139 | } PVR_RECORDING; | ||
| 140 | |||
| 141 | #ifdef __cplusplus | ||
| 142 | } | ||
| 143 | #endif /* __cplusplus */ | ||
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_stream.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_stream.h new file mode 100644 index 0000000..04b4059 --- /dev/null +++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_stream.h | |||
| @@ -0,0 +1,155 @@ | |||
| 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 | #include "pvr_defines.h" | ||
| 12 | |||
| 13 | #ifdef BUILD_KODI_ADDON | ||
| 14 | #include "../../../DemuxPacket.h" | ||
| 15 | #else | ||
| 16 | #include "cores/VideoPlayer/Interface/Addon/DemuxPacket.h" | ||
| 17 | #endif | ||
| 18 | |||
| 19 | #include <stdint.h> | ||
| 20 | #include <time.h> | ||
| 21 | |||
| 22 | //¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ | ||
| 23 | // "C" Definitions group 9 - PVR stream definitions (NOTE: Becomes replaced | ||
| 24 | // in future by inputstream addon instance way) | ||
| 25 | #ifdef __cplusplus | ||
| 26 | extern "C" | ||
| 27 | { | ||
| 28 | #endif /* __cplusplus */ | ||
| 29 | |||
| 30 | //============================================================================ | ||
| 31 | /// @ingroup cpp_kodi_addon_pvr_Defs_Stream | ||
| 32 | /// @brief Maximum of allowed streams | ||
| 33 | /// | ||
| 34 | #define PVR_STREAM_MAX_STREAMS 20 | ||
| 35 | //---------------------------------------------------------------------------- | ||
| 36 | |||
| 37 | //============================================================================ | ||
| 38 | /// @ingroup cpp_kodi_addon_pvr_Defs_Stream | ||
| 39 | /// @brief Invalid codec identifier | ||
| 40 | /// | ||
| 41 | #define PVR_INVALID_CODEC_ID 0 | ||
| 42 | //---------------------------------------------------------------------------- | ||
| 43 | |||
| 44 | //============================================================================ | ||
| 45 | /// @ingroup cpp_kodi_addon_pvr_Defs_Stream | ||
| 46 | /// @brief Invalid codec | ||
| 47 | /// | ||
| 48 | #define PVR_INVALID_CODEC \ | ||
| 49 | { \ | ||
| 50 | PVR_CODEC_TYPE_UNKNOWN, PVR_INVALID_CODEC_ID \ | ||
| 51 | } | ||
| 52 | //---------------------------------------------------------------------------- | ||
| 53 | |||
| 54 | //============================================================================ | ||
| 55 | /// @defgroup cpp_kodi_addon_pvr_Defs_Stream_PVR_CODEC_TYPE enum PVR_CODEC_TYPE | ||
| 56 | /// @ingroup cpp_kodi_addon_pvr_Defs_Stream | ||
| 57 | /// @brief **Inputstream types**\n | ||
| 58 | /// To identify type on stream. | ||
| 59 | /// | ||
| 60 | /// Used on @ref kodi::addon::PVRStreamProperties::SetCodecType and @ref kodi::addon::PVRStreamProperties::SetCodecType. | ||
| 61 | /// | ||
| 62 | ///@{ | ||
| 63 | typedef enum PVR_CODEC_TYPE | ||
| 64 | { | ||
| 65 | /// @brief To set nothing defined. | ||
| 66 | PVR_CODEC_TYPE_UNKNOWN = -1, | ||
| 67 | |||
| 68 | /// @brief To identify @ref cpp_kodi_addon_pvr_Defs_Stream_PVRStreamProperties as Video. | ||
| 69 | PVR_CODEC_TYPE_VIDEO, | ||
| 70 | |||
| 71 | /// @brief To identify @ref cpp_kodi_addon_pvr_Defs_Stream_PVRStreamProperties as Audio. | ||
| 72 | PVR_CODEC_TYPE_AUDIO, | ||
| 73 | |||
| 74 | /// @brief To identify @ref cpp_kodi_addon_pvr_Defs_Stream_PVRStreamProperties as Data. | ||
| 75 | /// | ||
| 76 | /// With codec id related source identified. | ||
| 77 | PVR_CODEC_TYPE_DATA, | ||
| 78 | |||
| 79 | /// @brief To identify @ref cpp_kodi_addon_pvr_Defs_Stream_PVRStreamProperties as Subtitle. | ||
| 80 | PVR_CODEC_TYPE_SUBTITLE, | ||
| 81 | |||
| 82 | /// @brief To identify @ref cpp_kodi_addon_pvr_Defs_Stream_PVRStreamProperties as Radio RDS. | ||
| 83 | PVR_CODEC_TYPE_RDS, | ||
| 84 | |||
| 85 | PVR_CODEC_TYPE_NB | ||
| 86 | } PVR_CODEC_TYPE; | ||
| 87 | ///@} | ||
| 88 | //---------------------------------------------------------------------------- | ||
| 89 | |||
| 90 | //============================================================================ | ||
| 91 | /// @defgroup cpp_kodi_addon_pvr_Defs_Stream_PVR_CODEC struct PVR_CODEC | ||
| 92 | /// @ingroup cpp_kodi_addon_pvr_Defs_Stream | ||
| 93 | /// @brief **Codec identification structure**\n | ||
| 94 | /// Identifier about stream between Kodi and addon. | ||
| 95 | /// | ||
| 96 | ///@{ | ||
| 97 | typedef struct PVR_CODEC | ||
| 98 | { | ||
| 99 | /// @brief Used codec type for stream. | ||
| 100 | enum PVR_CODEC_TYPE codec_type; | ||
| 101 | |||
| 102 | /// @brief Related codec identifier, normally match the ffmpeg id's. | ||
| 103 | unsigned int codec_id; | ||
| 104 | } PVR_CODEC; | ||
| 105 | ///@} | ||
| 106 | //---------------------------------------------------------------------------- | ||
| 107 | |||
| 108 | /*! | ||
| 109 | * @brief "C" Stream properties | ||
| 110 | * | ||
| 111 | * Structure used to interface in "C" between Kodi and Addon. | ||
| 112 | * | ||
| 113 | * See @ref cpp_kodi_addon_pvr_Defs_Stream_PVRStreamProperties for description of values. | ||
| 114 | */ | ||
| 115 | typedef struct PVR_STREAM_PROPERTIES | ||
| 116 | { | ||
| 117 | unsigned int iStreamCount; | ||
| 118 | struct PVR_STREAM | ||
| 119 | { | ||
| 120 | unsigned int iPID; | ||
| 121 | enum PVR_CODEC_TYPE iCodecType; | ||
| 122 | unsigned int iCodecId; | ||
| 123 | char strLanguage[4]; | ||
| 124 | int iSubtitleInfo; | ||
| 125 | int iFPSScale; | ||
| 126 | int iFPSRate; | ||
| 127 | int iHeight; | ||
| 128 | int iWidth; | ||
| 129 | float fAspect; | ||
| 130 | int iChannels; | ||
| 131 | int iSampleRate; | ||
| 132 | int iBlockAlign; | ||
| 133 | int iBitRate; | ||
| 134 | int iBitsPerSample; | ||
| 135 | } stream[PVR_STREAM_MAX_STREAMS]; | ||
| 136 | } PVR_STREAM_PROPERTIES; | ||
| 137 | |||
| 138 | /*! | ||
| 139 | * @brief "C" Times of playing stream (Live TV and recordings) | ||
| 140 | * | ||
| 141 | * Structure used to interface in "C" between Kodi and Addon. | ||
| 142 | * | ||
| 143 | * See @ref cpp_kodi_addon_pvr_Defs_Stream_PVRStreamTimes for description of values. | ||
| 144 | */ | ||
| 145 | typedef struct PVR_STREAM_TIMES | ||
| 146 | { | ||
| 147 | time_t startTime; | ||
| 148 | int64_t ptsStart; | ||
| 149 | int64_t ptsBegin; | ||
| 150 | int64_t ptsEnd; | ||
| 151 | } PVR_STREAM_TIMES; | ||
| 152 | |||
| 153 | #ifdef __cplusplus | ||
| 154 | } | ||
| 155 | #endif /* __cplusplus */ | ||
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_timers.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_timers.h new file mode 100644 index 0000000..bc16adb --- /dev/null +++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_timers.h | |||
| @@ -0,0 +1,407 @@ | |||
| 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 | #include "pvr_defines.h" | ||
| 12 | |||
| 13 | #include <stdbool.h> | ||
| 14 | #include <stdint.h> | ||
| 15 | #include <time.h> | ||
| 16 | |||
| 17 | //¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ | ||
| 18 | // "C" Definitions group 6 - PVR timers | ||
| 19 | #ifdef __cplusplus | ||
| 20 | extern "C" | ||
| 21 | { | ||
| 22 | #endif /* __cplusplus */ | ||
| 23 | |||
| 24 | //============================================================================ | ||
| 25 | /// @defgroup cpp_kodi_addon_pvr_Defs_Timer_PVR_TIMER_ definition PVR_TIMER (various) | ||
| 26 | /// @ingroup cpp_kodi_addon_pvr_Defs_Timer | ||
| 27 | /// @brief **PVR timer various different definitions**\n | ||
| 28 | /// This mostly used on @ref cpp_kodi_addon_pvr_Defs_Timer_PVRTimer "kodi::addon::PVRTimer" | ||
| 29 | /// to define default or not available. | ||
| 30 | /// | ||
| 31 | ///@{ | ||
| 32 | |||
| 33 | //============================================================================ | ||
| 34 | /// @brief Numeric PVR timer type definitions (@ref kodi::addon::PVRTimer::SetTimerType() | ||
| 35 | /// values). | ||
| 36 | /// | ||
| 37 | /// "Null" value for a numeric timer type. | ||
| 38 | #define PVR_TIMER_TYPE_NONE 0 | ||
| 39 | //---------------------------------------------------------------------------- | ||
| 40 | |||
| 41 | //============================================================================ | ||
| 42 | /// @brief Special @ref kodi::addon::PVRTimer::SetClientIndex() value to indicate | ||
| 43 | /// that a timer has not (yet) a valid client index. | ||
| 44 | /// | ||
| 45 | /// Timer has not (yet) a valid client index. | ||
| 46 | #define PVR_TIMER_NO_CLIENT_INDEX 0 | ||
| 47 | //---------------------------------------------------------------------------- | ||
| 48 | |||
| 49 | //============================================================================ | ||
| 50 | /// @brief Special @ref kodi::addon::PVRTimer::SetParentClientIndex() value to | ||
| 51 | /// indicate that a timer has no parent. | ||
| 52 | /// | ||
| 53 | /// Timer has no parent; it was not scheduled by a repeating timer. | ||
| 54 | #define PVR_TIMER_NO_PARENT PVR_TIMER_NO_CLIENT_INDEX | ||
| 55 | //---------------------------------------------------------------------------- | ||
| 56 | |||
| 57 | //============================================================================ | ||
| 58 | /// @brief Special @ref kodi::addon::PVRTimer::SetEPGUid() value to indicate | ||
| 59 | /// that a timer has no EPG event uid. | ||
| 60 | /// | ||
| 61 | /// Timer has no EPG event unique identifier. | ||
| 62 | #define PVR_TIMER_NO_EPG_UID EPG_TAG_INVALID_UID | ||
| 63 | //---------------------------------------------------------------------------- | ||
| 64 | |||
| 65 | //============================================================================ | ||
| 66 | /// @brief Special @ref kodi::addon::PVRTimer::SetClientChannelUid() value to | ||
| 67 | /// indicate "any channel". Useful for some repeating timer types. | ||
| 68 | /// | ||
| 69 | /// denotes "any channel", not a specific one. | ||
| 70 | /// | ||
| 71 | #define PVR_TIMER_ANY_CHANNEL -1 | ||
| 72 | //---------------------------------------------------------------------------- | ||
| 73 | |||
| 74 | //============================================================================ | ||
| 75 | /// @brief Value where set in background to inform that related part not used. | ||
| 76 | /// | ||
| 77 | /// Normally this related parts need not to set by this as it is default. | ||
| 78 | #define PVR_TIMER_VALUE_NOT_AVAILABLE -1 | ||
| 79 | //---------------------------------------------------------------------------- | ||
| 80 | |||
| 81 | ///@} | ||
| 82 | //---------------------------------------------------------------------------- | ||
| 83 | |||
| 84 | |||
| 85 | //============================================================================ | ||
| 86 | /// @defgroup cpp_kodi_addon_pvr_Defs_Timer_PVR_TIMER_TYPES enum PVR_TIMER_TYPES | ||
| 87 | /// @ingroup cpp_kodi_addon_pvr_Defs_Timer | ||
| 88 | /// @brief **PVR timer type attributes (@ref kodi::addon::PVRTimerType::SetAttributes() values).**\n | ||
| 89 | /// To defines the attributes for a type. These values are bit fields that can be | ||
| 90 | /// used together. | ||
| 91 | /// | ||
| 92 | ///-------------------------------------------------------------------------- | ||
| 93 | /// | ||
| 94 | /// **Example:** | ||
| 95 | /// ~~~~~~~~~~~~~{.cpp} | ||
| 96 | /// kodi::addon::PVRTimerType tag; | ||
| 97 | /// tag.SetAttributes(PVR_TIMER_TYPE_IS_MANUAL | PVR_TIMER_TYPE_IS_REPEATING); | ||
| 98 | /// ~~~~~~~~~~~~~ | ||
| 99 | /// | ||
| 100 | ///@{ | ||
| 101 | typedef enum PVR_TIMER_TYPES | ||
| 102 | { | ||
| 103 | /// @brief __0000 0000 0000 0000 0000 0000 0000 0000__ :\n Empty attribute value. | ||
| 104 | PVR_TIMER_TYPE_ATTRIBUTE_NONE = 0, | ||
| 105 | |||
| 106 | /// @brief __0000 0000 0000 0000 0000 0000 0000 0001__ :\n Defines whether this is a type for | ||
| 107 | /// manual (time-based) or epg-based timers. | ||
| 108 | PVR_TIMER_TYPE_IS_MANUAL = (1 << 0), | ||
| 109 | |||
| 110 | /// @brief __0000 0000 0000 0000 0000 0000 0000 0010__ :\n Defines whether this is a type for | ||
| 111 | /// repeating or one-shot timers. | ||
| 112 | PVR_TIMER_TYPE_IS_REPEATING = (1 << 1), | ||
| 113 | |||
| 114 | /// @brief __0000 0000 0000 0000 0000 0000 0000 0100__ :\n Timers of this type must not be edited | ||
| 115 | /// by Kodi. | ||
| 116 | PVR_TIMER_TYPE_IS_READONLY = (1 << 2), | ||
| 117 | |||
| 118 | /// @brief __0000 0000 0000 0000 0000 0000 0000 1000__ :\n Timers of this type must not be created | ||
| 119 | /// by Kodi. All other operations are allowed, though. | ||
| 120 | PVR_TIMER_TYPE_FORBIDS_NEW_INSTANCES = (1 << 3), | ||
| 121 | |||
| 122 | /// @brief __0000 0000 0000 0000 0000 0000 0001 0000__ :\n This type supports enabling/disabling | ||
| 123 | /// of the timer (@ref kodi::addon::PVRTimer::SetState() with | ||
| 124 | /// @ref PVR_TIMER_STATE_SCHEDULED | @ref PVR_TIMER_STATE_DISABLED). | ||
| 125 | PVR_TIMER_TYPE_SUPPORTS_ENABLE_DISABLE = (1 << 4), | ||
| 126 | |||
| 127 | /// @brief __0000 0000 0000 0000 0000 0000 0010 0000__ :\n This type supports channels | ||
| 128 | /// (@ref kodi::addon::PVRTimer::SetClientChannelUid()). | ||
| 129 | PVR_TIMER_TYPE_SUPPORTS_CHANNELS = (1 << 5), | ||
| 130 | |||
| 131 | /// @brief __0000 0000 0000 0000 0000 0000 0100 0000__ :\n This type supports a recording start | ||
| 132 | /// time (@ref kodi::addon::PVRTimer::SetStartTime()). | ||
| 133 | PVR_TIMER_TYPE_SUPPORTS_START_TIME = (1 << 6), | ||
| 134 | |||
| 135 | /// @brief __0000 0000 0000 0000 0000 0000 1000 0000__ :\n This type supports matching epg episode | ||
| 136 | /// title using@ref kodi::addon::PVRTimer::SetEPGSearchString(). | ||
| 137 | PVR_TIMER_TYPE_SUPPORTS_TITLE_EPG_MATCH = (1 << 7), | ||
| 138 | |||
| 139 | /// @brief __0000 0000 0000 0000 0000 0001 0000 0000__ :\n This type supports matching "more" epg | ||
| 140 | /// data (not just episode title) using @ref kodi::addon::PVRTimer::SetEPGSearchString(). | ||
| 141 | /// Setting @ref PVR_TIMER_TYPE_SUPPORTS_FULLTEXT_EPG_MATCH implies | ||
| 142 | /// @ref PVR_TIMER_TYPE_SUPPORTS_TITLE_EPG_MATCH. | ||
| 143 | PVR_TIMER_TYPE_SUPPORTS_FULLTEXT_EPG_MATCH = (1 << 8), | ||
| 144 | |||
| 145 | /// @brief __0000 0000 0000 0000 0000 0010 0000 0000__ :\n This type supports a first day the | ||
| 146 | /// timer gets active (@ref kodi::addon::PVRTimer::SetFirstDay()). | ||
| 147 | PVR_TIMER_TYPE_SUPPORTS_FIRST_DAY = (1 << 9), | ||
| 148 | |||
| 149 | /// @brief __0000 0000 0000 0000 0000 0100 0000 0000__ :\n This type supports weekdays for | ||
| 150 | /// defining the recording schedule (@ref kodi::addon::PVRTimer::SetWeekdays()). | ||
| 151 | PVR_TIMER_TYPE_SUPPORTS_WEEKDAYS = (1 << 10), | ||
| 152 | |||
| 153 | /// @brief __0000 0000 0000 0000 0000 1000 0000 0000__ :\n This type supports the <b>"record only new episodes"</b> feature | ||
| 154 | /// (@ref kodi::addon::PVRTimer::SetPreventDuplicateEpisodes()). | ||
| 155 | PVR_TIMER_TYPE_SUPPORTS_RECORD_ONLY_NEW_EPISODES = (1 << 11), | ||
| 156 | |||
| 157 | /// @brief __0000 0000 0000 0000 0001 0000 0000 0000__ :\n This type supports pre and post record time (@ref kodi::addon::PVRTimer::SetMarginStart(), | ||
| 158 | /// @ref kodi::addon::PVRTimer::SetMarginEnd()). | ||
| 159 | PVR_TIMER_TYPE_SUPPORTS_START_END_MARGIN = (1 << 12), | ||
| 160 | |||
| 161 | /// @brief __0000 0000 0000 0000 0010 0000 0000 0000__ :\n This type supports recording priority (@ref kodi::addon::PVRTimer::SetPriority()). | ||
| 162 | PVR_TIMER_TYPE_SUPPORTS_PRIORITY = (1 << 13), | ||
| 163 | |||
| 164 | /// @brief __0000 0000 0000 0000 0100 0000 0000 0000__ :\n This type supports recording lifetime (@ref kodi::addon::PVRTimer::SetLifetime()). | ||
| 165 | PVR_TIMER_TYPE_SUPPORTS_LIFETIME = (1 << 14), | ||
| 166 | |||
| 167 | /// @brief __0000 0000 0000 0000 1000 0000 0000 0000__ :\n This type supports placing recordings in user defined folders | ||
| 168 | /// (@ref kodi::addon::PVRTimer::SetDirectory()). | ||
| 169 | PVR_TIMER_TYPE_SUPPORTS_RECORDING_FOLDERS = (1 << 15), | ||
| 170 | |||
| 171 | /// @brief __0000 0000 0000 0001 0000 0000 0000 0000__ :\n This type supports a list of recording groups | ||
| 172 | /// (@ref kodi::addon::PVRTimer::SetRecordingGroup()). | ||
| 173 | PVR_TIMER_TYPE_SUPPORTS_RECORDING_GROUP = (1 << 16), | ||
| 174 | |||
| 175 | /// @brief __0000 0000 0000 0010 0000 0000 0000 0000__ :\n This type supports a recording end time (@ref kodi::addon::PVRTimer::SetEndTime()). | ||
| 176 | PVR_TIMER_TYPE_SUPPORTS_END_TIME = (1 << 17), | ||
| 177 | |||
| 178 | /// @brief __0000 0000 0000 0100 0000 0000 0000 0000__ :\n Enables an 'Any Time' over-ride option for start time | ||
| 179 | /// (using @ref kodi::addon::PVRTimer::SetStartAnyTime()). | ||
| 180 | PVR_TIMER_TYPE_SUPPORTS_START_ANYTIME = (1 << 18), | ||
| 181 | |||
| 182 | /// @brief __0000 0000 0000 1000 0000 0000 0000 0000__ :\n Enables a separate <b>'Any Time'</b> over-ride for end time | ||
| 183 | /// (using @ref kodi::addon::PVRTimer::SetEndAnyTime()). | ||
| 184 | PVR_TIMER_TYPE_SUPPORTS_END_ANYTIME = (1 << 19), | ||
| 185 | |||
| 186 | /// @brief __0000 0000 0001 0000 0000 0000 0000 0000__ :\n This type supports specifying a maximum recordings setting' | ||
| 187 | /// (@ref kodi::addon::PVRTimer::SetMaxRecordings()). | ||
| 188 | PVR_TIMER_TYPE_SUPPORTS_MAX_RECORDINGS = (1 << 20), | ||
| 189 | |||
| 190 | /// @brief __0000 0000 0010 0000 0000 0000 0000 0000__ :\n This type should not appear on any create menus which don't | ||
| 191 | /// provide an associated @ref cpp_kodi_addon_pvr_Defs_epg_PVREPGTag "EPG tag". | ||
| 192 | PVR_TIMER_TYPE_REQUIRES_EPG_TAG_ON_CREATE = (1 << 21), | ||
| 193 | |||
| 194 | /// @brief __0000 0000 0100 0000 0000 0000 0000 0000__ :\n This type should not appear on any create menus which provide an | ||
| 195 | /// associated @ref cpp_kodi_addon_pvr_Defs_epg_PVREPGTag "EPG tag". | ||
| 196 | PVR_TIMER_TYPE_FORBIDS_EPG_TAG_ON_CREATE = (1 << 22), | ||
| 197 | |||
| 198 | /// @brief __0000 0000 1000 0000 0000 0000 0000 0000__ :\n This type should not appear on any create menus unless associated | ||
| 199 | /// with an @ref cpp_kodi_addon_pvr_Defs_epg_PVREPGTag "EPG tag" with | ||
| 200 | /// 'series' attributes. | ||
| 201 | /// | ||
| 202 | /// Following conditions allow this: | ||
| 203 | /// - @ref kodi::addon::PVREPGTag::SetFlags() have flag @ref EPG_TAG_FLAG_IS_SERIES | ||
| 204 | /// - @ref kodi::addon::PVREPGTag::SetSeriesNumber() > 0 | ||
| 205 | /// - @ref kodi::addon::PVREPGTag::SetEpisodeNumber() > 0 | ||
| 206 | /// - @ref kodi::addon::PVREPGTag::SetEpisodePartNumber() > 0 | ||
| 207 | /// | ||
| 208 | /// Implies @ref PVR_TIMER_TYPE_REQUIRES_EPG_TAG_ON_CREATE. | ||
| 209 | PVR_TIMER_TYPE_REQUIRES_EPG_SERIES_ON_CREATE = (1 << 23), | ||
| 210 | |||
| 211 | /// @brief __0000 0001 0000 0000 0000 0000 0000 0000__ :\n This type supports 'any channel', for example when defining a timer | ||
| 212 | /// rule that should match any channel instaed of a particular channel. | ||
| 213 | PVR_TIMER_TYPE_SUPPORTS_ANY_CHANNEL = (1 << 24), | ||
| 214 | |||
| 215 | /// @brief __0000 0010 0000 0000 0000 0000 0000 0000__ :\n This type should not appear on any create menus which don't provide | ||
| 216 | /// an associated @ref cpp_kodi_addon_pvr_Defs_epg_PVREPGTag "EPG tag" with | ||
| 217 | /// a series link. | ||
| 218 | PVR_TIMER_TYPE_REQUIRES_EPG_SERIESLINK_ON_CREATE = (1 << 25), | ||
| 219 | |||
| 220 | /// @brief __0000 0100 0000 0000 0000 0000 0000 0000__ :\n This type allows deletion of an otherwise read-only timer. | ||
| 221 | PVR_TIMER_TYPE_SUPPORTS_READONLY_DELETE = (1 << 26), | ||
| 222 | |||
| 223 | /// @brief __0000 1000 0000 0000 0000 0000 0000 0000__ :\n Timers of this type do trigger a reminder if time is up. | ||
| 224 | PVR_TIMER_TYPE_IS_REMINDER = (1 << 27), | ||
| 225 | |||
| 226 | /// @brief __0001 0000 0000 0000 0000 0000 0000 0000__ :\n This type supports pre record time (@ref kodi::addon::PVRTimer::SetMarginStart()). | ||
| 227 | PVR_TIMER_TYPE_SUPPORTS_START_MARGIN = (1 << 28), | ||
| 228 | |||
| 229 | /// @brief __0010 0000 0000 0000 0000 0000 0000 0000__ :\n This type supports post record time (@ref kodi::addon::PVRTimer::SetMarginEnd()). | ||
| 230 | PVR_TIMER_TYPE_SUPPORTS_END_MARGIN = (1 << 29), | ||
| 231 | } PVR_TIMER_TYPES; | ||
| 232 | ///@} | ||
| 233 | //---------------------------------------------------------------------------- | ||
| 234 | |||
| 235 | //============================================================================ | ||
| 236 | /// @defgroup cpp_kodi_addon_pvr_Defs_Timer_PVR_WEEKDAY enum PVR_WEEKDAY | ||
| 237 | /// @ingroup cpp_kodi_addon_pvr_Defs_Timer | ||
| 238 | /// @brief **PVR timer weekdays** (@ref kodi::addon::PVRTimer::SetWeekdays() **values**)\n | ||
| 239 | /// Used to select the days of a week you want. | ||
| 240 | /// | ||
| 241 | /// It can be also used to select several days e.g.: | ||
| 242 | /// ~~~~~~~~~~~~~{.cpp} | ||
| 243 | /// ... | ||
| 244 | /// unsigned int day = PVR_WEEKDAY_MONDAY | PVR_WEEKDAY_SATURDAY; | ||
| 245 | /// ... | ||
| 246 | /// ~~~~~~~~~~~~~ | ||
| 247 | /// | ||
| 248 | ///@{ | ||
| 249 | typedef enum PVR_WEEKDAYS | ||
| 250 | { | ||
| 251 | /// @brief __0000 0000__ : Nothing selected. | ||
| 252 | PVR_WEEKDAY_NONE = 0, | ||
| 253 | |||
| 254 | /// @brief __0000 0001__ : To select Monday. | ||
| 255 | PVR_WEEKDAY_MONDAY = (1 << 0), | ||
| 256 | |||
| 257 | /// @brief __0000 0010__ : To select Tuesday. | ||
| 258 | PVR_WEEKDAY_TUESDAY = (1 << 1), | ||
| 259 | |||
| 260 | /// @brief __0000 0100__ : To select Wednesday. | ||
| 261 | PVR_WEEKDAY_WEDNESDAY = (1 << 2), | ||
| 262 | |||
| 263 | /// @brief __0000 1000__ : To select Thursday. | ||
| 264 | PVR_WEEKDAY_THURSDAY = (1 << 3), | ||
| 265 | |||
| 266 | /// @brief __0001 0000__ : To select Friday. | ||
| 267 | PVR_WEEKDAY_FRIDAY = (1 << 4), | ||
| 268 | |||
| 269 | /// @brief __0010 0000__ : To select Saturday. | ||
| 270 | PVR_WEEKDAY_SATURDAY = (1 << 5), | ||
| 271 | |||
| 272 | /// @brief __0100 0000__ : To select Sunday. | ||
| 273 | PVR_WEEKDAY_SUNDAY = (1 << 6), | ||
| 274 | |||
| 275 | /// @brief __0111 1111__ : To select all days of week. | ||
| 276 | PVR_WEEKDAY_ALLDAYS = PVR_WEEKDAY_MONDAY | PVR_WEEKDAY_TUESDAY | PVR_WEEKDAY_WEDNESDAY | | ||
| 277 | PVR_WEEKDAY_THURSDAY | PVR_WEEKDAY_FRIDAY | PVR_WEEKDAY_SATURDAY | | ||
| 278 | PVR_WEEKDAY_SUNDAY | ||
| 279 | } PVR_WEEKDAY; | ||
| 280 | ///@} | ||
| 281 | //---------------------------------------------------------------------------- | ||
| 282 | |||
| 283 | //============================================================================ | ||
| 284 | /// @defgroup cpp_kodi_addon_pvr_Defs_Timer_PVR_TIMER_STATE enum PVR_TIMER_STATE | ||
| 285 | /// @ingroup cpp_kodi_addon_pvr_Defs_Timer | ||
| 286 | /// @brief **PVR timer states**\n | ||
| 287 | /// To set within @ref cpp_kodi_addon_pvr_Defs_Timer_PVRTimer "kodi::addon::PVRTimer" | ||
| 288 | /// the needed state about. | ||
| 289 | /// | ||
| 290 | ///@{ | ||
| 291 | typedef enum PVR_TIMER_STATE | ||
| 292 | { | ||
| 293 | /// @brief __0__ : The timer was just created on the backend and is not yet active. | ||
| 294 | /// | ||
| 295 | /// This state must not be used for timers just created on the client side. | ||
| 296 | PVR_TIMER_STATE_NEW = 0, | ||
| 297 | |||
| 298 | /// @brief __1__ : The timer is scheduled for recording. | ||
| 299 | PVR_TIMER_STATE_SCHEDULED = 1, | ||
| 300 | |||
| 301 | /// @brief __2__ : The timer is currently recordings. | ||
| 302 | PVR_TIMER_STATE_RECORDING = 2, | ||
| 303 | |||
| 304 | /// @brief __3__ : The recording completed successfully. | ||
| 305 | PVR_TIMER_STATE_COMPLETED = 3, | ||
| 306 | |||
| 307 | /// @brief __4__ : Recording started, but was aborted. | ||
| 308 | PVR_TIMER_STATE_ABORTED = 4, | ||
| 309 | |||
| 310 | /// @brief __5__ : The timer was scheduled, but was canceled. | ||
| 311 | PVR_TIMER_STATE_CANCELLED = 5, | ||
| 312 | |||
| 313 | /// @brief __6__ : The scheduled timer conflicts with another one, but will be | ||
| 314 | /// recorded. | ||
| 315 | PVR_TIMER_STATE_CONFLICT_OK = 6, | ||
| 316 | |||
| 317 | /// @brief __7__ : The scheduled timer conflicts with another one and won't be | ||
| 318 | /// recorded. | ||
| 319 | PVR_TIMER_STATE_CONFLICT_NOK = 7, | ||
| 320 | |||
| 321 | /// @brief __8__ : The timer is scheduled, but can't be recorded for some reason. | ||
| 322 | PVR_TIMER_STATE_ERROR = 8, | ||
| 323 | |||
| 324 | /// @brief __9__ : The timer was disabled by the user, can be enabled via setting | ||
| 325 | /// the state to @ref PVR_TIMER_STATE_SCHEDULED. | ||
| 326 | PVR_TIMER_STATE_DISABLED = 9, | ||
| 327 | } PVR_TIMER_STATE; | ||
| 328 | ///@} | ||
| 329 | //---------------------------------------------------------------------------- | ||
| 330 | |||
| 331 | /*! | ||
| 332 | * @brief "C" PVR add-on timer event. | ||
| 333 | * | ||
| 334 | * Structure used to interface in "C" between Kodi and Addon. | ||
| 335 | * | ||
| 336 | * See @ref cpp_kodi_addon_pvr_Defs_Timer_PVRTimer "kodi::addon::PVRTimer" for | ||
| 337 | * description of values. | ||
| 338 | */ | ||
| 339 | typedef struct PVR_TIMER | ||
| 340 | { | ||
| 341 | unsigned int iClientIndex; | ||
| 342 | unsigned int iParentClientIndex; | ||
| 343 | int iClientChannelUid; | ||
| 344 | time_t startTime; | ||
| 345 | time_t endTime; | ||
| 346 | bool bStartAnyTime; | ||
| 347 | bool bEndAnyTime; | ||
| 348 | enum PVR_TIMER_STATE state; | ||
| 349 | unsigned int iTimerType; | ||
| 350 | char strTitle[PVR_ADDON_NAME_STRING_LENGTH]; | ||
| 351 | char strEpgSearchString[PVR_ADDON_NAME_STRING_LENGTH]; | ||
| 352 | bool bFullTextEpgSearch; | ||
| 353 | char strDirectory[PVR_ADDON_URL_STRING_LENGTH]; | ||
| 354 | char strSummary[PVR_ADDON_DESC_STRING_LENGTH]; | ||
| 355 | int iPriority; | ||
| 356 | int iLifetime; | ||
| 357 | int iMaxRecordings; | ||
| 358 | unsigned int iRecordingGroup; | ||
| 359 | time_t firstDay; | ||
| 360 | unsigned int iWeekdays; | ||
| 361 | unsigned int iPreventDuplicateEpisodes; | ||
| 362 | unsigned int iEpgUid; | ||
| 363 | unsigned int iMarginStart; | ||
| 364 | unsigned int iMarginEnd; | ||
| 365 | int iGenreType; | ||
| 366 | int iGenreSubType; | ||
| 367 | char strSeriesLink[PVR_ADDON_URL_STRING_LENGTH]; | ||
| 368 | } PVR_TIMER; | ||
| 369 | |||
| 370 | /*! | ||
| 371 | * @brief "C" PVR add-on timer event type. | ||
| 372 | * | ||
| 373 | * Structure used to interface in "C" between Kodi and Addon. | ||
| 374 | * | ||
| 375 | * See @ref cpp_kodi_addon_pvr_Defs_Timer_PVRTimerType "kodi::addon::PVRTimerType" for | ||
| 376 | * description of values. | ||
| 377 | */ | ||
| 378 | typedef struct PVR_TIMER_TYPE | ||
| 379 | { | ||
| 380 | unsigned int iId; | ||
| 381 | uint64_t iAttributes; | ||
| 382 | char strDescription[PVR_ADDON_TIMERTYPE_STRING_LENGTH]; | ||
| 383 | |||
| 384 | unsigned int iPrioritiesSize; | ||
| 385 | struct PVR_ATTRIBUTE_INT_VALUE priorities[PVR_ADDON_TIMERTYPE_VALUES_ARRAY_SIZE]; | ||
| 386 | int iPrioritiesDefault; | ||
| 387 | |||
| 388 | unsigned int iLifetimesSize; | ||
| 389 | struct PVR_ATTRIBUTE_INT_VALUE lifetimes[PVR_ADDON_TIMERTYPE_VALUES_ARRAY_SIZE]; | ||
| 390 | int iLifetimesDefault; | ||
| 391 | |||
| 392 | unsigned int iPreventDuplicateEpisodesSize; | ||
| 393 | struct PVR_ATTRIBUTE_INT_VALUE preventDuplicateEpisodes[PVR_ADDON_TIMERTYPE_VALUES_ARRAY_SIZE]; | ||
| 394 | unsigned int iPreventDuplicateEpisodesDefault; | ||
| 395 | |||
| 396 | unsigned int iRecordingGroupSize; | ||
| 397 | struct PVR_ATTRIBUTE_INT_VALUE recordingGroup[PVR_ADDON_TIMERTYPE_VALUES_ARRAY_SIZE]; | ||
| 398 | unsigned int iRecordingGroupDefault; | ||
| 399 | |||
| 400 | unsigned int iMaxRecordingsSize; | ||
| 401 | struct PVR_ATTRIBUTE_INT_VALUE maxRecordings[PVR_ADDON_TIMERTYPE_VALUES_ARRAY_SIZE_SMALL]; | ||
| 402 | int iMaxRecordingsDefault; | ||
| 403 | } PVR_TIMER_TYPE; | ||
| 404 | |||
| 405 | #ifdef __cplusplus | ||
| 406 | } | ||
| 407 | #endif /* __cplusplus */ | ||
