本文整理汇总了C++中CPVREpgInfoTagPtr::IsRecordable方法的典型用法代码示例。如果您正苦于以下问题:C++ CPVREpgInfoTagPtr::IsRecordable方法的具体用法?C++ CPVREpgInfoTagPtr::IsRecordable怎么用?C++ CPVREpgInfoTagPtr::IsRecordable使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CPVREpgInfoTagPtr
的用法示例。
在下文中一共展示了CPVREpgInfoTagPtr::IsRecordable方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: InitializeTypesList
void CGUIDialogPVRTimerSettings::InitializeTypesList()
{
m_typeEntries.clear();
// If timer is read-only or was created by a timer rule, only add current type, for information. Type can't be changed.
if (m_timerType->IsReadOnly() || m_timerInfoTag->GetTimerRuleId() != PVR_TIMER_NO_PARENT)
{
m_typeEntries.insert(std::make_pair(0, m_timerType));
return;
}
bool bFoundThisType(false);
int idx(0);
const std::vector<CPVRTimerTypePtr> types(CPVRTimerType::GetAllTypes());
for (const auto &type : types)
{
// Type definition prohibits created of new instances.
// But the dialog can act as a viewer for these types.
if (type->ForbidsNewInstances())
continue;
// Read-only timers cannot be created using this dialog.
// But the dialog can act as a viewer for read-only types.
if (type->IsReadOnly())
continue;
// Drop TimerTypes that require EPGInfo, if none is populated
if (type->RequiresEpgTagOnCreate() && !m_timerInfoTag->GetEpgInfoTag())
continue;
// Drop TimerTypes without 'Series' EPG attributes if none are set
if (type->RequiresEpgSeriesOnCreate())
{
const CPVREpgInfoTagPtr epgTag(m_timerInfoTag->GetEpgInfoTag());
if (epgTag && !epgTag->IsSeries())
continue;
}
// Drop TimerTypes which need series link if none is set
if (type->RequiresEpgSeriesLinkOnCreate())
{
const CPVREpgInfoTagPtr epgTag(m_timerInfoTag->GetEpgInfoTag());
if (!epgTag || epgTag->SeriesLink().empty())
continue;
}
// Drop TimerTypes that forbid EPGInfo, if it is populated
if (type->ForbidsEpgTagOnCreate() && m_timerInfoTag->GetEpgInfoTag())
continue;
// Drop TimerTypes that aren't rules and cannot be recorded
if (!type->IsTimerRule())
{
const CPVREpgInfoTagPtr epgTag(m_timerInfoTag->GetEpgInfoTag());
bool bCanRecord = epgTag ? epgTag->IsRecordable() : m_timerInfoTag->EndAsLocalTime() > CDateTime::GetCurrentDateTime();
if (!bCanRecord)
continue;
}
if (!bFoundThisType && *type == *m_timerType)
bFoundThisType = true;
m_typeEntries.insert(std::make_pair(idx++, type));
}
if (!bFoundThisType)
m_typeEntries.insert(std::make_pair(idx++, m_timerType));
}