本文整理汇总了C++中CPVRChannelPtr::EPGEnabled方法的典型用法代码示例。如果您正苦于以下问题:C++ CPVRChannelPtr::EPGEnabled方法的具体用法?C++ CPVRChannelPtr::EPGEnabled怎么用?C++ CPVRChannelPtr::EPGEnabled使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CPVRChannelPtr
的用法示例。
在下文中一共展示了CPVRChannelPtr::EPGEnabled方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: UpdateFromScraper
bool CEpg::UpdateFromScraper(time_t start, time_t end)
{
bool bGrabSuccess = false;
if (ScraperName() == "client")
{
CPVRChannelPtr channel = Channel();
if (!channel)
CLog::Log(LOGINFO, "%s - channel not found, can't update", __FUNCTION__);
else if (!channel->EPGEnabled())
CLog::Log(LOGINFO, "%s - EPG updating disabled in the channel configuration", __FUNCTION__);
else if (!g_PVRClients->SupportsEPG(channel->ClientID()))
CLog::Log(LOGINFO, "%s - the backend for channel '%s' on client '%i' does not support EPGs", __FUNCTION__, channel->ChannelName().c_str(), channel->ClientID());
else
{
CLog::Log(LOGINFO, "%s - updating EPG for channel '%s' from client '%i'", __FUNCTION__, channel->ChannelName().c_str(), channel->ClientID());
bGrabSuccess = (g_PVRClients->GetEPGForChannel(*channel, this, start, end) == PVR_ERROR_NO_ERROR);
}
}
else if (m_strScraperName.IsEmpty()) /* no grabber defined */
CLog::Log(LOGERROR, "EPG - %s - no EPG scraper defined for table '%s'", __FUNCTION__, m_strName.c_str());
else
{
CLog::Log(LOGINFO, "EPG - %s - updating EPG table '%s' with scraper '%s'", __FUNCTION__, m_strName.c_str(), m_strScraperName.c_str());
CLog::Log(LOGERROR, "loading the EPG via scraper has not been implemented yet");
// TODO: Add Support for Web EPG Scrapers here
}
return bGrabSuccess;
}
示例2: UpdateFromScraper
bool CPVREpg::UpdateFromScraper(time_t start, time_t end)
{
bool bGrabSuccess = false;
if (ScraperName() == "client")
{
CPVRChannelPtr channel = Channel();
if (!channel)
{
CLog::Log(LOGWARNING, "EPG - %s - channel not found, can't update", __FUNCTION__);
}
else if (!channel->EPGEnabled())
{
#if EPG_DEBUGGING
CLog::Log(LOGDEBUG, "EPG - %s - EPG updating disabled in the channel configuration", __FUNCTION__);
#endif
bGrabSuccess = true;
}
else if (channel->IsHidden())
{
#if EPG_DEBUGGING
CLog::Log(LOGDEBUG, "EPG - %s - channel '%s' on client '%i' is hidden", __FUNCTION__, channel->ChannelName().c_str(), channel->ClientID());
#endif
bGrabSuccess = true;
}
else if (!CServiceBroker::GetPVRManager().Clients()->GetClientCapabilities(channel->ClientID()).SupportsEPG())
{
CLog::Log(LOGDEBUG, "EPG - %s - the backend for channel '%s' on client '%i' does not support EPGs", __FUNCTION__, channel->ChannelName().c_str(), channel->ClientID());
}
else
{
CLog::Log(LOGDEBUG, "EPG - %s - updating EPG for channel '%s' from client '%i'", __FUNCTION__, channel->ChannelName().c_str(), channel->ClientID());
bGrabSuccess = (CServiceBroker::GetPVRManager().Clients()->GetEPGForChannel(channel, this, start, end) == PVR_ERROR_NO_ERROR);
}
}
else if (m_strScraperName.empty()) /* no grabber defined */
CLog::Log(LOGWARNING, "EPG - %s - no EPG scraper defined for table '%s'", __FUNCTION__, m_strName.c_str());
else
{
CLog::Log(LOGINFO, "EPG - %s - updating EPG table '%s' with scraper '%s'", __FUNCTION__, m_strName.c_str(), m_strScraperName.c_str());
CLog::Log(LOGWARNING, "loading the EPG via scraper has not been implemented yet");
//! @todo Add Support for Web EPG Scrapers here
}
return bGrabSuccess;
}
示例3: Update
void CGUIDialogPVRChannelManager::Update()
{
// lock our display, as this window is rendered from the player thread
g_graphicsContext.Lock();
m_viewControl.SetCurrentView(CONTROL_LIST_CHANNELS);
// empty the lists ready for population
Clear();
CPVRChannelGroupPtr channels = g_PVRChannelGroups->GetGroupAll(m_bIsRadio);
// No channels available, nothing to do.
if(!channels)
return;
std::vector<PVRChannelGroupMember> groupMembers(channels->GetMembers());
CFileItemPtr channelFile;
for (std::vector<PVRChannelGroupMember>::const_iterator it = groupMembers.begin(); it != groupMembers.end(); ++it)
{
channelFile = CFileItemPtr(new CFileItem((*it).channel));
if (!channelFile || !channelFile->HasPVRChannelInfoTag())
continue;
const CPVRChannelPtr channel(channelFile->GetPVRChannelInfoTag());
channelFile->SetProperty("ActiveChannel", !channel->IsHidden());
channelFile->SetProperty("Name", channel->ChannelName());
channelFile->SetProperty("UseEPG", channel->EPGEnabled());
channelFile->SetProperty("Icon", channel->IconPath());
channelFile->SetProperty("EPGSource", (int)0);
channelFile->SetProperty("ParentalLocked", channel->IsLocked());
channelFile->SetProperty("Number", StringUtils::Format("%i", channel->ChannelNumber()));
std::string clientName;
g_PVRClients->GetClientName(channel->ClientID(), clientName);
channelFile->SetProperty("ClientName", clientName);
channelFile->SetProperty("SupportsSettings", g_PVRClients->SupportsChannelSettings(channel->ClientID()));
m_channelItems->Add(channelFile);
}
{
std::vector< std::pair<std::string, int> > labels;
labels.push_back(std::make_pair(g_localizeStrings.Get(19210), 0));
/// TODO: Add Labels for EPG scrapers here
SET_CONTROL_LABELS(SPIN_EPGSOURCE_SELECTION, 0, &labels);
}
m_clientsWithSettingsList = g_PVRClients->GetClientsSupportingChannelSettings(m_bIsRadio);
if (!m_clientsWithSettingsList.empty())
m_bAllowNewChannel = true;
if (m_bAllowNewChannel)
SET_CONTROL_VISIBLE(BUTTON_NEW_CHANNEL);
else
SET_CONTROL_HIDDEN(BUTTON_NEW_CHANNEL);
Renumber();
m_viewControl.SetItems(*m_channelItems);
m_viewControl.SetSelectedItem(m_iSelected);
g_graphicsContext.Unlock();
}