From 9fa33fb0a7747c875a3ae5e35dccd3a502c8a44e Mon Sep 17 00:00:00 2001 From: Kai Sommerfeld Date: Sat, 16 Feb 2019 19:09:31 +0100 Subject: [PVR] CEpgInfoTag cosmetics. --- xbmc/pvr/timers/PVRTimerInfoTag.cpp | 30 +++++++++++++++--------------- xbmc/pvr/timers/PVRTimerInfoTag.h | 12 ++++++------ 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/xbmc/pvr/timers/PVRTimerInfoTag.cpp b/xbmc/pvr/timers/PVRTimerInfoTag.cpp index c673fc187b..4caa60aa93 100644 --- a/xbmc/pvr/timers/PVRTimerInfoTag.cpp +++ b/xbmc/pvr/timers/PVRTimerInfoTag.cpp @@ -295,13 +295,6 @@ void CPVRTimerInfoTag::Serialize(CVariant &value) const value["serieslink"] = m_strSeriesLink; } -void CPVRTimerInfoTag::UpdateEpgInfoTag(void) -{ - CSingleLock lock(m_critSection); - m_epgTag.reset(); - GetEpgInfoTag(); -} - void CPVRTimerInfoTag::UpdateSummary(void) { CSingleLock lock(m_critSection); @@ -713,7 +706,7 @@ CPVRTimerInfoTagPtr CPVRTimerInfoTag::CreateInstantTimerTag(const CPVRChannelPtr newTimer->SetTimerType(timerType); if (epgTag) - newTimer->SetEpgTag(epgTag); + newTimer->SetEpgInfoTag(epgTag); else newTimer->UpdateEpgInfoTag(); } @@ -820,7 +813,7 @@ CPVRTimerInfoTagPtr CPVRTimerInfoTag::CreateFromEpg(const CPVREpgInfoTagPtr &tag newTag->SetTimerType(timerType); newTag->UpdateSummary(); - newTag->SetEpgTag(tag); + newTag->SetEpgInfoTag(tag); /* unused only for reference */ newTag->m_strFileNameAndPath = CPVRTimersPath::PATH_NEW; @@ -938,6 +931,19 @@ std::string CPVRTimerInfoTag::GetDeletedNotificationText() const return StringUtils::Format("%s: '%s'", g_localizeStrings.Get(stringID).c_str(), m_strTitle.c_str()); } +void CPVRTimerInfoTag::SetEpgInfoTag(const std::shared_ptr& tag) +{ + CSingleLock lock(m_critSection); + m_epgTag = tag; +} + +void CPVRTimerInfoTag::UpdateEpgInfoTag() +{ + CSingleLock lock(m_critSection); + m_epgTag.reset(); + GetEpgInfoTag(); +} + CPVREpgInfoTagPtr CPVRTimerInfoTag::GetEpgInfoTag(bool bCreate /* = true */) const { if (!m_epgTag && bCreate) @@ -1007,12 +1013,6 @@ CPVREpgInfoTagPtr CPVRTimerInfoTag::GetEpgInfoTag(bool bCreate /* = true */) con return m_epgTag; } -void CPVRTimerInfoTag::SetEpgTag(const CPVREpgInfoTagPtr &tag) -{ - CSingleLock lock(m_critSection); - m_epgTag = tag; -} - bool CPVRTimerInfoTag::HasChannel() const { return m_channel.get() != nullptr; diff --git a/xbmc/pvr/timers/PVRTimerInfoTag.h b/xbmc/pvr/timers/PVRTimerInfoTag.h index 9e4f912235..868d3569f0 100644 --- a/xbmc/pvr/timers/PVRTimerInfoTag.h +++ b/xbmc/pvr/timers/PVRTimerInfoTag.h @@ -76,6 +76,12 @@ namespace PVR */ static CPVRTimerInfoTagPtr CreateFromEpg(const CPVREpgInfoTagPtr &tag, bool bCreateRule = false); + /*! + * @brief Associate the given epg tag with this timer. + * @param tag The epg tag to assign. + */ + void SetEpgInfoTag(const std::shared_ptr& tag); + /*! * @brief get the epg info tag associated with this timer, if any * @param bCreate if true, try to find the epg tag if not yet set (lazy evaluation) @@ -246,12 +252,6 @@ namespace PVR */ bool UpdateOnClient(); - /*! - * @brief Associate the given epg tag with this timer; before, clear old timer at associated epg tag, if any. - * @param tag The epg tag to assign. - */ - void SetEpgTag(const CPVREpgInfoTagPtr &tag); - /*! * @brief Update the channel associated with this timer. * @return the channel for the timer. Can be empty for epg based repeating timers (e.g. "match any channel" rules) -- cgit v1.2.3