本文整理汇总了C++中CEpgInfoTagPtr::HasPVRChannel方法的典型用法代码示例。如果您正苦于以下问题:C++ CEpgInfoTagPtr::HasPVRChannel方法的具体用法?C++ CEpgInfoTagPtr::HasPVRChannel怎么用?C++ CEpgInfoTagPtr::HasPVRChannel使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CEpgInfoTagPtr
的用法示例。
在下文中一共展示了CEpgInfoTagPtr::HasPVRChannel方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnClickButtonRecord
bool CGUIDialogPVRGuideInfo::OnClickButtonRecord(CGUIMessage &message)
{
bool bReturn = false;
if (message.GetSenderId() == CONTROL_BTN_RECORD)
{
bReturn = true;
const CEpgInfoTagPtr tag(m_progItem->GetEPGInfoTag());
if (!tag || !tag->HasPVRChannel())
{
/* invalid channel */
CGUIDialogOK::ShowAndGetInput(CVariant{19033}, CVariant{19067});
Close();
return bReturn;
}
CFileItemPtr timerTag = g_PVRTimers->GetTimerForEpgTag(m_progItem.get());
bool bHasTimer = timerTag != NULL && timerTag->HasPVRTimerInfoTag();
if (!bHasTimer)
ActionStartTimer(tag);
else
ActionCancelTimer(timerTag);
}
return bReturn;
}
示例2: StopRecordFile
bool CGUIWindowPVRBase::StopRecordFile(const CFileItem &item)
{
if (!item.HasEPGInfoTag())
return false;
const CEpgInfoTagPtr tag(item.GetEPGInfoTag());
if (!tag || !tag->HasPVRChannel())
return false;
CFileItemPtr timer = g_PVRTimers->GetTimerForEpgTag(&item);
if (!timer || !timer->HasPVRTimerInfoTag() || timer->GetPVRTimerInfoTag()->m_bIsRepeating)
return false;
return g_PVRTimers->DeleteTimer(*timer);
}
示例3: StopRecordFile
bool CGUIWindowPVRBase::StopRecordFile(CFileItem *item)
{
if (!item->HasEPGInfoTag())
return false;
const CEpgInfoTagPtr tag(item->GetEPGInfoTag());
if (!tag || !tag->HasPVRChannel())
return false;
CFileItemPtr timer = g_PVRTimers->GetTimerForEpgTag(item);
if (!timer || !timer->HasPVRTimerInfoTag())
return false;
bool bDeleteScheduled(false);
if (ConfirmDeleteTimer(timer.get(), bDeleteScheduled))
return g_PVRTimers->DeleteTimer(*timer, false, bDeleteScheduled);
return false;
}
示例4: OnInputDone
void CGUIWindowPVRGuide::OnInputDone()
{
const int iChannelNumber = GetChannelNumber();
if (iChannelNumber >= 0)
{
for (const CFileItemPtr event : m_vecItems->GetList())
{
const CEpgInfoTagPtr tag(event->GetEPGInfoTag());
if (tag->HasPVRChannel() && tag->PVRChannelNumber() == iChannelNumber)
{
CGUIEPGGridContainer* epgGridContainer = dynamic_cast<CGUIEPGGridContainer*>(GetControl(m_viewControl.GetCurrentControl()));
if (epgGridContainer)
{
epgGridContainer->SetChannel(tag->ChannelTag());
return;
}
}
}
}
}
示例5: ShowEPGInfo
void CGUIWindowPVRBase::ShowEPGInfo(CFileItem *item)
{
CEpgInfoTagPtr epgTag;
CPVRChannelPtr channel;
if (item->IsEPG())
{
epgTag = item->GetEPGInfoTag();
channel = epgTag->ChannelTag();
}
else if (item->IsPVRChannel())
{
channel = item->GetPVRChannelInfoTag();
epgTag = channel->GetEPGNow();
}
else if (item->IsPVRTimer())
{
epgTag = item->GetPVRTimerInfoTag()->GetEpgInfoTag();
if (epgTag && epgTag->HasPVRChannel())
channel = epgTag->ChannelTag();
}
if (channel && !g_PVRManager.CheckParentalLock(channel))
return;
if (!epgTag)
{
CLog::Log(LOGERROR, "CGUIWindowPVRBase - %s - no epg tag!", __FUNCTION__);
return;
}
CGUIDialogPVRGuideInfo* pDlgInfo = (CGUIDialogPVRGuideInfo*)g_windowManager.GetWindow(WINDOW_DIALOG_PVR_GUIDE_INFO);
if (!pDlgInfo)
{
CLog::Log(LOGERROR, "CGUIWindowPVRBase - %s - unable to get WINDOW_DIALOG_PVR_GUIDE_INFO!", __FUNCTION__);
return;
}
pDlgInfo->SetProgInfo(epgTag);
pDlgInfo->Open();
}
示例6: OnClickButtonFind
bool CGUIDialogPVRGuideInfo::OnClickButtonFind(CGUIMessage &message)
{
bool bReturn = false;
if (message.GetSenderId() == CONTROL_BTN_FIND)
{
const CEpgInfoTagPtr tag(m_progItem->GetEPGInfoTag());
if (tag && tag->HasPVRChannel())
{
int windowSearchId = tag->ChannelTag()->IsRadio() ? WINDOW_RADIO_SEARCH : WINDOW_TV_SEARCH;
CGUIWindowPVRBase *windowSearch = (CGUIWindowPVRBase*) g_windowManager.GetWindow(windowSearchId);
if (windowSearch)
{
Close();
g_windowManager.ActivateWindow(windowSearchId);
bReturn = windowSearch->OnContextButton(*m_progItem.get(), CONTEXT_BUTTON_FIND);
}
}
}
return bReturn;
}