From 3cb8aa05f8cee9e860cf83531682ff0ed4af6a4f Mon Sep 17 00:00:00 2001 From: manuel Date: Thu, 4 Mar 2021 23:36:40 +0100 Subject: sync with upstream --- .../kodi-dev-kit/include/kodi/addon-instance/PVR.h | 80 ++++++++++++++++------ 1 file changed, 59 insertions(+), 21 deletions(-) (limited to 'xbmc/addons/kodi-dev-kit/include/kodi/addon-instance/PVR.h') 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 @@ * Only must be min version increased if a new compile of addon breaks after * changes here. * - * Have by add of new parts a look about **Doxygen** `\\ingroup`, so that + * Have by add of new parts a look about **Doxygen** `\@ingroup`, so that * added parts included in documentation. * * If you add addon side related documentation, where his dev need know, use `///`. @@ -1477,22 +1477,39 @@ public: //---------------------------------------------------------------------------- //============================================================================ - /// @brief Tell the client the time frame to use when notifying epg events back to Kodi + /// @brief Tell the client the past time frame to use when notifying epg events back to Kodi /// /// The client might push epg events asynchronously to Kodi using the callback function /// @ref EpgEventStateChange. To be able to only push events that are actually of - /// interest for Kodi, client needs to know about the epg time frame Kodi uses. Kodi - /// supplies the current epg time frame value in @ref EpgMaxDays() when creating the - /// addon and calls @ref SetEPGTimeFrame later whenever Kodi's epg time frame value - /// changes. + /// interest for Kodi, client needs to know about the epg time frame Kodi uses. Kodi supplies + /// the current epg max past time frame value @ref EpgMaxPastDays() when creating the addon + /// and calls @ref SetEPGMaxPastDays later whenever Kodi's epg time frame value changes. /// - /// @param[in] days number of days from "now". @ref EPG_TIMEFRAME_UNLIMITED means that Kodi - /// is interested in all epg events, regardless of event times. + /// @param[in] pastDays number of days before "now". @ref EPG_TIMEFRAME_UNLIMITED means that Kodi + /// is interested in all epg events, regardless of event times. /// @return @ref PVR_ERROR_NO_ERROR if new value was successfully set. /// /// @remarks Required if @ref PVRCapabilities::SetSupportsEPG "supportsEPG" is set to true. /// - virtual PVR_ERROR SetEPGTimeFrame(int days) { return PVR_ERROR_NOT_IMPLEMENTED; } + virtual PVR_ERROR SetEPGMaxPastDays(int pastDays) { return PVR_ERROR_NOT_IMPLEMENTED; } + //---------------------------------------------------------------------------- + + //============================================================================ + /// @brief Tell the client the future time frame to use when notifying epg events back to Kodi + /// + /// The client might push epg events asynchronously to Kodi using the callback function + /// @ref EpgEventStateChange. To be able to only push events that are actually of + /// interest for Kodi, client needs to know about the epg time frame Kodi uses. Kodi supplies + /// the current epg max future time frame value @ref EpgMaxFutureDays() when creating the addon + /// and calls @ref SetEPGMaxFutureDays later whenever Kodi's epg time frame value changes. + /// + /// @param[in] futureDays number of days from "now". @ref EPG_TIMEFRAME_UNLIMITED means that Kodi + /// is interested in all epg events, regardless of event times. + /// @return @ref PVR_ERROR_NO_ERROR if new value was successfully set. + /// + /// @remarks Required if @ref PVRCapabilities::SetSupportsEPG "supportsEPG" is set to true. + /// + virtual PVR_ERROR SetEPGMaxFutureDays(int futureDays) { return PVR_ERROR_NOT_IMPLEMENTED; } //---------------------------------------------------------------------------- //========================================================================== @@ -1518,15 +1535,28 @@ public: //========================================================================== /// @brief **Callback to Kodi Function**\n - /// Get the Max days handled by Kodi. + /// Get the Max past days handled by Kodi. /// - /// If > @ref EPG_TIMEFRAME_UNLIMITED, in async epg mode, deliver only events - /// in the range from 'end time > now' to 'start time < now + EpgMaxDays(). + /// If > @ref EPG_TIMEFRAME_UNLIMITED, in async epg mode, deliver only events in the + /// range from 'end time > now - EpgMaxPastDays()' to 'start time < now + EpgMaxFutureDays(). /// @ref EPG_TIMEFRAME_UNLIMITED, notify all events. /// - /// @return The Max days handled by Kodi + /// @return The Max past days handled by Kodi /// - inline int EpgMaxDays() const { return m_instanceData->props->iEpgMaxDays; } + inline int EpgMaxPastDays() const { return m_instanceData->props->iEpgMaxPastDays; } + //---------------------------------------------------------------------------- + + //========================================================================== + /// @brief **Callback to Kodi Function**\n + /// Get the Max future days handled by Kodi. + /// + /// If > @ref EPG_TIMEFRAME_UNLIMITED, in async epg mode, deliver only events in the + /// range from 'end time > now - EpgMaxPastDays()' to 'start time < now + EpgMaxFutureDays(). + /// @ref EPG_TIMEFRAME_UNLIMITED, notify all events. + /// + /// @return The Max future days handled by Kodi + /// + inline int EpgMaxFutureDays() const { return m_instanceData->props->iEpgMaxFutureDays; } //---------------------------------------------------------------------------- //========================================================================== @@ -2324,7 +2354,7 @@ public: /// @remarks Required, and only used if addon has its own demuxer. /// Return `nullptr` if this add-on won't provide this function. /// - virtual DemuxPacket* DemuxRead() { return nullptr; } + virtual DEMUX_PACKET* DemuxRead() { return nullptr; } //---------------------------------------------------------------------------- //============================================================================ @@ -2413,7 +2443,7 @@ public: /// /// @remarks Only called from addon itself /// - inline DemuxPacket* AllocateDemuxPacket(int iDataSize) + inline DEMUX_PACKET* AllocateDemuxPacket(int iDataSize) { return m_instanceData->toKodi->AllocateDemuxPacket(m_instanceData->toKodi->kodiInstance, iDataSize); @@ -2428,7 +2458,7 @@ public: /// /// @remarks Only called from addon itself. /// - inline void FreeDemuxPacket(DemuxPacket* pPacket) + inline void FreeDemuxPacket(DEMUX_PACKET* pPacket) { m_instanceData->toKodi->FreeDemuxPacket(m_instanceData->toKodi->kodiInstance, pPacket); } @@ -2662,7 +2692,8 @@ private: m_instanceData->toAddon->IsEPGTagPlayable = ADDON_IsEPGTagPlayable; m_instanceData->toAddon->GetEPGTagEdl = ADDON_GetEPGTagEdl; m_instanceData->toAddon->GetEPGTagStreamProperties = ADDON_GetEPGTagStreamProperties; - m_instanceData->toAddon->SetEPGTimeFrame = ADDON_SetEPGTimeFrame; + m_instanceData->toAddon->SetEPGMaxPastDays = ADDON_SetEPGMaxPastDays; + m_instanceData->toAddon->SetEPGMaxFutureDays = ADDON_SetEPGMaxFutureDays; m_instanceData->toAddon->CallEPGMenuHook = ADDON_CallEPGMenuHook; //--==----==----==----==----==----==----==----==----==----==----==----==----== m_instanceData->toAddon->GetRecordingsAmount = ADDON_GetRecordingsAmount; @@ -2998,10 +3029,17 @@ private: return error; } - inline static PVR_ERROR ADDON_SetEPGTimeFrame(const AddonInstance_PVR* instance, int days) + inline static PVR_ERROR ADDON_SetEPGMaxPastDays(const AddonInstance_PVR* instance, int pastDays) + { + return static_cast(instance->toAddon->addonInstance) + ->SetEPGMaxPastDays(pastDays); + } + + inline static PVR_ERROR ADDON_SetEPGMaxFutureDays(const AddonInstance_PVR* instance, + int futureDays) { return static_cast(instance->toAddon->addonInstance) - ->SetEPGTimeFrame(days); + ->SetEPGMaxFutureDays(futureDays); } inline static PVR_ERROR ADDON_CallEPGMenuHook(const AddonInstance_PVR* instance, @@ -3364,7 +3402,7 @@ private: static_cast(instance->toAddon->addonInstance)->DemuxFlush(); } - inline static DemuxPacket* ADDON_DemuxRead(const AddonInstance_PVR* instance) + inline static DEMUX_PACKET* ADDON_DemuxRead(const AddonInstance_PVR* instance) { return static_cast(instance->toAddon->addonInstance)->DemuxRead(); } -- cgit v1.2.3