本文整理汇总了C++中CPVRChannelGroupInternal::GroupID方法的典型用法代码示例。如果您正苦于以下问题:C++ CPVRChannelGroupInternal::GroupID方法的具体用法?C++ CPVRChannelGroupInternal::GroupID怎么用?C++ CPVRChannelGroupInternal::GroupID使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CPVRChannelGroupInternal
的用法示例。
在下文中一共展示了CPVRChannelGroupInternal::GroupID方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Get
int CPVRDatabase::Get(CPVRChannelGroupInternal &results)
{
int iReturn(0);
std::string strQuery = PrepareSQL("SELECT channels.idChannel, channels.iUniqueId, channels.bIsRadio, channels.bIsHidden, channels.bIsUserSetIcon, channels.bIsUserSetName, "
"channels.sIconPath, channels.sChannelName, channels.bIsVirtual, channels.bEPGEnabled, channels.sEPGScraper, channels.iLastWatched, channels.iClientId, channels.bIsLocked, "
"map_channelgroups_channels.iChannelNumber, channels.idEpg "
"FROM map_channelgroups_channels "
"LEFT JOIN channels ON channels.idChannel = map_channelgroups_channels.idChannel "
"WHERE map_channelgroups_channels.idGroup = %u", results.GroupID());
if (ResultQuery(strQuery))
{
try
{
bool bIgnoreEpgDB = CSettings::Get().GetBool("epg.ignoredbforclient");
while (!m_pDS->eof())
{
CPVRChannelPtr channel = CPVRChannelPtr(new CPVRChannel());
channel->m_iChannelId = m_pDS->fv("idChannel").get_asInt();
channel->m_iUniqueId = m_pDS->fv("iUniqueId").get_asInt();
channel->m_bIsRadio = m_pDS->fv("bIsRadio").get_asBool();
channel->m_bIsHidden = m_pDS->fv("bIsHidden").get_asBool();
channel->m_bIsUserSetIcon = m_pDS->fv("bIsUserSetIcon").get_asBool();
channel->m_bIsUserSetName = m_pDS->fv("bIsUserSetName").get_asBool();
channel->m_bIsLocked = m_pDS->fv("bIsLocked").get_asBool();
channel->m_strIconPath = m_pDS->fv("sIconPath").get_asString();
channel->m_strChannelName = m_pDS->fv("sChannelName").get_asString();
channel->m_bEPGEnabled = m_pDS->fv("bEPGEnabled").get_asBool();
channel->m_strEPGScraper = m_pDS->fv("sEPGScraper").get_asString();
channel->m_iLastWatched = (time_t) m_pDS->fv("iLastWatched").get_asInt();
channel->m_iClientId = m_pDS->fv("iClientId").get_asInt();
if (bIgnoreEpgDB)
channel->m_iEpgId = -1;
else
channel->m_iEpgId = m_pDS->fv("idEpg").get_asInt();
channel->UpdateEncryptionName();
#if PVRDB_DEBUGGING
CLog::Log(LOGDEBUG, "PVR - %s - channel '%s' loaded from the database", __FUNCTION__, channel->m_strChannelName.c_str());
#endif
PVRChannelGroupMember newMember = { channel, (unsigned int)m_pDS->fv("iChannelNumber").get_asInt() };
results.m_sortedMembers.push_back(newMember);
results.m_members.insert(std::make_pair(channel->StorageId(), newMember));
m_pDS->next();
++iReturn;
}
m_pDS->close();
}
catch (...)
{
CLog::Log(LOGERROR, "PVR - %s - couldn't load channels from the database", __FUNCTION__);
}
}
else
{
CLog::Log(LOGERROR, "PVR - %s - query failed", __FUNCTION__);
}
m_pDS->close();
return iReturn;
}