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


C++ epg::CEpgInfoTagPtr类代码示例

本文整理汇总了C++中epg::CEpgInfoTagPtr的典型用法代码示例。如果您正苦于以下问题:C++ CEpgInfoTagPtr类的具体用法?C++ CEpgInfoTagPtr怎么用?C++ CEpgInfoTagPtr使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: UpdateFromClient

void CPVRRecordings::UpdateFromClient(const CPVRRecordingPtr &tag)
{
  CSingleLock lock(m_critSection);

  if (tag->IsDeleted())
    m_bHasDeleted = true;

  CPVRRecordingPtr newTag = GetById(tag->m_iClientId, tag->m_strRecordingId);
  if (newTag)
  {
    newTag->Update(*tag);
  }
  else
  {
    newTag = CPVRRecordingPtr(new CPVRRecording);
    newTag->Update(*tag);
    if (newTag->BroadcastUid() != EPG_TAG_INVALID_UID)
    {
      const CPVRChannelPtr channel(newTag->Channel());
      if (channel)
      {
        const EPG::CEpgInfoTagPtr epgTag = EPG::CEpgContainer::GetInstance().GetTagById(channel, newTag->BroadcastUid());
        if (epgTag)
          epgTag->SetRecording(newTag);
      }
    }
    newTag->m_iRecordingId = ++m_iLastId;
    m_recordings.insert(std::make_pair(CPVRRecordingUid(newTag->m_iClientId, newTag->m_strRecordingId), newTag));
  }
}
开发者ID:69thelememt,项目名称:xbmc,代码行数:30,代码来源:PVRRecordings.cpp

示例2: GetRecording

CPVRRecordingPtr CPVRChannel::GetRecording(void) const
{
  EPG::CEpgInfoTagPtr epgTag = GetEPGNow();
  return (epgTag && epgTag->HasRecording()) ?
      epgTag->Recording() :
      CPVRRecordingPtr();
}
开发者ID:AchimTuran,项目名称:xbmc,代码行数:7,代码来源:PVRChannel.cpp

示例3: UpdateFromClient

void CPVRRecordings::UpdateFromClient(const CPVRRecordingPtr &tag)
{
  CSingleLock lock(m_critSection);

  if (tag->IsDeleted())
    m_bHasDeleted = true;

  CPVRRecordingPtr newTag = GetById(tag->m_iClientId, tag->m_strRecordingId);
  if (newTag)
  {
    newTag->Update(*tag);
  }
  else
  {
    newTag = CPVRRecordingPtr(new CPVRRecording);
    newTag->Update(*tag);
    if (newTag->EpgEvent() > 0)
    {
      EPG::CEpgInfoTagPtr epgTag = EPG::CEpgContainer::GetInstance().GetTagById(newTag->EpgEvent());
      if (epgTag)
        epgTag->SetRecording(newTag);
    }
    newTag->m_iRecordingId = ++m_iLastId;
    m_recordings.insert(std::make_pair(CPVRRecordingUid(newTag->m_iClientId, newTag->m_strRecordingId), newTag));
  }
}
开发者ID:KeTao,项目名称:kodi-cmake,代码行数:26,代码来源:PVRRecordings.cpp

示例4: IsBeingRecorded

bool CPVRRecording::IsBeingRecorded(void) const
{
  if (m_iEpgEventId)
  {
    EPG::CEpgInfoTagPtr epgTag = EPG::CEpgContainer::GetInstance().GetTagById(m_iEpgEventId);
    return epgTag ? epgTag->HasRecording() : false;
  }
  return false;
}
开发者ID:evilhamster,项目名称:xbmc,代码行数:9,代码来源:PVRRecording.cpp

示例5: Channel

CPVRChannelPtr CPVRRecording::Channel(void) const
{
  if (m_iEpgEventId)
  {
    EPG::CEpgInfoTagPtr epgTag = EPG::CEpgContainer::GetInstance().GetTagById(m_iEpgEventId);
    if (epgTag)
      return epgTag->ChannelTag();
  }
  return CPVRChannelPtr();
}
开发者ID:evilhamster,项目名称:xbmc,代码行数:10,代码来源:PVRRecording.cpp

示例6: OnDelete

void CPVRRecording::OnDelete(void)
{
  if (m_iEpgEventId != EPG_TAG_INVALID_UID)
  {
    const CPVRChannelPtr channel(Channel());
    if (channel)
    {
      const EPG::CEpgInfoTagPtr epgTag(EPG::CEpgContainer::GetInstance().GetTagById(channel, m_iEpgEventId));
      if (epgTag)
        epgTag->ClearRecording();
    }
  }
}
开发者ID:Jalle19,项目名称:xbmc,代码行数:13,代码来源:PVRRecording.cpp

示例7: UpdateEpgTags

void CPVRRecordings::UpdateEpgTags(void)
{
  CSingleLock lock(m_critSection);
  int iEpgEvent;
  for (PVR_RECORDINGMAP_ITR it = m_recordings.begin(); it != m_recordings.end(); ++it)
  {
    iEpgEvent = it->second->EpgEvent();
    if (iEpgEvent > 0 && !it->second->IsDeleted())
    {
      EPG::CEpgInfoTagPtr epgTag = EPG::CEpgContainer::GetInstance().GetTagById(iEpgEvent);
      if (epgTag)
        epgTag->SetRecording(it->second);
    }
  }
}
开发者ID:KeTao,项目名称:kodi-cmake,代码行数:15,代码来源:PVRRecordings.cpp

