本文整理汇总了C++中CPVREpgInfoTagPtr::SetTimer方法的典型用法代码示例。如果您正苦于以下问题:C++ CPVREpgInfoTagPtr::SetTimer方法的具体用法?C++ CPVREpgInfoTagPtr::SetTimer怎么用?C++ CPVREpgInfoTagPtr::SetTimer使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CPVREpgInfoTagPtr
的用法示例。
在下文中一共展示了CPVREpgInfoTagPtr::SetTimer方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: UpdateEntry
bool CPVREpg::UpdateEntry(const CPVREpgInfoTagPtr &tag, bool bUpdateDatabase)
{
CPVREpgInfoTagPtr infoTag;
{
CSingleLock lock(m_critSection);
std::map<CDateTime, CPVREpgInfoTagPtr>::iterator it = m_tags.find(tag->StartAsUTC());
bool bNewTag(false);
if (it != m_tags.end())
{
infoTag = it->second;
}
else
{
infoTag.reset(new CPVREpgInfoTag(this, m_pvrChannel, m_strName, m_pvrChannel ? m_pvrChannel->IconPath() : ""));
infoTag->SetUniqueBroadcastID(tag->UniqueBroadcastID());
m_tags.insert(std::make_pair(tag->StartAsUTC(), infoTag));
bNewTag = true;
}
infoTag->Update(*tag, bNewTag);
infoTag->SetEpg(this);
infoTag->SetChannel(m_pvrChannel);
if (bUpdateDatabase)
m_changedTags.insert(std::make_pair(infoTag->UniqueBroadcastID(), infoTag));
}
infoTag->SetTimer(CServiceBroker::GetPVRManager().Timers()->GetTimerForEpgTag(infoTag));
infoTag->SetRecording(CServiceBroker::GetPVRManager().Recordings()->GetRecordingForEpgTag(infoTag));
return true;
}
示例2: AddEntry
void CPVREpg::AddEntry(const CPVREpgInfoTag &tag)
{
CPVREpgInfoTagPtr newTag;
CPVRChannelPtr channel;
{
CSingleLock lock(m_critSection);
std::map<CDateTime, CPVREpgInfoTagPtr>::iterator itr = m_tags.find(tag.StartAsUTC());
if (itr != m_tags.end())
newTag = itr->second;
else
{
newTag.reset(new CPVREpgInfoTag(this, m_pvrChannel, m_strName, m_pvrChannel ? m_pvrChannel->IconPath() : ""));
m_tags.insert(make_pair(tag.StartAsUTC(), newTag));
}
channel = m_pvrChannel;
}
if (newTag)
{
newTag->Update(tag);
newTag->SetChannel(channel);
newTag->SetEpg(this);
newTag->SetTimer(CServiceBroker::GetPVRManager().Timers()->GetTimerForEpgTag(newTag));
newTag->SetRecording(CServiceBroker::GetPVRManager().Recordings()->GetRecordingForEpgTag(newTag));
}
}