本文整理汇总了C++中CPVRChannelGroups::Update方法的典型用法代码示例。如果您正苦于以下问题:C++ CPVRChannelGroups::Update方法的具体用法?C++ CPVRChannelGroups::Update怎么用?C++ CPVRChannelGroups::Update使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CPVRChannelGroups
的用法示例。
在下文中一共展示了CPVRChannelGroups::Update方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Get
bool CPVRDatabase::Get(CPVRChannelGroups &results)
{
bool bReturn = false;
CStdString strQuery = FormatSQL("SELECT * from channelgroups WHERE bIsRadio = %u ORDER BY idGroup;", results.IsRadio());
if (ResultQuery(strQuery))
{
try
{
while (!m_pDS->eof())
{
CPVRChannelGroup data(m_pDS->fv("bIsRadio").get_asBool());
data.SetGroupID(m_pDS->fv("idGroup").get_asInt());
data.SetGroupName(m_pDS->fv("sName").get_asString());
results.Update(data);
CLog::Log(LOGDEBUG, "PVRDB - %s - group '%s' loaded from the database",
__FUNCTION__, data.GroupName().c_str());
m_pDS->next();
}
m_pDS->close();
bReturn = true;
}
catch (...)
{
CLog::Log(LOGERROR, "%s - couldn't load channels from the database", __FUNCTION__);
}
}
return bReturn;
}
示例2: Get
bool CPVRDatabase::Get(CPVRChannelGroups &results)
{
bool bReturn = false;
std::string strQuery = PrepareSQL("SELECT * from channelgroups WHERE bIsRadio = %u", results.IsRadio());
if (ResultQuery(strQuery))
{
try
{
while (!m_pDS->eof())
{
CPVRChannelGroup data(m_pDS->fv("bIsRadio").get_asBool(), m_pDS->fv("idGroup").get_asInt(), m_pDS->fv("sName").get_asString());
data.SetGroupType(m_pDS->fv("iGroupType").get_asInt());
data.SetLastWatched((time_t) m_pDS->fv("iLastWatched").get_asInt());
data.SetHidden(m_pDS->fv("bIsHidden").get_asBool());
data.SetPosition(m_pDS->fv("iPosition").get_asInt());
results.Update(data);
CLog::Log(LOGDEBUG, "PVR - %s - group '%s' loaded from the database", __FUNCTION__, data.GroupName().c_str());
m_pDS->next();
}
m_pDS->close();
bReturn = true;
}
catch (...)
{
CLog::Log(LOGERROR, "%s - couldn't load channels from the database", __FUNCTION__);
}
}
return bReturn;
}