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


C++ HClientActionOp类代码示例

本文整理汇总了C++中HClientActionOp的典型用法代码示例。如果您正苦于以下问题:C++ HClientActionOp类的具体用法?C++ HClientActionOp怎么用?C++ HClientActionOp使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了HClientActionOp类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: getPositionInfo

bool HAvTransportAdapterPrivate::getPositionInfo(
    HClientAction*, const HClientActionOp& op)
{
    H_Q(HAvTransportAdapter);

    HPositionInfo info;
    if (op.returnValue() == UpnpSuccess)
    {
        const HActionArguments& outArgs = op.outputArguments();

        quint32 track = outArgs.value("Track").toUInt();
        HDuration trackDuration = outArgs.value("TrackDuration").toString();
        QString trackMd = outArgs.value("TrackMetaData").toString();
        QUrl trackUri = outArgs.value("TrackURI").toString();
        HDuration relTime = outArgs.value("RelTime").toString();
        HDuration absTime = outArgs.value("AbsTime").toString();
        qint32 relCountPos = outArgs.value("RelCount").toInt();
        quint32 absCountPos = outArgs.value("AbsCount").toUInt();

        info = HPositionInfo(
                   track, trackDuration, trackMd, trackUri, relTime, absTime,
                   relCountPos, absCountPos);
    }
    emit q->getPositionInfoCompleted(q, takeOp(op, info));

    return false;
}
开发者ID:rickysarraf,项目名称:digikam,代码行数:27,代码来源:havtransport_adapter.cpp

示例2: getMediaInfo_ext

bool HAvTransportAdapterPrivate::getMediaInfo_ext(
    HClientAction*, const HClientActionOp& op)
{
    H_Q(HAvTransportAdapter);

    HMediaInfo mediaInfo;
    if (op.returnValue() == UpnpSuccess)
    {
        const HActionArguments& outArgs = op.outputArguments();

        QString currentType = outArgs.value("CurrentType").toString();
        quint32 nrTracks = outArgs.value("NrTracks").toUInt();
        HDuration duration = outArgs.value("MediaDuration").toString();
        QUrl curUri = outArgs.value("CurrentURI").toUrl();
        QString curUriMetadata = outArgs.value("CurrentURIMetaData").toString();
        QUrl nextUri = outArgs.value("NextURI").toUrl();
        QString nextUriMetadata = outArgs.value("NextURIMetaData").toString();
        HStorageMedium playMedium = outArgs.value("PlayMedium").toString();
        HStorageMedium recMedium  = outArgs.value("RecordMedium").toString();
        HRecordMediumWriteStatus ws = outArgs.value("WriteStatus").toString();

        mediaInfo = HMediaInfo(
                        nrTracks, duration, curUri, curUriMetadata, nextUri, nextUriMetadata,
                        playMedium, recMedium, ws,
                        HMediaInfo::mediaCategoryFromString(currentType));
    }
    emit q->getMediaInfo_extCompleted(q, takeOp(op, mediaInfo));

    return false;
}
开发者ID:rickysarraf,项目名称:digikam,代码行数:30,代码来源:havtransport_adapter.cpp

示例3: disconnect

