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


C++ CPVRClient类代码示例

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


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

示例1: GetPVRClient

void CAddonCallbacksPVR::PVRTransferTimerEntry(void *addonData, const ADDON_HANDLE handle, const PVR_TIMER *timer)
{
  if (!handle)
  {
    CLog::Log(LOGERROR, "PVR - %s - invalid handler data", __FUNCTION__);
    return;
  }

  CPVRClient *client     = GetPVRClient(addonData);
  CPVRTimers *xbmcTimers = static_cast<CPVRTimers *>(handle->dataAddress);
  if (!timer || !client || !xbmcTimers)
  {
    CLog::Log(LOGERROR, "PVR - %s - invalid handler data", __FUNCTION__);
    return;
  }

  CPVRChannelPtr channel = g_PVRChannelGroups->GetByUniqueID(timer->iClientChannelUid, client->GetID());
  if (!channel)
  {
    CLog::Log(LOGERROR, "PVR - %s - cannot find channel %d on client %d", __FUNCTION__, timer->iClientChannelUid, client->GetID());
    return;
  }

  /* transfer this entry to the timers container */
  CPVRTimerInfoTag transferTimer(*timer, channel, client->GetID());
  xbmcTimers->UpdateFromClient(transferTimer);
}
开发者ID:Fury04,项目名称:xbmc,代码行数:27,代码来源:AddonCallbacksPVR.cpp

示例2: PVRTransferChannelEntry

void CAddonHelpers_PVR::PVRTransferChannelEntry(void *addonData, const PVRHANDLE handle, const PVR_CHANNEL *channel)
{
  CAddonHelpers* addon = (CAddonHelpers*) addonData;
  if (addon == NULL || handle == NULL || channel == NULL)
  {
    CLog::Log(LOGERROR, "PVR: PVRTransferChannelEntry is called with NULL-Pointer!!!");
    return;
  }

  CPVRClient* client = (CPVRClient*) handle->CALLER_ADDRESS;
  CPVRChannelGroupInternal *xbmcChannels = (CPVRChannelGroupInternal*) handle->DATA_ADDRESS;
  CPVRChannel channelTag(channel->radio);

  channelTag.SetClientChannelNumber(channel->number);
  channelTag.SetClientID(client->GetClientID());
  channelTag.SetUniqueID(channel->uid);
  channelTag.SetChannelName(channel->name);
  channelTag.SetClientChannelName(channel->callsign);
  channelTag.SetIconPath(channel->iconpath);
  channelTag.SetEncryptionSystem(channel->encryption);
  channelTag.SetHidden(channel->hide);
  channelTag.SetRecording(channel->recording);
  channelTag.SetInputFormat(channel->input_format);
  channelTag.SetStreamURL(channel->stream_url);

  xbmcChannels->UpdateChannel(channelTag);
}
开发者ID:rdaoc,项目名称:xbmc,代码行数:27,代码来源:AddonHelpers_PVR.cpp

示例3: PVRTransferTimerEntry

void CAddonCallbacksPVR::PVRTransferTimerEntry(void *addonData, const PVR_HANDLE handle, const PVR_TIMER *timer)
{
  CAddonCallbacks* addon = (CAddonCallbacks*) addonData;
  if (addon == NULL || handle == NULL || timer == NULL)
  {
    CLog::Log(LOGERROR, "CAddonCallbacksPVR - %s - called with a null pointer", __FUNCTION__);
    return;
  }

  CPVRTimers *xbmcTimers = (CPVRTimers*) handle->dataAddress;
  CPVRClient* client     = (CPVRClient*) handle->callerAddress;
  CPVRChannel *channel   = (CPVRChannel *) g_PVRChannelGroups->GetByUniqueID(timer->iClientChannelUid, client->GetClientID());

  if (channel == NULL)
  {
    CLog::Log(LOGERROR, "CAddonCallbacksPVR - %s - cannot find channel %d on client %d",
        __FUNCTION__, timer->iClientChannelUid, client->GetClientID());
    return;
  }

  CPVRTimerInfoTag tag(*timer, channel, client->GetClientID());

  /* transfer this entry to the timers container */
  xbmcTimers->UpdateFromClient(tag);
}
开发者ID:Kr0nZ,项目名称:xbmc,代码行数:25,代码来源:AddonCallbacksPVR.cpp

示例4: PVRTransferRecordingEntry

