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


C++ Invocation::ServiceType方法代码示例

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


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

示例1: a

void CpiDeviceLpec::Invocable::InvokeAction(Invocation& aInvocation)
{
    AutoMutex a(iDevice.iLock);
    iDevice.iResponseHandler = this;
    iInvocation = &aInvocation;
    iDevice.iWriteBuffer->Write(Lpec::kMethodAction);
    iDevice.iWriteBuffer->Write(' ');
    iDevice.iWriteBuffer->Write(iDevice.iLpecName);
    iDevice.iWriteBuffer->Write('/');
    iDevice.iWriteBuffer->Write(aInvocation.ServiceType().Name());
    iDevice.iWriteBuffer->Write(' ');
    Bws<Ascii::kMaxUintStringBytes> verBuf;
    (void)Ascii::AppendDec(verBuf, aInvocation.ServiceType().Version());
    iDevice.iWriteBuffer->Write(verBuf);
    iDevice.iWriteBuffer->Write(' ');
    iDevice.iWriteBuffer->Write(aInvocation.Action().Name());
    std::vector<Argument*> inputArgs = aInvocation.InputArguments();
    for (TUint i=0; i<inputArgs.size(); i++) {
        inputArgs[i]->ProcessInput(*this);
    }
    iDevice.iWriteBuffer->Write(Lpec::kMsgTerminator);
    iDevice.iWriteBuffer->WriteFlush();

    iSem.Wait(); // wait for response
    iInvocation = NULL;
    iDevice.iResponseHandler = NULL;
}
开发者ID:Jacik,项目名称:ohNet,代码行数:27,代码来源:CpiDeviceLpec.cpp

示例2: GetControlUri

void CpiDeviceUpnp::GetControlUri(const Invocation& aInvocation, Uri& aUri)
{
    AutoMutex a(iLock);
    if (iControlUrl.Bytes() != 0) {
        aUri.Replace(iControlUrl);
    }
    else {
        GetServiceUri(aUri, "controlURL", aInvocation.ServiceType());
        iControlUrl.Set(aUri.AbsoluteUri());
    }
}
开发者ID:wifigeek,项目名称:ohNet,代码行数:11,代码来源:CpiDeviceUpnp.cpp

示例3: invoker

void CpiDeviceUpnp::Invocable::InvokeAction(Invocation& aInvocation)
{
    try {
        Uri uri;
        iDevice.GetServiceUri(uri, "controlURL", aInvocation.ServiceType());
        InvocationUpnp invoker(iDevice.Device().GetCpStack(), aInvocation);
        invoker.Invoke(uri);
    }
    catch (XmlError&) {
        THROW(ReaderError);
    }
}
开发者ID:DoomHammer,项目名称:ohNet,代码行数:12,代码来源:CpiDeviceUpnp.cpp

示例4: InvokeAction

void CpiDeviceDv::InvokeAction(Invocation& aInvocation)
{
    const OpenHome::Net::ServiceType& serviceType = aInvocation.ServiceType();
    DviService* service = iDeviceDv.ServiceReference(serviceType);
    if (service == NULL) {
        const HttpStatus& err = HttpStatus::kNotFound;
        aInvocation.SetError(Error::eUpnp, err.Code(), err.Reason());
    }
    else {
        InvocationDv stream(aInvocation, *service);
        stream.Start();
        service->RemoveRef();
    }
    aInvocation.SignalCompleted();
}
开发者ID:DoomHammer,项目名称:ohNet,代码行数:15,代码来源:CpiDeviceDv.cpp

示例5: stream

void CpiDeviceDv::Invocable::InvokeAction(Invocation& aInvocation)
{
    const OpenHome::Net::ServiceType& serviceType = aInvocation.ServiceType();
    DviService* service = iDevice.iDeviceDv.ServiceReference(serviceType);
    if (service == NULL) {
        LOG2(kCpDeviceDv, kError, "CpiDeviceDv::Invocable::InvokeAction failed lookup for service %.*s:%.*s:%u\n",
                                  PBUF(serviceType.Domain()), PBUF(serviceType.Name()), serviceType.Version());
        const HttpStatus& err = HttpStatus::kNotFound;
        aInvocation.SetError(Error::eUpnp, err.Code(), err.Reason());
    }
    else {
        InvocationDv stream(aInvocation, *service);
        stream.Start();
        service->RemoveRef();
    }
}
开发者ID:Montellese,项目名称:ohNet,代码行数:16,代码来源:CpiDeviceDv.cpp

示例6: WriteServiceType

void InvocationUpnp::WriteServiceType(IWriterAscii& aWriter, const Invocation& aInvocation)
{
    const ServiceType& serviceType = aInvocation.ServiceType();
    aWriter.Write(serviceType.FullName());
}
开发者ID:fuzzy01,项目名称:ohNet,代码行数:5,代码来源:ProtocolUpnp.cpp


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