本文整理汇总了C++中CFileItem::GetPVRTimerInfoTag方法的典型用法代码示例。如果您正苦于以下问题:C++ CFileItem::GetPVRTimerInfoTag方法的具体用法?C++ CFileItem::GetPVRTimerInfoTag怎么用?C++ CFileItem::GetPVRTimerInfoTag使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CFileItem
的用法示例。
在下文中一共展示了CFileItem::GetPVRTimerInfoTag方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: UpdateTimer
bool CPVRTimers::UpdateTimer(const CFileItem &item)
{
/* Check if a CPVRTimerInfoTag is inside file item */
if (!item.IsPVRTimer())
{
CLog::Log(LOGERROR, "cPVRTimers: UpdateTimer no TimerInfoTag given!");
return false;
}
const CPVRTimerInfoTag* tag = item.GetPVRTimerInfoTag();
if (!tag)
return false;
return UpdateTimer(*tag);
}
示例2: RenameTimer
bool CPVRTimers::RenameTimer(CFileItem &item, const CStdString &strNewName)
{
/* Check if a CPVRTimerInfoTag is inside file item */
if (!item.IsPVRTimer())
{
CLog::Log(LOGERROR, "cPVRTimers: RenameTimer no TimerInfoTag given!");
return false;
}
CPVRTimerInfoTag* tag = item.GetPVRTimerInfoTag();
if (!tag)
return false;
return RenameTimer(*tag, strNewName);
}
示例3: DeleteTimer
bool CPVRTimers::DeleteTimer(const CFileItem &item, bool bForce /* = false */)
{
/* Check if a CPVRTimerInfoTag is inside file item */
if (!item.IsPVRTimer())
{
CLog::Log(LOGERROR, "cPVRTimers: DeleteTimer no TimerInfoTag given!");
return false;
}
const CPVRTimerInfoTag* tag = item.GetPVRTimerInfoTag();
if (!tag)
return false;
return DeleteTimer(*tag, bForce);
}
示例4: UpdateTimer
bool CPVRTimers::UpdateTimer(CFileItem &item)
{
/* Check if a CPVRTimerInfoTag is inside file item */
if (!item.IsPVRTimer())
{
CLog::Log(LOGERROR, "PVRTimers - %s - no TimerInfoTag given", __FUNCTION__);
return false;
}
CPVRTimerInfoTagPtr tag = item.GetPVRTimerInfoTag();
if (!tag)
return false;
return tag->UpdateOnClient();
}
示例5: RenameTimer
bool CPVRTimers::RenameTimer(CFileItem &item, const std::string &strNewName)
{
/* Check if a CPVRTimerInfoTag is inside file item */
if (!item.IsPVRTimer())
{
CLog::Log(LOGERROR, "PVRTimers - %s - no TimerInfoTag given", __FUNCTION__);
return false;
}
CPVRTimerInfoTagPtr tag = item.GetPVRTimerInfoTag();
if (!tag)
return false;
return tag->RenameOnClient(strNewName);
}
示例6: DeleteTimer
bool CPVRTimers::DeleteTimer(const CFileItem &item, bool bForce /* = false */, bool bDeleteSchedule /* = false */)
{
/* Check if a CPVRTimerInfoTag is inside file item */
if (!item.IsPVRTimer())
{
CLog::Log(LOGERROR, "PVRTimers - %s - no TimerInfoTag given", __FUNCTION__);
return false;
}
const CPVRTimerInfoTagPtr tag = item.GetPVRTimerInfoTag();
if (!tag)
return false;
return tag->DeleteFromClient(bForce, bDeleteSchedule);
}
示例7: StartRecordFile
bool CGUIWindowPVRBase::StartRecordFile(CFileItem *item, bool bAdvanced)
{
if (!item->HasEPGInfoTag())
return false;
const CEpgInfoTagPtr tag = item->GetEPGInfoTag();
CPVRChannelPtr channel = tag->ChannelTag();
if (!channel || !g_PVRManager.CheckParentalLock(channel))
return false;
CFileItemPtr timer = g_PVRTimers->GetTimerForEpgTag(item);
if (timer && timer->HasPVRTimerInfoTag())
{
CGUIDialogOK::ShowAndGetInput(CVariant{19033}, CVariant{19034});
return false;
}
bool bReturn(false);
if (bAdvanced)
{
CPVRTimerInfoTagPtr newTimer = CPVRTimerInfoTag::CreateFromEpg(tag, true);
if (newTimer)
{
CFileItem *newItem = new CFileItem(newTimer);
if (ShowTimerSettings(newItem))
bReturn = g_PVRTimers->AddTimer(newItem->GetPVRTimerInfoTag());
delete newItem;
}
}
else
{
// ask for confirmation before starting a timer
if (!CGUIDialogYesNo::ShowAndGetInput(
CVariant{264} /* "Record" */, CVariant{tag->PVRChannelName()}, CVariant{""}, CVariant{tag->Title()}))
return false;
CPVRTimerInfoTagPtr newTimer = CPVRTimerInfoTag::CreateFromEpg(tag);
if (newTimer)
bReturn = g_PVRTimers->AddTimer(newTimer);
}
return bReturn;
}
示例8: ShowNewTimerDialog
bool CGUIWindowPVRCommon::ShowNewTimerDialog(void)
{
bool bReturn(false);
CPVRTimerInfoTag *newTimer = new CPVRTimerInfoTag;
CFileItem *newItem = new CFileItem(*newTimer);
if (ShowTimerSettings(newItem))
{
/* Add timer to backend */
bReturn = g_PVRTimers->AddTimer(*newItem->GetPVRTimerInfoTag());
}
delete newItem;
delete newTimer;
return bReturn;
}
示例9: OnContextButton
bool CGUIWindowPVRSearch::OnContextButton(const CFileItem &item, CONTEXT_BUTTON button)
{
bool bReturn = false;
switch(button)
{
case CONTEXT_BUTTON_FIND:
{
m_searchfilter.Reset();
// construct the search term
if (item.IsEPG())
m_searchfilter.m_strSearchTerm = "\"" + item.GetEPGInfoTag()->Title() + "\"";
else if (item.IsPVRChannel())
{
const CEpgInfoTagPtr tag(item.GetPVRChannelInfoTag()->GetEPGNow());
if (tag)
m_searchfilter.m_strSearchTerm = "\"" + tag->Title() + "\"";
}
else if (item.IsUsablePVRRecording())
m_searchfilter.m_strSearchTerm = "\"" + item.GetPVRRecordingInfoTag()->m_strTitle + "\"";
else if (item.IsPVRTimer())
{
const CPVRTimerInfoTagPtr info(item.GetPVRTimerInfoTag());
const CEpgInfoTagPtr tag(info->GetEpgInfoTag());
if (tag)
m_searchfilter.m_strSearchTerm = "\"" + tag->Title() + "\"";
else
m_searchfilter.m_strSearchTerm = "\"" + info->m_strTitle + "\"";
}
m_bSearchConfirmed = true;
Refresh(true);
bReturn = true;
break;
}
default:
bReturn = false;
}
return bReturn;
}