void CAddonHelpers_PVR::PVRTransferRecordingEntry(void *addonData, const PVRHANDLE handle, const PVR_RECORDINGINFO *recording)
{
  CAddonHelpers* addon = (CAddonHelpers*) addonData;
  if (addon == NULL || handle == NULL || recording == NULL)
  {
    CLog::Log(LOGERROR, "PVR: PVRTransferRecordingEntry is called with NULL-Pointer!!!");
    return;
  }

  CPVRClient* client = (CPVRClient*) handle->CALLER_ADDRESS;
  CPVRRecordings *xbmcRecordings = (CPVRRecordings*) handle->DATA_ADDRESS;

  CPVRRecordingInfoTag tag;

  tag.SetClientIndex(recording->index);
  tag.SetClientID(client->GetClientID());
  tag.SetTitle(recording->title);
  tag.SetRecordingTime(recording->recording_time);
  tag.SetDuration(CDateTimeSpan(0, 0, recording->duration / 60, recording->duration % 60));
  tag.SetPriority(recording->priority);
  tag.SetLifetime(recording->lifetime);
  tag.SetDirectory(recording->directory);
  tag.SetPlot(recording->description);
  tag.SetPlotOutline(recording->subtitle);
  tag.SetStreamURL(recording->stream_url);
  tag.SetChannelName(recording->channel_name);

  xbmcRecordings->push_back(tag);
  return;
}
开发者ID:rdaoc,项目名称:xbmc,代码行数:30,代码来源:AddonHelpers_PVR.cpp

示例5: Delete

bool CPVRDatabase::Delete(const CPVRClient &client)
{
  /* invalid client uid */
  if (client.ID().IsEmpty())
  {
    CLog::Log(LOGERROR, "PVR - %s - invalid client uid", __FUNCTION__);
    return false;
  }

  CStdString strWhereClause = FormatSQL("sUid = '%s'", client.ID().c_str());
  return DeleteValues("clients", strWhereClause);
}
开发者ID:Omel,项目名称:xbmc,代码行数:12,代码来源:PVRDatabase.cpp

示例6: GetPVRClient

void CAddonCallbacksPVR::PVRTriggerEpgUpdate(void *addonData, unsigned int iChannelUid)
{
  // get the client
  CPVRClient *client = GetPVRClient(addonData);
  if (!client)
  {
    CLog::Log(LOGERROR, "PVR - %s - invalid handler data", __FUNCTION__);
    return;
  }

  g_EpgContainer.UpdateRequest(client->GetID(), iChannelUid);
}
开发者ID:DaHenchmen,项目名称:DHMC,代码行数:12,代码来源:AddonCallbacksPVR.cpp

示例7: DeleteClientChannels

bool CPVRDatabase::DeleteClientChannels(const CPVRClient &client)
{
  /* invalid client Id */
  if (client.GetID() <= 0)
  {
    CLog::Log(LOGERROR, "PVR - %s - invalid client id: %i", __FUNCTION__, client.GetID());
    return false;
  }

  CLog::Log(LOGDEBUG, "PVR - %s - deleting all channels from client '%i' from the database", __FUNCTION__, client.GetID());
  CStdString strWhereClause = FormatSQL("iClientId = %u", client.GetID());
  return DeleteValues("channels", strWhereClause);
}
开发者ID:Omel,项目名称:xbmc,代码行数:13,代码来源:PVRDatabase.cpp

示例8: GetPVRClient

void CAddonCallbacksPVR::PVRTransferRecordingEntry(void *addonData, const PVR_HANDLE handle, const PVR_RECORDING *recording)
{
  CPVRClient *client             = GetPVRClient(addonData);
  CPVRRecordings *xbmcRecordings = static_cast<CPVRRecordings *>(handle->dataAddress);
  if (!handle || !recording || !client || !xbmcRecordings)
  {
    CLog::Log(LOGERROR, "PVR - %s - invalid handler data", __FUNCTION__);
    return;
  }

  /* transfer this entry to the recordings container */
  xbmcRecordings->UpdateFromClient(CPVRRecording(*recording, client->GetID()));
}
开发者ID:,项目名称:,代码行数:13,代码来源:

示例9: Delete

bool CPVRDatabase::Delete(const CPVRClient &client)
{
  if (client.GetID() == PVR_INVALID_CLIENT_ID)
    return false;

  CLog::LogFC(LOGDEBUG, LOGPVR, "Deleting client '%s' from the database", client.ID().c_str());

  CSingleLock lock(m_critSection);

  Filter filter;
  filter.AppendWhere(PrepareSQL("idClient = '%i'", client.GetID()));

  return DeleteValues("clients", filter);
}
开发者ID:,项目名称:,代码行数:14,代码来源:

示例10: Delete

