本文整理汇总了C++中CPVRTimerInfoTag::ChannelNumber方法的典型用法代码示例。如果您正苦于以下问题:C++ CPVRTimerInfoTag::ChannelNumber方法的具体用法?C++ CPVRTimerInfoTag::ChannelNumber怎么用?C++ CPVRTimerInfoTag::ChannelNumber使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CPVRTimerInfoTag
的用法示例。
在下文中一共展示了CPVRTimerInfoTag::ChannelNumber方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: lock
CPVRTimerInfoTag *CPVRTimers::GetMatch(const CEpgInfoTag *Epg)
{
CPVRTimerInfoTag *returnTag = NULL;
CSingleLock lock(m_critSection);
for (unsigned int ptr = 0; ptr < size(); ptr++)
{
CPVRTimerInfoTag *timer = at(ptr);
if (!Epg || !Epg->GetTable() || !Epg->GetTable()->Channel())
continue;
const CPVRChannel *channel = Epg->GetTable()->Channel();
if (timer->ChannelNumber() != channel->ChannelNumber()
|| timer->m_bIsRadio != channel->IsRadio())
continue;
if (timer->StartAsUTC() > Epg->StartAsUTC() || timer->EndAsUTC() < Epg->EndAsUTC())
continue;
returnTag = timer;
break;
}
return returnTag;
}
示例2: DeleteTimersOnChannel
bool CPVRTimers::DeleteTimersOnChannel(const CPVRChannel &channel, bool bDeleteRepeating /* = true */, bool bCurrentlyActiveOnly /* = false */)
{
bool bReturn = false;
CSingleLock lock(m_critSection);
for (map<CDateTime, vector<CPVRTimerInfoTag *>* >::reverse_iterator it = m_tags.rbegin(); it != m_tags.rend(); it++)
{
for (int iTimerPtr = it->second->size() - 1; iTimerPtr >= 0; iTimerPtr--)
{
CPVRTimerInfoTag *timer = it->second->at(iTimerPtr);
if (bCurrentlyActiveOnly &&
(CDateTime::GetCurrentDateTime() < timer->StartAsLocalTime() ||
CDateTime::GetCurrentDateTime() > timer->EndAsLocalTime()))
continue;
if (!bDeleteRepeating && timer->m_bIsRepeating)
continue;
if (timer->ChannelNumber() == channel.ChannelNumber() && timer->m_bIsRadio == channel.IsRadio())
{
bReturn = timer->DeleteFromClient(true) || bReturn;
it->second->erase(it->second->begin() + iTimerPtr);
}
}
}
return bReturn;
}
示例3: GetMatch
CFileItemPtr CPVRTimers::GetMatch(const CEpgInfoTag *Epg)
{
CSingleLock lock(m_critSection);
for (map<CDateTime, vector<CPVRTimerInfoTag *>* >::iterator it = m_tags.begin(); it != m_tags.end(); it++)
{
for (unsigned int iTimerPtr = 0; iTimerPtr < it->second->size(); iTimerPtr++)
{
CPVRTimerInfoTag *timer = it->second->at(iTimerPtr);
CPVRChannelPtr channel;
if (Epg)
channel = Epg->ChannelTag();
if (!channel)
continue;
if (timer->ChannelNumber() != channel->ChannelNumber()
|| timer->m_bIsRadio != channel->IsRadio())
continue;
if (timer->StartAsUTC() > Epg->StartAsUTC() || timer->EndAsUTC() < Epg->EndAsUTC())
continue;
CFileItemPtr fileItem(new CFileItem(*timer));
return fileItem;
}
}
CFileItemPtr fileItem;
return fileItem;
}
示例4: ChannelHasTimers
bool CPVRTimers::ChannelHasTimers(const CPVRChannel &channel)
{
for (unsigned int ptr = 0; ptr < size(); ptr++)
{
CPVRTimerInfoTag timer = at(ptr);
if (timer.ChannelNumber() == channel.ChannelNumber() && timer.IsRadio() == channel.IsRadio())
return true;
}
return false;
}
示例5: GetEPGSearch
int CPVREpgContainer::GetEPGSearch(CFileItemList* results, const PVREpgSearchFilter &filter)
{
CEpgContainer::GetEPGSearch(results, filter);
/* filter recordings */
if (filter.m_bIgnorePresentRecordings && CPVRManager::GetRecordings()->size() > 0)
{
for (unsigned int iRecordingPtr = 0; iRecordingPtr < CPVRManager::GetRecordings()->size(); iRecordingPtr++)
{
for (int iResultPtr = 0; iResultPtr < results->Size(); iResultPtr++)
{
const CPVREpgInfoTag *epgentry = (CPVREpgInfoTag *) results->Get(iResultPtr)->GetEPGInfoTag();
CPVRRecording *recording = CPVRManager::GetRecordings()->at(iRecordingPtr);
if (epgentry)
{
if (epgentry->Title() != recording->m_strTitle ||
epgentry->PlotOutline() != recording->m_strPlotOutline ||
epgentry->Plot() != recording->m_strPlot)
continue;
results->Remove(iResultPtr);
iResultPtr--;
}
}
}
}
/* filter timers */
if (filter.m_bIgnorePresentTimers)
{
CPVRTimers *timers = CPVRManager::GetTimers();
for (unsigned int iTimerPtr = 0; iTimerPtr < timers->size(); iTimerPtr++)
{
for (int iResultPtr = 0; iResultPtr < results->Size(); iResultPtr++)
{
const CPVREpgInfoTag *epgentry = (CPVREpgInfoTag *) results->Get(iResultPtr)->GetEPGInfoTag();
CPVRTimerInfoTag *timer = timers->at(iTimerPtr);
if (epgentry)
{
if (epgentry->ChannelTag()->ChannelNumber() != timer->ChannelNumber() ||
epgentry->Start() < timer->m_StartTime ||
epgentry->End() > timer->m_StopTime)
continue;
results->Remove(iResultPtr);
iResultPtr--;
}
}
}
}
return results->Size();
}
示例6: ChannelHasTimers
bool CPVRTimers::ChannelHasTimers(const CPVRChannel &channel)
{
CSingleLock lock(m_critSection);
for (unsigned int ptr = 0; ptr < size(); ptr++)
{
CPVRTimerInfoTag *timer = at(ptr);
if (timer->ChannelNumber() == channel.ChannelNumber() && timer->m_bIsRadio == channel.IsRadio())
return true;
}
return false;
}
示例7: DeleteTimersOnChannel
bool CPVRTimers::DeleteTimersOnChannel(const CPVRChannel &channel, bool bForce /* = false */)
{
bool bReturn = true;
for (unsigned int ptr = 0; ptr < size(); ptr++)
{
CPVRTimerInfoTag timer = at(ptr);
if (timer.ChannelNumber() == channel.ChannelNumber() && timer.IsRadio() == channel.IsRadio())
{
bReturn = timer.DeleteFromClient(bForce) && bReturn;
erase(begin() + ptr);
ptr--;
}
}
return bReturn;
}
示例8: GetEPGSearch
int CPVREpgs::GetEPGSearch(CFileItemList* results, const PVREpgSearchFilter &filter)
{
for (unsigned int iEpgPtr = 0; iEpgPtr < size(); iEpgPtr++)
{
CPVREpg *epg = at(iEpgPtr);
epg->Get(results, filter);
}
/* filter recordings */
if (filter.m_bIgnorePresentRecordings && PVRRecordings.size() > 0)
{
for (unsigned int iRecordingPtr = 0; iRecordingPtr < PVRRecordings.size(); iRecordingPtr++)
{
for (int iResultPtr = 0; iResultPtr < results->Size(); iResultPtr++)
{
const CPVREpgInfoTag *epgentry = results->Get(iResultPtr)->GetEPGInfoTag();
CPVRRecordingInfoTag *recording = &PVRRecordings[iRecordingPtr];
if (epgentry)
{
if (epgentry->Title() != recording->Title() ||
epgentry->PlotOutline() != recording->PlotOutline() ||
epgentry->Plot() != recording->Plot())
continue;
results->Remove(iResultPtr);
iResultPtr--;
}
}
}
}
/* filter timers */
if (filter.m_bIgnorePresentTimers && PVRTimers.size() > 0)
{
for (unsigned int iTimerPtr = 0; iTimerPtr < PVRTimers.size(); iTimerPtr++)
{
for (int iResultPtr = 0; iResultPtr < results->Size(); iResultPtr++)
{
const CPVREpgInfoTag *epgentry = results->Get(iResultPtr)->GetEPGInfoTag();
CPVRTimerInfoTag *timer = &PVRTimers[iTimerPtr];
if (epgentry)
{
if (epgentry->ChannelTag()->ChannelNumber() != timer->ChannelNumber() ||
epgentry->Start() < timer->Start() ||
epgentry->End() > timer->Stop())
continue;
results->Remove(iResultPtr);
iResultPtr--;
}
}
}
}
/* remove duplicate entries */
if (filter.m_bPreventRepeats)
{
unsigned int iSize = results->Size();
for (unsigned int iResultPtr = 0; iResultPtr < iSize; iResultPtr++)
{
const CPVREpgInfoTag *epgentry_1 = results->Get(iResultPtr)->GetEPGInfoTag();
for (unsigned int iTagPtr = 0; iTagPtr < iSize; iTagPtr++)
{
const CPVREpgInfoTag *epgentry_2 = results->Get(iTagPtr)->GetEPGInfoTag();
if (iResultPtr == iTagPtr)
continue;
if (epgentry_1->Title() != epgentry_2->Title() ||
epgentry_1->Plot() != epgentry_2->Plot() ||
epgentry_1->PlotOutline() != epgentry_2->PlotOutline())
continue;
results->Remove(iTagPtr);
iSize = results->Size();
iResultPtr--;
iTagPtr--;
}
}
}
return results->Size();
}