void ObjectCache::attemptResolution( const HClientActionOp &op )
{
    HActionArguments output = op.outputArguments();
    // NOTE disconnection is important
    bool ok = disconnect( m_cpt, SIGNAL( browseResult( const Herqq::Upnp::HClientActionOp & ) ),
                          this, SLOT( attemptResolution( const Herqq::Upnp::HClientActionOp & ) ) );
    Q_ASSERT( ok );
    Q_UNUSED( ok );
    if( !output[QLatin1String("Result")].isValid() ) {
        emit m_cpt->error( KIO::ERR_SLAVE_DEFINED, "Resolution error" );
        return;
    }

    DIDL::Parser parser;
    connect( &parser, SIGNAL(itemParsed(DIDL::Item *)),
                       this, SLOT(slotResolveId(DIDL::Item *)) );
    connect( &parser, SIGNAL(containerParsed(DIDL::Container *)),
             this, SLOT(slotResolveId(DIDL::Container *)) );

    parser.parse( output[QLatin1String("Result")].value().toString() );

    // we block because devices ( atleast MediaTomb )
    // seem to block continous TCP connections after some time
    // this interval might need modification
    block(500);

    // TODO have some kind of slot to stop the parser as 
    // soon as we find our guy, so that the rest of the
    // document isn't parsed.

    // if we didn't find the ID, no point in continuing
    if( !m_resolve.object ) {
        kDebug() << "NULL RESOLUTION";
        emit pathResolved( 0 );
        return;
    }
    else {
        QString pathToInsert = ( m_resolve.segment + QDir::separator() + m_resolve.object->title() );
        m_reverseCache.insert( pathToInsert, m_resolve.object );
        m_idToPathCache.insert( m_resolve.object->id(), new QString( pathToInsert ) );
        // TODO: if we already have the id, should we just update the
        // ContainerUpdateIDs
// TODO no more QPairs
        m_resolve.pathIndex = SEP_POS( m_resolve.fullPath, pathToInsert.length() );
        // ignore trailing slashes
        if( m_resolve.pathIndex == m_resolve.fullPath.length()-1 ) {
            m_resolve.pathIndex = -1;
        }
    }

    // if we are done, emit the relevant Object
    // otherwise recurse with a new (m_)resolve :)
    if( m_resolve.pathIndex == -1 )
        emit pathResolved( m_resolve.object );
    else
        resolvePathToObjectInternal();

}
开发者ID:KDE,项目名称:kio-upnp-ms,代码行数:58,代码来源:objectcache.cpp

示例4: getCurrentTransportActions

