本文整理汇总了C++中CEpg::ScraperName方法的典型用法代码示例。如果您正苦于以下问题:C++ CEpg::ScraperName方法的具体用法?C++ CEpg::ScraperName怎么用?C++ CEpg::ScraperName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CEpg
的用法示例。
在下文中一共展示了CEpg::ScraperName方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Persist
int CEpgDatabase::Persist(const CEpg &epg, bool bQueueWrite /* = false */)
{
int iReturn = -1;
CStdString strQuery;
if (epg.EpgID() > 0)
{
strQuery = FormatSQL("REPLACE INTO epg (idEpg, sName, sScraperName) "
"VALUES (%u, '%s', '%s');", epg.EpgID(), epg.Name().c_str(), epg.ScraperName().c_str());
}
else
{
strQuery = FormatSQL("REPLACE INTO epg (sName, sScraperName) "
"VALUES ('%s', '%s');", epg.Name().c_str(), epg.ScraperName().c_str());
}
if (bQueueWrite)
{
if (QueueInsertQuery(strQuery))
iReturn = epg.EpgID() <= 0 ? 0 : epg.EpgID();
}
else
{
if (ExecuteQuery(strQuery))
iReturn = epg.EpgID() <= 0 ? (int) m_pDS->lastinsertid() : epg.EpgID();
}
return iReturn;
}
示例2: InsertFromDatabase
void CEpgContainer::InsertFromDatabase(int iEpgID, const CStdString &strName, const CStdString &strScraperName)
{
// table might already have been created when pvr channels were loaded
CEpg* epg = GetById(iEpgID);
if (epg)
{
if (!epg->Name().Equals(strName) || !epg->ScraperName().Equals(strScraperName))
{
// current table data differs from the info in the db
epg->SetChanged();
SetChanged();
}
}
else
{
// create a new epg table
epg = new CEpg(iEpgID, strName, strScraperName, true);
if (epg)
{
m_epgs.insert(make_pair(iEpgID, epg));
SetChanged();
epg->RegisterObserver(this);
}
}
}