本文整理汇总了C++中CPVRChannel::UpdateEPGPointers方法的典型用法代码示例。如果您正苦于以下问题:C++ CPVRChannel::UpdateEPGPointers方法的具体用法?C++ CPVRChannel::UpdateEPGPointers怎么用?C++ CPVRChannel::UpdateEPGPointers使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CPVRChannel
的用法示例。
在下文中一共展示了CPVRChannel::UpdateEPGPointers方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: LoadFromDb
bool CPVREpgs::LoadFromDb(bool bShowProgress /* = false */)
{
if (m_bDatabaseLoaded)
return m_bDatabaseLoaded;
CPVRDatabase *database = g_PVRManager.GetTVDatabase();
/* show the progress bar */
CGUIDialogPVRUpdateProgressBar *scanner = NULL;
if (bShowProgress)
{
scanner = (CGUIDialogPVRUpdateProgressBar *)g_windowManager.GetWindow(WINDOW_DIALOG_EPG_SCAN);
scanner->Show();
scanner->SetHeader(g_localizeStrings.Get(19004));
}
/* open the database */
database->Open();
/* load all EPG tables */
bool bLoaded = false;
unsigned int iSize = size();
for (unsigned int iEpgPtr = 0; iEpgPtr < iSize; iEpgPtr++)
{
CPVREpg *epg = at(iEpgPtr);
CPVRChannel *channel = epg->Channel();
if (epg->LoadFromDb())
{
if (channel)
channel->UpdateEPGPointers();
bLoaded = true;
}
if (bShowProgress)
{
/* update the progress bar */
if (channel)
scanner->SetTitle(channel->ChannelName());
scanner->SetProgress(iEpgPtr, iSize);
scanner->UpdateState();
}
}
/* close the database */
database->Close();
if (bShowProgress)
scanner->Close();
m_bDatabaseLoaded = bLoaded;
return bLoaded;
}
示例2: UpdateAllChannelEPGPointers
bool CPVREpgs::UpdateAllChannelEPGPointers()
{
for (unsigned int epgPtr = 0; epgPtr < PVREpgs.size(); epgPtr++)
{
CPVRChannel *channel = PVREpgs.at(epgPtr)->Channel();
if (channel)
channel->UpdateEPGPointers();
}
CDateTime::GetCurrentDateTime().GetAsTime(m_iLastPointerUpdate);
return true;
}