bool HAvTransportAdapterPrivate::getCurrentTransportActions(
    HClientAction*, const HClientActionOp& op)
{
    H_Q(HAvTransportAdapter);

    QSet<HTransportAction> actions;
    if (op.returnValue() == UpnpSuccess)
    {
        QStringList slist = op.outputArguments().value("Actions").toString().split(",");

        foreach(const QString& action, slist)
        {
            HTransportAction ta(action);
            if (ta.isValid())
            {
                actions.insert(ta);
            }
        }
开发者ID:rickysarraf,项目名称:digikam,代码行数:18,代码来源:havtransport_adapter.cpp

示例5: getLoudness

bool HRenderingControlAdapterPrivate::getLoudness(
    HClientAction*, const HClientActionOp& op)
{
    H_Q(HRenderingControlAdapter);

    bool loudnessOn = op.outputArguments().value("CurrentLoudness").toBool();
    emit q->getLoudnessCompleted(q, takeOp(op, loudnessOn));

    return false;
}
开发者ID:rickysarraf,项目名称:digikam,代码行数:10,代码来源:hrenderingcontrol_adapter.cpp

示例6: getVolumeDB

bool HRenderingControlAdapterPrivate::getVolumeDB(
    HClientAction*, const HClientActionOp& op)
{
    H_Q(HRenderingControlAdapter);

    qint16 currentVolumeDb = op.outputArguments().value("CurrentVolume").toInt();
    emit q->getVolumeDBCompleted(q, takeOp(op, currentVolumeDb));

    return false;
}
开发者ID:rickysarraf,项目名称:digikam,代码行数:10,代码来源:hrenderingcontrol_adapter.cpp

示例7: getMute

bool HRenderingControlAdapterPrivate::getMute(
    HClientAction*, const HClientActionOp& op)
{
    H_Q(HRenderingControlAdapter);

    bool currentlyMuted = op.outputArguments().value("CurrentMute").toBool();
    emit q->getMuteCompleted(q, takeOp(op, currentlyMuted));

    return false;
}
开发者ID:rickysarraf,项目名称:digikam,代码行数:10,代码来源:hrenderingcontrol_adapter.cpp

示例8: getTransportSettings

bool HAvTransportAdapterPrivate::getTransportSettings(
    HClientAction*, const HClientActionOp& op)
{
    H_Q(HAvTransportAdapter);

    HTransportSettings settings;
    if (op.returnValue() == UpnpSuccess)
    {
        const HActionArguments& outArgs = op.outputArguments();

        HPlayMode pm = outArgs.value("PlayMode").toString();
        QString rqMode = outArgs.value("RecQualityMode").toString();

        settings = HTransportSettings(pm, rqMode);
    }
    emit q->getTransportSettingsCompleted(q, takeOp(op, settings));

    return false;
}
开发者ID:rickysarraf,项目名称:digikam,代码行数:19,代码来源:havtransport_adapter.cpp

示例9: getTransportInfo

bool HAvTransportAdapterPrivate::getTransportInfo(
    HClientAction*, const HClientActionOp& op)
{
    H_Q(HAvTransportAdapter);

    HTransportInfo info;
    if (op.returnValue() == UpnpSuccess)
    {
        const HActionArguments& outArgs = op.outputArguments();

        QString state = outArgs.value("CurrentTransportState").toString();
        QString status = outArgs.value("CurrentTransportStatus").toString();
        QString speed = outArgs.value("CurrentSpeed").toString();

        info = HTransportInfo(state, status, speed);
    }
    emit q->getTransportInfoCompleted(q, takeOp(op, info));

    return false;
}
开发者ID:rickysarraf,项目名称:digikam,代码行数:20,代码来源:havtransport_adapter.cpp

示例10: setStateVariables

bool HRenderingControlAdapterPrivate::setStateVariables(
    HClientAction*, const HClientActionOp& op)
{
    H_Q(HRenderingControlAdapter);

    QStringList stateVariableList =
        op.outputArguments().value("StateVariableList").toString().split(",");

    emit q->setStateVariablesCompleted(q, takeOp(op, stateVariableList));

    return false;
}
开发者ID:rickysarraf,项目名称:digikam,代码行数:12,代码来源:hrenderingcontrol_adapter.cpp

示例11: getBlueVideoGain

bool HRenderingControlAdapterPrivate::getBlueVideoGain(
    HClientAction*, const HClientActionOp& op)
{
    H_Q(HRenderingControlAdapter);

    quint16 currentBlueVideoGain =
        op.outputArguments().value("CurrentBlueVideoGain").toUInt();

    emit q->getBlueVideoGainCompleted(q, takeOp(op, currentBlueVideoGain));

    return false;
}
开发者ID:rickysarraf,项目名称:digikam,代码行数:12,代码来源:hrenderingcontrol_adapter.cpp

示例12: getColorTemperature

bool HRenderingControlAdapterPrivate::getColorTemperature(
    HClientAction*, const HClientActionOp& op)
{
    H_Q(HRenderingControlAdapter);

    quint16 currentColorTemperature =
        op.outputArguments().value("CurrentColorTemperature").toUInt();

    emit q->getColorTemperatureCompleted(q, takeOp(op, currentColorTemperature));

    return false;
}
开发者ID:rickysarraf,项目名称:digikam,代码行数:12,代码来源:hrenderingcontrol_adapter.cpp

示例13: getStateVariables

bool HRenderingControlAdapterPrivate::getStateVariables(
    HClientAction*, const HClientActionOp& op)
{
    H_Q(HRenderingControlAdapter);

    QString stateVariableValuePairs =
        op.outputArguments().value("StateVariableValuePairs").toString();

    emit q->getStateVariablesCompleted(q, takeOp(op, stateVariableValuePairs));

    return false;
}
开发者ID:rickysarraf,项目名称:digikam,代码行数:12,代码来源:hrenderingcontrol_adapter.cpp

示例14: getSharpness

bool HRenderingControlAdapterPrivate::getSharpness(
    HClientAction*, const HClientActionOp& op)
{
    H_Q(HRenderingControlAdapter);

    quint16 currentSharpness =
        op.outputArguments().value("CurrentSharpness").toUInt();

    emit q->getSharpnessCompleted(q, takeOp(op, currentSharpness));

    return false;
}
开发者ID:rickysarraf,项目名称:digikam,代码行数:12,代码来源:hrenderingcontrol_adapter.cpp

示例15: getDeviceCapabilities

bool HAvTransportAdapterPrivate::getDeviceCapabilities(
    HClientAction*, const HClientActionOp& op)
{
    H_Q(HAvTransportAdapter);

    HDeviceCapabilities capabilities;
    if (op.returnValue() == UpnpSuccess)
    {
        const HActionArguments& outArgs = op.outputArguments();

        QStringList pmedia = outArgs.value("PlayMedia").toString().split(",");
        QStringList rmedia = outArgs.value("RecMedia").toString().split(",");
        QStringList rqMode = outArgs.value("RecQualityModes").toString().split(",");

        capabilities =
            HDeviceCapabilities(pmedia.toSet(), rmedia.toSet(), rqMode.toSet());
    }
    emit q->getDeviceCapabilitiesCompleted(q, takeOp(op, capabilities));

    return false;
}
开发者ID:rickysarraf,项目名称:digikam,代码行数:21,代码来源:havtransport_adapter.cpp


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