summaryrefslogtreecommitdiffstats
path: root/xbmc/addons/kodi-addon-dev-kit/include
diff options
context:
space:
mode:
Diffstat (limited to 'xbmc/addons/kodi-addon-dev-kit/include')
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/AudioEngine.h145
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/Filesystem.h81
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/AudioDecoder.h2
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/AudioEncoder.h2
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/ImageDecoder.h2
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/Inputstream.h29
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/Peripheral.h2
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/PeripheralUtils.h12
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/Screensaver.h2
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/VFS.h6
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/VideoCodec.h2
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/Visualization.h2
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/ListItem.h4
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/Window.h4
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/definitions.h2
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/dialogs/ContextMenu.h94
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/dialogs/ExtendedProgress.h2
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/dialogs/Keyboard.h24
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/dialogs/Numeric.h15
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/dialogs/Select.h165
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/libXBMC_addon.h13
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/libXBMC_pvr.h5
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/versions.h25
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_epg_types.h2
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_pvr_dll.h38
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_pvr_types.h12
26 files changed, 552 insertions, 140 deletions
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/AudioEngine.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/AudioEngine.h
index 1265dcd..02faf86 100644
--- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/AudioEngine.h
+++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/AudioEngine.h
@@ -139,7 +139,7 @@ extern "C"
139 } 139 }
140 } 140 }
141 141
142 return true; 142 return true;
143 } 143 }
144 }; 144 };
145 //@} 145 //@}
@@ -154,33 +154,34 @@ extern "C"
154 */ 154 */
155 typedef struct AddonToKodiFuncTable_kodi_audioengine 155 typedef struct AddonToKodiFuncTable_kodi_audioengine
156 { 156 {
157 AEStreamHandle* (*MakeStream) (void *kodiBase, AudioEngineFormat format, unsigned int options); 157 AEStreamHandle* (*make_stream)(void *kodiBase, AudioEngineFormat* format, unsigned int options);
158 void (*FreeStream) (void *kodiBase, AEStreamHandle *stream); 158 void (*free_stream)(void *kodiBase, AEStreamHandle *stream);
159 bool (*GetCurrentSinkFormat) (void *kodiBase, AudioEngineFormat *SinkFormat); 159 bool (*get_current_sink_format)(void *kodiBase, AudioEngineFormat* sink_format);
160 160
161 // Audio Engine Stream definitions 161 // Audio Engine Stream definitions
162 unsigned int (*AEStream_GetSpace) (void *kodiBase, AEStreamHandle *handle); 162 unsigned int (*aestream_get_space)(void *kodiBase, AEStreamHandle *handle);
163 unsigned int (*AEStream_AddData) (void *kodiBase, AEStreamHandle *handle, uint8_t* const *Data, unsigned int Offset, unsigned int Frames); 163 unsigned int (*aestream_add_data)(void *kodiBase, AEStreamHandle *handle, uint8_t* const *data,
164 double (*AEStream_GetDelay)(void *kodiBase, AEStreamHandle *handle); 164 unsigned int offset, unsigned int frames, double pts);
165 bool (*AEStream_IsBuffering)(void *kodiBase, AEStreamHandle *handle); 165 double (*aestream_get_delay)(void *kodiBase, AEStreamHandle *handle);
166 double (*AEStream_GetCacheTime)(void *kodiBase, AEStreamHandle *handle); 166 bool (*aestream_is_buffering)(void *kodiBase, AEStreamHandle *handle);
167 double (*AEStream_GetCacheTotal)(void *kodiBase, AEStreamHandle *handle); 167 double (*aestream_get_cache_time)(void *kodiBase, AEStreamHandle *handle);
168 void (*AEStream_Pause)(void *kodiBase, AEStreamHandle *handle); 168 double (*aestream_get_cache_total)(void *kodiBase, AEStreamHandle *handle);
169 void (*AEStream_Resume)(void *kodiBase, AEStreamHandle *handle); 169 void (*aestream_pause)(void *kodiBase, AEStreamHandle *handle);
170 void (*AEStream_Drain)(void *kodiBase, AEStreamHandle *handle, bool Wait); 170 void (*aestream_resume)(void *kodiBase, AEStreamHandle *handle);
171 bool (*AEStream_IsDraining)(void *kodiBase, AEStreamHandle *handle); 171 void (*aestream_drain)(void *kodiBase, AEStreamHandle *handle, bool wait);
172 bool (*AEStream_IsDrained)(void *kodiBase, AEStreamHandle *handle); 172 bool (*aestream_is_draining)(void *kodiBase, AEStreamHandle *handle);
173 void (*AEStream_Flush)(void *kodiBase, AEStreamHandle *handle); 173 bool (*aestream_is_drained)(void *kodiBase, AEStreamHandle *handle);
174 float (*AEStream_GetVolume)(void *kodiBase, AEStreamHandle *handle); 174 void (*aestream_flush)(void *kodiBase, AEStreamHandle *handle);
175 void (*AEStream_SetVolume)(void *kodiBase, AEStreamHandle *handle, float Volume); 175 float (*aestream_get_volume)(void *kodiBase, AEStreamHandle *handle);
176 float (*AEStream_GetAmplification)(void *kodiBase, AEStreamHandle *handle); 176 void (*aestream_set_volume)(void *kodiBase, AEStreamHandle *handle, float volume);
177 void (*AEStream_SetAmplification)(void *kodiBase, AEStreamHandle *handle, float Amplify); 177 float (*aestream_get_amplification)(void *kodiBase, AEStreamHandle *handle);
178 unsigned int (*AEStream_GetFrameSize)(void *kodiBase, AEStreamHandle *handle); 178 void (*aestream_set_amplification)(void *kodiBase, AEStreamHandle *handle, float amplify);
179 unsigned int (*AEStream_GetChannelCount)(void *kodiBase, AEStreamHandle *handle); 179 unsigned int (*aestream_get_frame_size)(void *kodiBase, AEStreamHandle *handle);
180 unsigned int (*AEStream_GetSampleRate)(void *kodiBase, AEStreamHandle *handle); 180 unsigned int (*aestream_get_channel_count)(void *kodiBase, AEStreamHandle *handle);
181 AEDataFormat (*AEStream_GetDataFormat)(void *kodiBase, AEStreamHandle *handle); 181 unsigned int (*aestream_get_sample_rate)(void *kodiBase, AEStreamHandle *handle);
182 double (*AEStream_GetResampleRatio)(void *kodiBase, AEStreamHandle *handle); 182 AEDataFormat (*aestream_get_data_format)(void *kodiBase, AEStreamHandle *handle);
183 void (*AEStream_SetResampleRatio)(void *kodiBase, AEStreamHandle *handle, double Ratio); 183 double (*aestream_get_resample_ratio)(void *kodiBase, AEStreamHandle *handle);
184 void (*aestream_set_resample_ratio)(void *kodiBase, AEStreamHandle *handle, double ratio);
184 } AddonToKodiFuncTable_kodi_audioengine; 185 } AddonToKodiFuncTable_kodi_audioengine;
185 186
186} /* extern "C" */ 187} /* extern "C" */
@@ -242,12 +243,12 @@ namespace audioengine
242 /// 243 ///
243 /// **Bit options to pass to CAELib_Stream (on Kodi by <c>IAE::MakeStream</c>)** 244 /// **Bit options to pass to CAELib_Stream (on Kodi by <c>IAE::MakeStream</c>)**
244 /// 245 ///
245 /// | enum AEStreamOptions | Value: | Description: 246 /// | enum AEStreamOptions | Value: | Description:
246 /// |-------------------------:|:------:|:----------------------------------- 247 /// |----------------------------:|:------:|:-----------------------------------
247 /// | AE_STREAM_FORCE_RESAMPLE | 1 << 0 | Force resample even if rates match 248 /// | AUDIO_STREAM_FORCE_RESAMPLE | 1 << 0 | Force resample even if rates match
248 /// | AE_STREAM_PAUSED | 1 << 1 | Create the stream paused 249 /// | AUDIO_STREAM_PAUSED | 1 << 1 | Create the stream paused
249 /// | AE_STREAM_AUTOSTART | 1 << 2 | Autostart the stream when enough data is buffered 250 /// | AUDIO_STREAM_AUTOSTART | 1 << 2 | Autostart the stream when enough data is buffered
250 /// | AE_STREAM_BYPASS_ADSP | 1 << 3 | if this option is set the ADSP-System is bypassed and the raw stream will be passed through IAESink. 251 /// | AUDIO_STREAM_BYPASS_ADSP | 1 << 3 | if this option is set the ADSP-System is bypassed and the raw stream will be passed through IAESink.
251 /// 252 ///
252 /// 253 ///
253 /// ------------------------------------------------------------------------ 254 /// ------------------------------------------------------------------------
@@ -261,7 +262,16 @@ namespace audioengine
261 /// 262 ///
262 /// ... 263 /// ...
263 /// 264 ///
264 /// CAddonAEStream* stream = new CAddonAEStream(AE_FMT_S16LE, AE_STREAM_AUTOSTART | AE_STREAM_BYPASS_ADSP); 265 /// AudioEngineFormat format;
266 /// format.m_dataFormat = AE_FMT_FLOAT;
267 /// format.m_channelCount = 2;
268 /// format.m_channels[0] = AE_CH_FL;
269 /// format.m_channels[1] = AE_CH_FR;
270 /// format.m_channels[2] = AE_CH_NULL;
271 /// format.m_sampleRate = 48000;
272 /// format.m_frameSize = sizeof(float)*format.m_channelCount;
273 /// format.m_frames = 512;
274 /// CAddonAEStream* stream = new CAddonAEStream(format, AE_STREAM_AUTOSTART | AE_STREAM_BYPASS_ADSP);
265 /// 275 ///
266 /// ~~~~~~~~~~~~~ 276 /// ~~~~~~~~~~~~~
267 /// 277 ///
@@ -269,22 +279,27 @@ namespace audioengine
269 : m_kodiBase(::kodi::addon::CAddonBase::m_interface->toKodi->kodiBase), 279 : m_kodiBase(::kodi::addon::CAddonBase::m_interface->toKodi->kodiBase),
270 m_cb(::kodi::addon::CAddonBase::m_interface->toKodi->kodi_audioengine) 280 m_cb(::kodi::addon::CAddonBase::m_interface->toKodi->kodi_audioengine)
271 { 281 {
272 m_StreamHandle = m_cb->MakeStream(m_kodiBase, format, options); 282 m_StreamHandle = m_cb->make_stream(m_kodiBase, &format, options);
273 if (m_StreamHandle == nullptr) 283 if (m_StreamHandle == nullptr)
274 { 284 {
275 kodi::Log(ADDON_LOG_FATAL, "CAddonAEStream: MakeStream failed!"); 285 kodi::Log(ADDON_LOG_FATAL, "CAddonAEStream: make_stream failed!");
276 } 286 }
277 } 287 }
278 //-------------------------------------------------------------------------- 288 //--------------------------------------------------------------------------
279 289
290 //==========================================================================
291 /// @ingroup cpp_kodi_audioengine_CAddonAEStream
292 /// @brief Class destructor
293 ///
280 ~CAddonAEStream() 294 ~CAddonAEStream()
281 { 295 {
282 if (m_StreamHandle) 296 if (m_StreamHandle)
283 { 297 {
284 m_cb->FreeStream(m_kodiBase, m_StreamHandle); 298 m_cb->free_stream(m_kodiBase, m_StreamHandle);
285 m_StreamHandle = nullptr; 299 m_StreamHandle = nullptr;
286 } 300 }
287 } 301 }
302 //--------------------------------------------------------------------------
288 303
289 //========================================================================== 304 //==========================================================================
290 /// @ingroup cpp_kodi_audioengine_CAddonAEStream 305 /// @ingroup cpp_kodi_audioengine_CAddonAEStream
@@ -294,7 +309,7 @@ namespace audioengine
294 /// 309 ///
295 unsigned int GetSpace() 310 unsigned int GetSpace()
296 { 311 {
297 return m_cb->AEStream_GetSpace(m_kodiBase, m_StreamHandle); 312 return m_cb->aestream_get_space(m_kodiBase, m_StreamHandle);
298 } 313 }
299 //-------------------------------------------------------------------------- 314 //--------------------------------------------------------------------------
300 315
@@ -302,14 +317,15 @@ namespace audioengine
302 /// @ingroup cpp_kodi_audioengine_CAddonAEStream 317 /// @ingroup cpp_kodi_audioengine_CAddonAEStream
303 /// @brief Add planar or interleaved PCM data to the stream 318 /// @brief Add planar or interleaved PCM data to the stream
304 /// 319 ///
305 /// @param data array of pointers to the planes 320 /// @param[in] data array of pointers to the planes
306 /// @param offset to frame in frames 321 /// @param[in] offset to frame in frames
307 /// @param frames number of frames 322 /// @param[in] frames number of frames
323 /// @param[in] pts presentation timestamp
308 /// @return The number of frames consumed 324 /// @return The number of frames consumed
309 /// 325 ///
310 unsigned int AddData(uint8_t* const *data, unsigned int offset, unsigned int frames) 326 unsigned int AddData(uint8_t* const *data, unsigned int offset, unsigned int frames, double pts = 0.0)
311 { 327 {
312 return m_cb->AEStream_AddData(m_kodiBase, m_StreamHandle, data, offset, frames); 328 return m_cb->aestream_add_data(m_kodiBase, m_StreamHandle, data, offset, frames, pts);
313 } 329 }
314 //-------------------------------------------------------------------------- 330 //--------------------------------------------------------------------------
315 331
@@ -322,7 +338,7 @@ namespace audioengine
322 /// 338 ///
323 double GetDelay() 339 double GetDelay()
324 { 340 {
325 return m_cb->AEStream_GetDelay(m_kodiBase, m_StreamHandle); 341 return m_cb->aestream_get_delay(m_kodiBase, m_StreamHandle);
326 } 342 }
327 //-------------------------------------------------------------------------- 343 //--------------------------------------------------------------------------
328 344
@@ -334,7 +350,7 @@ namespace audioengine
334 /// 350 ///
335 bool IsBuffering() 351 bool IsBuffering()
336 { 352 {
337 return m_cb->AEStream_IsBuffering(m_kodiBase, m_StreamHandle); 353 return m_cb->aestream_is_buffering(m_kodiBase, m_StreamHandle);
338 } 354 }
339 //-------------------------------------------------------------------------- 355 //--------------------------------------------------------------------------
340 356
@@ -347,7 +363,7 @@ namespace audioengine
347 /// 363 ///
348 double GetCacheTime() 364 double GetCacheTime()
349 { 365 {
350 return m_cb->AEStream_GetCacheTime(m_kodiBase, m_StreamHandle); 366 return m_cb->aestream_get_cache_time(m_kodiBase, m_StreamHandle);
351 } 367 }
352 //-------------------------------------------------------------------------- 368 //--------------------------------------------------------------------------
353 369
@@ -359,7 +375,7 @@ namespace audioengine
359 /// 375 ///
360 double GetCacheTotal() 376 double GetCacheTotal()
361 { 377 {
362 return m_cb->AEStream_GetCacheTotal(m_kodiBase, m_StreamHandle); 378 return m_cb->aestream_get_cache_total(m_kodiBase, m_StreamHandle);
363 } 379 }
364 //-------------------------------------------------------------------------- 380 //--------------------------------------------------------------------------
365 381
@@ -369,7 +385,7 @@ namespace audioengine
369 /// 385 ///
370 void Pause() 386 void Pause()
371 { 387 {
372 return m_cb->AEStream_Pause(m_kodiBase, m_StreamHandle); 388 return m_cb->aestream_pause(m_kodiBase, m_StreamHandle);
373 } 389 }
374 //-------------------------------------------------------------------------- 390 //--------------------------------------------------------------------------
375 391
@@ -379,7 +395,7 @@ namespace audioengine
379 /// 395 ///
380 void Resume() 396 void Resume()
381 { 397 {
382 return m_cb->AEStream_Resume(m_kodiBase, m_StreamHandle); 398 return m_cb->aestream_resume(m_kodiBase, m_StreamHandle);
383 } 399 }
384 //-------------------------------------------------------------------------- 400 //--------------------------------------------------------------------------
385 401
@@ -392,9 +408,9 @@ namespace audioengine
392 /// 408 ///
393 /// @note Once called AddData will not consume more data. 409 /// @note Once called AddData will not consume more data.
394 /// 410 ///
395 void Drain(bool wait) 411 void Drain(bool wait = true)
396 { 412 {
397 return m_cb->AEStream_Drain(m_kodiBase, m_StreamHandle, wait=true); 413 return m_cb->aestream_drain(m_kodiBase, m_StreamHandle, wait);
398 } 414 }
399 //-------------------------------------------------------------------------- 415 //--------------------------------------------------------------------------
400 416
@@ -404,7 +420,7 @@ namespace audioengine
404 /// 420 ///
405 bool IsDraining() 421 bool IsDraining()
406 { 422 {
407 return m_cb->AEStream_IsDraining(m_kodiBase, m_StreamHandle); 423 return m_cb->aestream_is_draining(m_kodiBase, m_StreamHandle);
408 } 424 }
409 //-------------------------------------------------------------------------- 425 //--------------------------------------------------------------------------
410 426
@@ -414,7 +430,7 @@ namespace audioengine
414 /// 430 ///
415 bool IsDrained() 431 bool IsDrained()
416 { 432 {
417 return m_cb->AEStream_IsDrained(m_kodiBase, m_StreamHandle); 433 return m_cb->aestream_is_drained(m_kodiBase, m_StreamHandle);
418 } 434 }
419 //-------------------------------------------------------------------------- 435 //--------------------------------------------------------------------------
420 436
@@ -424,7 +440,7 @@ namespace audioengine
424 /// 440 ///
425 void Flush() 441 void Flush()
426 { 442 {
427 return m_cb->AEStream_Flush(m_kodiBase, m_StreamHandle); 443 return m_cb->aestream_flush(m_kodiBase, m_StreamHandle);
428 } 444 }
429 //-------------------------------------------------------------------------- 445 //--------------------------------------------------------------------------
430 446
@@ -436,7 +452,7 @@ namespace audioengine
436 /// 452 ///
437 float GetVolume() 453 float GetVolume()
438 { 454 {
439 return m_cb->AEStream_GetVolume(m_kodiBase, m_StreamHandle); 455 return m_cb->aestream_get_volume(m_kodiBase, m_StreamHandle);
440 } 456 }
441 //-------------------------------------------------------------------------- 457 //--------------------------------------------------------------------------
442 458
@@ -448,7 +464,7 @@ namespace audioengine
448 /// 464 ///
449 void SetVolume(float volume) 465 void SetVolume(float volume)
450 { 466 {
451 return m_cb->AEStream_SetVolume(m_kodiBase, m_StreamHandle, volume); 467 return m_cb->aestream_set_volume(m_kodiBase, m_StreamHandle, volume);
452 } 468 }
453 //-------------------------------------------------------------------------- 469 //--------------------------------------------------------------------------
454 470
@@ -460,7 +476,7 @@ namespace audioengine
460 /// 476 ///
461 float GetAmplification() 477 float GetAmplification()
462 { 478 {
463 return m_cb->AEStream_GetAmplification(m_kodiBase, m_StreamHandle); 479 return m_cb->aestream_get_amplification(m_kodiBase, m_StreamHandle);
464 } 480 }
465 //-------------------------------------------------------------------------- 481 //--------------------------------------------------------------------------
466 482
@@ -473,7 +489,7 @@ namespace audioengine
473 /// 489 ///
474 void SetAmplification(float amplify) 490 void SetAmplification(float amplify)
475 { 491 {
476 return m_cb->AEStream_SetAmplification(m_kodiBase, m_StreamHandle, amplify); 492 return m_cb->aestream_set_amplification(m_kodiBase, m_StreamHandle, amplify);
477 } 493 }
478 //-------------------------------------------------------------------------- 494 //--------------------------------------------------------------------------
479 495
@@ -485,7 +501,7 @@ namespace audioengine
485 /// 501 ///
486 unsigned int GetFrameSize() const 502 unsigned int GetFrameSize() const
487 { 503 {
488 return m_cb->AEStream_GetFrameSize(m_kodiBase, m_StreamHandle); 504 return m_cb->aestream_get_frame_size(m_kodiBase, m_StreamHandle);
489 } 505 }
490 //-------------------------------------------------------------------------- 506 //--------------------------------------------------------------------------
491 507
@@ -497,7 +513,7 @@ namespace audioengine
497 /// 513 ///
498 unsigned int GetChannelCount() const 514 unsigned int GetChannelCount() const
499 { 515 {
500 return m_cb->AEStream_GetChannelCount(m_kodiBase, m_StreamHandle); 516 return m_cb->aestream_get_channel_count(m_kodiBase, m_StreamHandle);
501 } 517 }
502 //-------------------------------------------------------------------------- 518 //--------------------------------------------------------------------------
503 519
@@ -511,7 +527,7 @@ namespace audioengine
511 /// 527 ///
512 unsigned int GetSampleRate() const 528 unsigned int GetSampleRate() const
513 { 529 {
514 return m_cb->AEStream_GetSampleRate(m_kodiBase, m_StreamHandle); 530 return m_cb->aestream_get_sample_rate(m_kodiBase, m_StreamHandle);
515 } 531 }
516 //-------------------------------------------------------------------------- 532 //--------------------------------------------------------------------------
517 533
@@ -523,7 +539,7 @@ namespace audioengine
523 /// 539 ///
524 AEDataFormat GetDataFormat() const 540 AEDataFormat GetDataFormat() const
525 { 541 {
526 return m_cb->AEStream_GetDataFormat(m_kodiBase, m_StreamHandle); 542 return m_cb->aestream_get_data_format(m_kodiBase, m_StreamHandle);
527 } 543 }
528 //-------------------------------------------------------------------------- 544 //--------------------------------------------------------------------------
529 545
@@ -537,7 +553,7 @@ namespace audioengine
537 /// 553 ///
538 double GetResampleRatio() 554 double GetResampleRatio()
539 { 555 {
540 return m_cb->AEStream_GetResampleRatio(m_kodiBase, m_StreamHandle); 556 return m_cb->aestream_get_resample_ratio(m_kodiBase, m_StreamHandle);
541 } 557 }
542 //-------------------------------------------------------------------------- 558 //--------------------------------------------------------------------------
543 559
@@ -553,7 +569,7 @@ namespace audioengine
553 /// 569 ///
554 void SetResampleRatio(double ratio) 570 void SetResampleRatio(double ratio)
555 { 571 {
556 m_cb->AEStream_SetResampleRatio(m_kodiBase, m_StreamHandle, ratio); 572 m_cb->aestream_set_resample_ratio(m_kodiBase, m_StreamHandle, ratio);
557 } 573 }
558 //-------------------------------------------------------------------------- 574 //--------------------------------------------------------------------------
559 575
@@ -572,7 +588,8 @@ namespace audioengine
572 /// 588 ///
573 inline bool GetCurrentSinkFormat(AudioEngineFormat &format) 589 inline bool GetCurrentSinkFormat(AudioEngineFormat &format)
574 { 590 {
575 return ::kodi::addon::CAddonBase::m_interface->toKodi->kodi_audioengine->GetCurrentSinkFormat(::kodi::addon::CAddonBase::m_interface->toKodi->kodiBase, &format); 591 using namespace kodi::addon;
592 return CAddonBase::m_interface->toKodi->kodi_audioengine->get_current_sink_format(CAddonBase::m_interface->toKodi->kodiBase, &format);
576 } 593 }
577 //---------------------------------------------------------------------------- 594 //----------------------------------------------------------------------------
578 595
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/Filesystem.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/Filesystem.h
index 76210cf..b06770c 100644
--- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/Filesystem.h
+++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/Filesystem.h
@@ -110,6 +110,7 @@ extern "C"
110 double (*get_file_download_speed)(void* kodiBase, void* file); 110 double (*get_file_download_speed)(void* kodiBase, void* file);
111 void (*close_file)(void* kodiBase, void* file); 111 void (*close_file)(void* kodiBase, void* file);
112 int (*get_file_chunk_size)(void* kodiBase, void* file); 112 int (*get_file_chunk_size)(void* kodiBase, void* file);
113 char* (*get_property)(void* kodiBase, void* file, int type, const char *name);
113 114
114 void* (*curl_create)(void* kodiBase, const char* url); 115 void* (*curl_create)(void* kodiBase, const char* url);
115 bool (*curl_add_option)(void* kodiBase, void* file, int type, const char* name, const char* value); 116 bool (*curl_add_option)(void* kodiBase, void* file, int type, const char* name, const char* value);
@@ -194,6 +195,25 @@ typedef enum CURLOptiontype
194} CURLOptiontype; 195} CURLOptiontype;
195//------------------------------------------------------------------------------ 196//------------------------------------------------------------------------------
196 197
198//==============================================================================
199/// \ingroup cpp_kodi_vfs_Defs
200/// @brief Used CURL message types
201///
202typedef enum FilePropertyTypes
203{
204 /// Get protocol response line
205 ADDON_FILE_PROPERTY_RESPONSE_PROTOCOL,
206 /// Get a response header
207 ADDON_FILE_PROPERTY_RESPONSE_HEADER,
208 /// Get file content type
209 ADDON_FILE_PROPERTY_CONTENT_TYPE,
210 /// Get file content charset
211 ADDON_FILE_PROPERTY_CONTENT_CHARSET,
212 /// Get file mime type
213 ADDON_FILE_PROPERTY_MIME_TYPE
214} FilePropertyTypes;
215//------------------------------------------------------------------------------
216
197//============================================================================ 217//============================================================================
198/// 218///
199/// \ingroup cpp_kodi_vfs_Defs 219/// \ingroup cpp_kodi_vfs_Defs
@@ -310,7 +330,7 @@ namespace vfs
310 // 330 //
311 // @param[in] dirEntry pointer to own class type 331 // @param[in] dirEntry pointer to own class type
312 // 332 //
313 CDirEntry(const VFSDirEntry& dirEntry) : 333 explicit CDirEntry(const VFSDirEntry& dirEntry) :
314 m_label(dirEntry.label ? dirEntry.label : ""), 334 m_label(dirEntry.label ? dirEntry.label : ""),
315 m_path(dirEntry.path ? dirEntry.path : ""), 335 m_path(dirEntry.path ? dirEntry.path : ""),
316 m_folder(dirEntry.folder), 336 m_folder(dirEntry.folder),
@@ -906,6 +926,37 @@ namespace vfs
906 } 926 }
907 //---------------------------------------------------------------------------- 927 //----------------------------------------------------------------------------
908 928
929
930 //============================================================================
931 ///
932 /// @ingroup cpp_kodi_vfs
933 /// @brief Remove the slash on given path name
934 ///
935 /// @param[in,out] path The complete path
936 ///
937 ///
938 /// ------------------------------------------------------------------------
939 ///
940 /// **Example:**
941 /// ~~~~~~~~~~~~~{.cpp}
942 /// #include <kodi/Filesystem.h>
943 /// ...
944 /// std::string dirName = "special://temp/";
945 /// kodi::vfs::RemoveSlashAtEnd(dirName);
946 /// fprintf(stderr, "Directory name is '%s'\n", dirName.c_str());
947 /// ~~~~~~~~~~~~~
948 ///
949 inline void RemoveSlashAtEnd(std::string& path)
950 {
951 if (!path.empty())
952 {
953 char last = path[path.size() - 1];
954 if (last == '/' || last == '\\')
955 path.erase(path.size() - 1);
956 }
957 }
958 //----------------------------------------------------------------------------
959
909 //============================================================================ 960 //============================================================================
910 /// 961 ///
911 /// @ingroup cpp_kodi_vfs 962 /// @ingroup cpp_kodi_vfs
@@ -1483,6 +1534,34 @@ namespace vfs
1483 //========================================================================== 1534 //==========================================================================
1484 /// 1535 ///
1485 /// @ingroup cpp_kodi_vfs_CFile 1536 /// @ingroup cpp_kodi_vfs_CFile
1537 /// @brief retrieve a file property
1538 ///
1539 /// @param[in] type The type of the file property to retrieve the value for
1540 /// @param[in] name The name of a named property value (e.g. Header)
1541 /// @return value of requested property, empty on failure / non-existance
1542 ///
1543 const std::string GetProperty(FilePropertyTypes type, const std::string &name) const
1544 {
1545 if (!m_file)
1546 {
1547 kodi::Log(ADDON_LOG_ERROR, "kodi::vfs::CURLCreate(...) needed to call before GetProperty!");
1548 return "";
1549 }
1550 char *res(::kodi::addon::CAddonBase::m_interface->toKodi->kodi_filesystem->get_property(
1551 ::kodi::addon::CAddonBase::m_interface->toKodi->kodiBase, m_file, type, name.c_str()));
1552 if (res)
1553 {
1554 std::string strReturn(res);
1555 ::kodi::addon::CAddonBase::m_interface->toKodi->free_string(::kodi::addon::CAddonBase::m_interface->toKodi->kodiBase, res);
1556 return strReturn;
1557 }
1558 return "";
1559 }
1560 //--------------------------------------------------------------------------
1561
1562 //==========================================================================
1563 ///
1564 /// @ingroup cpp_kodi_vfs_CFile
1486 /// @brief Get the current download speed of file if loaded from web. 1565 /// @brief Get the current download speed of file if loaded from web.
1487 /// 1566 ///
1488 /// @return The current download speed. 1567 /// @return The current download speed.
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/AudioDecoder.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/AudioDecoder.h
index f56f8ae..ca253ff 100644
--- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/AudioDecoder.h
+++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/AudioDecoder.h
@@ -83,7 +83,7 @@ namespace addon
83 /// @param[in] instance The from Kodi given instance given be 83 /// @param[in] instance The from Kodi given instance given be
84 /// add-on CreateInstance call with instance 84 /// add-on CreateInstance call with instance
85 /// id ADDON_INSTANCE_AUDIODECODER. 85 /// id ADDON_INSTANCE_AUDIODECODER.
86 CInstanceAudioDecoder(KODI_HANDLE instance) 86 explicit CInstanceAudioDecoder(KODI_HANDLE instance)
87 : IAddonInstance(ADDON_INSTANCE_AUDIODECODER) 87 : IAddonInstance(ADDON_INSTANCE_AUDIODECODER)
88 { 88 {
89 if (CAddonBase::m_interface->globalSingleInstance != nullptr) 89 if (CAddonBase::m_interface->globalSingleInstance != nullptr)
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/AudioEncoder.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/AudioEncoder.h
index 3d59a99..7d2464d 100644
--- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/AudioEncoder.h
+++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/AudioEncoder.h
@@ -75,7 +75,7 @@ namespace addon
75 /// @param[in] instance The from Kodi given instance given be 75 /// @param[in] instance The from Kodi given instance given be
76 /// add-on CreateInstance call with instance 76 /// add-on CreateInstance call with instance
77 /// id ADDON_INSTANCE_AUDIOENCODER. 77 /// id ADDON_INSTANCE_AUDIOENCODER.
78 CInstanceAudioEncoder(KODI_HANDLE instance) 78 explicit CInstanceAudioEncoder(KODI_HANDLE instance)
79 : IAddonInstance(ADDON_INSTANCE_AUDIOENCODER) 79 : IAddonInstance(ADDON_INSTANCE_AUDIOENCODER)
80 { 80 {
81 if (CAddonBase::m_interface->globalSingleInstance != nullptr) 81 if (CAddonBase::m_interface->globalSingleInstance != nullptr)
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/ImageDecoder.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/ImageDecoder.h
index a854711..5ccb859 100644
--- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/ImageDecoder.h
+++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/ImageDecoder.h
@@ -81,7 +81,7 @@ namespace addon
81 /// @param[in] instance The from Kodi given instance given be 81 /// @param[in] instance The from Kodi given instance given be
82 /// add-on CreateInstance call with instance 82 /// add-on CreateInstance call with instance
83 /// id ADDON_INSTANCE_IMAGEDECODER. 83 /// id ADDON_INSTANCE_IMAGEDECODER.
84 CInstanceImageDecoder(KODI_HANDLE instance) 84 explicit CInstanceImageDecoder(KODI_HANDLE instance)
85 : IAddonInstance(ADDON_INSTANCE_IMAGEDECODER) 85 : IAddonInstance(ADDON_INSTANCE_IMAGEDECODER)
86 { 86 {
87 if (CAddonBase::m_interface->globalSingleInstance != nullptr) 87 if (CAddonBase::m_interface->globalSingleInstance != nullptr)
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/Inputstream.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/Inputstream.h
index 76cfe92..8db17c0 100644
--- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/Inputstream.h
+++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/Inputstream.h
@@ -109,11 +109,26 @@ extern "C" {
109 TYPE_TELETEXT 109 TYPE_TELETEXT
110 } m_streamType; 110 } m_streamType;
111 111
112 enum Codec_FEATURES 112 enum Codec_FEATURES : uint32_t
113 { 113 {
114 FEATURE_DECODE = 1 114 FEATURE_DECODE = 1
115 }; 115 };
116 unsigned int m_features; 116 uint32_t m_features;
117
118 enum STREAM_FLAGS : uint32_t
119 {
120 FLAG_NONE = 0x0000,
121 FLAG_DEFAULT = 0x0001,
122 FLAG_DUB = 0x0002,
123 FLAG_ORIGINAL = 0x0004,
124 FLAG_COMMENT = 0x0008,
125 FLAG_LYRICS = 0x0010,
126 FLAG_KARAOKE = 0x0020,
127 FLAG_FORCED = 0x0040,
128 FLAG_HEARING_IMPAIRED = 0x0080,
129 FLAG_VISUAL_IMPAIRED = 0x0100
130 };
131 uint32_t m_flags;
117 132
118 char m_codecName[32]; /*!< @brief (required) name of codec according to ffmpeg */ 133 char m_codecName[32]; /*!< @brief (required) name of codec according to ffmpeg */
119 char m_codecInternalName[32]; /*!< @brief (optional) internal name of codec (selectionstream info) */ 134 char m_codecInternalName[32]; /*!< @brief (optional) internal name of codec (selectionstream info) */
@@ -173,7 +188,7 @@ extern "C" {
173 struct INPUTSTREAM_IDS (__cdecl* get_stream_ids)(const AddonInstance_InputStream* instance); 188 struct INPUTSTREAM_IDS (__cdecl* get_stream_ids)(const AddonInstance_InputStream* instance);
174 struct INPUTSTREAM_INFO (__cdecl* get_stream)(const AddonInstance_InputStream* instance, int streamid); 189 struct INPUTSTREAM_INFO (__cdecl* get_stream)(const AddonInstance_InputStream* instance, int streamid);
175 void (__cdecl* enable_stream)(const AddonInstance_InputStream* instance, int streamid, bool enable); 190 void (__cdecl* enable_stream)(const AddonInstance_InputStream* instance, int streamid, bool enable);
176 void(__cdecl* open_stream)(const AddonInstance_InputStream* instance, int streamid); 191 bool(__cdecl* open_stream)(const AddonInstance_InputStream* instance, int streamid);
177 void (__cdecl* demux_reset)(const AddonInstance_InputStream* instance); 192 void (__cdecl* demux_reset)(const AddonInstance_InputStream* instance);
178 void (__cdecl* demux_abort)(const AddonInstance_InputStream* instance); 193 void (__cdecl* demux_abort)(const AddonInstance_InputStream* instance);
179 void (__cdecl* demux_flush)(const AddonInstance_InputStream* instance); 194 void (__cdecl* demux_flush)(const AddonInstance_InputStream* instance);
@@ -218,7 +233,7 @@ namespace addon
218 class CInstanceInputStream : public IAddonInstance 233 class CInstanceInputStream : public IAddonInstance
219 { 234 {
220 public: 235 public:
221 CInstanceInputStream(KODI_HANDLE instance) 236 explicit CInstanceInputStream(KODI_HANDLE instance)
222 : IAddonInstance(ADDON_INSTANCE_INPUTSTREAM) 237 : IAddonInstance(ADDON_INSTANCE_INPUTSTREAM)
223 { 238 {
224 if (CAddonBase::m_interface->globalSingleInstance != nullptr) 239 if (CAddonBase::m_interface->globalSingleInstance != nullptr)
@@ -278,7 +293,7 @@ namespace addon
278 * @param streamid unique id of stream 293 * @param streamid unique id of stream
279 * @remarks 294 * @remarks
280 */ 295 */
281 virtual void OpenStream(int streamid) = 0; 296 virtual bool OpenStream(int streamid) = 0;
282 297
283 /*! 298 /*!
284 * Reset the demultiplexer in the add-on. 299 * Reset the demultiplexer in the add-on.
@@ -513,9 +528,9 @@ namespace addon
513 instance->toAddon.addonInstance->EnableStream(streamid, enable); 528 instance->toAddon.addonInstance->EnableStream(streamid, enable);
514 } 529 }
515 530
516 inline static void ADDON_OpenStream(const AddonInstance_InputStream* instance, int streamid) 531 inline static bool ADDON_OpenStream(const AddonInstance_InputStream* instance, int streamid)
517 { 532 {
518 instance->toAddon.addonInstance->OpenStream(streamid); 533 return instance->toAddon.addonInstance->OpenStream(streamid);
519 } 534 }
520 535
521 inline static void ADDON_DemuxReset(const AddonInstance_InputStream* instance) 536 inline static void ADDON_DemuxReset(const AddonInstance_InputStream* instance)
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/Peripheral.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/Peripheral.h
index 045a925..c1a18e0 100644
--- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/Peripheral.h
+++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/Peripheral.h
@@ -319,7 +319,7 @@ namespace addon
319 CAddonBase::m_interface->globalSingleInstance = this; 319 CAddonBase::m_interface->globalSingleInstance = this;
320 } 320 }
321 321
322 CInstancePeripheral(KODI_HANDLE instance) 322 explicit CInstancePeripheral(KODI_HANDLE instance)
323 : IAddonInstance(ADDON_INSTANCE_PERIPHERAL) 323 : IAddonInstance(ADDON_INSTANCE_PERIPHERAL)
324 { 324 {
325 if (CAddonBase::m_interface->globalSingleInstance != nullptr) 325 if (CAddonBase::m_interface->globalSingleInstance != nullptr)
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/PeripheralUtils.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/PeripheralUtils.h
index 721da35..ea70b30 100644
--- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/PeripheralUtils.h
+++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/PeripheralUtils.h
@@ -104,7 +104,7 @@ namespace addon
104 { 104 {
105 } 105 }
106 106
107 Peripheral(const PERIPHERAL_INFO& info) : 107 explicit Peripheral(const PERIPHERAL_INFO& info) :
108 m_type(info.type), 108 m_type(info.type),
109 m_strName(info.name ? info.name : ""), 109 m_strName(info.name ? info.name : ""),
110 m_vendorId(info.vendor_id), 110 m_vendorId(info.vendor_id),
@@ -196,7 +196,7 @@ namespace addon
196 SetAxisState(state); 196 SetAxisState(state);
197 } 197 }
198 198
199 PeripheralEvent(const PERIPHERAL_EVENT& event) : 199 explicit PeripheralEvent(const PERIPHERAL_EVENT& event) :
200 m_event(event) 200 m_event(event)
201 { 201 {
202 } 202 }
@@ -259,7 +259,7 @@ namespace addon
259 *this = other; 259 *this = other;
260 } 260 }
261 261
262 Joystick(const JOYSTICK_INFO& info) : 262 explicit Joystick(const JOYSTICK_INFO& info) :
263 Peripheral(info.peripheral), 263 Peripheral(info.peripheral),
264 m_provider(info.provider ? info.provider : ""), 264 m_provider(info.provider ? info.provider : ""),
265 m_requestedPort(info.requested_port), 265 m_requestedPort(info.requested_port),
@@ -445,7 +445,7 @@ namespace addon
445 return DriverPrimitive(JOYSTICK_DRIVER_PRIMITIVE_TYPE_MOTOR, motorIndex); 445 return DriverPrimitive(JOYSTICK_DRIVER_PRIMITIVE_TYPE_MOTOR, motorIndex);
446 } 446 }
447 447
448 DriverPrimitive(const JOYSTICK_DRIVER_PRIMITIVE& primitive) : 448 explicit DriverPrimitive(const JOYSTICK_DRIVER_PRIMITIVE& primitive) :
449 m_type(primitive.type), 449 m_type(primitive.type),
450 m_driverIndex(0), 450 m_driverIndex(0),
451 m_hatDirection(JOYSTICK_DRIVER_HAT_UNKNOWN), 451 m_hatDirection(JOYSTICK_DRIVER_HAT_UNKNOWN),
@@ -604,12 +604,12 @@ namespace addon
604 *this = other; 604 *this = other;
605 } 605 }
606 606
607 JoystickFeature(const JOYSTICK_FEATURE& feature) : 607 explicit JoystickFeature(const JOYSTICK_FEATURE& feature) :
608 m_name(feature.name ? feature.name : ""), 608 m_name(feature.name ? feature.name : ""),
609 m_type(feature.type) 609 m_type(feature.type)
610 { 610 {
611 for (unsigned int i = 0; i < JOYSTICK_PRIMITIVE_MAX; i++) 611 for (unsigned int i = 0; i < JOYSTICK_PRIMITIVE_MAX; i++)
612 m_primitives[i] = feature.primitives[i]; 612 m_primitives[i] = DriverPrimitive(feature.primitives[i]);
613 } 613 }
614 614
615 JoystickFeature& operator=(const JoystickFeature& rhs) 615 JoystickFeature& operator=(const JoystickFeature& rhs)
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/Screensaver.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/Screensaver.h
index 85cd7bc..04821b2 100644
--- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/Screensaver.h
+++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/Screensaver.h
@@ -261,7 +261,7 @@ namespace addon
261 /// 261 ///
262 /// @warning Only use `instance` from the CreateInstance call 262 /// @warning Only use `instance` from the CreateInstance call
263 /// 263 ///
264 CInstanceScreensaver(KODI_HANDLE instance) 264 explicit CInstanceScreensaver(KODI_HANDLE instance)
265 : IAddonInstance(ADDON_INSTANCE_SCREENSAVER) 265 : IAddonInstance(ADDON_INSTANCE_SCREENSAVER)
266 { 266 {
267 if (CAddonBase::m_interface->globalSingleInstance != nullptr) 267 if (CAddonBase::m_interface->globalSingleInstance != nullptr)
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/VFS.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/VFS.h
index 4bb3e69..8e688d7 100644
--- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/VFS.h
+++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/VFS.h
@@ -119,7 +119,7 @@ namespace addon
119 class CInstanceVFS : public IAddonInstance 119 class CInstanceVFS : public IAddonInstance
120 { 120 {
121 public: 121 public:
122 CInstanceVFS(KODI_HANDLE instance) 122 explicit CInstanceVFS(KODI_HANDLE instance)
123 : IAddonInstance(ADDON_INSTANCE_VFS) 123 : IAddonInstance(ADDON_INSTANCE_VFS)
124 { 124 {
125 if (CAddonBase::m_interface->globalSingleInstance != nullptr) 125 if (CAddonBase::m_interface->globalSingleInstance != nullptr)
@@ -350,7 +350,7 @@ namespace addon
350 m_cb->require_authentication(m_cb->ctx, url.c_str()); 350 m_cb->require_authentication(m_cb->ctx, url.c_str());
351 } 351 }
352 352
353 CVFSCallbacks(const VFSGetDirectoryCallbacks* cb) : m_cb(cb) { } 353 explicit CVFSCallbacks(const VFSGetDirectoryCallbacks* cb) : m_cb(cb) { }
354 354
355 private: 355 private:
356 const VFSGetDirectoryCallbacks* m_cb; 356 const VFSGetDirectoryCallbacks* m_cb;
@@ -519,7 +519,7 @@ namespace addon
519 VFSGetDirectoryCallbacks* callbacks) 519 VFSGetDirectoryCallbacks* callbacks)
520 { 520 {
521 std::vector<kodi::vfs::CDirEntry> addonEntries; 521 std::vector<kodi::vfs::CDirEntry> addonEntries;
522 bool ret = instance->toAddon.addonInstance->GetDirectory(*url, addonEntries, callbacks); 522 bool ret = instance->toAddon.addonInstance->GetDirectory(*url, addonEntries, CVFSCallbacks(callbacks));
523 if (ret) 523 if (ret)
524 { 524 {
525 VFSDirEntry* entries = static_cast<VFSDirEntry*>(malloc(sizeof(VFSDirEntry) * addonEntries.size())); 525 VFSDirEntry* entries = static_cast<VFSDirEntry*>(malloc(sizeof(VFSDirEntry) * addonEntries.size()));
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/VideoCodec.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/VideoCodec.h
index 710fda0..02d39c6 100644
--- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/VideoCodec.h
+++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/VideoCodec.h
@@ -158,7 +158,7 @@ namespace kodi
158 class CInstanceVideoCodec : public IAddonInstance 158 class CInstanceVideoCodec : public IAddonInstance
159 { 159 {
160 public: 160 public:
161 CInstanceVideoCodec(KODI_HANDLE instance) 161 explicit CInstanceVideoCodec(KODI_HANDLE instance)
162 : IAddonInstance(ADDON_INSTANCE_VIDEOCODEC) 162 : IAddonInstance(ADDON_INSTANCE_VIDEOCODEC)
163 { 163 {
164 if (CAddonBase::m_interface->globalSingleInstance != nullptr) 164 if (CAddonBase::m_interface->globalSingleInstance != nullptr)
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/Visualization.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/Visualization.h
index b1ded64..452085a 100644
--- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/Visualization.h
+++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/Visualization.h
@@ -340,7 +340,7 @@ namespace addon
340 /// 340 ///
341 /// @warning Only use `instance` from the CreateInstance call 341 /// @warning Only use `instance` from the CreateInstance call
342 /// 342 ///
343 CInstanceVisualization(KODI_HANDLE instance) 343 explicit CInstanceVisualization(KODI_HANDLE instance)
344 : IAddonInstance(ADDON_INSTANCE_VISUALIZATION), 344 : IAddonInstance(ADDON_INSTANCE_VISUALIZATION),
345 m_presetLockedByUser(false) 345 m_presetLockedByUser(false)
346 { 346 {
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/ListItem.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/ListItem.h
index 944b1b9..13cf2d1 100644
--- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/ListItem.h
+++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/ListItem.h
@@ -37,7 +37,7 @@ namespace gui
37 GUIHANDLE GetControlHandle() const { return m_controlHandle; } 37 GUIHANDLE GetControlHandle() const { return m_controlHandle; }
38 38
39 protected: 39 protected:
40 CAddonGUIControlBase(CAddonGUIControlBase* window) 40 explicit CAddonGUIControlBase(CAddonGUIControlBase* window)
41 : m_controlHandle(nullptr), 41 : m_controlHandle(nullptr),
42 m_interface(::kodi::addon::CAddonBase::m_interface->toKodi), 42 m_interface(::kodi::addon::CAddonBase::m_interface->toKodi),
43 m_Window(window) {} 43 m_Window(window) {}
@@ -111,7 +111,7 @@ namespace gui
111 * Related to call of "ListItemPtr kodi::gui::CWindow::GetListItem(int listPos)" 111 * Related to call of "ListItemPtr kodi::gui::CWindow::GetListItem(int listPos)"
112 * Not needed for addon development itself 112 * Not needed for addon development itself
113 */ 113 */
114 CListItem(GUIHANDLE listItemHandle) 114 explicit CListItem(GUIHANDLE listItemHandle)
115 : CAddonGUIControlBase(nullptr) 115 : CAddonGUIControlBase(nullptr)
116 { 116 {
117 m_controlHandle = listItemHandle; 117 m_controlHandle = listItemHandle;
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/Window.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/Window.h
index b78585f..c369c62 100644
--- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/Window.h
+++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/Window.h
@@ -128,6 +128,10 @@ namespace gui
128 /// @note If your Add-On ends this window will be closed to. To show it forever, 128 /// @note If your Add-On ends this window will be closed to. To show it forever,
129 /// make a loop at the end of your Add-On or use doModal() instead. 129 /// make a loop at the end of your Add-On or use doModal() instead.
130 /// 130 ///
131 /// @warning If used must be the class be global present until Kodi becomes
132 /// closed. The creation can be done after before "Show" becomes called, but
133 /// not delete class after them.
134 ///
131 /// @return Return true if call and show is successed, 135 /// @return Return true if call and show is successed,
132 /// if false was something failed to get needed 136 /// if false was something failed to get needed
133 /// skin parts. 137 /// skin parts.
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/definitions.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/definitions.h
index 61af9fe..1dd03cc 100644
--- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/definitions.h
+++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/definitions.h
@@ -262,6 +262,8 @@ typedef struct AddonToKodiFuncTable_kodi_gui_dialogProgress
262typedef struct AddonToKodiFuncTable_kodi_gui_dialogSelect 262typedef struct AddonToKodiFuncTable_kodi_gui_dialogSelect
263{ 263{
264 int (*open)(void* kodiBase, const char *heading, const char *entries[], unsigned int size, int selected, unsigned int autoclose); 264 int (*open)(void* kodiBase, const char *heading, const char *entries[], unsigned int size, int selected, unsigned int autoclose);
265 bool (*open_multi_select)(void* kodiBase, const char* heading, const char* entryIDs[], const char* entryNames[],
266 bool entriesSelected[], unsigned int size, unsigned int autoclose);
265} AddonToKodiFuncTable_kodi_gui_dialogSelect; 267} AddonToKodiFuncTable_kodi_gui_dialogSelect;
266 268
267typedef struct AddonToKodiFuncTable_kodi_gui_dialogTextViewer 269typedef struct AddonToKodiFuncTable_kodi_gui_dialogTextViewer
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/dialogs/ContextMenu.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/dialogs/ContextMenu.h
index 47afc23..39b21b4 100644
--- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/dialogs/ContextMenu.h
+++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/dialogs/ContextMenu.h
@@ -91,6 +91,100 @@ namespace dialogs
91 return ret; 91 return ret;
92 } 92 }
93 //-------------------------------------------------------------------------- 93 //--------------------------------------------------------------------------
94
95 //==========================================================================
96 ///
97 /// \ingroup cpp_kodi_gui_dialogs_ContextMenu
98 /// @brief Show a context menu dialog about given parts.
99 ///
100 /// @param[in] heading Dialog heading name
101 /// @param[in] entries String list about entries
102 /// @return The selected entry, if return <tt>-1</tt> was nothing selected or canceled
103 ///
104 ///
105 ///-------------------------------------------------------------------------
106 ///
107 /// **Example:**
108 /// ~~~~~~~~~~~~~{.cpp}
109 /// #include <kodi/gui/dialogs/ContextMenu.h>
110 ///
111 /// const std::vector<std::pair<std::string, std::string>> entries
112 /// {
113 /// { "ID 1", "Test 1" },
114 /// { "ID 2", "Test 2" },
115 /// { "ID 3", "Test 3" },
116 /// { "ID 4", "Test 4" },
117 /// { "ID 5", "Test 5" }
118 /// };
119 ///
120 /// int selected = kodi::gui::dialogs::ContextMenu::Show("Test selection", entries);
121 /// if (selected < 0)
122 /// fprintf(stderr, "Item selection canceled\n");
123 /// else
124 /// fprintf(stderr, "Selected item is: %i\n", selected);
125 /// ~~~~~~~~~~~~~
126 ///
127 inline int Show(const std::string& heading, const std::vector<std::pair<std::string, std::string>>& entries)
128 {
129 using namespace ::kodi::addon;
130 unsigned int size = entries.size();
131 const char** cEntries = static_cast<const char**>(malloc(size*sizeof(const char**)));
132 for (unsigned int i = 0; i < size; ++i)
133 {
134 cEntries[i] = entries[i].second.c_str();
135 }
136 int ret = CAddonBase::m_interface->toKodi->kodi_gui->dialogContextMenu->open(CAddonBase::m_interface->toKodi->kodiBase, heading.c_str(), cEntries, size);
137 free(cEntries);
138 return ret;
139 }
140 //--------------------------------------------------------------------------
141
142 //==========================================================================
143 ///
144 /// \ingroup cpp_kodi_gui_dialogs_ContextMenu
145 /// @brief Show a context menu dialog about given parts.
146 ///
147 /// @param[in] heading Dialog heading name
148 /// @param[in] entries String list about entries
149 /// @return The selected entry, if return <tt>-1</tt> was nothing selected or canceled
150 ///
151 ///
152 ///-------------------------------------------------------------------------
153 ///
154 /// **Example:**
155 /// ~~~~~~~~~~~~~{.cpp}
156 /// #include <kodi/gui/dialogs/ContextMenu.h>
157 ///
158 /// const std::vector<std::pair<int, std::string>> entries
159 /// {
160 /// { 1, "Test 1" },
161 /// { 2, "Test 2" },
162 /// { 3, "Test 3" },
163 /// { 4, "Test 4" },
164 /// { 5, "Test 5" }
165 /// };
166 ///
167 /// int selected = kodi::gui::dialogs::ContextMenu::Show("Test selection", entries);
168 /// if (selected < 0)
169 /// fprintf(stderr, "Item selection canceled\n");
170 /// else
171 /// fprintf(stderr, "Selected item is: %i\n", selected);
172 /// ~~~~~~~~~~~~~
173 ///
174 inline int Show(const std::string& heading, const std::vector<std::pair<int, std::string>>& entries)
175 {
176 using namespace ::kodi::addon;
177 unsigned int size = entries.size();
178 const char** cEntries = static_cast<const char**>(malloc(size*sizeof(const char**)));
179 for (unsigned int i = 0; i < size; ++i)
180 {
181 cEntries[i] = entries[i].second.c_str();
182 }
183 int ret = CAddonBase::m_interface->toKodi->kodi_gui->dialogContextMenu->open(CAddonBase::m_interface->toKodi->kodiBase, heading.c_str(), cEntries, size);
184 free(cEntries);
185 return ret;
186 }
187 //--------------------------------------------------------------------------
94 }; 188 };
95 189
96} /* namespace dialogs */ 190} /* namespace dialogs */
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/dialogs/ExtendedProgress.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/dialogs/ExtendedProgress.h
index e9c5a9d..5878958 100644
--- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/dialogs/ExtendedProgress.h
+++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/dialogs/ExtendedProgress.h
@@ -75,7 +75,7 @@ namespace dialogs
75 /// 75 ///
76 /// @param[in] title Title string 76 /// @param[in] title Title string
77 /// 77 ///
78 CExtendedProgress(const std::string& title = "") 78 explicit CExtendedProgress(const std::string& title = "")
79 { 79 {
80 using namespace ::kodi::addon; 80 using namespace ::kodi::addon;
81 m_DialogHandle = CAddonBase::m_interface->toKodi->kodi_gui->dialogExtendedProgress->new_dialog(CAddonBase::m_interface->toKodi->kodiBase, title.c_str()); 81 m_DialogHandle = CAddonBase::m_interface->toKodi->kodi_gui->dialogExtendedProgress->new_dialog(CAddonBase::m_interface->toKodi->kodiBase, title.c_str());
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/dialogs/Keyboard.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/dialogs/Keyboard.h
index cff30d8..6d2b32b 100644
--- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/dialogs/Keyboard.h
+++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/dialogs/Keyboard.h
@@ -96,8 +96,7 @@ namespace dialogs
96 hiddenInput, autoCloseMs); 96 hiddenInput, autoCloseMs);
97 if (retString != nullptr) 97 if (retString != nullptr)
98 { 98 {
99 if (std::strlen(retString)) 99 text = retString;
100 text = retString;
101 CAddonBase::m_interface->toKodi->free_string(CAddonBase::m_interface->toKodi->kodiBase, retString); 100 CAddonBase::m_interface->toKodi->free_string(CAddonBase::m_interface->toKodi->kodiBase, retString);
102 } 101 }
103 return ret; 102 return ret;
@@ -129,8 +128,7 @@ namespace dialogs
129 allowEmptyResult, autoCloseMs); 128 allowEmptyResult, autoCloseMs);
130 if (retString != nullptr) 129 if (retString != nullptr)
131 { 130 {
132 if (std::strlen(retString)) 131 text = retString;
133 text = retString;
134 CAddonBase::m_interface->toKodi->free_string(CAddonBase::m_interface->toKodi->kodiBase, retString); 132 CAddonBase::m_interface->toKodi->free_string(CAddonBase::m_interface->toKodi->kodiBase, retString);
135 } 133 }
136 return ret; 134 return ret;
@@ -162,8 +160,7 @@ namespace dialogs
162 allowEmptyResult, autoCloseMs); 160 allowEmptyResult, autoCloseMs);
163 if (retString != nullptr) 161 if (retString != nullptr)
164 { 162 {
165 if (std::strlen(retString)) 163 newPassword = retString;
166 newPassword = retString;
167 CAddonBase::m_interface->toKodi->free_string(CAddonBase::m_interface->toKodi->kodiBase, retString); 164 CAddonBase::m_interface->toKodi->free_string(CAddonBase::m_interface->toKodi->kodiBase, retString);
168 } 165 }
169 return ret; 166 return ret;
@@ -192,8 +189,7 @@ namespace dialogs
192 newPassword.c_str(), &retString, autoCloseMs); 189 newPassword.c_str(), &retString, autoCloseMs);
193 if (retString != nullptr) 190 if (retString != nullptr)
194 { 191 {
195 if (std::strlen(retString)) 192 newPassword = retString;
196 newPassword = retString;
197 CAddonBase::m_interface->toKodi->free_string(CAddonBase::m_interface->toKodi->kodiBase, retString); 193 CAddonBase::m_interface->toKodi->free_string(CAddonBase::m_interface->toKodi->kodiBase, retString);
198 } 194 }
199 return ret; 195 return ret;
@@ -275,8 +271,7 @@ namespace dialogs
275 autoCloseMs); 271 autoCloseMs);
276 if (retString != nullptr) 272 if (retString != nullptr)
277 { 273 {
278 if (std::strlen(retString)) 274 newPassword = retString;
279 newPassword = retString;
280 CAddonBase::m_interface->toKodi->free_string(CAddonBase::m_interface->toKodi->kodiBase, retString); 275 CAddonBase::m_interface->toKodi->free_string(CAddonBase::m_interface->toKodi->kodiBase, retString);
281 } 276 }
282 return ret; 277 return ret;
@@ -305,8 +300,7 @@ namespace dialogs
305 &retString, autoCloseMs); 300 &retString, autoCloseMs);
306 if (retString != nullptr) 301 if (retString != nullptr)
307 { 302 {
308 if (std::strlen(retString)) 303 newPassword = retString;
309 newPassword = retString;
310 CAddonBase::m_interface->toKodi->free_string(CAddonBase::m_interface->toKodi->kodiBase, retString); 304 CAddonBase::m_interface->toKodi->free_string(CAddonBase::m_interface->toKodi->kodiBase, retString);
311 } 305 }
312 return ret; 306 return ret;
@@ -339,8 +333,7 @@ namespace dialogs
339 retries, autoCloseMs); 333 retries, autoCloseMs);
340 if (retString != nullptr) 334 if (retString != nullptr)
341 { 335 {
342 if (std::strlen(retString)) 336 password = retString;
343 password = retString;
344 CAddonBase::m_interface->toKodi->free_string(CAddonBase::m_interface->toKodi->kodiBase, retString); 337 CAddonBase::m_interface->toKodi->free_string(CAddonBase::m_interface->toKodi->kodiBase, retString);
345 } 338 }
346 return ret; 339 return ret;
@@ -373,8 +366,7 @@ namespace dialogs
373 text.c_str(), &retString, searching, autoCloseMs); 366 text.c_str(), &retString, searching, autoCloseMs);
374 if (retString != nullptr) 367 if (retString != nullptr)
375 { 368 {
376 if (std::strlen(retString)) 369 text = retString;
377 text = retString;
378 CAddonBase::m_interface->toKodi->free_string(CAddonBase::m_interface->toKodi->kodiBase, retString); 370 CAddonBase::m_interface->toKodi->free_string(CAddonBase::m_interface->toKodi->kodiBase, retString);
379 } 371 }
380 return ret; 372 return ret;
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/dialogs/Numeric.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/dialogs/Numeric.h
index dddbf7e..70e9e7b 100644
--- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/dialogs/Numeric.h
+++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/dialogs/Numeric.h
@@ -68,8 +68,7 @@ namespace dialogs
68 bool ret = CAddonBase::m_interface->toKodi->kodi_gui->dialogNumeric->show_and_verify_new_password(CAddonBase::m_interface->toKodi->kodiBase, &pw); 68 bool ret = CAddonBase::m_interface->toKodi->kodi_gui->dialogNumeric->show_and_verify_new_password(CAddonBase::m_interface->toKodi->kodiBase, &pw);
69 if (pw != nullptr) 69 if (pw != nullptr)
70 { 70 {
71 if (std::strlen(pw)) 71 newPassword = pw;
72 newPassword = pw;
73 CAddonBase::m_interface->toKodi->free_string(CAddonBase::m_interface->toKodi->kodiBase, pw); 72 CAddonBase::m_interface->toKodi->free_string(CAddonBase::m_interface->toKodi->kodiBase, pw);
74 } 73 }
75 return ret; 74 return ret;
@@ -172,8 +171,7 @@ namespace dialogs
172 toVerify.c_str(), &retString, heading.c_str(), verifyInput); 171 toVerify.c_str(), &retString, heading.c_str(), verifyInput);
173 if (retString != nullptr) 172 if (retString != nullptr)
174 { 173 {
175 if (std::strlen(retString)) 174 toVerify = retString;
176 toVerify = retString;
177 CAddonBase::m_interface->toKodi->free_string(CAddonBase::m_interface->toKodi->kodiBase, retString); 175 CAddonBase::m_interface->toKodi->free_string(CAddonBase::m_interface->toKodi->kodiBase, retString);
178 } 176 }
179 return ret; 177 return ret;
@@ -279,8 +277,7 @@ namespace dialogs
279 ipAddress.c_str(), &retString, heading.c_str()); 277 ipAddress.c_str(), &retString, heading.c_str());
280 if (retString != nullptr) 278 if (retString != nullptr)
281 { 279 {
282 if (std::strlen(retString)) 280 ipAddress = retString;
283 ipAddress = retString;
284 CAddonBase::m_interface->toKodi->free_string(CAddonBase::m_interface->toKodi->kodiBase, retString); 281 CAddonBase::m_interface->toKodi->free_string(CAddonBase::m_interface->toKodi->kodiBase, retString);
285 } 282 }
286 return ret; 283 return ret;
@@ -326,8 +323,7 @@ namespace dialogs
326 input.c_str(), &retString, heading.c_str(), autoCloseTimeoutMs); 323 input.c_str(), &retString, heading.c_str(), autoCloseTimeoutMs);
327 if (retString != nullptr) 324 if (retString != nullptr)
328 { 325 {
329 if (std::strlen(retString)) 326 input = retString;
330 input = retString;
331 CAddonBase::m_interface->toKodi->free_string(CAddonBase::m_interface->toKodi->kodiBase, retString); 327 CAddonBase::m_interface->toKodi->free_string(CAddonBase::m_interface->toKodi->kodiBase, retString);
332 } 328 }
333 return ret; 329 return ret;
@@ -354,8 +350,7 @@ namespace dialogs
354 time.c_str(), &retString, heading.c_str()); 350 time.c_str(), &retString, heading.c_str());
355 if (retString != nullptr) 351 if (retString != nullptr)
356 { 352 {
357 if (std::strlen(retString)) 353 time = retString;
358 time = retString;
359 CAddonBase::m_interface->toKodi->free_string(CAddonBase::m_interface->toKodi->kodiBase, retString); 354 CAddonBase::m_interface->toKodi->free_string(CAddonBase::m_interface->toKodi->kodiBase, retString);
360 } 355 }
361 return ret; 356 return ret;
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/dialogs/Select.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/dialogs/Select.h
index 963c84c..8276832 100644
--- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/dialogs/Select.h
+++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/dialogs/Select.h
@@ -22,6 +22,38 @@
22#include "../definitions.h" 22#include "../definitions.h"
23#include "../../AddonBase.h" 23#include "../../AddonBase.h"
24 24
25//==============================================================================
26/// \defgroup cpp_kodi_vfs_Defs Definitions, structures and enumerators
27/// \ingroup cpp_kodi_gui_dialogs_Select
28/// @brief **Dialog Select definition values**
29//------------------------------------------------------------------------------
30
31//==============================================================================
32/// \ingroup cpp_kodi_vfs_Defs
33/// @brief **Selection entry structure**
34///
35typedef struct SSelectionEntry
36{
37 //============================================================================
38 /// Structure constructor
39 ///
40 /// There becomes selected always set to false.
41 ///
42 SSelectionEntry() : selected(false) { }
43 //----------------------------------------------------------------------------
44
45 /// Entry identfication string
46 std::string id;
47
48 /// Entry name to show on GUI dialog
49 std::string name;
50
51 /// Place where entry can be preselected and after return the from user
52 /// selected is set.
53 bool selected;
54} SSelectionEntry;
55//------------------------------------------------------------------------------
56
25namespace kodi 57namespace kodi
26{ 58{
27namespace gui 59namespace gui
@@ -97,6 +129,139 @@ namespace dialogs
97 return ret; 129 return ret;
98 } 130 }
99 //-------------------------------------------------------------------------- 131 //--------------------------------------------------------------------------
132
133 //==========================================================================
134 ///
135 /// \ingroup cpp_kodi_gui_dialogs_Select
136 /// @brief Show a selection dialog about given parts.
137 ///
138 /// This function is mostly equal to the other, only becomes the string list
139 /// here done by a SSelectionEntry, where a ID string can be defined.
140 ///
141 /// @param[in] heading Dialog heading name
142 /// @param[in] entries SSelectionEntry list about entries
143 /// @param[in] selected [opt] Predefined selection (default is
144 /// <tt>-1</tt> for the first)
145 /// @param[in] autoclose [opt] To close dialog automatic after the given
146 /// time in ms. As '0' it stays open.
147 /// @return The selected entry, if return <tt>-1</tt> was
148 /// nothing selected or canceled
149 ///
150 ///
151 ///-------------------------------------------------------------------------
152 ///
153 /// **Example:**
154 /// ~~~~~~~~~~~~~{.cpp}
155 /// #include <kodi/gui/dialogs/Select.h>
156 ///
157 /// std::vector<SSelectionEntry> entries
158 /// {
159 /// { "ID 1", "Test 1", false },
160 /// { "ID 2", "Test 2", false },
161 /// { "ID 3", "Test 3", false },
162 /// { "ID 4", "Test 4", false },
163 /// { "ID 5", "Test 5", false }
164 /// };
165 ///
166 /// int selected = kodi::gui::dialogs::Select::Show("Test selection", entries, -1);
167 /// if (selected < 0)
168 /// fprintf(stderr, "Item selection canceled\n");
169 /// else
170 /// fprintf(stderr, "Selected item is: %i\n", selected);
171 /// ~~~~~~~~~~~~~
172 ///
173 inline int Show(const std::string& heading, std::vector<SSelectionEntry>& entries, int selected = -1, unsigned int autoclose = 0)
174 {
175 using namespace ::kodi::addon;
176 unsigned int size = entries.size();
177 const char** cEntries = static_cast<const char**>(malloc(size*sizeof(const char*)));
178 for (unsigned int i = 0; i < size; ++i)
179 {
180 cEntries[i] = entries[i].name.c_str();
181 if (selected == -1 && entries[i].selected)
182 selected = i;
183 }
184 int ret = CAddonBase::m_interface->toKodi->kodi_gui->dialogSelect->open(CAddonBase::m_interface->toKodi->kodiBase, heading.c_str(),
185 cEntries, size, selected, autoclose);
186 if (ret >= 0)
187 {
188 entries[ret].selected = true;
189 }
190 free(cEntries);
191 return ret;
192 }
193 //--------------------------------------------------------------------------
194
195 //==========================================================================
196 ///
197 /// \ingroup cpp_kodi_gui_dialogs_Select
198 /// @brief Show a multiple selection dialog about given parts.
199 ///
200 /// @param[in] heading Dialog heading name
201 /// @param[in] entries SSelectionEntry list about entries
202 /// @param[in] autoclose [opt] To close dialog automatic after the given
203 /// time in ms. As '0' it stays open.
204 /// @return The selected entries, if return <tt>empty</tt> was
205 /// nothing selected or canceled
206 ///
207 /// With selected on SSelectionEntry can be a pre selection defined.
208 ///
209 ///-------------------------------------------------------------------------
210 ///
211 /// **Example:**
212 /// ~~~~~~~~~~~~~{.cpp}
213 /// #include <kodi/gui/dialogs/Select.h>
214 ///
215 /// std::vector<SSelectionEntry> entries
216 /// {
217 /// { "ID 1", "Test 1", false },
218 /// { "ID 2", "Test 2", false },
219 /// { "ID 3", "Test 3", false },
220 /// { "ID 4", "Test 4", false },
221 /// { "ID 5", "Test 5", false }
222 /// };
223 ///
224 /// bool ret = kodi::gui::dialogs::Select::ShowMultiSelect("Test selection", entries);
225 /// if (!ret)
226 /// fprintf(stderr, "Selection canceled\n");
227 /// else
228 /// {
229 /// fprintf(stderr, "Selected items:\n");
230 /// for (const auto& entry : entries)
231 /// {
232 /// if (entry.selected)
233 /// fprintf(stderr, " - %s\n", entry.selected.id.c_str());
234 /// }
235 /// }
236 /// ~~~~~~~~~~~~~
237 ///
238 inline bool ShowMultiSelect(const std::string& heading, std::vector<SSelectionEntry>& entries, int autoclose = 0)
239 {
240 using namespace ::kodi::addon;
241 unsigned int size = entries.size();
242 const char** cEntryIDs = static_cast<const char**>(malloc(size*sizeof(const char*)));
243 const char** cEntryNames = static_cast<const char**>(malloc(size*sizeof(const char*)));
244 bool* cEntriesSelected = static_cast<bool*>(malloc(size*sizeof(bool)));
245 for (unsigned int i = 0; i < size; ++i)
246 {
247 cEntryIDs[i] = entries[i].id.c_str();
248 cEntryNames[i] = entries[i].name.c_str();
249 cEntriesSelected[i] = entries[i].selected;
250 }
251 bool ret = CAddonBase::m_interface->toKodi->kodi_gui->dialogSelect->open_multi_select(CAddonBase::m_interface->toKodi->kodiBase,
252 heading.c_str(), cEntryIDs, cEntryNames,
253 cEntriesSelected, size, autoclose);
254 if (ret)
255 {
256 for (unsigned int i = 0; i < size; ++i)
257 entries[i].selected = cEntriesSelected[i];
258 }
259 free(cEntryNames);
260 free(cEntryIDs);
261 free(cEntriesSelected);
262 return ret;
263 }
264 //--------------------------------------------------------------------------
100 }; 265 };
101 /// @} 266 /// @}
102 267
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/libXBMC_addon.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/libXBMC_addon.h
index 8b02e33..c264578 100644
--- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/libXBMC_addon.h
+++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/libXBMC_addon.h
@@ -155,6 +155,7 @@ typedef struct CB_AddOn
155 int (*GetFileChunkSize)(const void* addonData, void* file); 155 int (*GetFileChunkSize)(const void* addonData, void* file);
156 bool (*FileExists)(const void* addonData, const char *strFileName, bool bUseCache); 156 bool (*FileExists)(const void* addonData, const char *strFileName, bool bUseCache);
157 int (*StatFile)(const void* addonData, const char *strFileName, struct __stat64* buffer); 157 int (*StatFile)(const void* addonData, const char *strFileName, struct __stat64* buffer);
158 char *(*GetFileProperty)(const void* addonData, void* file, XFILE::FileProperty type, const char *name);
158 bool (*DeleteFile)(const void* addonData, const char *strFileName); 159 bool (*DeleteFile)(const void* addonData, const char *strFileName);
159 bool (*CanOpenDirectory)(const void* addonData, const char* strURL); 160 bool (*CanOpenDirectory)(const void* addonData, const char* strURL);
160 bool (*CreateDirectory)(const void* addonData, const char *strPath); 161 bool (*CreateDirectory)(const void* addonData, const char *strPath);
@@ -465,6 +466,18 @@ namespace ADDON
465 } 466 }
466 467
467 /*! 468 /*!
469 * @brief Get a property from an open file.
470 * @param file The file to get an property for
471 * @param type type of the requested property.
472 * @param name of the requested property / can be null.
473 * @return The value of the requested property, must be FreeString'ed.
474 */
475 char *GetFileProperty(void* file, XFILE::FileProperty type, const char *name)
476 {
477 return m_Callbacks->GetFileProperty(m_Handle->addonData, file, type, name);
478 }
479
480 /*!
468 * @brief Deletes a file. 481 * @brief Deletes a file.
469 * @param strFileName The filename to delete. 482 * @param strFileName The filename to delete.
470 * @return The file was successfully deleted. 483 * @return The file was successfully deleted.
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/libXBMC_pvr.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/libXBMC_pvr.h
index 6a9145e..f470566 100644
--- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/libXBMC_pvr.h
+++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/libXBMC_pvr.h
@@ -222,13 +222,12 @@ public:
222 /*! 222 /*!
223 * @brief Notify a state change for an EPG event 223 * @brief Notify a state change for an EPG event
224 * @param tag The EPG event. 224 * @param tag The EPG event.
225 * @param iUniqueChannelId The unique id of the channel for the EPG event
226 * @param newState The new state. For EPG_EVENT_CREATED and EPG_EVENT_UPDATED, tag must be filled with all available 225 * @param newState The new state. For EPG_EVENT_CREATED and EPG_EVENT_UPDATED, tag must be filled with all available
227 * event data, not just a delta. For EPG_EVENT_DELETED, it is sufficient to fill EPG_TAG.iUniqueBroadcastId 226 * event data, not just a delta. For EPG_EVENT_DELETED, it is sufficient to fill EPG_TAG.iUniqueBroadcastId
228 */ 227 */
229 void EpgEventStateChange(EPG_TAG *tag, unsigned int iUniqueChannelId, EPG_EVENT_STATE newState) 228 void EpgEventStateChange(EPG_TAG *tag, EPG_EVENT_STATE newState)
230 { 229 {
231 return m_Callbacks->toKodi.EpgEventStateChange(m_Callbacks->toKodi.kodiInstance, tag, iUniqueChannelId, newState); 230 return m_Callbacks->toKodi.EpgEventStateChange(m_Callbacks->toKodi.kodiInstance, tag, newState);
232 } 231 }
233 232
234 /*! 233 /*!
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/versions.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/versions.h
index 870a646..32e6b1a 100644
--- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/versions.h
+++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/versions.h
@@ -41,8 +41,8 @@
41 * overview. 41 * overview.
42 */ 42 */
43 43
44#define ADDON_GLOBAL_VERSION_MAIN "1.0.10" 44#define ADDON_GLOBAL_VERSION_MAIN "1.0.11"
45#define ADDON_GLOBAL_VERSION_MAIN_MIN "1.0.10" 45#define ADDON_GLOBAL_VERSION_MAIN_MIN "1.0.11"
46#define ADDON_GLOBAL_VERSION_MAIN_XML_ID "kodi.binary.global.main" 46#define ADDON_GLOBAL_VERSION_MAIN_XML_ID "kodi.binary.global.main"
47#define ADDON_GLOBAL_VERSION_MAIN_DEPENDS "AddonBase.h" \ 47#define ADDON_GLOBAL_VERSION_MAIN_DEPENDS "AddonBase.h" \
48 "xbmc_addon_dll.h" \ 48 "xbmc_addon_dll.h" \
@@ -55,18 +55,19 @@
55#define ADDON_GLOBAL_VERSION_GENERAL_XML_ID "kodi.binary.global.general" 55#define ADDON_GLOBAL_VERSION_GENERAL_XML_ID "kodi.binary.global.general"
56#define ADDON_GLOBAL_VERSION_GENERAL_DEPENDS "General.h" 56#define ADDON_GLOBAL_VERSION_GENERAL_DEPENDS "General.h"
57 57
58#define ADDON_GLOBAL_VERSION_GUI "5.11.0" 58#define ADDON_GLOBAL_VERSION_GUI "5.12.0"
59#define ADDON_GLOBAL_VERSION_GUI_MIN "5.10.0" 59#define ADDON_GLOBAL_VERSION_GUI_MIN "5.10.0"
60#define ADDON_GLOBAL_VERSION_GUI_XML_ID "kodi.binary.global.gui" 60#define ADDON_GLOBAL_VERSION_GUI_XML_ID "kodi.binary.global.gui"
61#define ADDON_GLOBAL_VERSION_GUI_DEPENDS "libKODI_guilib.h" 61#define ADDON_GLOBAL_VERSION_GUI_DEPENDS "libKODI_guilib.h" \
62 "gui/"
62 63
63#define ADDON_GLOBAL_VERSION_AUDIOENGINE "1.0.0" 64#define ADDON_GLOBAL_VERSION_AUDIOENGINE "1.0.1"
64#define ADDON_GLOBAL_VERSION_AUDIOENGINE_MIN "1.0.0" 65#define ADDON_GLOBAL_VERSION_AUDIOENGINE_MIN "1.0.1"
65#define ADDON_GLOBAL_VERSION_AUDIOENGINE_XML_ID "kodi.binary.global.audioengine" 66#define ADDON_GLOBAL_VERSION_AUDIOENGINE_XML_ID "kodi.binary.global.audioengine"
66#define ADDON_GLOBAL_VERSION_AUDIOENGINE_DEPENDS "AudioEngine.h" 67#define ADDON_GLOBAL_VERSION_AUDIOENGINE_DEPENDS "AudioEngine.h"
67 68
68#define ADDON_GLOBAL_VERSION_FILESYSTEM "1.0.0" 69#define ADDON_GLOBAL_VERSION_FILESYSTEM "1.0.1"
69#define ADDON_GLOBAL_VERSION_FILESYSTEM_MIN "1.0.0" 70#define ADDON_GLOBAL_VERSION_FILESYSTEM_MIN "1.0.1"
70#define ADDON_GLOBAL_VERSION_FILESYSTEM_XML_ID "kodi.binary.global.filesystem" 71#define ADDON_GLOBAL_VERSION_FILESYSTEM_XML_ID "kodi.binary.global.filesystem"
71#define ADDON_GLOBAL_VERSION_FILESYSTEM_DEPENDS "Filesystem.h" 72#define ADDON_GLOBAL_VERSION_FILESYSTEM_DEPENDS "Filesystem.h"
72 73
@@ -102,8 +103,8 @@
102#define ADDON_INSTANCE_VERSION_IMAGEDECODER_XML_ID "kodi.binary.instance.imagedecoder" 103#define ADDON_INSTANCE_VERSION_IMAGEDECODER_XML_ID "kodi.binary.instance.imagedecoder"
103#define ADDON_INSTANCE_VERSION_IMAGEDECODER_DEPENDS "addon-instance/ImageDecoder.h" 104#define ADDON_INSTANCE_VERSION_IMAGEDECODER_DEPENDS "addon-instance/ImageDecoder.h"
104 105
105#define ADDON_INSTANCE_VERSION_INPUTSTREAM "2.0.2" 106#define ADDON_INSTANCE_VERSION_INPUTSTREAM "2.0.4"
106#define ADDON_INSTANCE_VERSION_INPUTSTREAM_MIN "2.0.2" 107#define ADDON_INSTANCE_VERSION_INPUTSTREAM_MIN "2.0.4"
107#define ADDON_INSTANCE_VERSION_INPUTSTREAM_XML_ID "kodi.binary.instance.inputstream" 108#define ADDON_INSTANCE_VERSION_INPUTSTREAM_XML_ID "kodi.binary.instance.inputstream"
108#define ADDON_INSTANCE_VERSION_INPUTSTREAM_DEPENDS "addon-instance/Inputstream.h" 109#define ADDON_INSTANCE_VERSION_INPUTSTREAM_DEPENDS "addon-instance/Inputstream.h"
109 110
@@ -113,8 +114,8 @@
113#define ADDON_INSTANCE_VERSION_PERIPHERAL_DEPENDS "addon-instance/Peripheral.h" \ 114#define ADDON_INSTANCE_VERSION_PERIPHERAL_DEPENDS "addon-instance/Peripheral.h" \
114 "addon-instance/PeripheralUtils.h" 115 "addon-instance/PeripheralUtils.h"
115 116
116#define ADDON_INSTANCE_VERSION_PVR "5.6.0" 117#define ADDON_INSTANCE_VERSION_PVR "5.7.0"
117#define ADDON_INSTANCE_VERSION_PVR_MIN "5.6.0" 118#define ADDON_INSTANCE_VERSION_PVR_MIN "5.7.0"
118#define ADDON_INSTANCE_VERSION_PVR_XML_ID "kodi.binary.instance.pvr" 119#define ADDON_INSTANCE_VERSION_PVR_XML_ID "kodi.binary.instance.pvr"
119#define ADDON_INSTANCE_VERSION_PVR_DEPENDS "xbmc_pvr_dll.h" \ 120#define ADDON_INSTANCE_VERSION_PVR_DEPENDS "xbmc_pvr_dll.h" \
120 "xbmc_pvr_types.h" \ 121 "xbmc_pvr_types.h" \
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_epg_types.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_epg_types.h
index c2b5458..7561ff6 100644
--- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_epg_types.h
+++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_epg_types.h
@@ -91,8 +91,8 @@ extern "C" {
91 */ 91 */
92 typedef struct EPG_TAG { 92 typedef struct EPG_TAG {
93 unsigned int iUniqueBroadcastId; /*!< @brief (required) identifier for this event. Event uids must be unique for a channel. Valid uids must be greater than EPG_TAG_INVALID_UID. */ 93 unsigned int iUniqueBroadcastId; /*!< @brief (required) identifier for this event. Event uids must be unique for a channel. Valid uids must be greater than EPG_TAG_INVALID_UID. */
94 unsigned int iUniqueChannelId; /*!< @brief (required) unique identifier of the channel this event belongs to. */
94 const char * strTitle; /*!< @brief (required) this event's title */ 95 const char * strTitle; /*!< @brief (required) this event's title */
95 unsigned int iChannelNumber; /*!< @brief (required) the number of the channel this event occurs on */
96 time_t startTime; /*!< @brief (required) start time in UTC */ 96 time_t startTime; /*!< @brief (required) start time in UTC */
97 time_t endTime; /*!< @brief (required) end time in UTC */ 97 time_t endTime; /*!< @brief (required) end time in UTC */
98 const char * strPlotOutline; /*!< @brief (optional) plot outline */ 98 const char * strPlotOutline; /*!< @brief (optional) plot outline */
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_pvr_dll.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_pvr_dll.h
index 3dbf1c8..019644b 100644
--- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_pvr_dll.h
+++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_pvr_dll.h
@@ -97,6 +97,35 @@ extern "C"
97 * @remarks Required if bSupportsEPG is set to true. Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. 97 * @remarks Required if bSupportsEPG is set to true. Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function.
98 */ 98 */
99 PVR_ERROR GetEPGForChannel(ADDON_HANDLE handle, const PVR_CHANNEL& channel, time_t iStart, time_t iEnd); 99 PVR_ERROR GetEPGForChannel(ADDON_HANDLE handle, const PVR_CHANNEL& channel, time_t iStart, time_t iEnd);
100
101 /*
102 * Check if the given EPG tag can be recorded.
103 * @param tag the epg tag to check.
104 * @param [out] bIsRecordable Set to true if the tag can be recorded.
105 * @return PVR_ERROR_NO_ERROR if bIsRecordable has been set successfully.
106 * @remarks Optional, return PVR_ERROR_NOT_IMPLEMENTED to let Kodi decide.
107 */
108 PVR_ERROR IsEPGTagRecordable(const EPG_TAG* tag, bool* bIsRecordable);
109
110 /*
111 * Check if the given EPG tag can be played.
112 * @param tag the epg tag to check.
113 * @param [out] bIsPlayable Set to true if the tag can be played.
114 * @return PVR_ERROR_NO_ERROR if bIsPlayable has been set successfully.
115 * @remarks Required if add-on supports playing epg tags. Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function.
116 */
117 PVR_ERROR IsEPGTagPlayable(const EPG_TAG* tag, bool* bIsPlayable);
118
119 /*!
120 * Get the stream properties for an epg tag from the backend.
121 * @param[in] tag The epg tag to get the stream properties for.
122 * @param[inout] properties in: an array for the properties to return, out: the properties required to play the stream.
123 * @param[inout] iPropertiesCount in: the size of the properties array, out: the number of properties returned.
124 * @return PVR_ERROR_NO_ERROR if the stream is available.
125 * @remarks Required if add-on supports playing epg tags. In this case your implementation must fill the property PVR_STREAM_PROPERTY_STREAMURL with the URL Kodi should resolve to playback the epg tag. Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function.
126 */
127 PVR_ERROR GetEPGTagStreamProperties(const EPG_TAG* tag, PVR_NAMED_VALUE* properties, unsigned int* iPropertiesCount);
128
100 //@} 129 //@}
101 130
102 /*! @name PVR channel group methods 131 /*! @name PVR channel group methods
@@ -429,7 +458,7 @@ extern "C"
429 * Get the stream properties for a channel from the backend. 458 * Get the stream properties for a channel from the backend.
430 * @param[in] channel The channel to get the stream properties for. 459 * @param[in] channel The channel to get the stream properties for.
431 * @param[inout] properties in: an array for the properties to return, out: the properties required to play the stream. 460 * @param[inout] properties in: an array for the properties to return, out: the properties required to play the stream.
432 * @param[inout] iPropertiesCount: in the size of the properties array, out: the number of properties returned. 461 * @param[inout] iPropertiesCount in: the size of the properties array, out: the number of properties returned.
433 * @return PVR_ERROR_NO_ERROR if the stream is available. 462 * @return PVR_ERROR_NO_ERROR if the stream is available.
434 * @remarks Required if PVR_ADDON_CAPABILITIES::bSupportsTV or PVR_ADDON_CAPABILITIES::bSupportsRadio are set to true and PVR_ADDON_CAPABILITIES::bHandlesInputStream is set to false. In this case the implementation must fill the property PVR_STREAM_PROPERTY_STREAMURL with the URL Kodi should resolve to playback the channel. Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. 463 * @remarks Required if PVR_ADDON_CAPABILITIES::bSupportsTV or PVR_ADDON_CAPABILITIES::bSupportsRadio are set to true and PVR_ADDON_CAPABILITIES::bHandlesInputStream is set to false. In this case the implementation must fill the property PVR_STREAM_PROPERTY_STREAMURL with the URL Kodi should resolve to playback the channel. Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function.
435 */ 464 */
@@ -439,7 +468,7 @@ extern "C"
439 * Get the stream properties for a recording from the backend. 468 * Get the stream properties for a recording from the backend.
440 * @param[in] channel The recording to get the stream properties for. 469 * @param[in] channel The recording to get the stream properties for.
441 * @param[inout] properties in: an array for the properties to return, out: the properties required to play the stream. 470 * @param[inout] properties in: an array for the properties to return, out: the properties required to play the stream.
442 * @param[inout] iPropertiesCount: in the size of the properties array, out: the number of properties returned. 471 * @param[inout] iPropertiesCount in: the size of the properties array, out: the number of properties returned.
443 * @return PVR_ERROR_NO_ERROR if the stream is available. 472 * @return PVR_ERROR_NO_ERROR if the stream is available.
444 * @remarks Required if PVR_ADDON_CAPABILITIES::bSupportsRecordings is set to true and the add-on does not implement recording stream functions (OpenRecordedStream, ...). In this case your implementation must fill the property PVR_STREAM_PROPERTY_STREAMURL with the URL Kodi should resolve to playback the recording. Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. 473 * @remarks Required if PVR_ADDON_CAPABILITIES::bSupportsRecordings is set to true and the add-on does not implement recording stream functions (OpenRecordedStream, ...). In this case your implementation must fill the property PVR_STREAM_PROPERTY_STREAMURL with the URL Kodi should resolve to playback the recording. Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function.
445 */ 474 */
@@ -657,7 +686,10 @@ extern "C"
657 pClient->toAddon.OpenDialogChannelScan = OpenDialogChannelScan; 686 pClient->toAddon.OpenDialogChannelScan = OpenDialogChannelScan;
658 pClient->toAddon.MenuHook = CallMenuHook; 687 pClient->toAddon.MenuHook = CallMenuHook;
659 688
660 pClient->toAddon.GetEpg = GetEPGForChannel; 689 pClient->toAddon.GetEPGForChannel = GetEPGForChannel;
690 pClient->toAddon.IsEPGTagRecordable = IsEPGTagRecordable;
691 pClient->toAddon.IsEPGTagPlayable = IsEPGTagPlayable;
692 pClient->toAddon.GetEPGTagStreamProperties = GetEPGTagStreamProperties;
661 693
662 pClient->toAddon.GetChannelGroupsAmount = GetChannelGroupsAmount; 694 pClient->toAddon.GetChannelGroupsAmount = GetChannelGroupsAmount;
663 pClient->toAddon.GetChannelGroups = GetChannelGroups; 695 pClient->toAddon.GetChannelGroups = GetChannelGroups;
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_pvr_types.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_pvr_types.h
index 9a64f92..a7d21ed 100644
--- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_pvr_types.h
+++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_pvr_types.h
@@ -77,9 +77,10 @@ struct DemuxPacket;
77#define XBMC_INVALID_CODEC_ID 0 77#define XBMC_INVALID_CODEC_ID 0
78#define XBMC_INVALID_CODEC { XBMC_CODEC_TYPE_UNKNOWN, XBMC_INVALID_CODEC_ID } 78#define XBMC_INVALID_CODEC { XBMC_CODEC_TYPE_UNKNOWN, XBMC_INVALID_CODEC_ID }
79 79
80/* defines for GetChannelStreamProperties and GetRecordingStreamProperties */ 80/* defines for GetChannelStreamProperties, GetRecordingStreamProperties and GetEPGTagStreamProperties */
81#define PVR_STREAM_MAX_PROPERTIES 20 81#define PVR_STREAM_MAX_PROPERTIES 20
82#define PVR_STREAM_PROPERTY_STREAMURL "streamurl" 82#define PVR_STREAM_PROPERTY_STREAMURL "streamurl" /*!< @brief the URL of the stream that should be played. */
83#define PVR_STREAM_PROPERTY_INPUTSTREAMADDON "inputstreamaddon" /*!< @brief the name of the inputstream add-on that should be used by Kodi to play the stream denoted by PVR_STREAM_PROPERTY_STREAMURL. Leave blank to use Kodi's built-in playing capabilities. */
83 84
84/* using the default avformat's MAX_STREAMS value to be safe */ 85/* using the default avformat's MAX_STREAMS value to be safe */
85#define PVR_STREAM_MAX_STREAMS 20 86#define PVR_STREAM_MAX_STREAMS 20
@@ -620,7 +621,7 @@ extern "C" {
620 DemuxPacket* (*AllocateDemuxPacket)(void* kodiInstance, int iDataSize); 621 DemuxPacket* (*AllocateDemuxPacket)(void* kodiInstance, int iDataSize);
621 622
622 void (*ConnectionStateChange)(void* kodiInstance, const char* strConnectionString, PVR_CONNECTION_STATE newState, const char *strMessage); 623 void (*ConnectionStateChange)(void* kodiInstance, const char* strConnectionString, PVR_CONNECTION_STATE newState, const char *strMessage);
623 void (*EpgEventStateChange)(void* kodiInstance, EPG_TAG* tag, unsigned int iUniqueChannelId, EPG_EVENT_STATE newState); 624 void (*EpgEventStateChange)(void* kodiInstance, EPG_TAG* tag, EPG_EVENT_STATE newState);
624 625
625 xbmc_codec_t (*GetCodecByName)(const void* kodiInstance, const char* strCodecName); 626 xbmc_codec_t (*GetCodecByName)(const void* kodiInstance, const char* strCodecName);
626 } AddonToKodiFuncTable_PVR; 627 } AddonToKodiFuncTable_PVR;
@@ -639,7 +640,10 @@ extern "C" {
639 const char* (__cdecl* GetConnectionString)(void); 640 const char* (__cdecl* GetConnectionString)(void);
640 PVR_ERROR (__cdecl* GetDriveSpace)(long long*, long long*); 641 PVR_ERROR (__cdecl* GetDriveSpace)(long long*, long long*);
641 PVR_ERROR (__cdecl* MenuHook)(const PVR_MENUHOOK&, const PVR_MENUHOOK_DATA&); 642 PVR_ERROR (__cdecl* MenuHook)(const PVR_MENUHOOK&, const PVR_MENUHOOK_DATA&);
642 PVR_ERROR (__cdecl* GetEpg)(ADDON_HANDLE, const PVR_CHANNEL&, time_t, time_t); 643 PVR_ERROR (__cdecl* GetEPGForChannel)(ADDON_HANDLE, const PVR_CHANNEL&, time_t, time_t);
644 PVR_ERROR (__cdecl* IsEPGTagRecordable)(const EPG_TAG*, bool*);
645 PVR_ERROR (__cdecl* IsEPGTagPlayable)(const EPG_TAG*, bool*);
646 PVR_ERROR (__cdecl* GetEPGTagStreamProperties)(const EPG_TAG*, PVR_NAMED_VALUE*, unsigned int*);
643 int (__cdecl* GetChannelGroupsAmount)(void); 647 int (__cdecl* GetChannelGroupsAmount)(void);
644 PVR_ERROR (__cdecl* GetChannelGroups)(ADDON_HANDLE, bool); 648 PVR_ERROR (__cdecl* GetChannelGroups)(ADDON_HANDLE, bool);
645 PVR_ERROR (__cdecl* GetChannelGroupMembers)(ADDON_HANDLE, const PVR_CHANNEL_GROUP&); 649 PVR_ERROR (__cdecl* GetChannelGroupMembers)(ADDON_HANDLE, const PVR_CHANNEL_GROUP&);