本文整理汇总了C++中ProgramInfo::IsDeletePending方法的典型用法代码示例。如果您正苦于以下问题:C++ ProgramInfo::IsDeletePending方法的具体用法?C++ ProgramInfo::IsDeletePending怎么用?C++ ProgramInfo::IsDeletePending使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ProgramInfo
的用法示例。
在下文中一共展示了ProgramInfo::IsDeletePending方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetRecordedList
DTC::ProgramList* Dvr::GetRecordedList( bool bDescending,
int nStartIndex,
int nCount,
const QString &sTitleRegEx,
const QString &sRecGroup,
const QString &sStorageGroup )
{
QMap< QString, ProgramInfo* > recMap;
if (gCoreContext->GetScheduler())
recMap = gCoreContext->GetScheduler()->GetRecording();
QMap< QString, uint32_t > inUseMap = ProgramInfo::QueryInUseMap();
QMap< QString, bool > isJobRunning= ProgramInfo::QueryJobsRunning(JOB_COMMFLAG);
ProgramList progList;
int desc = 1;
if (bDescending)
desc = -1;
LoadFromRecorded( progList, false, inUseMap, isJobRunning, recMap, desc );
QMap< QString, ProgramInfo* >::iterator mit = recMap.begin();
for (; mit != recMap.end(); mit = recMap.erase(mit))
delete *mit;
// ----------------------------------------------------------------------
// Build Response
// ----------------------------------------------------------------------
DTC::ProgramList *pPrograms = new DTC::ProgramList();
int nAvailable = 0;
int nMax = (nCount > 0) ? nCount : progList.size();
nAvailable = 0;
nCount = 0;
QRegExp rTitleRegEx = QRegExp(sTitleRegEx, Qt::CaseInsensitive);
for( unsigned int n = 0; n < progList.size(); n++)
{
ProgramInfo *pInfo = progList[ n ];
if (pInfo->IsDeletePending() ||
(!sTitleRegEx.isEmpty() && !pInfo->GetTitle().contains(rTitleRegEx)) ||
(!sRecGroup.isEmpty() && sRecGroup != pInfo->GetRecordingGroup()) ||
(!sStorageGroup.isEmpty() && sStorageGroup != pInfo->GetStorageGroup()))
continue;
if ((nAvailable < nStartIndex) ||
(nCount >= nMax))
{
++nAvailable;
continue;
}
++nAvailable;
++nCount;
DTC::Program *pProgram = pPrograms->AddNewProgram();
FillProgramInfo( pProgram, pInfo, true );
}
// ----------------------------------------------------------------------
pPrograms->setStartIndex ( nStartIndex );
pPrograms->setCount ( nCount );
pPrograms->setTotalAvailable( nAvailable );
pPrograms->setAsOf ( MythDate::current() );
pPrograms->setVersion ( MYTH_BINARY_VERSION );
pPrograms->setProtoVer ( MYTH_PROTO_VERSION );
return pPrograms;
}