diff options
author | Kai Sommerfeld <kai.sommerfeld@gmx.com> | 2019-02-16 19:09:31 +0100 |
---|---|---|
committer | Kai Sommerfeld <kai.sommerfeld@gmx.com> | 2019-03-14 09:42:22 +0100 |
commit | 9fa33fb0a7747c875a3ae5e35dccd3a502c8a44e (patch) | |
tree | 42e8dabc4a8f1a15a33a6a1cf1bbb193db266a34 | |
parent | e90861306cd2c50621c11aa78cdf6c362d0e7f8a (diff) |
[PVR] CEpgInfoTag cosmetics.
-rw-r--r-- | xbmc/pvr/timers/PVRTimerInfoTag.cpp | 30 | ||||
-rw-r--r-- | 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<CPVREpgInfoTag>& 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 @@ -77,6 +77,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<CPVREpgInfoTag>& 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) * @return the epg info tag associated with this timer or null if there is no tag @@ -247,12 +253,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) */ |