本文整理汇总了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;
}
示例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());
}
}
示例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);
}
}
示例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();
}
示例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();
}
}
示例6: WriteServiceType
void InvocationUpnp::WriteServiceType(IWriterAscii& aWriter, const Invocation& aInvocation)
{
const ServiceType& serviceType = aInvocation.ServiceType();
aWriter.Write(serviceType.FullName());
}