本文整理汇总了C++中SChannels类的典型用法代码示例。如果您正苦于以下问题:C++ SChannels类的具体用法?C++ SChannels怎么用?C++ SChannels使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了SChannels类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetChannels
PVR_ERROR CHTSPData::GetChannelGroupMembers(PVR_HANDLE handle, const PVR_CHANNEL_GROUP &group)
{
XBMC->Log(LOG_DEBUG, "%s - group '%s'", __FUNCTION__, group.strGroupName);
for(unsigned int iTagPtr = 0; iTagPtr < m_tags.size(); iTagPtr++)
{
if (m_tags[iTagPtr].name != group.strGroupName)
continue;
SChannels channels = GetChannels(m_tags[iTagPtr].id);
for(SChannels::iterator it = channels.begin(); it != channels.end(); ++it)
{
SChannel& channel = it->second;
if (channel.radio != group.bIsRadio)
continue;
PVR_CHANNEL_GROUP_MEMBER tag;
memset(&tag,0 , sizeof(PVR_CHANNEL_GROUP_MEMBER));
tag.strGroupName = group.strGroupName;
tag.iChannelUniqueId = channel.id;
tag.iChannelNumber = channel.num;
XBMC->Log(LOG_DEBUG, "%s - add channel %s (%d) to group '%s' channel number %d",
__FUNCTION__, channel.name.c_str(), tag.iChannelUniqueId, group.strGroupName, channel.num);
PVR->TransferChannelGroupMember(handle, &tag);
}
}
return PVR_ERROR_NO_ERROR;
}
示例2: url
bool CHTSPDirectory::GetChannels( const CURL &base
, CFileItemList &items
, SChannels channels
, int tag)
{
CURL url(base);
SEvent event;
for(SChannels::iterator it = channels.begin(); it != channels.end(); it++)
{
if(!m_session->GetEvent(event, it->second.event))
event.Clear();
CFileItemPtr item(new CFileItem("", true));
url.SetFileName("");
item->SetPath(url.Get());
CHTSPSession::ParseItem(it->second, tag, event, *item);
item->m_bIsFolder = false;
item->SetLabel(item->m_strTitle);
item->m_strTitle = StringUtils::Format("%d", it->second.num);
items.Add(item);
}
items.AddSortMethod(SortByTrackNumber, 554, LABEL_MASKS("%K[ - %B]", "%Z", "%L", ""));
items.AddSortMethod(SortByAlbum, 558, LABEL_MASKS("%B", "%Z", "%L", ""), CSettings::Get().GetBool("filelists.ignorethewhensorting") ? SortAttributeIgnoreArticle : SortAttributeNone);
items.AddSortMethod(SortByLabel, 551, LABEL_MASKS("%Z", "%B", "%L", ""), CSettings::Get().GetBool("filelists.ignorethewhensorting") ? SortAttributeIgnoreArticle : SortAttributeNone);
items.SetContent("livetv");
return !channels.empty();
}
示例3: GetChannels
PVR_ERROR CHTSPData::GetEpg(ADDON_HANDLE handle, const PVR_CHANNEL &channel, time_t iStart, time_t iEnd)
{
PVR_ERROR retVal = PVR_ERROR_NO_ERROR;
SChannels channels = GetChannels();
if (channels.find(channel.iUniqueId) != channels.end())
{
/* Full channel update */
if (GetProtocol() >= 6)
{
retVal = GetEvents(handle, channel.iUniqueId, iEnd);
}
/* Event at a time */
else
{
uint32_t eventId = channels[channel.iUniqueId].event;
if (eventId != 0)
{
do
{
retVal = GetEvent(handle, &eventId, iEnd);
} while(eventId && retVal == PVR_ERROR_NO_ERROR);
}
}
}
return retVal;
}
示例4: url
bool CHTSPDirectory::GetChannels( const CURL &base
, CFileItemList &items
, SChannels channels
, int tag)
{
CURL url(base);
SEvent event;
for(SChannels::iterator it = channels.begin(); it != channels.end(); it++)
{
if(!m_session->GetEvent(event, it->second.event))
event.Clear();
CFileItemPtr item(new CFileItem("", true));
url.SetFileName("");
item->SetPath(url.Get());
CHTSPSession::ParseItem(it->second, tag, event, *item);
item->m_bIsFolder = false;
item->SetLabel(item->m_strTitle);
item->m_strTitle.Format("%d", it->second.num);
items.Add(item);
}
items.AddSortMethod(SORT_METHOD_TRACKNUM, 554, LABEL_MASKS("%K[ - %B]", "%Z", "%L", ""));
if (g_guiSettings.GetBool("filelists.ignorethewhensorting"))
items.AddSortMethod(SORT_METHOD_ALBUM_IGNORE_THE, 558, LABEL_MASKS("%B", "%Z", "%L", ""));
else
items.AddSortMethod(SORT_METHOD_ALBUM, 558, LABEL_MASKS("%B", "%Z", "%L", ""));
if (g_guiSettings.GetBool("filelists.ignorethewhensorting"))
items.AddSortMethod(SORT_METHOD_LABEL_IGNORE_THE, 551, LABEL_MASKS("%Z", "%B", "%L", ""));
else
items.AddSortMethod(SORT_METHOD_LABEL, 551, LABEL_MASKS("%Z", "%B", "%L", ""));
items.SetContent("livetv");
return !channels.empty();
}