summaryrefslogtreecommitdiffstats
path: root/xbmc/addons/kodi-addon-dev-kit/include/kodi/c-api
diff options
context:
space:
mode:
Diffstat (limited to 'xbmc/addons/kodi-addon-dev-kit/include/kodi/c-api')
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/c-api/CMakeLists.txt9
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/c-api/addon-instance/CMakeLists.txt6
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/c-api/addon-instance/image_decoder.h78
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/c-api/addon-instance/pvr.h327
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/c-api/addon-instance/pvr/CMakeLists.txt14
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_channel_groups.h54
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_channels.h104
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_defines.h61
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_edl.h62
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_epg.h653
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_general.h288
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_menu_hook.h72
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_recordings.h143
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_stream.h155
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_timers.h407
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/c-api/addon_base.h252
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/c-api/audio_engine.h308
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/c-api/filesystem.h299
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/c-api/general.h123
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/c-api/network.h43
20 files changed, 3458 insertions, 0 deletions
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/c-api/CMakeLists.txt b/xbmc/addons/kodi-addon-dev-kit/include/kodi/c-api/CMakeLists.txt
new file mode 100644
index 0000000..d7b2269
--- /dev/null
+++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/c-api/CMakeLists.txt
@@ -0,0 +1,9 @@
1set(HEADERS addon_base.h
2 audio_engine.h
3 filesystem.h
4 general.h
5 network.h)
6
7if(NOT ENABLE_STATIC_LIBS)
8 core_add_library(addons_kodi-addon-dev-kit_include_kodi_c-api)
9endif()
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 @@
1set(HEADERS image_decoder.h
2 pvr.h)
3
4if(NOT ENABLE_STATIC_LIBS)
5 core_add_library(addons_kodi-addon-dev-kit_include_kodi_c-api_addon-instance)
6endif()
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
14extern "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
29extern "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 @@
1set(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
12if(NOT ENABLE_STATIC_LIBS)
13 core_add_library(addons_kodi-addon-dev-kit_include_kodi_c-api_addon-instance_pvr)
14endif()
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
18extern "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
18extern "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
17extern "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
18extern "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
18extern "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
22extern "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
16extern "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
20extern "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
26extern "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
20extern "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 */
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/c-api/addon_base.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/c-api/addon_base.h
new file mode 100644
index 0000000..1924d77
--- /dev/null
+++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/c-api/addon_base.h
@@ -0,0 +1,252 @@
1/*
2 * Copyright (C) 2005-2019 Team Kodi
3 * This file is part of Kodi - https://kodi.tv
4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
7 */
8
9#pragma once
10
11#include "stdbool.h"
12#include "stdint.h"
13
14#ifndef TARGET_WINDOWS
15#ifndef __cdecl
16#define __cdecl
17#endif
18#ifndef __declspec
19#define __declspec(X)
20#endif
21#endif
22
23#undef ATTRIBUTE_PACKED
24#undef PRAGMA_PACK_BEGIN
25#undef PRAGMA_PACK_END
26
27#if defined(__GNUC__)
28#define ATTRIBUTE_PACKED __attribute__((packed))
29#define PRAGMA_PACK 0
30#define ATTRIBUTE_HIDDEN __attribute__((visibility("hidden")))
31#endif
32
33#if !defined(ATTRIBUTE_PACKED)
34#define ATTRIBUTE_PACKED
35#define PRAGMA_PACK 1
36#endif
37
38#if !defined(ATTRIBUTE_HIDDEN)
39#define ATTRIBUTE_HIDDEN
40#endif
41
42#ifdef _MSC_VER
43#define ATTRIBUTE_FORCEINLINE __forceinline
44#elif defined(__GNUC__)
45#define ATTRIBUTE_FORCEINLINE inline __attribute__((__always_inline__))
46#elif defined(__CLANG__)
47#if __has_attribute(__always_inline__)
48#define ATTRIBUTE_FORCEINLINE inline __attribute__((__always_inline__))
49#else
50#define ATTRIBUTE_FORCEINLINE inline
51#endif
52#else
53#define ATTRIBUTE_FORCEINLINE inline
54#endif
55
56/*
57 * To have a on add-on and kodi itself handled string always on known size!
58 */
59#define ADDON_STANDARD_STRING_LENGTH 1024
60#define ADDON_STANDARD_STRING_LENGTH_SMALL 256
61
62#ifdef __cplusplus
63extern "C"
64{
65#endif /* __cplusplus */
66
67 //============================================================================
68 /// @ingroup cpp_kodi_addon_addonbase
69 /// @brief Return value of functions in @ref cpp_kodi_addon_addonbase "kodi::addon::CAddonBase"
70 /// and associated classes.
71 ///
72 ///@{
73 typedef enum ADDON_STATUS
74 {
75 /// @brief For everything OK and no error
76 ADDON_STATUS_OK,
77
78 /// @brief A needed connection was lost
79 ADDON_STATUS_LOST_CONNECTION,
80
81 /// @brief Addon needs a restart inside Kodi
82 ADDON_STATUS_NEED_RESTART,
83
84 /// @brief Necessary settings are not yet set
85 ADDON_STATUS_NEED_SETTINGS,
86
87 /// @brief Unknown and incomprehensible error
88 ADDON_STATUS_UNKNOWN,
89
90 /// @brief Permanent failure, like failing to resolve methods
91 ADDON_STATUS_PERMANENT_FAILURE,
92
93 /* internal used return error if function becomes not used from child on
94 * addon */
95 ADDON_STATUS_NOT_IMPLEMENTED
96 } ADDON_STATUS;
97 ///@}
98 //----------------------------------------------------------------------------
99
100 //============================================================================
101 /// @defgroup cpp_kodi_Defs_AddonLog enum AddonLog
102 /// @ingroup cpp_kodi_Defs
103 /// @brief **Log file type definitions**\n
104 /// These define the types of log entries given with @ref kodi::Log() to Kodi.
105 ///
106 /// -------------------------------------------------------------------------
107 ///
108 /// **Example:**
109 /// ~~~~~~~~~~~~~{.cpp}
110 /// #include <kodi/General.h>
111 ///
112 /// kodi::Log(ADDON_LOG_ERROR, "%s: There is an error occurred!", __func__);
113 ///
114 /// ~~~~~~~~~~~~~
115 ///
116 ///@{
117 typedef enum AddonLog
118 {
119 /// @brief **0** : To include debug information in the log file.
120 ADDON_LOG_DEBUG = 0,
121
122 /// @brief **1** : To include information messages in the log file.
123 ADDON_LOG_INFO = 1,
124
125 /// @brief **2** : To write warnings in the log file.
126 ADDON_LOG_WARNING = 2,
127
128 /// @brief **3** : To report error messages in the log file.
129 ADDON_LOG_ERROR = 3,
130
131 /// @brief **4** : To notify fatal unrecoverable errors, which can may also indicate
132 /// upcoming crashes.
133 ADDON_LOG_FATAL = 4
134 } AddonLog;
135 ///@}
136 //----------------------------------------------------------------------------
137
138 /*! @brief Standard undefined pointer handle */
139 typedef void* KODI_HANDLE;
140
141 /*!
142 * @brief Handle used to return data from the PVR add-on to CPVRClient
143 */
144 struct ADDON_HANDLE_STRUCT
145 {
146 void* callerAddress; /*!< address of the caller */
147 void* dataAddress; /*!< address to store data in */
148 int dataIdentifier; /*!< parameter to pass back when calling the callback */
149 };
150 typedef struct ADDON_HANDLE_STRUCT* ADDON_HANDLE;
151
152 /*!
153 * @brief Callback function tables from addon to Kodi
154 * Set complete from Kodi!
155 */
156 struct AddonToKodiFuncTable_kodi;
157 struct AddonToKodiFuncTable_kodi_audioengine;
158 struct AddonToKodiFuncTable_kodi_filesystem;
159 struct AddonToKodiFuncTable_kodi_network;
160 struct AddonToKodiFuncTable_kodi_gui;
161 typedef struct AddonToKodiFuncTable_Addon
162 {
163 // Pointer inside Kodi, used on callback functions to give related handle
164 // class, for this ADDON::CAddonDll inside Kodi.
165 KODI_HANDLE kodiBase;
166
167 // Function addresses used for callbacks from addon to Kodi
168 char* (*get_type_version)(void* kodiBase, int type);
169
170 void (*free_string)(void* kodiBase, char* str);
171 void (*free_string_array)(void* kodiBase, char** arr, int numElements);
172 char* (*get_addon_path)(void* kodiBase);
173 char* (*get_base_user_path)(void* kodiBase);
174 void (*addon_log_msg)(void* kodiBase, const int loglevel, const char* msg);
175
176 bool (*get_setting_bool)(void* kodiBase, const char* id, bool* value);
177 bool (*get_setting_int)(void* kodiBase, const char* id, int* value);
178 bool (*get_setting_float)(void* kodiBase, const char* id, float* value);
179 bool (*get_setting_string)(void* kodiBase, const char* id, char** value);
180
181 bool (*set_setting_bool)(void* kodiBase, const char* id, bool value);
182 bool (*set_setting_int)(void* kodiBase, const char* id, int value);
183 bool (*set_setting_float)(void* kodiBase, const char* id, float value);
184 bool (*set_setting_string)(void* kodiBase, const char* id, const char* value);
185
186 void* (*get_interface)(void* kodiBase, const char* name, const char* version);
187
188 struct AddonToKodiFuncTable_kodi* kodi;
189 struct AddonToKodiFuncTable_kodi_audioengine* kodi_audioengine;
190 struct AddonToKodiFuncTable_kodi_filesystem* kodi_filesystem;
191 struct AddonToKodiFuncTable_kodi_gui* kodi_gui;
192 struct AddonToKodiFuncTable_kodi_network* kodi_network;
193
194 // Move up by min version change about
195 bool (*is_setting_using_default)(void* kodiBase, const char* id);
196 } AddonToKodiFuncTable_Addon;
197
198 /*!
199 * @brief Function tables from Kodi to addon
200 */
201 typedef struct KodiToAddonFuncTable_Addon
202 {
203 void (*destroy)();
204 ADDON_STATUS (*get_status)();
205 ADDON_STATUS(*create_instance)
206 (int instanceType,
207 const char* instanceID,
208 KODI_HANDLE instance,
209 const char* version,
210 KODI_HANDLE* addonInstance,
211 KODI_HANDLE parent);
212 void (*destroy_instance)(int instanceType, KODI_HANDLE instance);
213 ADDON_STATUS (*set_setting)(const char* settingName, const void* settingValue);
214 } KodiToAddonFuncTable_Addon;
215
216 /*!
217 * @brief Main structure passed from kodi to addon with basic information needed to
218 * create add-on.
219 */
220 typedef struct AddonGlobalInterface
221 {
222 // String with full path where add-on is installed (without his name on end)
223 // Set from Kodi!
224 const char* libBasePath;
225
226 // Master API version of Kodi itself (ADDON_GLOBAL_VERSION_MAIN)
227 const char* kodi_base_api_version;
228
229 // Pointer of first created instance, used in case this add-on goes with single way
230 // Set from Kodi!
231 KODI_HANDLE firstKodiInstance;
232
233 // Pointer to master base class inside add-on
234 // Set from addon header (kodi::addon::CAddonBase)!
235 KODI_HANDLE addonBase;
236
237 // Pointer to a instance used on single way (together with this class)
238 // Set from addon header (kodi::addon::IAddonInstance)!
239 KODI_HANDLE globalSingleInstance;
240
241 // Callback function tables from addon to Kodi
242 // Set from Kodi!
243 AddonToKodiFuncTable_Addon* toKodi;
244
245 // Function tables from Kodi to addon
246 // Set from addon header!
247 KodiToAddonFuncTable_Addon* toAddon;
248 } AddonGlobalInterface;
249
250#ifdef __cplusplus
251}
252#endif /* __cplusplus */
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/c-api/audio_engine.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/c-api/audio_engine.h
new file mode 100644
index 0000000..02e96ac
--- /dev/null
+++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/c-api/audio_engine.h
@@ -0,0 +1,308 @@
1/*
2 * Copyright (C) 2005-2019 Team Kodi
3 * This file is part of Kodi - https://kodi.tv
4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
7 */
8
9#pragma once
10
11#include "stdint.h"
12
13#ifdef __cplusplus
14extern "C"
15{
16#endif /* __cplusplus */
17
18 //¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
19 // "C" Definitions, structures and enumerators of audio engine
20 //{{{
21
22 //============================================================================
23 /// @defgroup cpp_kodi_audioengine_Defs_AudioEngineStreamOptions enum AudioEngineStreamOptions
24 /// @ingroup cpp_kodi_audioengine_Defs
25 /// @brief **Bit options to pass to CAEStream**\n
26 /// A bit field of stream options.
27 ///
28 ///
29 /// ------------------------------------------------------------------------
30 ///
31 /// **Usage example:**
32 /// ~~~~~~~~~~~~~{.cpp}
33 /// // Here only as minimal, "format" must be set to wanted types
34 /// kodi::audioengine::AudioEngineFormat format;
35 /// m_audioengine = new kodi::audioengine::CAEStream(format, AUDIO_STREAM_FORCE_RESAMPLE | AUDIO_STREAM_AUTOSTART);
36 /// ~~~~~~~~~~~~~
37 ///
38 //@{
39 typedef enum AudioEngineStreamOptions
40 {
41 /// force resample even if rates match
42 AUDIO_STREAM_FORCE_RESAMPLE = 1 << 0,
43 /// create the stream paused
44 AUDIO_STREAM_PAUSED = 1 << 1,
45 /// autostart the stream when enough data is buffered
46 AUDIO_STREAM_AUTOSTART = 1 << 2,
47 } AudioEngineStreamOptions;
48 //@}
49 //----------------------------------------------------------------------------
50
51 //============================================================================
52 /// @defgroup cpp_kodi_audioengine_Defs_AudioEngineChannel enum AudioEngineChannel
53 /// @ingroup cpp_kodi_audioengine_Defs
54 /// @brief **The possible channels**\n
55 /// Used to set available or used channels on stream.
56 ///
57 ///
58 /// ------------------------------------------------------------------------
59 ///
60 /// **Usage example:**
61 /// ~~~~~~~~~~~~~{.cpp}
62 /// kodi::audioengine::AudioEngineFormat format;
63 /// format.SetChannelLayout(std::vector<AudioEngineChannel>(AUDIOENGINE_CH_FL, AUDIOENGINE_CH_FR));
64 /// ~~~~~~~~~~~~~
65 ///
66 //@{
67 enum AudioEngineChannel
68 {
69 /// Used inside to indicate the end of a list and not for addon use directly.
70 AUDIOENGINE_CH_NULL = -1,
71 /// RAW Audio format
72 AUDIOENGINE_CH_RAW,
73 /// Front left
74 AUDIOENGINE_CH_FL,
75 /// Front right
76 AUDIOENGINE_CH_FR,
77 /// Front center
78 AUDIOENGINE_CH_FC,
79 /// LFE / Subwoofer
80 AUDIOENGINE_CH_LFE,
81 /// Back left
82 AUDIOENGINE_CH_BL,
83 /// Back right
84 AUDIOENGINE_CH_BR,
85 /// Front left over center
86 AUDIOENGINE_CH_FLOC,
87 /// Front right over center
88 AUDIOENGINE_CH_FROC,
89 /// Back center
90 AUDIOENGINE_CH_BC,
91 /// Side left
92 AUDIOENGINE_CH_SL,
93 /// Side right
94 AUDIOENGINE_CH_SR,
95 /// Top front left
96 AUDIOENGINE_CH_TFL,
97 /// Top front right
98 AUDIOENGINE_CH_TFR,
99 /// Top front center
100 AUDIOENGINE_CH_TFC,
101 /// Top center
102 AUDIOENGINE_CH_TC,
103 /// Top back left
104 AUDIOENGINE_CH_TBL,
105 /// Top back right
106 AUDIOENGINE_CH_TBR,
107 /// Top back center
108 AUDIOENGINE_CH_TBC,
109 /// Back left over center
110 AUDIOENGINE_CH_BLOC,
111 /// Back right over center
112 AUDIOENGINE_CH_BROC,
113 /// Maximum possible value, to use e.g. as size inside list
114 AUDIOENGINE_CH_MAX
115 };
116 //@}
117 //----------------------------------------------------------------------------
118
119 //============================================================================
120 /// @defgroup cpp_kodi_audioengine_Defs_AudioEngineDataFormat enum AudioEngineDataFormat
121 /// @ingroup cpp_kodi_audioengine_Defs
122 /// @brief **Audio sample formats**\n
123 /// The bit layout of the audio data.
124 ///
125 /// LE = Little Endian, BE = Big Endian, NE = Native Endian
126 ///
127 /// For planar sample formats, each audio channel is in a separate data plane,
128 /// and linesize is the buffer size, in bytes, for a single plane. All data
129 /// planes must be the same size. For packed sample formats, only the first
130 /// data plane is used, and samples for each channel are interleaved. In this
131 /// case, linesize is the buffer size, in bytes, for the 1 plane.
132 ///
133 /// @note This is ordered from the worst to best preferred formats
134 ///
135 ///
136 /// ------------------------------------------------------------------------
137 ///
138 /// **Usage example:**
139 /// ~~~~~~~~~~~~~{.cpp}
140 /// kodi::audioengine::AudioEngineFormat format;
141 /// format.SetDataFormat(AUDIOENGINE_FMT_FLOATP);
142 /// ~~~~~~~~~~~~~
143 ///
144 //@{
145 enum AudioEngineDataFormat
146 {
147 /// To define format as invalid
148 AUDIOENGINE_FMT_INVALID = -1,
149
150 /// Unsigned integer 8 bit
151 AUDIOENGINE_FMT_U8,
152
153 /// Big Endian signed integer 16 bit
154 AUDIOENGINE_FMT_S16BE,
155 /// Little Endian signed integer 16 bit
156 AUDIOENGINE_FMT_S16LE,
157 /// Native Endian signed integer 16 bit
158 AUDIOENGINE_FMT_S16NE,
159
160 /// Big Endian signed integer 32 bit
161 AUDIOENGINE_FMT_S32BE,
162 /// Little Endian signed integer 32 bit
163 AUDIOENGINE_FMT_S32LE,
164 /// Native Endian signed integer 32 bit
165 AUDIOENGINE_FMT_S32NE,
166
167 /// Big Endian signed integer 24 bit (in 4 bytes)
168 AUDIOENGINE_FMT_S24BE4,
169 /// Little Endian signed integer 24 bit (in 4 bytes)
170 AUDIOENGINE_FMT_S24LE4,
171 /// Native Endian signed integer 24 bit (in 4 bytes)
172 AUDIOENGINE_FMT_S24NE4,
173 /// S32 with bits_per_sample < 32
174 AUDIOENGINE_FMT_S24NE4MSB,
175
176 /// Big Endian signed integer 24 bit (3 bytes)
177 AUDIOENGINE_FMT_S24BE3,
178 /// Little Endian signed integer 24 bit (3 bytes)
179 AUDIOENGINE_FMT_S24LE3,
180 /// Native Endian signed integer 24 bit (3 bytes)
181 AUDIOENGINE_FMT_S24NE3,
182
183 /// Double floating point
184 AUDIOENGINE_FMT_DOUBLE,
185 /// Floating point
186 AUDIOENGINE_FMT_FLOAT,
187
188 /// **Bitstream**\n
189 /// RAW Audio format
190 AUDIOENGINE_FMT_RAW,
191
192 /// **Planar format**\n
193 /// Unsigned byte
194 AUDIOENGINE_FMT_U8P,
195 /// **Planar format**\n
196 /// Native Endian signed 16 bit
197 AUDIOENGINE_FMT_S16NEP,
198 /// **Planar format**\n
199 /// Native Endian signed 32 bit
200 AUDIOENGINE_FMT_S32NEP,
201 /// **Planar format**\n
202 /// Native Endian signed integer 24 bit (in 4 bytes)
203 AUDIOENGINE_FMT_S24NE4P,
204 /// **Planar format**\n
205 /// S32 with bits_per_sample < 32
206 AUDIOENGINE_FMT_S24NE4MSBP,
207 /// **Planar format**\n
208 /// Native Endian signed integer 24 bit (in 3 bytes)
209 AUDIOENGINE_FMT_S24NE3P,
210 /// **Planar format**\n
211 /// Double floating point
212 AUDIOENGINE_FMT_DOUBLEP,
213 /// **Planar format**\n
214 /// Floating point
215 AUDIOENGINE_FMT_FLOATP,
216
217 /// Amount of sample formats.
218 AUDIOENGINE_FMT_MAX
219 };
220 //@}
221 //----------------------------------------------------------------------------
222
223 /*!
224 * @brief Internal API structure which are used for data exchange between
225 * Kodi and addon.
226 */
227 struct AUDIO_ENGINE_FORMAT
228 {
229 /*! The stream's data format (eg, AUDIOENGINE_FMT_S16LE) */
230 enum AudioEngineDataFormat m_dataFormat;
231
232 /*! The stream's sample rate (eg, 48000) */
233 unsigned int m_sampleRate;
234
235 /*! The encoded streams sample rate if a bitstream, otherwise undefined */
236 unsigned int m_encodedRate;
237
238 /*! The amount of used speaker channels */
239 unsigned int m_channelCount;
240
241 /*! The stream's channel layout */
242 enum AudioEngineChannel m_channels[AUDIOENGINE_CH_MAX];
243
244 /*! The number of frames per period */
245 unsigned int m_frames;
246
247 /*! The size of one frame in bytes */
248 unsigned int m_frameSize;
249 };
250
251 /* A stream handle pointer, which is only used internally by the addon stream handle */
252 typedef void AEStreamHandle;
253
254 //}}}
255
256 //¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
257 // "C" Internal interface tables for intercommunications between addon and kodi
258 //{{{
259
260 /*
261 * Function address structure, not need to visible on dev kit doxygen
262 * documentation
263 */
264 typedef struct AddonToKodiFuncTable_kodi_audioengine
265 {
266 AEStreamHandle* (*make_stream)(void* kodiBase,
267 struct AUDIO_ENGINE_FORMAT* format,
268 unsigned int options);
269 void (*free_stream)(void* kodiBase, AEStreamHandle* stream);
270 bool (*get_current_sink_format)(void* kodiBase, struct AUDIO_ENGINE_FORMAT* sink_format);
271
272 // Audio Engine Stream definitions
273 unsigned int (*aestream_get_space)(void* kodiBase, AEStreamHandle* handle);
274 unsigned int (*aestream_add_data)(void* kodiBase,
275 AEStreamHandle* handle,
276 uint8_t* const* data,
277 unsigned int offset,
278 unsigned int frames,
279 double pts,
280 bool hasDownmix,
281 double centerMixLevel);
282 double (*aestream_get_delay)(void* kodiBase, AEStreamHandle* handle);
283 bool (*aestream_is_buffering)(void* kodiBase, AEStreamHandle* handle);
284 double (*aestream_get_cache_time)(void* kodiBase, AEStreamHandle* handle);
285 double (*aestream_get_cache_total)(void* kodiBase, AEStreamHandle* handle);
286 void (*aestream_pause)(void* kodiBase, AEStreamHandle* handle);
287 void (*aestream_resume)(void* kodiBase, AEStreamHandle* handle);
288 void (*aestream_drain)(void* kodiBase, AEStreamHandle* handle, bool wait);
289 bool (*aestream_is_draining)(void* kodiBase, AEStreamHandle* handle);
290 bool (*aestream_is_drained)(void* kodiBase, AEStreamHandle* handle);
291 void (*aestream_flush)(void* kodiBase, AEStreamHandle* handle);
292 float (*aestream_get_volume)(void* kodiBase, AEStreamHandle* handle);
293 void (*aestream_set_volume)(void* kodiBase, AEStreamHandle* handle, float volume);
294 float (*aestream_get_amplification)(void* kodiBase, AEStreamHandle* handle);
295 void (*aestream_set_amplification)(void* kodiBase, AEStreamHandle* handle, float amplify);
296 unsigned int (*aestream_get_frame_size)(void* kodiBase, AEStreamHandle* handle);
297 unsigned int (*aestream_get_channel_count)(void* kodiBase, AEStreamHandle* handle);
298 unsigned int (*aestream_get_sample_rate)(void* kodiBase, AEStreamHandle* handle);
299 enum AudioEngineDataFormat (*aestream_get_data_format)(void* kodiBase, AEStreamHandle* handle);
300 double (*aestream_get_resample_ratio)(void* kodiBase, AEStreamHandle* handle);
301 void (*aestream_set_resample_ratio)(void* kodiBase, AEStreamHandle* handle, double ratio);
302 } AddonToKodiFuncTable_kodi_audioengine;
303
304 //}}}
305
306#ifdef __cplusplus
307}
308#endif /* __cplusplus */
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/c-api/filesystem.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/c-api/filesystem.h
new file mode 100644
index 0000000..b68a24c
--- /dev/null
+++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/c-api/filesystem.h
@@ -0,0 +1,299 @@
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 <stdbool.h>
12#include <stdint.h>
13#include <time.h>
14
15#ifdef _WIN32 // windows
16#ifndef _SSIZE_T_DEFINED
17typedef intptr_t ssize_t;
18#define _SSIZE_T_DEFINED
19#endif // !_SSIZE_T_DEFINED
20
21// Prevent conflicts with Windows macros where have this names.
22#ifdef CreateDirectory
23#undef CreateDirectory
24#endif // CreateDirectory
25#ifdef DeleteFile
26#undef DeleteFile
27#endif // DeleteFile
28#endif // _WIN32
29
30#ifdef __cplusplus
31extern "C"
32{
33#endif /* __cplusplus */
34
35 //¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
36 // "C" Definitions, structures and enumerators of filesystem
37 //{{{
38
39 //============================================================================
40 /// @defgroup cpp_kodi_vfs_Defs_OpenFileFlags enum OpenFileFlags
41 /// @ingroup cpp_kodi_vfs_Defs
42 /// @brief **Flags to define way how file becomes opened**\n
43 /// The values can be used together, e.g. <b>`file.Open("myfile", ADDON_READ_TRUNCATED | ADDON_READ_CHUNKED);`</b>
44 ///
45 /// Used on @ref kodi::vfs::CFile::OpenFile().
46 ///
47 ///@{
48 typedef enum OpenFileFlags
49 {
50 /// @brief **0000 0000 0001** :\n
51 /// Indicate that caller can handle truncated reads, where function
52 /// returns before entire buffer has been filled.
53 ADDON_READ_TRUNCATED = 0x01,
54
55 /// @brief **0000 0000 0010** :\n
56 /// Indicate that that caller support read in the minimum defined
57 /// chunk size, this disables internal cache then.
58 ADDON_READ_CHUNKED = 0x02,
59
60 /// @brief **0000 0000 0100** :\n
61 /// Use cache to access this file.
62 ADDON_READ_CACHED = 0x04,
63
64 /// @brief **0000 0000 1000** :\n
65 /// Open without caching. regardless to file type.
66 ADDON_READ_NO_CACHE = 0x08,
67
68 /// @brief **0000 0001 0000** :\n
69 /// Calcuate bitrate for file while reading.
70 ADDON_READ_BITRATE = 0x10,
71
72 /// @brief **0000 0010 0000** :\n
73 /// Indicate to the caller we will seek between multiple streams in
74 /// the file frequently.
75 ADDON_READ_MULTI_STREAM = 0x20,
76
77 /// @brief **0000 0100 0000** :\n
78 /// indicate to the caller file is audio and/or video (and e.g. may
79 /// grow).
80 ADDON_READ_AUDIO_VIDEO = 0x40,
81
82 /// @brief **0000 1000 0000** :\n
83 /// Indicate that caller will do write operations before reading.
84 ADDON_READ_AFTER_WRITE = 0x80,
85
86 /// @brief **0001 0000 0000** :\n
87 /// Indicate that caller want to reopen a file if its already open.
88 ADDON_READ_REOPEN = 0x100
89 } OpenFileFlags;
90 ///@}
91 //----------------------------------------------------------------------------
92
93 //============================================================================
94 /// @defgroup cpp_kodi_vfs_Defs_CURLOptiontype enum CURLOptiontype
95 /// @ingroup cpp_kodi_vfs_Defs
96 /// @brief **CURL message types**\n
97 /// Used on kodi::vfs::CFile::CURLAddOption().
98 ///
99 //@{
100 typedef enum CURLOptiontype
101 {
102 /// @brief Set a general option.
103 ADDON_CURL_OPTION_OPTION,
104
105 /// @brief Set a protocol option.
106 ///
107 /// The following names for *ADDON_CURL_OPTION_PROTOCOL* are possible:
108 ///
109 /// | Option name | Description
110 /// |------------------------------------:|:--------------------------------
111 /// | <b>`accept-charset`</b> | Set the "accept-charset" header
112 /// | <b>`acceptencoding or encoding`</b> | Set the "accept-encoding" header
113 /// | <b>`active-remote`</b> | Set the "active-remote" header
114 /// | <b>`auth`</b> | Set the authentication method. Possible values: any, anysafe, digest, ntlm
115 /// | <b>`connection-timeout`</b> | Set the connection timeout in seconds
116 /// | <b>`cookie`</b> | Set the "cookie" header
117 /// | <b>`customrequest`</b> | Set a custom HTTP request like DELETE
118 /// | <b>`noshout`</b> | Set to true if kodi detects a stream as shoutcast by mistake.
119 /// | <b>`postdata`</b> | Set the post body (value needs to be base64 encoded). (Implicitly sets the request to POST)
120 /// | <b>`referer`</b> | Set the "referer" header
121 /// | <b>`user-agent`</b> | Set the "user-agent" header
122 /// | <b>`seekable`</b> | Set the stream seekable. 1: enable, 0: disable
123 /// | <b>`sslcipherlist`</b> | Set list of accepted SSL ciphers.
124 ///
125 ADDON_CURL_OPTION_PROTOCOL,
126
127 /// @brief Set User and password
128 ADDON_CURL_OPTION_CREDENTIALS,
129
130 /// @brief Add a Header
131 ADDON_CURL_OPTION_HEADER
132 } CURLOptiontype;
133 //@}
134 //----------------------------------------------------------------------------
135
136 //============================================================================
137 /// @defgroup cpp_kodi_vfs_Defs_FilePropertyTypes enum FilePropertyTypes
138 /// @ingroup cpp_kodi_vfs_Defs
139 /// @brief **File property types**\n
140 /// Mostly to read internet sources.
141 ///
142 /// Used on kodi::vfs::CFile::GetPropertyValue() and kodi::vfs::CFile::GetPropertyValues().
143 ///
144 //@{
145 typedef enum FilePropertyTypes
146 {
147 /// @brief Get protocol response line.
148 ADDON_FILE_PROPERTY_RESPONSE_PROTOCOL,
149 /// @brief Get a response header.
150 ADDON_FILE_PROPERTY_RESPONSE_HEADER,
151 /// @brief Get file content type.
152 ADDON_FILE_PROPERTY_CONTENT_TYPE,
153 /// @brief Get file content charset.
154 ADDON_FILE_PROPERTY_CONTENT_CHARSET,
155 /// @brief Get file mime type.
156 ADDON_FILE_PROPERTY_MIME_TYPE,
157 /// @brief Get file effective URL (last one if redirected).
158 ADDON_FILE_PROPERTY_EFFECTIVE_URL
159 } FilePropertyTypes;
160 //@}
161 //----------------------------------------------------------------------------
162
163 //}}}
164
165 //¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
166 // "C" Internal interface tables for intercommunications between addon and kodi
167 //{{{
168
169 struct KODI_HTTP_HEADER
170 {
171 void* handle;
172
173 char* (*get_value)(void* kodiBase, void* handle, const char* param);
174 char** (*get_values)(void* kodiBase, void* handle, const char* param, int* length);
175 char* (*get_header)(void* kodiBase, void* handle);
176 char* (*get_mime_type)(void* kodiBase, void* handle);
177 char* (*get_charset)(void* kodiBase, void* handle);
178 char* (*get_proto_line)(void* kodiBase, void* handle);
179 };
180
181 struct STAT_STRUCTURE
182 {
183 /// ID of device containing file
184 uint32_t deviceId;
185 /// Total size, in bytes
186 uint64_t size;
187 /// Time of last access
188 time_t accessTime;
189 /// Time of last modification
190 time_t modificationTime;
191 /// Time of last status change
192 time_t statusTime;
193 /// The stat url is a directory
194 bool isDirectory;
195 /// The stat url is a symbolic link
196 bool isSymLink;
197 };
198
199 struct VFS_CACHE_STATUS_DATA
200 {
201 uint64_t forward;
202 unsigned int maxrate;
203 unsigned int currate;
204 bool lowspeed;
205 };
206
207 struct VFSProperty
208 {
209 char* name;
210 char* val;
211 };
212
213 struct VFSDirEntry
214 {
215 char* label; //!< item label
216 char* title; //!< item title
217 char* path; //!< item path
218 unsigned int num_props; //!< Number of properties attached to item
219 struct VFSProperty* properties; //!< Properties
220 time_t date_time; //!< file creation date & time
221 bool folder; //!< Item is a folder
222 uint64_t size; //!< Size of file represented by item
223 };
224
225 typedef struct AddonToKodiFuncTable_kodi_filesystem
226 {
227 bool (*can_open_directory)(void* kodiBase, const char* url);
228 bool (*create_directory)(void* kodiBase, const char* path);
229 bool (*remove_directory)(void* kodiBase, const char* path);
230 bool (*directory_exists)(void* kodiBase, const char* path);
231 bool (*get_directory)(void* kodiBase,
232 const char* path,
233 const char* mask,
234 struct VFSDirEntry** items,
235 unsigned int* num_items);
236 void (*free_directory)(void* kodiBase, struct VFSDirEntry* items, unsigned int num_items);
237
238 bool (*file_exists)(void* kodiBase, const char* filename, bool useCache);
239 bool (*stat_file)(void* kodiBase, const char* filename, struct STAT_STRUCTURE* buffer);
240 bool (*delete_file)(void* kodiBase, const char* filename);
241 bool (*rename_file)(void* kodiBase, const char* filename, const char* newFileName);
242 bool (*copy_file)(void* kodiBase, const char* filename, const char* dest);
243
244 char* (*get_file_md5)(void* kodiBase, const char* filename);
245 char* (*get_cache_thumb_name)(void* kodiBase, const char* filename);
246 char* (*make_legal_filename)(void* kodiBase, const char* filename);
247 char* (*make_legal_path)(void* kodiBase, const char* path);
248 char* (*translate_special_protocol)(void* kodiBase, const char* strSource);
249 bool (*is_internet_stream)(void* kodiBase, const char* path, bool strictCheck);
250 bool (*is_on_lan)(void* kodiBase, const char* path);
251 bool (*is_remote)(void* kodiBase, const char* path);
252 bool (*is_local)(void* kodiBase, const char* path);
253 bool (*is_url)(void* kodiBase, const char* path);
254 bool (*get_http_header)(void* kodiBase, const char* url, struct KODI_HTTP_HEADER* headers);
255 bool (*get_mime_type)(void* kodiBase, const char* url, char** content, const char* useragent);
256 bool (*get_content_type)(void* kodiBase,
257 const char* url,
258 char** content,
259 const char* useragent);
260 bool (*get_cookies)(void* kodiBase, const char* url, char** cookies);
261 bool (*http_header_create)(void* kodiBase, struct KODI_HTTP_HEADER* headers);
262 void (*http_header_free)(void* kodiBase, struct KODI_HTTP_HEADER* headers);
263
264 void* (*open_file)(void* kodiBase, const char* filename, unsigned int flags);
265 void* (*open_file_for_write)(void* kodiBase, const char* filename, bool overwrite);
266 ssize_t (*read_file)(void* kodiBase, void* file, void* ptr, size_t size);
267 bool (*read_file_string)(void* kodiBase, void* file, char* szLine, int iLineLength);
268 ssize_t (*write_file)(void* kodiBase, void* file, const void* ptr, size_t size);
269 void (*flush_file)(void* kodiBase, void* file);
270 int64_t (*seek_file)(void* kodiBase, void* file, int64_t position, int whence);
271 int (*truncate_file)(void* kodiBase, void* file, int64_t size);
272 int64_t (*get_file_position)(void* kodiBase, void* file);
273 int64_t (*get_file_length)(void* kodiBase, void* file);
274 double (*get_file_download_speed)(void* kodiBase, void* file);
275 void (*close_file)(void* kodiBase, void* file);
276 int (*get_file_chunk_size)(void* kodiBase, void* file);
277 bool (*io_control_get_seek_possible)(void* kodiBase, void* file);
278 bool (*io_control_get_cache_status)(void* kodiBase,
279 void* file,
280 struct VFS_CACHE_STATUS_DATA* status);
281 bool (*io_control_set_cache_rate)(void* kodiBase, void* file, unsigned int rate);
282 bool (*io_control_set_retry)(void* kodiBase, void* file, bool retry);
283 char** (*get_property_values)(
284 void* kodiBase, void* file, int type, const char* name, int* numValues);
285
286 void* (*curl_create)(void* kodiBase, const char* url);
287 bool (*curl_add_option)(
288 void* kodiBase, void* file, int type, const char* name, const char* value);
289 bool (*curl_open)(void* kodiBase, void* file, unsigned int flags);
290
291 bool (*get_disk_space)(
292 void* kodiBase, const char* path, uint64_t* capacity, uint64_t* free, uint64_t* available);
293 } AddonToKodiFuncTable_kodi_filesystem;
294
295 //}}}
296
297#ifdef __cplusplus
298} /* extern "C" */
299#endif /* __cplusplus */
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/c-api/general.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/c-api/general.h
new file mode 100644
index 0000000..ede8e94
--- /dev/null
+++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/c-api/general.h
@@ -0,0 +1,123 @@
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#ifdef __cplusplus
12extern "C"
13{
14#endif /* __cplusplus */
15
16 //============================================================================
17 /// \ingroup cpp_kodi_Defs
18 /// @brief For kodi::CurrentKeyboardLayout used defines
19 ///
20 typedef enum StdKbButtons
21 {
22 /// The quantity of buttons per row on Kodi's standard keyboard
23 STD_KB_BUTTONS_PER_ROW = 20,
24 /// The quantity of rows on Kodi's standard keyboard
25 STD_KB_BUTTONS_MAX_ROWS = 4,
26 /// Keyboard layout type, this for initial standard
27 STD_KB_MODIFIER_KEY_NONE = 0x00,
28 /// Keyboard layout type, this for shift controled layout (uppercase)
29 STD_KB_MODIFIER_KEY_SHIFT = 0x01,
30 /// Keyboard layout type, this to show symbols
31 STD_KB_MODIFIER_KEY_SYMBOL = 0x02
32 } StdKbButtons;
33 //----------------------------------------------------------------------------
34
35 //============================================================================
36 /// \ingroup cpp_kodi_Defs
37 /// @brief For kodi::QueueNotification() used message types
38 ///
39 typedef enum QueueMsg
40 {
41 /// Show info notification message
42 QUEUE_INFO,
43 /// Show warning notification message
44 QUEUE_WARNING,
45 /// Show error notification message
46 QUEUE_ERROR,
47 /// Show with own given image and parts if set on values
48 QUEUE_OWN_STYLE
49 } QueueMsg;
50 //----------------------------------------------------------------------------
51
52 //============================================================================
53 /// \ingroup cpp_kodi_Defs
54 /// @brief Format codes to get string from them.
55 ///
56 /// Used on kodi::GetLanguage().
57 ///
58 typedef enum LangFormats
59 {
60 /// two letter code as defined in ISO 639-1
61 LANG_FMT_ISO_639_1,
62 /// three letter code as defined in ISO 639-2/T or ISO 639-2/B
63 LANG_FMT_ISO_639_2,
64 /// full language name in English
65 LANG_FMT_ENGLISH_NAME
66 } LangFormats;
67 //----------------------------------------------------------------------------
68
69 /*
70 * For interface between add-on and kodi.
71 *
72 * This structure defines the addresses of functions stored inside Kodi which
73 * are then available for the add-on to call
74 *
75 * All function pointers there are used by the C++ interface functions below.
76 * You find the set of them on xbmc/addons/interfaces/General.cpp
77 *
78 * Note: For add-on development itself this is not needed
79 */
80 typedef struct AddonKeyboardKeyTable
81 {
82 char* keys[STD_KB_BUTTONS_MAX_ROWS][STD_KB_BUTTONS_PER_ROW];
83 } AddonKeyboardKeyTable;
84 typedef struct AddonToKodiFuncTable_kodi
85 {
86 char* (*get_addon_info)(void* kodiBase, const char* id);
87 bool (*open_settings_dialog)(void* kodiBase);
88 char* (*unknown_to_utf8)(void* kodiBase, const char* source, bool* ret, bool failOnBadChar);
89 char* (*get_localized_string)(void* kodiBase, long label_id);
90 char* (*get_language)(void* kodiBase, int format, bool region);
91 bool (*queue_notification)(void* kodiBase,
92 int type,
93 const char* header,
94 const char* message,
95 const char* imageFile,
96 unsigned int displayTime,
97 bool withSound,
98 unsigned int messageTime);
99 void (*get_md5)(void* kodiBase, const char* text, char* md5);
100 char* (*get_temp_path)(void* kodiBase);
101 char* (*get_region)(void* kodiBase, const char* id);
102 void (*get_free_mem)(void* kodiBase, long* free, long* total, bool as_bytes);
103 int (*get_global_idle_time)(void* kodiBase);
104 bool (*is_addon_avilable)(void* kodiBase, const char* id, char** version, bool* enabled);
105 void (*kodi_version)(void* kodiBase,
106 char** compile_name,
107 int* major,
108 int* minor,
109 char** revision,
110 char** tag,
111 char** tagversion);
112 char* (*get_current_skin_id)(void* kodiBase);
113 bool (*get_keyboard_layout)(void* kodiBase,
114 char** layout_name,
115 int modifier_key,
116 struct AddonKeyboardKeyTable* layout);
117 bool (*change_keyboard_layout)(void* kodiBase, char** layout_name);
118 } AddonToKodiFuncTable_kodi;
119
120
121#ifdef __cplusplus
122} /* extern "C" */
123#endif /* __cplusplus */
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/c-api/network.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/c-api/network.h
new file mode 100644
index 0000000..6c0441f
--- /dev/null
+++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/c-api/network.h
@@ -0,0 +1,43 @@
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 <stddef.h>
12
13#ifdef __cplusplus
14extern "C"
15{
16#endif /* __cplusplus */
17
18 /*
19 * For interface between add-on and kodi.
20 *
21 * This structure defines the addresses of functions stored inside Kodi which
22 * are then available for the add-on to call
23 *
24 * All function pointers there are used by the C++ interface functions below.
25 * You find the set of them on xbmc/addons/interfaces/General.cpp
26 *
27 * Note: For add-on development itself this is not needed
28 */
29 typedef struct AddonToKodiFuncTable_kodi_network
30 {
31 bool (*wake_on_lan)(void* kodiBase, const char* mac);
32 char* (*get_ip_address)(void* kodiBase);
33 char* (*dns_lookup)(void* kodiBase, const char* url, bool* ret);
34 char* (*url_encode)(void* kodiBase, const char* url);
35 char* (*get_hostname)(void* kodiBase);
36 bool (*is_local_host)(void* kodiBase, const char* hostname);
37 bool (*is_host_on_lan)(void* kodiBase, const char* hostname, bool offLineCheck);
38 char* (*get_user_agent)(void* kodiBase);
39 } AddonToKodiFuncTable_kodi_network;
40
41#ifdef __cplusplus
42} /* extern "C" */
43#endif /* __cplusplus */