当前位置: 首页>>代码示例>>C++>>正文


C++ CEpg::Channel方法代码示例

本文整理汇总了C++中CEpg::Channel方法的典型用法代码示例。如果您正苦于以下问题:C++ CEpg::Channel方法的具体用法?C++ CEpg::Channel怎么用?C++ CEpg::Channel使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CEpg的用法示例。


在下文中一共展示了CEpg::Channel方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: Icon

CStdString CEpgInfoTag::Icon(void) const
{
  CStdString retVal;
  CEpg *epg = g_EpgContainer.GetById(m_iEpgId);

  CSingleLock lock(m_critSection);
  retVal = m_strIconPath;
  if (retVal.IsEmpty() && epg && epg->HasPVRChannel())
     retVal = epg->Channel()->IconPath();
  return retVal;
}
开发者ID:Kr0nZ,项目名称:xbmc,代码行数:11,代码来源:EpgInfoTag.cpp

示例2: SetChannel

bool PVR::CPVREpg::Update(const CEpg &epg, bool bUpdateDb /* = false */)
{
  bool bReturn = CEpg::Update(epg, false); // don't update the db yet

  SetChannel((CPVRChannel*) epg.Channel());

  if (bUpdateDb)
    bReturn = Persist(false);

  return bReturn;
}
开发者ID:chris-magic,项目名称:xbmc_dualaudio_pvr,代码行数:11,代码来源:PVREpg.cpp

示例3: UpdateEPG

bool CEpgContainer::UpdateEPG(bool bOnlyPending /* = false */)
{
  bool bInterrupted(false);
  unsigned int iUpdatedTables(0);
  bool bShowProgress(false);

  /* set start and end time */
  time_t start;
  time_t end;
  CDateTime::GetCurrentDateTime().GetAsUTCDateTime().GetAsTime(start);
  end = start + m_iDisplayTime;
  start -= g_advancedSettings.m_iEpgLingerTime * 60;
  bShowProgress = g_advancedSettings.m_bEpgDisplayUpdatePopup && (m_bIsInitialising || g_advancedSettings.m_bEpgDisplayIncrementalUpdatePopup);

  {
    CSingleLock lock(m_critSection);
    if (m_bIsUpdating || InterruptUpdate())
      return false;
    m_bIsUpdating = true;
  }

  if (bShowProgress && !bOnlyPending)
    ShowProgressDialog();

  if (!m_bIgnoreDbForClient && !m_database.IsOpen())
  {
    CLog::Log(LOGERROR, "EpgContainer - %s - could not open the database", __FUNCTION__);

    CSingleLock lock(m_critSection);
    m_bIsUpdating = false;
    m_updateEvent.Set();

    if (bShowProgress && !bOnlyPending)
      CloseProgressDialog();

    return false;
  }

  vector<CEpg*> invalidTables;

  /* load or update all EPG tables */
  CEpg *epg;
  unsigned int iCounter(0);
  for (map<unsigned int, CEpg *>::iterator it = m_epgs.begin(); it != m_epgs.end(); it++)
  {
    if (InterruptUpdate())
    {
      bInterrupted = true;
      break;
    }

    epg = it->second;
    if (!epg)
      continue;

    if (bShowProgress && !bOnlyPending)
      UpdateProgressDialog(++iCounter, m_epgs.size(), epg->Name());

    // we currently only support update via pvr add-ons. skip update when the pvr manager isn't started
    if (!g_PVRManager.IsStarted())
      continue;

    // check the pvr manager when the channel pointer isn't set
    if (!epg->Channel())
    {
      CPVRChannelPtr channel = g_PVRChannelGroups->GetChannelByEpgId(epg->EpgID());
      if (channel)
        epg->SetChannel(channel);
    }

    if ((!bOnlyPending || epg->UpdatePending()) && epg->Update(start, end, m_iUpdateTime, bOnlyPending))
      iUpdatedTables++;
    else if (!epg->IsValid())
      invalidTables.push_back(epg);
  }

  for (vector<CEpg*>::iterator it = invalidTables.begin(); it != invalidTables.end(); it++)
    DeleteEpg(**it, true);

  if (bInterrupted)
  {
    /* the update has been interrupted. try again later */
    time_t iNow;
    CDateTime::GetCurrentDateTime().GetAsUTCDateTime().GetAsTime(iNow);
    m_iNextEpgUpdate = iNow + g_advancedSettings.m_iEpgRetryInterruptedUpdateInterval;
  }
  else
  {
    CDateTime::GetCurrentDateTime().GetAsUTCDateTime().GetAsTime(m_iNextEpgUpdate);
    m_iNextEpgUpdate += g_advancedSettings.m_iEpgUpdateCheckInterval;
    m_bHasPendingUpdates = false;
  }

  if (bShowProgress && !bOnlyPending)
    CloseProgressDialog();

  /* notify observers */
  if (iUpdatedTables > 0)
  {
    SetChanged();
//.........这里部分代码省略.........
开发者ID:koying,项目名称:xbmc-pivos,代码行数:101,代码来源:EpgContainer.cpp


注:本文中的CEpg::Channel方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。