本文整理汇总了C++中CEpgPtr::reset方法的典型用法代码示例。如果您正苦于以下问题:C++ CEpgPtr::reset方法的具体用法?C++ CEpgPtr::reset怎么用?C++ CEpgPtr::reset使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CEpgPtr
的用法示例。
在下文中一共展示了CEpgPtr::reset方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: InsertFromDatabase
void CEpgContainer::InsertFromDatabase(int iEpgID, const std::string &strName, const std::string &strScraperName)
{
// table might already have been created when pvr channels were loaded
CEpgPtr epg = GetById(iEpgID);
if (epg)
{
if (epg->Name() != strName || epg->ScraperName() != strScraperName)
{
// current table data differs from the info in the db
epg->SetChanged();
SetChanged();
}
}
else
{
// create a new epg table
epg.reset(new CEpg(iEpgID, strName, strScraperName, true));
if (epg)
{
m_epgs.insert(std::make_pair(iEpgID, epg));
SetChanged();
epg->RegisterObserver(this);
}
}
}
示例2: CreateChannelEpg
CEpgPtr CEpgContainer::CreateChannelEpg(CPVRChannelPtr channel)
{
if (!channel)
return NULL;
WaitForUpdateFinish(true);
LoadFromDB();
CEpgPtr epg;
if (channel->EpgID() > 0)
epg = GetById(channel->EpgID());
if (!epg)
{
channel->SetEpgID(NextEpgId());
epg.reset(new CEpg(channel, false));
CSingleLock lock(m_critSection);
m_epgs.insert(std::make_pair((unsigned int)epg->EpgID(), epg));
SetChanged();
epg->RegisterObserver(this);
}
epg->SetChannel(channel);
{
CSingleLock lock(m_critSection);
m_bPreventUpdates = false;
CDateTime::GetCurrentDateTime().GetAsUTCDateTime().GetAsTime(m_iNextEpgUpdate);
}
NotifyObservers(ObservableMessageEpgContainer);
return epg;
}