本文整理汇总了C++中CPVRChannel::UpdatePath方法的典型用法代码示例。如果您正苦于以下问题:C++ CPVRChannel::UpdatePath方法的具体用法?C++ CPVRChannel::UpdatePath怎么用?C++ CPVRChannel::UpdatePath使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CPVRChannel
的用法示例。
在下文中一共展示了CPVRChannel::UpdatePath方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetChannels
int CPVRDatabase::GetChannels(CPVRChannels &results, bool bIsRadio)
{
int iReturn = -1;
CStdString strQuery = FormatSQL("SELECT * FROM Channels WHERE IsRadio = %u ORDER BY ChannelNumber\n", bIsRadio);
int iNumRows = ResultQuery(strQuery);
if (iNumRows > 0)
{
try
{
while (!m_pDS->eof())
{
CPVRChannel *channel = new CPVRChannel();
channel->m_iChannelId = m_pDS->fv("ChannelId").get_asInt();
channel->m_iUniqueId = m_pDS->fv("UniqueId").get_asInt();
channel->m_iChannelNumber = m_pDS->fv("ChannelNumber").get_asInt();
channel->m_iChannelGroupId = m_pDS->fv("GroupId").get_asInt();
channel->m_bIsRadio = m_pDS->fv("IsRadio").get_asBool();
channel->m_bIsHidden = m_pDS->fv("IsHidden").get_asBool();
channel->m_strIconPath = m_pDS->fv("IconPath").get_asString();
channel->m_strChannelName = m_pDS->fv("ChannelName").get_asString();
channel->m_bIsVirtual = m_pDS->fv("IsVirtual").get_asBool();
channel->m_bEPGEnabled = m_pDS->fv("EPGEnabled").get_asBool();
channel->m_strEPGScraper = m_pDS->fv("EPGScraper").get_asString();
channel->m_iClientId = m_pDS->fv("ClientId").get_asInt();
channel->m_iClientChannelNumber = m_pDS->fv("ClientChannelNumber").get_asInt();
channel->m_strInputFormat = m_pDS->fv("InputFormat").get_asString();
channel->m_strStreamURL = m_pDS->fv("StreamURL").get_asString();
channel->m_iClientEncryptionSystem = m_pDS->fv("EncryptionSystem").get_asInt();
channel->UpdatePath();
CLog::Log(LOGDEBUG, "PVRDB - %s - channel '%s' loaded from the database",
__FUNCTION__, channel->m_strChannelName.c_str());
results.push_back(channel);
m_pDS->next();
++iReturn;
}
}
catch (...)
{
CLog::Log(LOGERROR, "PVRDB - %s - couldn't load channels from the database", __FUNCTION__);
}
}
m_pDS->close();
return iReturn;
}