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


C++ MythProgramInfo::UID方法代码示例

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


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

示例1: GetScheduledPrograms

ProgramInfoMap MythConnection::GetScheduledPrograms()
{
  Lock();

  ProgramInfoMap retval;
  cmyth_proglist_t proglist = NULL;
  CMYTH_CONN_CALL_REF(proglist, proglist == NULL, cmyth_proglist_get_all_scheduled(*m_conn_t));
  int len = cmyth_proglist_get_count(proglist);
  for (int i = 0; i < len; i++)
  {
    MythProgramInfo prog = cmyth_proglist_get_item(proglist, i);
    if (!prog.IsNull()) {
      retval.insert(std::pair<CStdString, MythProgramInfo>(prog.UID().c_str(), prog));
    }
  }
  ref_release(proglist);

  Unlock();

  return retval;
}
开发者ID:Alloyed,项目名称:xbmc-pvr-addons,代码行数:21,代码来源:MythConnection.cpp

示例2: if


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

      if (myth_event == CMYTH_EVENT_SCHEDULE_CHANGE)
      {
        if (g_bExtraDebug)
          XBMC->Log(LOG_NOTICE, "%s - Event schedule change", __FUNCTION__);
        PVR->TriggerTimerUpdate();
      }

      else if (myth_event == CMYTH_EVENT_RECORDING_LIST_CHANGE_ADD)
      {
        //Event data: "4121 2010-03-06T01:06:43[]:[]empty"
        unsigned int chanid;
        char recstartts[20];
        if (strlen(databuf)>=24 && sscanf(databuf, "%u %19s", &chanid, recstartts) == 2) {
          Lock();
          m_recordingChangeEventList.push_back(RecordingChangeEvent(CHANGE_ADD, chanid, recstartts));
          Unlock();
          if (g_bExtraDebug)
            XBMC->Log(LOG_DEBUG,"%s - Event recording list add: CHANID=%u TS=%s", __FUNCTION__, chanid, recstartts);
          recordingChange = true;
        }
      }

      else if (myth_event == CMYTH_EVENT_RECORDING_LIST_CHANGE_UPDATE)
      {
        //Event data: Updated 'proginfo' is returned
        MythProgramInfo prog = MythProgramInfo(proginfo);
        if (!prog.IsNull())
        {
          Lock();
          m_recordingChangeEventList.push_back(RecordingChangeEvent(CHANGE_UPDATE, prog));
          Unlock();
          if (g_bExtraDebug)
            XBMC->Log(LOG_DEBUG,"%s - Event recording list update: UID=%s", __FUNCTION__, prog.UID().c_str());
          recordingChange = true;
        }
      }

      else if (myth_event == CMYTH_EVENT_RECORDING_LIST_CHANGE_DELETE)
      {
        //Event data: "4121 2010-03-06T01:06:43[]:[]empty"
        unsigned int chanid;
        char recstartts[20];
        if (strlen(databuf)>=24 && sscanf(databuf, "%u %19s", &chanid, recstartts) == 2) {
          Lock();
          m_recordingChangeEventList.push_back(RecordingChangeEvent(CHANGE_DELETE, chanid, recstartts));
          Unlock();
          if (g_bExtraDebug)
            XBMC->Log(LOG_DEBUG,"%s - Event recording list delete: CHANID=%u TS=%s", __FUNCTION__, chanid, recstartts);
          recordingChange = true;
        }
      }

      else if (myth_event == CMYTH_EVENT_RECORDING_LIST_CHANGE)
      {
        if (g_bExtraDebug)
          XBMC->Log(LOG_NOTICE, "%s - Event recording list change", __FUNCTION__);
        RecordingListChange();
      }

      else if (myth_event == CMYTH_EVENT_UNKNOWN)
      {
        XBMC->Log(LOG_NOTICE, "%s - Event unknown, databuf: %s", __FUNCTION__, databuf);
      }

      else if (myth_event == CMYTH_EVENT_CLOSE)
开发者ID:koz4,项目名称:xbmc-pvr-addons,代码行数:67,代码来源:MythEventHandler.cpp


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