本文整理汇总了C++中CPVREpgInfoTagPtr::HasRecording方法的典型用法代码示例。如果您正苦于以下问题:C++ CPVREpgInfoTagPtr::HasRecording方法的具体用法?C++ CPVREpgInfoTagPtr::HasRecording怎么用?C++ CPVREpgInfoTagPtr::HasRecording使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CPVREpgInfoTagPtr
的用法示例。
在下文中一共展示了CPVREpgInfoTagPtr::HasRecording方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnMessage
bool CGUIWindowPVRGuideBase::OnMessage(CGUIMessage& message)
{
bool bReturn = false;
switch (message.GetMessage())
{
case GUI_MSG_CLICKED:
{
if (message.GetSenderId() == m_viewControl.GetCurrentControl())
{
int iItem = m_viewControl.GetSelectedItem();
if (iItem >= 0 && iItem < m_vecItems->Size())
{
CFileItemPtr pItem = m_vecItems->Get(iItem);
/* process actions */
switch (message.GetParam1())
{
case ACTION_SELECT_ITEM:
case ACTION_MOUSE_LEFT_CLICK:
switch(CServiceBroker::GetSettings().GetInt(CSettings::SETTING_EPG_SELECTACTION))
{
case EPG_SELECT_ACTION_CONTEXT_MENU:
OnPopupMenu(iItem);
bReturn = true;
break;
case EPG_SELECT_ACTION_SWITCH:
CServiceBroker::GetPVRManager().GUIActions()->SwitchToChannel(pItem, true);
bReturn = true;
break;
case EPG_SELECT_ACTION_PLAY_RECORDING:
CServiceBroker::GetPVRManager().GUIActions()->PlayRecording(pItem, true);
bReturn = true;
break;
case EPG_SELECT_ACTION_INFO:
CServiceBroker::GetPVRManager().GUIActions()->ShowEPGInfo(pItem);
bReturn = true;
break;
case EPG_SELECT_ACTION_RECORD:
CServiceBroker::GetPVRManager().GUIActions()->ToggleTimer(pItem);
bReturn = true;
break;
case EPG_SELECT_ACTION_SMART_SELECT:
{
const CPVREpgInfoTagPtr tag(pItem->GetEPGInfoTag());
if (tag)
{
const CDateTime start(tag->StartAsUTC());
const CDateTime end(tag->EndAsUTC());
const CDateTime now(CDateTime::GetUTCDateTime());
if (start <= now && now <= end)
{
// current event
CServiceBroker::GetPVRManager().GUIActions()->SwitchToChannel(pItem, true);
}
else if (now < start)
{
// future event
if (tag->HasTimer())
CServiceBroker::GetPVRManager().GUIActions()->EditTimer(pItem);
else
CServiceBroker::GetPVRManager().GUIActions()->AddTimer(pItem, false);
}
else
{
// past event
if (tag->HasRecording())
CServiceBroker::GetPVRManager().GUIActions()->PlayRecording(pItem, true);
else if (tag->IsPlayable())
CServiceBroker::GetPVRManager().GUIActions()->PlayEpgTag(pItem);
else
CServiceBroker::GetPVRManager().GUIActions()->ShowEPGInfo(pItem);
}
bReturn = true;
}
break;
}
}
break;
case ACTION_SHOW_INFO:
CServiceBroker::GetPVRManager().GUIActions()->ShowEPGInfo(pItem);
bReturn = true;
break;
case ACTION_PLAY:
CServiceBroker::GetPVRManager().GUIActions()->PlayRecording(pItem, true);
bReturn = true;
break;
case ACTION_RECORD:
CServiceBroker::GetPVRManager().GUIActions()->ToggleTimer(pItem);
bReturn = true;
break;
case ACTION_PVR_SHOW_TIMER_RULE:
CServiceBroker::GetPVRManager().GUIActions()->AddTimerRule(pItem, true);
bReturn = true;
break;
case ACTION_CONTEXT_MENU:
case ACTION_MOUSE_RIGHT_CLICK:
OnPopupMenu(iItem);
bReturn = true;
break;
}
//.........这里部分代码省略.........
示例2: GetListItemAndPlayerBool
bool CPVRGUIInfo::GetListItemAndPlayerBool(const CFileItem *item, const CGUIInfo &info, bool &bValue) const
{
switch (info.m_info)
{
case LISTITEM_ISRECORDING:
if (item->IsPVRChannel())
{
bValue = item->GetPVRChannelInfoTag()->IsRecording();
return true;
}
else if (item->IsEPG() || item->IsPVRTimer())
{
const CPVRTimerInfoTagPtr timer = CPVRItem(item).GetTimerInfoTag();
if (timer)
bValue = timer->IsRecording();
return true;
}
else if (item->IsPVRRecording())
{
bValue = item->GetPVRRecordingInfoTag()->IsInProgress();
return true;
}
break;
case LISTITEM_INPROGRESS:
if (item->IsPVRChannel() || item->IsEPG())
{
const CPVREpgInfoTagPtr epgTag = CPVRItem(item).GetEpgInfoTag();
if (epgTag)
bValue = epgTag->IsActive();
return true;
}
break;
case LISTITEM_HASTIMER:
if (item->IsPVRChannel() || item->IsEPG())
{
const CPVREpgInfoTagPtr epgTag = CPVRItem(item).GetEpgInfoTag();
if (epgTag)
bValue = epgTag->HasTimer();
return true;
}
break;
case LISTITEM_HASTIMERSCHEDULE:
if (item->IsPVRChannel() || item->IsEPG() || item->IsPVRTimer())
{
const CPVRTimerInfoTagPtr timer = CPVRItem(item).GetTimerInfoTag();
if (timer)
bValue = timer->GetTimerRuleId() != PVR_TIMER_NO_PARENT;
return true;
}
break;
case LISTITEM_TIMERISACTIVE:
if (item->IsPVRChannel() || item->IsEPG())
{
const CPVRTimerInfoTagPtr timer = CPVRItem(item).GetTimerInfoTag();
if (timer)
bValue = timer->IsActive();
break;
}
break;
case LISTITEM_TIMERHASCONFLICT:
if (item->IsPVRChannel() || item->IsEPG())
{
const CPVRTimerInfoTagPtr timer = CPVRItem(item).GetTimerInfoTag();
if (timer)
bValue = timer->HasConflict();
return true;
}
break;
case LISTITEM_TIMERHASERROR:
if (item->IsPVRChannel() || item->IsEPG())
{
const CPVRTimerInfoTagPtr timer = CPVRItem(item).GetTimerInfoTag();
if (timer)
bValue = (timer->IsBroken() && !timer->HasConflict());
return true;
}
break;
case LISTITEM_HASRECORDING:
if (item->IsPVRChannel() || item->IsEPG())
{
const CPVREpgInfoTagPtr epgTag = CPVRItem(item).GetEpgInfoTag();
if (epgTag)
bValue = epgTag->HasRecording();
return true;
}
break;
case LISTITEM_HAS_EPG:
if (item->IsPVRChannel() || item->IsEPG() || item->IsPVRTimer())
{
const CPVREpgInfoTagPtr epgTag = CPVRItem(item).GetEpgInfoTag();
bValue = (epgTag != nullptr);
return true;
}
break;
case LISTITEM_ISENCRYPTED:
if (item->IsPVRChannel() || item->IsEPG())
{
const CPVRChannelPtr channel = CPVRItem(item).GetChannel();
if (channel)
bValue = channel->IsEncrypted();
//.........这里部分代码省略.........