summaryrefslogtreecommitdiffstats
path: root/xbmc/addons/kodi-dev-kit/include/kodi/addon-instance/PVR.h
diff options
context:
space:
mode:
authormanuel <manuel@mausz.at>2021-03-04 23:36:40 +0100
committermanuel <manuel@mausz.at>2021-03-04 23:36:40 +0100
commit3cb8aa05f8cee9e860cf83531682ff0ed4af6a4f (patch)
tree921f4829b32126f80f9113c124f2e14c0ebce8d9 /xbmc/addons/kodi-dev-kit/include/kodi/addon-instance/PVR.h
parentbe933ef2241d79558f91796cc5b3a161f72ebf9c (diff)
downloadkodi-pvr-build-Matrix.tar.gz
kodi-pvr-build-Matrix.tar.bz2
kodi-pvr-build-Matrix.zip
sync with upstreamMatrix
Diffstat (limited to 'xbmc/addons/kodi-dev-kit/include/kodi/addon-instance/PVR.h')
-rw-r--r--xbmc/addons/kodi-dev-kit/include/kodi/addon-instance/PVR.h80
1 files changed, 59 insertions, 21 deletions
diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/addon-instance/PVR.h b/xbmc/addons/kodi-dev-kit/include/kodi/addon-instance/PVR.h
index d5977a7..61e294f 100644
--- a/xbmc/addons/kodi-dev-kit/include/kodi/addon-instance/PVR.h
+++ b/xbmc/addons/kodi-dev-kit/include/kodi/addon-instance/PVR.h
@@ -36,7 +36,7 @@
36 * Only must be min version increased if a new compile of addon breaks after 36 * Only must be min version increased if a new compile of addon breaks after
37 * changes here. 37 * changes here.
38 * 38 *
39 * Have by add of new parts a look about **Doxygen** `\\ingroup`, so that 39 * Have by add of new parts a look about **Doxygen** `\@ingroup`, so that
40 * added parts included in documentation. 40 * added parts included in documentation.
41 * 41 *
42 * If you add addon side related documentation, where his dev need know, use `///`. 42 * If you add addon side related documentation, where his dev need know, use `///`.
@@ -1477,22 +1477,39 @@ public:
1477 //---------------------------------------------------------------------------- 1477 //----------------------------------------------------------------------------
1478 1478
1479 //============================================================================ 1479 //============================================================================
1480 /// @brief Tell the client the time frame to use when notifying epg events back to Kodi 1480 /// @brief Tell the client the past time frame to use when notifying epg events back to Kodi
1481 /// 1481 ///
1482 /// The client might push epg events asynchronously to Kodi using the callback function 1482 /// The client might push epg events asynchronously to Kodi using the callback function
1483 /// @ref EpgEventStateChange. To be able to only push events that are actually of 1483 /// @ref EpgEventStateChange. To be able to only push events that are actually of
1484 /// interest for Kodi, client needs to know about the epg time frame Kodi uses. Kodi 1484 /// interest for Kodi, client needs to know about the epg time frame Kodi uses. Kodi supplies
1485 /// supplies the current epg time frame value in @ref EpgMaxDays() when creating the 1485 /// the current epg max past time frame value @ref EpgMaxPastDays() when creating the addon
1486 /// addon and calls @ref SetEPGTimeFrame later whenever Kodi's epg time frame value 1486 /// and calls @ref SetEPGMaxPastDays later whenever Kodi's epg time frame value changes.
1487 /// changes.
1488 /// 1487 ///
1489 /// @param[in] days number of days from "now". @ref EPG_TIMEFRAME_UNLIMITED means that Kodi 1488 /// @param[in] pastDays number of days before "now". @ref EPG_TIMEFRAME_UNLIMITED means that Kodi
1490 /// is interested in all epg events, regardless of event times. 1489 /// is interested in all epg events, regardless of event times.
1491 /// @return @ref PVR_ERROR_NO_ERROR if new value was successfully set. 1490 /// @return @ref PVR_ERROR_NO_ERROR if new value was successfully set.
1492 /// 1491 ///
1493 /// @remarks Required if @ref PVRCapabilities::SetSupportsEPG "supportsEPG" is set to true. 1492 /// @remarks Required if @ref PVRCapabilities::SetSupportsEPG "supportsEPG" is set to true.
1494 /// 1493 ///
1495 virtual PVR_ERROR SetEPGTimeFrame(int days) { return PVR_ERROR_NOT_IMPLEMENTED; } 1494 virtual PVR_ERROR SetEPGMaxPastDays(int pastDays) { return PVR_ERROR_NOT_IMPLEMENTED; }
1495 //----------------------------------------------------------------------------
1496
1497 //============================================================================
1498 /// @brief Tell the client the future time frame to use when notifying epg events back to Kodi
1499 ///
1500 /// The client might push epg events asynchronously to Kodi using the callback function
1501 /// @ref EpgEventStateChange. To be able to only push events that are actually of
1502 /// interest for Kodi, client needs to know about the epg time frame Kodi uses. Kodi supplies
1503 /// the current epg max future time frame value @ref EpgMaxFutureDays() when creating the addon
1504 /// and calls @ref SetEPGMaxFutureDays later whenever Kodi's epg time frame value changes.
1505 ///
1506 /// @param[in] futureDays number of days from "now". @ref EPG_TIMEFRAME_UNLIMITED means that Kodi
1507 /// is interested in all epg events, regardless of event times.
1508 /// @return @ref PVR_ERROR_NO_ERROR if new value was successfully set.
1509 ///
1510 /// @remarks Required if @ref PVRCapabilities::SetSupportsEPG "supportsEPG" is set to true.
1511 ///
1512 virtual PVR_ERROR SetEPGMaxFutureDays(int futureDays) { return PVR_ERROR_NOT_IMPLEMENTED; }
1496 //---------------------------------------------------------------------------- 1513 //----------------------------------------------------------------------------
1497 1514
1498 //========================================================================== 1515 //==========================================================================
@@ -1518,15 +1535,28 @@ public:
1518 1535
1519 //========================================================================== 1536 //==========================================================================
1520 /// @brief **Callback to Kodi Function**\n 1537 /// @brief **Callback to Kodi Function**\n
1521 /// Get the Max days handled by Kodi. 1538 /// Get the Max past days handled by Kodi.
1522 /// 1539 ///
1523 /// If > @ref EPG_TIMEFRAME_UNLIMITED, in async epg mode, deliver only events 1540 /// If > @ref EPG_TIMEFRAME_UNLIMITED, in async epg mode, deliver only events in the
1524 /// in the range from 'end time > now' to 'start time < now + EpgMaxDays(). 1541 /// range from 'end time > now - EpgMaxPastDays()' to 'start time < now + EpgMaxFutureDays().
1525 /// @ref EPG_TIMEFRAME_UNLIMITED, notify all events. 1542 /// @ref EPG_TIMEFRAME_UNLIMITED, notify all events.
1526 /// 1543 ///
1527 /// @return The Max days handled by Kodi 1544 /// @return The Max past days handled by Kodi
1528 /// 1545 ///
1529 inline int EpgMaxDays() const { return m_instanceData->props->iEpgMaxDays; } 1546 inline int EpgMaxPastDays() const { return m_instanceData->props->iEpgMaxPastDays; }
1547 //----------------------------------------------------------------------------
1548
1549 //==========================================================================
1550 /// @brief **Callback to Kodi Function**\n
1551 /// Get the Max future days handled by Kodi.
1552 ///
1553 /// If > @ref EPG_TIMEFRAME_UNLIMITED, in async epg mode, deliver only events in the
1554 /// range from 'end time > now - EpgMaxPastDays()' to 'start time < now + EpgMaxFutureDays().
1555 /// @ref EPG_TIMEFRAME_UNLIMITED, notify all events.
1556 ///
1557 /// @return The Max future days handled by Kodi
1558 ///
1559 inline int EpgMaxFutureDays() const { return m_instanceData->props->iEpgMaxFutureDays; }
1530 //---------------------------------------------------------------------------- 1560 //----------------------------------------------------------------------------
1531 1561
1532 //========================================================================== 1562 //==========================================================================
@@ -2324,7 +2354,7 @@ public:
2324 /// @remarks Required, and only used if addon has its own demuxer. 2354 /// @remarks Required, and only used if addon has its own demuxer.
2325 /// Return `nullptr` if this add-on won't provide this function. 2355 /// Return `nullptr` if this add-on won't provide this function.
2326 /// 2356 ///
2327 virtual DemuxPacket* DemuxRead() { return nullptr; } 2357 virtual DEMUX_PACKET* DemuxRead() { return nullptr; }
2328 //---------------------------------------------------------------------------- 2358 //----------------------------------------------------------------------------
2329 2359
2330 //============================================================================ 2360 //============================================================================
@@ -2413,7 +2443,7 @@ public:
2413 /// 2443 ///
2414 /// @remarks Only called from addon itself 2444 /// @remarks Only called from addon itself
2415 /// 2445 ///
2416 inline DemuxPacket* AllocateDemuxPacket(int iDataSize) 2446 inline DEMUX_PACKET* AllocateDemuxPacket(int iDataSize)
2417 { 2447 {
2418 return m_instanceData->toKodi->AllocateDemuxPacket(m_instanceData->toKodi->kodiInstance, 2448 return m_instanceData->toKodi->AllocateDemuxPacket(m_instanceData->toKodi->kodiInstance,
2419 iDataSize); 2449 iDataSize);
@@ -2428,7 +2458,7 @@ public:
2428 /// 2458 ///
2429 /// @remarks Only called from addon itself. 2459 /// @remarks Only called from addon itself.
2430 /// 2460 ///
2431 inline void FreeDemuxPacket(DemuxPacket* pPacket) 2461 inline void FreeDemuxPacket(DEMUX_PACKET* pPacket)
2432 { 2462 {
2433 m_instanceData->toKodi->FreeDemuxPacket(m_instanceData->toKodi->kodiInstance, pPacket); 2463 m_instanceData->toKodi->FreeDemuxPacket(m_instanceData->toKodi->kodiInstance, pPacket);
2434 } 2464 }
@@ -2662,7 +2692,8 @@ private:
2662 m_instanceData->toAddon->IsEPGTagPlayable = ADDON_IsEPGTagPlayable; 2692 m_instanceData->toAddon->IsEPGTagPlayable = ADDON_IsEPGTagPlayable;
2663 m_instanceData->toAddon->GetEPGTagEdl = ADDON_GetEPGTagEdl; 2693 m_instanceData->toAddon->GetEPGTagEdl = ADDON_GetEPGTagEdl;
2664 m_instanceData->toAddon->GetEPGTagStreamProperties = ADDON_GetEPGTagStreamProperties; 2694 m_instanceData->toAddon->GetEPGTagStreamProperties = ADDON_GetEPGTagStreamProperties;
2665 m_instanceData->toAddon->SetEPGTimeFrame = ADDON_SetEPGTimeFrame; 2695 m_instanceData->toAddon->SetEPGMaxPastDays = ADDON_SetEPGMaxPastDays;
2696 m_instanceData->toAddon->SetEPGMaxFutureDays = ADDON_SetEPGMaxFutureDays;
2666 m_instanceData->toAddon->CallEPGMenuHook = ADDON_CallEPGMenuHook; 2697 m_instanceData->toAddon->CallEPGMenuHook = ADDON_CallEPGMenuHook;
2667 //--==----==----==----==----==----==----==----==----==----==----==----==----== 2698 //--==----==----==----==----==----==----==----==----==----==----==----==----==
2668 m_instanceData->toAddon->GetRecordingsAmount = ADDON_GetRecordingsAmount; 2699 m_instanceData->toAddon->GetRecordingsAmount = ADDON_GetRecordingsAmount;
@@ -2998,10 +3029,17 @@ private:
2998 return error; 3029 return error;
2999 } 3030 }
3000 3031
3001 inline static PVR_ERROR ADDON_SetEPGTimeFrame(const AddonInstance_PVR* instance, int days) 3032 inline static PVR_ERROR ADDON_SetEPGMaxPastDays(const AddonInstance_PVR* instance, int pastDays)
3033 {
3034 return static_cast<CInstancePVRClient*>(instance->toAddon->addonInstance)
3035 ->SetEPGMaxPastDays(pastDays);
3036 }
3037
3038 inline static PVR_ERROR ADDON_SetEPGMaxFutureDays(const AddonInstance_PVR* instance,
3039 int futureDays)
3002 { 3040 {
3003 return static_cast<CInstancePVRClient*>(instance->toAddon->addonInstance) 3041 return static_cast<CInstancePVRClient*>(instance->toAddon->addonInstance)
3004 ->SetEPGTimeFrame(days); 3042 ->SetEPGMaxFutureDays(futureDays);
3005 } 3043 }
3006 3044
3007 inline static PVR_ERROR ADDON_CallEPGMenuHook(const AddonInstance_PVR* instance, 3045 inline static PVR_ERROR ADDON_CallEPGMenuHook(const AddonInstance_PVR* instance,
@@ -3364,7 +3402,7 @@ private:
3364 static_cast<CInstancePVRClient*>(instance->toAddon->addonInstance)->DemuxFlush(); 3402 static_cast<CInstancePVRClient*>(instance->toAddon->addonInstance)->DemuxFlush();
3365 } 3403 }
3366 3404
3367 inline static DemuxPacket* ADDON_DemuxRead(const AddonInstance_PVR* instance) 3405 inline static DEMUX_PACKET* ADDON_DemuxRead(const AddonInstance_PVR* instance)
3368 { 3406 {
3369 return static_cast<CInstancePVRClient*>(instance->toAddon->addonInstance)->DemuxRead(); 3407 return static_cast<CInstancePVRClient*>(instance->toAddon->addonInstance)->DemuxRead();
3370 } 3408 }