本文整理汇总了C++中CPVRChannel::ClientChannelName方法的典型用法代码示例。如果您正苦于以下问题:C++ CPVRChannel::ClientChannelName方法的具体用法?C++ CPVRChannel::ClientChannelName怎么用?C++ CPVRChannel::ClientChannelName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CPVRChannel
的用法示例。
在下文中一共展示了CPVRChannel::ClientChannelName方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: UpdateFromClient
bool CPVRChannel::UpdateFromClient(const CPVRChannel &channel)
{
bool bChanged = false;
bChanged = SetClientID(channel.ClientID()) || bChanged;
bChanged = SetClientChannelNumber(channel.ClientChannelNumber()) || bChanged;
bChanged = SetClientChannelName(channel.ClientChannelName()) || bChanged;
bChanged = SetInputFormat(channel.InputFormat()) || bChanged;
bChanged = SetStreamURL(channel.StreamURL()) || bChanged;
bChanged = SetEncryptionSystem(channel.EncryptionSystem()) || bChanged;
bChanged = SetRecording(channel.IsRecording()) || bChanged;
if (m_strChannelName.IsEmpty())
{
m_strChannelName = channel.ClientChannelName();
bChanged = true;
}
if (m_strIconPath.IsEmpty())
{
m_strIconPath = channel.IconPath();
bChanged = true;
}
return bChanged;
}
示例2: UpdateFromClient
bool CPVRChannel::UpdateFromClient(const CPVRChannel &channel)
{
SetClientID(channel.ClientID());
SetClientChannelNumber(channel.ClientChannelNumber());
SetInputFormat(channel.InputFormat());
SetStreamURL(channel.StreamURL());
SetEncryptionSystem(channel.EncryptionSystem());
SetClientChannelName(channel.ClientChannelName());
CSingleLock lock(m_critSection);
if (m_strChannelName.IsEmpty())
SetChannelName(channel.ClientChannelName());
if (m_strIconPath.IsEmpty()||(!m_strIconPath.Equals(channel.IconPath()) && !IsUserSetIcon()))
SetIconPath(channel.IconPath());
return m_bChanged;
}
示例3: UpdateFromClient
bool CPVRChannel::UpdateFromClient(const CPVRChannel &channel)
{
SetClientID(channel.ClientID());
SetClientChannelNumber(channel.ClientChannelNumber());
SetInputFormat(channel.InputFormat());
SetStreamURL(channel.StreamURL());
SetEncryptionSystem(channel.EncryptionSystem());
SetClientChannelName(channel.ClientChannelName());
CSingleLock lock(m_critSection);
// only update the channel name and icon if the user hasn't changed them manually
if (m_strChannelName.empty() || !IsUserSetName())
SetChannelName(channel.ClientChannelName());
if (m_strIconPath.empty() || !IsUserSetIcon())
SetIconPath(channel.IconPath());
return m_bChanged;
}
示例4: PVRWriteClientChannelInfo
/*!
* @brief Copy over channel info from xbmcChannel to addonClient.
* @param xbmcChannel The channel on XBMC's side.
* @param addonChannel The channel on the addon's side.
*/
inline void PVRWriteClientChannelInfo(const CPVRChannel &xbmcChannel, PVR_CHANNEL &addonChannel)
{
addonChannel.iUniqueId = xbmcChannel.UniqueID();
addonChannel.iChannelNumber = xbmcChannel.ClientChannelNumber();
addonChannel.strChannelName = xbmcChannel.ClientChannelName().c_str();
addonChannel.strIconPath = xbmcChannel.IconPath().c_str();
addonChannel.iEncryptionSystem = xbmcChannel.EncryptionSystem();
addonChannel.bIsRadio = xbmcChannel.IsRadio();
addonChannel.bIsHidden = xbmcChannel.IsHidden();
addonChannel.strInputFormat = xbmcChannel.InputFormat().c_str();
addonChannel.strStreamURL = xbmcChannel.StreamURL().c_str();
}
示例5: SearchAndSetChannelIcons
void CPVRChannels::SearchAndSetChannelIcons(bool bUpdateDb /* = false */)
{
if (g_guiSettings.GetString("pvrmenu.iconpath") == "")
return;
CPVRDatabase *database = g_PVRManager.GetTVDatabase();
database->Open();
for (unsigned int ptr = 0; ptr < size(); ptr++)
{
CPVRChannel *channel = at(ptr);
/* skip if an icon is already set */
if (channel->IconPath() != "")
continue;
CStdString strBasePath = g_guiSettings.GetString("pvrmenu.iconpath");
CStdString strIconPath = strBasePath + channel->ClientChannelName();
CStdString strIconPathLower = strBasePath + channel->ClientChannelName().ToLower();
CStdString strIconPathUid;
strIconPathUid.Format("%s/%08d", strBasePath, channel->UniqueID());
channel->SetIconPath(strIconPath + ".tbn", bUpdateDb) ||
channel->SetIconPath(strIconPath + ".jpg", bUpdateDb) ||
channel->SetIconPath(strIconPath + ".png", bUpdateDb) ||
channel->SetIconPath(strIconPathLower + ".tbn", bUpdateDb) ||
channel->SetIconPath(strIconPathLower + ".jpg", bUpdateDb) ||
channel->SetIconPath(strIconPathLower + ".png", bUpdateDb) ||
channel->SetIconPath(strIconPathUid + ".tbn", bUpdateDb) ||
channel->SetIconPath(strIconPathUid + ".jpg", bUpdateDb) ||
channel->SetIconPath(strIconPathUid + ".png", bUpdateDb);
/* TODO: start channel icon scraper here if nothing was found */
}
database->Close();
}
示例6: WriteClientChannelInfo
/*!
* @brief Copy over channel info from xbmcChannel to addonClient.
* @param xbmcChannel The channel on XBMC's side.
* @param addonChannel The channel on the addon's side.
*/
void CPVRClient::WriteClientChannelInfo(const CPVRChannel &xbmcChannel, PVR_CHANNEL &addonChannel)
{
memset(&addonChannel, 0, sizeof(addonChannel));
addonChannel.iUniqueId = xbmcChannel.UniqueID();
addonChannel.iChannelNumber = xbmcChannel.ClientChannelNumber();
strncpy(addonChannel.strChannelName, xbmcChannel.ClientChannelName().c_str(), sizeof(addonChannel.strChannelName) - 1);
strncpy(addonChannel.strIconPath, xbmcChannel.IconPath().c_str(), sizeof(addonChannel.strIconPath) - 1);
addonChannel.iEncryptionSystem = xbmcChannel.EncryptionSystem();
addonChannel.bIsRadio = xbmcChannel.IsRadio();
addonChannel.bIsHidden = xbmcChannel.IsHidden();
strncpy(addonChannel.strInputFormat, xbmcChannel.InputFormat().c_str(), sizeof(addonChannel.strInputFormat) - 1);
strncpy(addonChannel.strStreamURL, xbmcChannel.StreamURL().c_str(), sizeof(addonChannel.strStreamURL) - 1);
}