2 * Copyright (C) 2012-2013 Team XBMC
5 * This Program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2, or (at your option)
10 * This Program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with XBMC; see the file COPYING. If not, see
17 * <http://www.gnu.org/licenses/>.
21 #include "guilib/LocalizeStrings.h"
23 #include "EpgInfoTag.h"
24 #include "EpgContainer.h"
25 #include "EpgDatabase.h"
26 #include "pvr/channels/PVRChannelGroupsContainer.h"
27 #include "pvr/timers/PVRTimers.h"
28 #include "pvr/PVRManager.h"
29 #include "settings/AdvancedSettings.h"
30 #include "settings/GUISettings.h"
31 #include "utils/log.h"
32 #include "utils/Variant.h"
33 #include "addons/include/xbmc_pvr_types.h"
39 CEpgInfoTag::CEpgInfoTag(void) :
50 m_iUniqueBroadcastID(-1),
53 CPVRChannelPtr emptyChannel;
54 m_pvrChannel = emptyChannel;
56 CPVRTimerInfoTagPtr emptyTimer;
60 CEpgInfoTag::CEpgInfoTag(CEpg *epg, PVR::CPVRChannelPtr pvrChannel, const CStdString &strTableName /* = StringUtils::EmptyString */, const CStdString &strIconPath /* = StringUtils::EmptyString */) :
71 m_iUniqueBroadcastID(-1),
72 m_strIconPath(strIconPath),
74 m_pvrChannel(pvrChannel)
76 CPVRTimerInfoTagPtr emptyTimer;
80 CEpgInfoTag::CEpgInfoTag(const EPG_TAG &data) :
91 m_iUniqueBroadcastID(-1),
94 CPVRChannelPtr emptyChannel;
95 m_pvrChannel = emptyChannel;
97 CPVRTimerInfoTagPtr emptyTimer;
103 CEpgInfoTag::CEpgInfoTag(const CEpgInfoTag &tag) :
104 m_bNotify(tag.m_bNotify),
105 m_bChanged(tag.m_bChanged),
106 m_iBroadcastId(tag.m_iBroadcastId),
107 m_iGenreType(tag.m_iGenreType),
108 m_iGenreSubType(tag.m_iGenreSubType),
109 m_iParentalRating(tag.m_iParentalRating),
110 m_iStarRating(tag.m_iStarRating),
111 m_iSeriesNumber(tag.m_iSeriesNumber),
112 m_iEpisodeNumber(tag.m_iEpisodeNumber),
113 m_iEpisodePart(tag.m_iEpisodePart),
114 m_iUniqueBroadcastID(tag.m_iUniqueBroadcastID),
115 m_strTitle(tag.m_strTitle),
116 m_strPlotOutline(tag.m_strPlotOutline),
117 m_strPlot(tag.m_strPlot),
118 m_genre(tag.m_genre),
119 m_strEpisodeName(tag.m_strEpisodeName),
120 m_strIconPath(tag.m_strIconPath),
121 m_strFileNameAndPath(tag.m_strFileNameAndPath),
122 m_startTime(tag.m_startTime),
123 m_endTime(tag.m_endTime),
124 m_firstAired(tag.m_firstAired),
125 m_timer(tag.m_timer),
127 m_pvrChannel(tag.m_pvrChannel)
131 CEpgInfoTag::~CEpgInfoTag()
136 bool CEpgInfoTag::operator ==(const CEpgInfoTag& right) const
138 if (this == &right) return true;
140 CSingleLock lock(m_critSection);
141 return (m_bNotify == right.m_bNotify &&
142 m_bChanged == right.m_bChanged &&
143 m_iBroadcastId == right.m_iBroadcastId &&
144 m_iGenreType == right.m_iGenreType &&
145 m_iGenreSubType == right.m_iGenreSubType &&
146 m_iParentalRating == right.m_iParentalRating &&
147 m_firstAired == right.m_firstAired &&
148 m_iStarRating == right.m_iStarRating &&
149 m_iSeriesNumber == right.m_iSeriesNumber &&
150 m_iEpisodeNumber == right.m_iEpisodeNumber &&
151 m_iEpisodePart == right.m_iEpisodePart &&
152 m_iUniqueBroadcastID == right.m_iUniqueBroadcastID &&
153 m_strTitle == right.m_strTitle &&
154 m_strPlotOutline == right.m_strPlotOutline &&
155 m_strPlot == right.m_strPlot &&
156 m_genre == right.m_genre &&
157 m_strEpisodeName == right.m_strEpisodeName &&
158 m_strIconPath == right.m_strIconPath &&
159 m_strFileNameAndPath == right.m_strFileNameAndPath &&
160 m_startTime == right.m_startTime &&
161 m_endTime == right.m_endTime &&
162 m_pvrChannel == right.m_pvrChannel);
165 bool CEpgInfoTag::operator !=(const CEpgInfoTag& right) const
167 if (this == &right) return false;
169 return !(*this == right);
172 CEpgInfoTag &CEpgInfoTag::operator =(const CEpgInfoTag &other)
174 CSingleLock lock(other.m_critSection);
176 m_bNotify = other.m_bNotify;
177 m_bChanged = other.m_bChanged;
178 m_iBroadcastId = other.m_iBroadcastId;
179 m_iGenreType = other.m_iGenreType;
180 m_iGenreSubType = other.m_iGenreSubType;
181 m_iParentalRating = other.m_iParentalRating;
182 m_iStarRating = other.m_iStarRating;
183 m_iSeriesNumber = other.m_iSeriesNumber;
184 m_iEpisodeNumber = other.m_iEpisodeNumber;
185 m_iEpisodePart = other.m_iEpisodePart;
186 m_iUniqueBroadcastID = other.m_iUniqueBroadcastID;
187 m_strTitle = other.m_strTitle;
188 m_strPlotOutline = other.m_strPlotOutline;
189 m_strPlot = other.m_strPlot;
190 m_genre = other.m_genre;
191 m_strEpisodeName = other.m_strEpisodeName;
192 m_strIconPath = other.m_strIconPath;
193 m_strFileNameAndPath = other.m_strFileNameAndPath;
194 m_startTime = other.m_startTime;
195 m_endTime = other.m_endTime;
196 m_firstAired = other.m_firstAired;
197 m_timer = other.m_timer;
199 m_pvrChannel = other.m_pvrChannel;
204 void CEpgInfoTag::Serialize(CVariant &value) const
206 value["rating"] = m_iStarRating;
207 value["title"] = m_strTitle;
208 value["plotoutline"] = m_strPlotOutline;
209 value["plot"] = m_strPlot;
210 value["genre"] = m_genre;
211 value["filenameandpath"] = m_strFileNameAndPath;
212 value["starttime"] = m_startTime.IsValid() ? m_startTime.GetAsDBDateTime() : StringUtils::EmptyString;
213 value["endtime"] = m_endTime.IsValid() ? m_endTime.GetAsDBDateTime() : StringUtils::EmptyString;
214 value["runtime"] = StringUtils::Format("%d", GetDuration() / 60);
215 value["firstaired"] = m_firstAired.IsValid() ? m_firstAired.GetAsDBDate() : StringUtils::EmptyString;
218 bool CEpgInfoTag::Changed(void) const
220 CSingleLock lock(m_critSection);
224 bool CEpgInfoTag::IsActive(void) const
226 CDateTime now = CDateTime::GetUTCDateTime();
227 CSingleLock lock(m_critSection);
228 return (m_startTime <= now && m_endTime > now);
231 bool CEpgInfoTag::WasActive(void) const
233 CDateTime now = CDateTime::GetUTCDateTime();
234 CSingleLock lock(m_critSection);
235 return (m_endTime < now);
238 bool CEpgInfoTag::InTheFuture(void) const
240 CDateTime now = CDateTime::GetUTCDateTime();
241 CSingleLock lock(m_critSection);
242 return (m_startTime > now);
245 float CEpgInfoTag::ProgressPercentage(void) const
249 time_t currentTime, startTime, endTime;
250 CDateTime::GetCurrentDateTime().GetAsUTCDateTime().GetAsTime(currentTime);
252 CSingleLock lock(m_critSection);
253 m_startTime.GetAsTime(startTime);
254 m_endTime.GetAsTime(endTime);
255 iDuration = endTime - startTime > 0 ? endTime - startTime : 3600;
257 if (currentTime >= startTime && currentTime <= endTime)
258 fReturn = ((float) currentTime - startTime) / iDuration * 100;
259 else if (currentTime > endTime)
265 int CEpgInfoTag::Progress(void) const
268 time_t currentTime, startTime;
269 CDateTime::GetCurrentDateTime().GetAsUTCDateTime().GetAsTime(currentTime);
271 CSingleLock lock(m_critSection);
272 m_startTime.GetAsTime(startTime);
273 iDuration = currentTime - startTime;
280 CEpgInfoTagPtr CEpgInfoTag::GetNextEvent(void) const
282 return GetTable()->GetNextEvent(*this);
285 CEpgInfoTagPtr CEpgInfoTag::GetPreviousEvent(void) const
287 return GetTable()->GetPreviousEvent(*this);
290 void CEpgInfoTag::SetUniqueBroadcastID(int iUniqueBroadcastID)
294 CSingleLock lock(m_critSection);
295 if (m_iUniqueBroadcastID != iUniqueBroadcastID)
297 m_iUniqueBroadcastID = iUniqueBroadcastID;
306 int CEpgInfoTag::UniqueBroadcastID(void) const
308 CSingleLock lock(m_critSection);
309 return m_iUniqueBroadcastID;
312 void CEpgInfoTag::SetBroadcastId(int iId)
316 CSingleLock lock(m_critSection);
317 if (m_iBroadcastId != iId)
319 m_iBroadcastId = iId;
328 int CEpgInfoTag::BroadcastId(void) const
330 CSingleLock lock(m_critSection);
331 return m_iBroadcastId;
334 CDateTime CEpgInfoTag::StartAsUTC(void) const
336 CSingleLock lock(m_critSection);
340 CDateTime CEpgInfoTag::StartAsLocalTime(void) const
343 CSingleLock lock(m_critSection);
344 retVal.SetFromUTCDateTime(m_startTime);
348 void CEpgInfoTag::SetStartFromUTC(const CDateTime &start)
352 CSingleLock lock(m_critSection);
353 if (m_startTime != start)
364 void CEpgInfoTag::SetStartFromLocalTime(const CDateTime &start)
366 CDateTime tmp = start.GetAsUTCDateTime();
367 SetStartFromUTC(tmp);
370 CDateTime CEpgInfoTag::EndAsUTC(void) const
373 CSingleLock lock(m_critSection);
378 CDateTime CEpgInfoTag::EndAsLocalTime(void) const
381 CSingleLock lock(m_critSection);
382 retVal.SetFromUTCDateTime(m_endTime);
386 void CEpgInfoTag::SetEndFromUTC(const CDateTime &end)
390 CSingleLock lock(m_critSection);
391 if (m_endTime != end)
402 void CEpgInfoTag::SetEndFromLocalTime(const CDateTime &end)
404 CDateTime tmp = end.GetAsUTCDateTime();
408 int CEpgInfoTag::GetDuration(void) const
411 CSingleLock lock(m_critSection);
412 m_startTime.GetAsTime(start);
413 m_endTime.GetAsTime(end);
414 return end - start > 0 ? end - start : 3600;
417 void CEpgInfoTag::SetTitle(const CStdString &strTitle)
421 CSingleLock lock(m_critSection);
422 if (m_strTitle != strTitle)
424 m_strTitle = strTitle;
433 CStdString CEpgInfoTag::Title(bool bOverrideParental /* = false */) const
436 bool bParentalLocked(false);
439 CSingleLock lock(m_critSection);
440 strTitle = m_strTitle;
442 bParentalLocked = g_PVRManager.IsParentalLocked(*m_pvrChannel);
445 if (!bOverrideParental && bParentalLocked)
446 strTitle = g_localizeStrings.Get(19266); // parental locked
447 else if (strTitle.empty() && !g_guiSettings.GetBool("epg.hidenoinfoavailable"))
448 strTitle = g_localizeStrings.Get(19055); // no information available
453 void CEpgInfoTag::SetPlotOutline(const CStdString &strPlotOutline)
457 CSingleLock lock(m_critSection);
458 if (m_strPlotOutline != strPlotOutline)
460 m_strPlotOutline = strPlotOutline;
469 CStdString CEpgInfoTag::PlotOutline(bool bOverrideParental /* = false */) const
472 CSingleLock lock(m_critSection);
473 if (bOverrideParental || !m_pvrChannel || !g_PVRManager.IsParentalLocked(*m_pvrChannel))
474 retVal = m_strPlotOutline;
479 void CEpgInfoTag::SetPlot(const CStdString &strPlot)
483 CSingleLock lock(m_critSection);
484 bUpdate = !m_strPlot.Equals(strPlot);
485 m_bChanged |= bUpdate;
492 CStdString CEpgInfoTag::Plot(bool bOverrideParental /* = false */) const
495 CSingleLock lock(m_critSection);
496 if (bOverrideParental || !m_pvrChannel || !g_PVRManager.IsParentalLocked(*m_pvrChannel))
502 void CEpgInfoTag::SetGenre(int iID, int iSubID, const char* strGenre)
506 CSingleLock lock(m_critSection);
507 if (m_iGenreType != iID || m_iGenreSubType != iSubID)
510 m_iGenreSubType = iSubID;
511 if ((iID == EPG_GENRE_USE_STRING) && (strGenre != NULL) && (strlen(strGenre) > 0))
513 /* Type and sub type are not given. No EPG color coding possible
514 * Use the provided genre description as backup. */
515 m_genre = StringUtils::Split(strGenre, g_advancedSettings.m_videoItemSeparator);
519 /* Determine the genre description from the type and subtype IDs */
520 m_genre = StringUtils::Split(CEpg::ConvertGenreIdToString(iID, iSubID), g_advancedSettings.m_videoItemSeparator);
530 int CEpgInfoTag::GenreType(void) const
532 CSingleLock lock(m_critSection);
536 int CEpgInfoTag::GenreSubType(void) const
538 CSingleLock lock(m_critSection);
539 return m_iGenreSubType;
542 const vector<string> CEpgInfoTag::Genre(void) const
544 vector<string> retVal;
545 CSingleLock lock(m_critSection);
550 CDateTime CEpgInfoTag::FirstAiredAsUTC(void) const
553 CSingleLock lock(m_critSection);
554 retVal = m_firstAired;
558 CDateTime CEpgInfoTag::FirstAiredAsLocalTime(void) const
561 CSingleLock lock(m_critSection);
562 retVal.SetFromUTCDateTime(m_firstAired);
566 void CEpgInfoTag::SetFirstAiredFromUTC(const CDateTime &firstAired)
570 CSingleLock lock(m_critSection);
571 if (m_firstAired != firstAired)
573 m_firstAired = firstAired;
582 void CEpgInfoTag::SetFirstAiredFromLocalTime(const CDateTime &firstAired)
584 CDateTime tmp = firstAired.GetAsUTCDateTime();
585 SetFirstAiredFromUTC(tmp);
588 void CEpgInfoTag::SetParentalRating(int iParentalRating)
592 CSingleLock lock(m_critSection);
593 if (m_iParentalRating != iParentalRating)
595 m_iParentalRating = iParentalRating;
604 int CEpgInfoTag::ParentalRating(void) const
606 CSingleLock lock(m_critSection);
607 return m_iParentalRating;
610 void CEpgInfoTag::SetStarRating(int iStarRating)
614 CSingleLock lock(m_critSection);
615 if (m_iStarRating != iStarRating)
617 m_iStarRating = iStarRating;
626 int CEpgInfoTag::StarRating(void) const
628 CSingleLock lock(m_critSection);
629 return m_iStarRating;
632 void CEpgInfoTag::SetNotify(bool bNotify)
636 CSingleLock lock(m_critSection);
637 if (m_bNotify != bNotify)
648 bool CEpgInfoTag::Notify(void) const
650 CSingleLock lock(m_critSection);
654 void CEpgInfoTag::SetSeriesNum(int iSeriesNum)
658 CSingleLock lock(m_critSection);
659 if (m_iSeriesNumber != iSeriesNum)
661 m_iSeriesNumber = iSeriesNum;
670 int CEpgInfoTag::SeriesNum(void) const
672 CSingleLock lock(m_critSection);
673 return m_iSeriesNumber;
676 void CEpgInfoTag::SetEpisodeNum(int iEpisodeNum)
680 CSingleLock lock(m_critSection);
681 if (m_iEpisodeNumber != iEpisodeNum)
683 m_iEpisodeNumber = iEpisodeNum;
692 int CEpgInfoTag::EpisodeNum(void) const
694 CSingleLock lock(m_critSection);
695 return m_iEpisodeNumber;
698 void CEpgInfoTag::SetEpisodePart(int iEpisodePart)
702 CSingleLock lock(m_critSection);
703 if (m_iEpisodePart != iEpisodePart)
705 m_iEpisodePart = iEpisodePart;
714 int CEpgInfoTag::EpisodePart(void) const
716 CSingleLock lock(m_critSection);
717 return m_iEpisodePart;
720 void CEpgInfoTag::SetEpisodeName(const CStdString &strEpisodeName)
724 CSingleLock lock(m_critSection);
725 if (m_strEpisodeName != strEpisodeName)
727 m_strEpisodeName = strEpisodeName;
736 CStdString CEpgInfoTag::EpisodeName(void) const
739 CSingleLock lock(m_critSection);
740 retVal = m_strEpisodeName;
744 void CEpgInfoTag::SetIcon(const CStdString &strIconPath)
748 CSingleLock lock(m_critSection);
749 if (m_strIconPath != strIconPath)
751 m_strIconPath = strIconPath;
760 CStdString CEpgInfoTag::Icon(void) const
764 CSingleLock lock(m_critSection);
765 retVal = m_strIconPath;
769 void CEpgInfoTag::SetPath(const CStdString &strFileNameAndPath)
771 CSingleLock lock(m_critSection);
772 if (m_strFileNameAndPath != strFileNameAndPath)
774 m_strFileNameAndPath = strFileNameAndPath;
779 CStdString CEpgInfoTag::Path(void) const
782 CSingleLock lock(m_critSection);
783 retVal = m_strFileNameAndPath;
787 //void CEpgInfoTag::SetTimer(CPVRTimerInfoTagPtr newTimer)
789 // CPVRTimerInfoTagPtr oldTimer;
791 // CSingleLock lock(m_critSection);
792 // oldTimer = m_timer;
793 // m_timer = newTimer;
796 // oldTimer->ClearEpgTag();
799 bool CEpgInfoTag::HasTimer(void) const
801 CSingleLock lock(m_critSection);
802 return m_timer != NULL;
805 CPVRTimerInfoTagPtr CEpgInfoTag::Timer(void) const
807 CSingleLock lock(m_critSection);
811 void CEpgInfoTag::SetPVRChannel(PVR::CPVRChannelPtr channel)
813 CSingleLock lock(m_critSection);
814 m_pvrChannel = channel;
817 bool CEpgInfoTag::HasPVRChannel(void) const
819 CSingleLock lock(m_critSection);
820 return m_pvrChannel != NULL;
823 int CEpgInfoTag::PVRChannelNumber(void) const
825 CSingleLock lock(m_critSection);
826 return m_pvrChannel ? m_pvrChannel->ChannelNumber() : -1;
829 CStdString CEpgInfoTag::PVRChannelName(void) const
831 CStdString strReturn;
832 CSingleLock lock(m_critSection);
834 strReturn = m_pvrChannel->ChannelName();
838 const PVR::CPVRChannelPtr CEpgInfoTag::ChannelTag(void) const
840 CSingleLock lock(m_critSection);
844 void CEpgInfoTag::Update(const EPG_TAG &tag)
846 CSingleLock lock(m_critSection);
847 SetStartFromUTC(tag.startTime + g_advancedSettings.m_iPVRTimeCorrection);
848 SetEndFromUTC(tag.endTime + g_advancedSettings.m_iPVRTimeCorrection);
849 SetTitle(tag.strTitle);
850 SetPlotOutline(tag.strPlotOutline);
851 SetPlot(tag.strPlot);
852 SetGenre(tag.iGenreType, tag.iGenreSubType, tag.strGenreDescription);
853 SetParentalRating(tag.iParentalRating);
854 SetUniqueBroadcastID(tag.iUniqueBroadcastId);
855 SetNotify(tag.bNotify);
856 SetFirstAiredFromUTC(tag.firstAired + g_advancedSettings.m_iPVRTimeCorrection);
857 SetEpisodeNum(tag.iEpisodeNumber);
858 SetEpisodePart(tag.iEpisodePartNumber);
859 SetEpisodeName(tag.strEpisodeName);
860 SetStarRating(tag.iStarRating);
861 SetIcon(tag.strIconPath);
864 bool CEpgInfoTag::Update(const CEpgInfoTag &tag, bool bUpdateBroadcastId /* = true */)
866 bool bChanged(false);
868 CSingleLock lock(m_critSection);
870 m_strTitle != tag.m_strTitle ||
871 m_strPlotOutline != tag.m_strPlotOutline ||
872 m_strPlot != tag.m_strPlot ||
873 m_startTime != tag.m_startTime ||
874 m_endTime != tag.m_endTime ||
875 m_iGenreType != tag.m_iGenreType ||
876 m_iGenreSubType != tag.m_iGenreSubType ||
877 m_firstAired != tag.m_firstAired ||
878 m_iParentalRating != tag.m_iParentalRating ||
879 m_iStarRating != tag.m_iStarRating ||
880 m_bNotify != tag.m_bNotify ||
881 m_iEpisodeNumber != tag.m_iEpisodeNumber ||
882 m_iEpisodePart != tag.m_iEpisodePart ||
883 m_iSeriesNumber != tag.m_iSeriesNumber ||
884 m_strEpisodeName != tag.m_strEpisodeName ||
885 m_iUniqueBroadcastID != tag.m_iUniqueBroadcastID ||
886 EpgID() != tag.EpgID() ||
887 m_pvrChannel != tag.m_pvrChannel ||
888 m_genre != tag.m_genre
890 if (bUpdateBroadcastId)
891 bChanged = bChanged || m_iBroadcastId != tag.m_iBroadcastId;
895 if (bUpdateBroadcastId)
896 m_iBroadcastId = tag.m_iBroadcastId;
898 m_strTitle = tag.m_strTitle;
899 m_strPlotOutline = tag.m_strPlotOutline;
900 m_strPlot = tag.m_strPlot;
901 m_startTime = tag.m_startTime;
902 m_endTime = tag.m_endTime;
903 m_iGenreType = tag.m_iGenreType;
904 m_iGenreSubType = tag.m_iGenreSubType;
906 m_pvrChannel = tag.m_pvrChannel;
907 if (m_iGenreType == EPG_GENRE_USE_STRING)
909 /* No type/subtype. Use the provided description */
910 m_genre = tag.m_genre;
914 /* Determine genre description by type/subtype */
915 m_genre = StringUtils::Split(CEpg::ConvertGenreIdToString(tag.m_iGenreType, tag.m_iGenreSubType), g_advancedSettings.m_videoItemSeparator);
917 m_firstAired = tag.m_firstAired;
918 m_iParentalRating = tag.m_iParentalRating;
919 m_iStarRating = tag.m_iStarRating;
920 m_bNotify = tag.m_bNotify;
921 m_iEpisodeNumber = tag.m_iEpisodeNumber;
922 m_iEpisodePart = tag.m_iEpisodePart;
923 m_iSeriesNumber = tag.m_iSeriesNumber;
924 m_strEpisodeName = tag.m_strEpisodeName;
925 m_iUniqueBroadcastID = tag.m_iUniqueBroadcastID;
936 bool CEpgInfoTag::Persist(bool bSingleUpdate /* = true */)
938 bool bReturn = false;
939 CSingleLock lock(m_critSection);
944 CLog::Log(LOGDEBUG, "Epg - %s - Infotag '%s' %s, persisting...", __FUNCTION__, m_strTitle.c_str(), m_iBroadcastId > 0 ? "has changes" : "is new");
947 CEpgDatabase *database = g_EpgContainer.GetDatabase();
948 if (!database || (bSingleUpdate && !database->IsOpen()))
950 CLog::Log(LOGERROR, "%s - could not open the database", __FUNCTION__);
954 int iId = database->Persist(*this, bSingleUpdate);
961 m_iBroadcastId = iId;
969 void CEpgInfoTag::UpdatePath(void)
973 CSingleLock lock(m_critSection);
974 path.Format("pvr://guide/%04i/%s.epg", EpgID(), m_startTime.GetAsDBDateTime().c_str());
980 const CEpg *CEpgInfoTag::GetTable() const
985 const int CEpgInfoTag::EpgID(void) const
987 return m_epg ? m_epg->EpgID() : -1;
990 void CEpgInfoTag::SetTimer(CPVRTimerInfoTagPtr timer)
992 CSingleLock lock(m_critSection);
996 void CEpgInfoTag::ClearTimer(void)
998 CPVRTimerInfoTagPtr previousTag;
1000 CSingleLock lock(m_critSection);
1001 previousTag = m_timer;
1002 CPVRTimerInfoTagPtr empty;
1007 previousTag->ClearEpgTag();