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


C++ CPVRTimerInfoTagPtr::ClearEpgTag方法代码示例

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


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

示例1: ClearTimer

void CEpgInfoTag::ClearTimer(void)
{
  CPVRTimerInfoTagPtr previousTag;
  previousTag = m_timer;
  CPVRTimerInfoTagPtr empty;
  m_timer = empty;

  if (previousTag)
    previousTag->ClearEpgTag();
}
开发者ID:Distrotech,项目名称:xbmc,代码行数:10,代码来源:EpgInfoTag.cpp

示例2: ClearTimer

void CEpgInfoTag::ClearTimer(void)
{
  CPVRTimerInfoTagPtr previousTag;
  {
    CSingleLock lock(m_critSection);
    previousTag = m_timer;
    CPVRTimerInfoTagPtr empty;
    m_timer = empty;
  }

  if (previousTag)
    previousTag->ClearEpgTag();
}
开发者ID:topfs2,项目名称:xbmc-cmake,代码行数:13,代码来源:EpgInfoTag.cpp

示例3: UpdateEntries


//.........这里部分代码省略.........
    }
  }

  /* to collect timer with changed starting time */
  vector<CPVRTimerInfoTagPtr> timersToMove;
  
  /* check for deleted timers */
  for (map<CDateTime, vector<CPVRTimerInfoTagPtr>* >::iterator it = m_tags.begin(); it != m_tags.end();)
  {
    for (int iTimerPtr = it->second->size() - 1; iTimerPtr >= 0; iTimerPtr--)
    {
      CPVRTimerInfoTagPtr timer = it->second->at(iTimerPtr);
      if (!timers.GetByClient(timer->m_iClientId, timer->m_iClientIndex))
      {
        /* timer was not found */
        CLog::Log(LOGDEBUG,"PVRTimers - %s - deleted timer %d on client %d",
            __FUNCTION__, timer->m_iClientIndex, timer->m_iClientId);

        if (g_PVRManager.IsStarted())
        {
          CStdString strMessage;
          strMessage.Format("%s: '%s'",
              (timer->EndAsUTC() <= CDateTime::GetCurrentDateTime().GetAsUTCDateTime()) ?
                  g_localizeStrings.Get(19227) :
                  g_localizeStrings.Get(19228),
                  timer->m_strTitle.c_str());
          timerNotifications.push_back(strMessage);
        }

        it->second->erase(it->second->begin() + iTimerPtr);

        bChanged = true;
        bAddedOrDeleted = true;
      }
      else if (timer->StartAsUTC() != it->first)
      {
        /* timer start has changed */
        CLog::Log(LOGDEBUG,"PVRTimers - %s - changed start time timer %d on client %d",
            __FUNCTION__, timer->m_iClientIndex, timer->m_iClientId);

        timer->ClearEpgTag();

        /* remember timer */
        timersToMove.push_back(timer);
        
        /* remove timer for now, reinsert later */
        it->second->erase(it->second->begin() + iTimerPtr);

        bChanged = true;
        bAddedOrDeleted = true;
      }
    }
    if (it->second->size() == 0)
      m_tags.erase(it++);
    else
      ++it;
  }

  /* reinsert timers with changed timer start */
  for (vector<CPVRTimerInfoTagPtr>::const_iterator timerIt = timersToMove.begin(); timerIt != timersToMove.end(); timerIt++)
  {
      vector<CPVRTimerInfoTagPtr>* addEntry = NULL;
      map<CDateTime, vector<CPVRTimerInfoTagPtr>* >::const_iterator itr = m_tags.find((*timerIt)->StartAsUTC());
      if (itr == m_tags.end())
      {
        addEntry = new vector<CPVRTimerInfoTagPtr>;
        m_tags.insert(make_pair((*timerIt)->StartAsUTC(), addEntry));
      }
      else
      {
        addEntry = itr->second;
      }

      addEntry->push_back(*timerIt);
      UpdateEpgEvent(*timerIt);
  }

  m_bIsUpdating = false;
  if (bChanged)
  {
    UpdateChannels();
    SetChanged();
    lock.Leave();

    NotifyObservers(bAddedOrDeleted ? ObservableMessageTimersReset : ObservableMessageTimers);

    if (g_guiSettings.GetBool("pvrrecord.timernotifications"))
    {
      /* queue notifications */
      for (unsigned int iNotificationPtr = 0; iNotificationPtr < timerNotifications.size(); iNotificationPtr++)
      {
        CGUIDialogKaiToast::QueueNotification(CGUIDialogKaiToast::Info,
            g_localizeStrings.Get(19166),
            timerNotifications.at(iNotificationPtr));
      }
    }
  }

  return bChanged;
}
开发者ID:AnXi-TieGuanYin-Tea,项目名称:plex-home-theatre,代码行数:101,代码来源:PVRTimers.cpp


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