示例8: InitializeTypesList

void CGUIDialogPVRTimerSettings::InitializeTypesList()
{
  m_typeEntries.clear();

  // If timer is read-only or was created by a timer rule, only add current type, for information. Type can't be changed.
  if (m_timerType->IsReadOnly() || m_timerInfoTag->GetTimerRuleId() != PVR_TIMER_NO_PARENT)
  {
    m_typeEntries.insert(std::make_pair(0, m_timerType));
    return;
  }

  int idx = 0;
  const std::vector<CPVRTimerTypePtr> types(CPVRTimerType::GetAllTypes());
  for (const auto &type : types)
  {
    // Type definition prohibits created of new instances.
    // But the dialog can act as a viewer for these types.
    if (type->ForbidsNewInstances())
      continue;

    // Read-only timers cannot be created using this dialog.
    // But the dialog can act as a viewer for read-only types.
    if (type->IsReadOnly())
      continue;

    // Drop TimerTypes that require EPGInfo, if none is populated
    if (type->RequiresEpgTagOnCreate() && !m_timerInfoTag->GetEpgInfoTag())
      continue;

    // Drop TimerTypes without 'Series' EPG attributes if none are set
    if (type->RequiresEpgSeriesOnCreate())
    {
      const EPG::CEpgInfoTagPtr epgTag(m_timerInfoTag->GetEpgInfoTag());
      if (epgTag && !epgTag->IsSeries())
        continue;
    }

    // Drop TimerTypes that forbid EPGInfo, if it is populated
    if (type->ForbidsEpgTagOnCreate() && m_timerInfoTag->GetEpgInfoTag())
      continue;

    // Drop TimerTypes that aren't rules if end time is in the past
    if (!type->IsTimerRule() && m_timerInfoTag->EndAsLocalTime() < CDateTime::GetCurrentDateTime())
      continue;

    m_typeEntries.insert(std::make_pair(idx++, type));
  }
}
开发者ID:Jalle19,项目名称:xbmc,代码行数:48,代码来源:GUIDialogPVRTimerSettings.cpp

示例9: UpdateEpgTags

void CPVRRecordings::UpdateEpgTags(void)
{
  CSingleLock lock(m_critSection);
  unsigned int iEpgEvent;
  CPVRChannelPtr channel;
  for (PVR_RECORDINGMAP_ITR it = m_recordings.begin(); it != m_recordings.end(); ++it)
  {
    iEpgEvent = it->second->BroadcastUid();
    if (iEpgEvent != EPG_TAG_INVALID_UID && !it->second->IsDeleted())
    {
      channel = it->second->Channel();
      if (channel)
      {
        const EPG::CEpgInfoTagPtr epgTag = EPG::CEpgContainer::GetInstance().GetTagById(channel, iEpgEvent);
        if (epgTag)
          epgTag->SetRecording(it->second);
      }
    }
  }
}
开发者ID:69thelememt,项目名称:xbmc,代码行数:20,代码来源:PVRRecordings.cpp

示例10: GetRecordingForEpgTag

CPVRRecordingPtr CPVRRecordings::GetRecordingForEpgTag(const EPG::CEpgInfoTagPtr &epgTag) const
{
  CSingleLock lock(m_critSection);

  for (const auto recording : m_recordings)
  {
    if (recording.second->IsDeleted())
      continue;

    unsigned int iEpgEvent = recording.second->BroadcastUid();
    if (iEpgEvent != EPG_TAG_INVALID_UID)
    {
      if (iEpgEvent == epgTag->UniqueBroadcastID())
      {
        // uid matches. perfect.
        return recording.second;
      }
    }
    else
    {
      // uid is optional, so check other relevant data.

      // note: don't use recording.second->Channel() for comparing channels here as this can lead
      //       to deadlocks. compare client ids and channel ids instead, this has the same effect.
      if (epgTag->ChannelTag() &&
          recording.second->ClientID() == epgTag->ChannelTag()->ClientID() &&
          recording.second->ChannelUid() == epgTag->ChannelTag()->UniqueID() &&
          recording.second->RecordingTimeAsUTC() <= epgTag->StartAsUTC() &&
          (recording.second->RecordingTimeAsUTC() + recording.second->m_duration) >= epgTag->EndAsUTC())
        return recording.second;
    }
  }

  return CPVRRecordingPtr();
}
开发者ID:DaveTBlake,项目名称:xbmc,代码行数:35,代码来源:PVRRecordings.cpp

示例11: HasRecording

bool CPVRChannel::HasRecording(void) const
{
  EPG::CEpgInfoTagPtr epgTag = GetEPGNow();
  return epgTag && epgTag->HasRecording();
}
开发者ID:AchimTuran,项目名称:xbmc,代码行数:5,代码来源:PVRChannel.cpp

示例12: OnDelete

void CPVRRecording::OnDelete(void)
{
  EPG::CEpgInfoTagPtr epgTag = EPG::CEpgContainer::GetInstance().GetTagById(EpgEvent());
  if (epgTag)
    epgTag->ClearRecording();
}
开发者ID:evilhamster,项目名称:xbmc,代码行数:6,代码来源:PVRRecording.cpp


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