bool CPVRDatabase::Delete(const CPVRClient &client)
{
  /* invalid client uid */
  if (client.ID().empty())
  {
    CLog::Log(LOGERROR, "PVR - %s - invalid client uid", __FUNCTION__);
    return false;
  }

  Filter filter;
  filter.AppendWhere(PrepareSQL("sUid = '%s'", client.ID().c_str()));

  return DeleteValues("clients", filter);
}
开发者ID:lorem-ipsum,项目名称:xbmc,代码行数:14,代码来源:PVRDatabase.cpp

示例11: Persist

bool CPVRDatabase::Persist(const CPVRClient &client)
{
  if (client.GetID() == PVR_INVALID_CLIENT_ID)
    return false;

  CLog::LogFC(LOGDEBUG, LOGPVR, "Persisting client '%s' to database", client.ID().c_str());

  CSingleLock lock(m_critSection);

  const std::string strQuery = PrepareSQL("REPLACE INTO clients (idClient, iPriority) VALUES (%i, %i);",
                                          client.GetID(), client.GetPriority());

  return ExecuteQuery(strQuery);
}
开发者ID:,项目名称:,代码行数:14,代码来源:

示例12: DeleteClientChannels

bool CPVRDatabase::DeleteClientChannels(const CPVRClient &client)
{
  /* invalid client Id */
  if (client.GetID() <= 0)
  {
    CLog::Log(LOGERROR, "PVR - %s - invalid client id: %i", __FUNCTION__, client.GetID());
    return false;
  }

  CLog::Log(LOGDEBUG, "PVR - %s - deleting all channels from client '%i' from the database", __FUNCTION__, client.GetID());

  Filter filter;
  filter.AppendWhere(PrepareSQL("iClientId = %u", client.GetID()));

  return DeleteValues("channels", filter);
}
开发者ID:FoodDelivery,项目名称:xbmc,代码行数:16,代码来源:PVRDatabase.cpp

示例13: PVRTransferChannelEntry

void CAddonCallbacksPVR::PVRTransferChannelEntry(void *addonData, const PVR_HANDLE handle, const PVR_CHANNEL *channel)
{
  CAddonCallbacks* addon = (CAddonCallbacks*) addonData;
  if (addon == NULL || handle == NULL || channel == NULL)
  {
    CLog::Log(LOGERROR, "CAddonCallbacksPVR - %s - called with a null pointer", __FUNCTION__);
    return;
  }

  CPVRClient* client                     = (CPVRClient*) handle->callerAddress;
  CPVRChannelGroupInternal *xbmcChannels = (CPVRChannelGroupInternal*) handle->dataAddress;

  CPVRChannel channelTag(*channel, client->GetClientID());

  /* transfer this entry to the internal channels group */
  xbmcChannels->UpdateFromClient(channelTag);
}
开发者ID:Kr0nZ,项目名称:xbmc,代码行数:17,代码来源:AddonCallbacksPVR.cpp

示例14: PVRTransferRecordingEntry

void CAddonCallbacksPVR::PVRTransferRecordingEntry(void *addonData, const PVR_HANDLE handle, const PVR_RECORDING *recording)
{
  CAddonCallbacks* addon = (CAddonCallbacks*) addonData;
  if (addon == NULL || handle == NULL || recording == NULL)
  {
    CLog::Log(LOGERROR, "CAddonCallbacksPVR - %s - called with a null pointer", __FUNCTION__);
    return;
  }

  CPVRClient* client             = (CPVRClient*) handle->callerAddress;
  CPVRRecordings *xbmcRecordings = (CPVRRecordings*) handle->dataAddress;

  CPVRRecording tag(*recording, client->GetClientID());

  /* transfer this entry to the recordings container */
  xbmcRecordings->UpdateFromClient(tag);
}
开发者ID:Kr0nZ,项目名称:xbmc,代码行数:17,代码来源:AddonCallbacksPVR.cpp

示例15: GetPriority

int CPVRDatabase::GetPriority(const CPVRClient &client)
{
  if (client.GetID() == PVR_INVALID_CLIENT_ID)
    return 0;

  CLog::LogFC(LOGDEBUG, LOGPVR, "Getting priority for client '%s' from the database", client.ID().c_str());

  CSingleLock lock(m_critSection);

  const std::string strWhereClause = PrepareSQL("idClient = '%i'", client.GetID());
  const std::string strValue = GetSingleValue("clients", "iPriority", strWhereClause);

  if (strValue.empty())
    return 0;

  return atoi(strValue.c_str());
}
开发者ID:,项目名称:,代码行数:17,代码来源:


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