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


C++ ProgramInfo::HasPathname方法代码示例

本文整理汇总了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;
}
开发者ID:dhaber,项目名称:mythtv,代码行数:30,代码来源:dvr.cpp

示例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;
}
开发者ID:StefanRoss,项目名称:mythtv,代码行数:15,代码来源:dvr.cpp

示例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;
}
开发者ID:DocOnDev,项目名称:mythtv,代码行数:21,代码来源:playbacksock.cpp

示例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;
}
开发者ID:kmdewaal,项目名称:mythtv,代码行数:24,代码来源:dvr.cpp


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