本文整理汇总了C++中ProgramInfo::HasPathname方法的典型用法代码示例。如果您正苦于以下问题:C++ ProgramInfo::HasPathname方法的具体用法?C++ ProgramInfo::HasPathname怎么用?C++ ProgramInfo::HasPathname使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ProgramInfo
的用法示例。
在下文中一共展示了ProgramInfo::HasPathname方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: DeleteRecording
bool Dvr::DeleteRecording(int RecordedId,
int chanid, const QDateTime &recstarttsRaw,
bool forceDelete, bool allowRerecord)
{
if ((RecordedId <= 0) &&
(chanid <= 0 || !recstarttsRaw.isValid()))
throw QString("Recorded ID or Channel ID and StartTime appears invalid.");
// TODO Should use RecordingInfo
ProgramInfo pi;
if (RecordedId > 0)
pi = ProgramInfo(RecordedId);
else
pi = ProgramInfo(chanid, recstarttsRaw.toUTC());
if (pi.GetChanID() && pi.HasPathname())
{
QString cmd = QString("DELETE_RECORDING %1 %2 %3 %4")
.arg(pi.GetChanID())
.arg(pi.GetRecordingStartTime(MythDate::ISODate))
.arg(forceDelete ? "FORCE" : "NO_FORCE")
.arg(allowRerecord ? "FORGET" : "NO_FORGET");
MythEvent me(cmd);
gCoreContext->dispatch(me);
return true;
}
return false;
}
示例2: RemoveRecorded
bool Dvr::RemoveRecorded( int nChanId,
const QDateTime &dStartTime )
{
if (nChanId <= 0 || !dStartTime.isValid())
throw( QString("Channel ID or StartTime appears invalid."));
bool bResult = false;
ProgramInfo *pInfo = new ProgramInfo(nChanId, dStartTime);
if (pInfo->HasPathname())
bResult = RemoteDeleteRecording(nChanId, dStartTime, true, false);
return bResult;
}
示例3: strlist
/** \brief Returns the ProgramInfo being used by any current recording.
*
* Caller is responsible for deleting the ProgramInfo when done with it.
*/
ProgramInfo *PlaybackSock::GetRecording(uint cardid)
{
QStringList strlist(QString("QUERY_REMOTEENCODER %1").arg(cardid));
strlist << "GET_CURRENT_RECORDING";
if (!SendReceiveStringList(strlist))
return NULL;
ProgramInfo *pginfo = new ProgramInfo(strlist);
if (!pginfo->HasPathname() && !pginfo->GetChanID())
{
delete pginfo;
pginfo = NULL;
}
return pginfo;
}
示例4: UpdateRecordedWatchedStatus
bool Dvr::UpdateRecordedWatchedStatus ( int RecordedId,
int chanid,
const QDateTime &recstarttsRaw,
bool watched)
{
if ((RecordedId <= 0) &&
(chanid <= 0 || !recstarttsRaw.isValid()))
throw QString("Recorded ID or Channel ID and StartTime appears invalid.");
// TODO Should use RecordingInfo
ProgramInfo pi;
if (RecordedId > 0)
pi = ProgramInfo(RecordedId);
else
pi = ProgramInfo(chanid, recstarttsRaw.toUTC());
if (pi.GetChanID() && pi.HasPathname())
{
pi.SaveWatched(watched);
return true;
}
return false;
}