本文整理汇总了C++中IDviInvocation类的典型用法代码示例。如果您正苦于以下问题:C++ IDviInvocation类的具体用法?C++ IDviInvocation怎么用?C++ IDviInvocation使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了IDviInvocation类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: invocationWrapper
void DvProviderAvOpenhomeOrgCredentials1C::DoGet(IDviInvocation& aInvocation)
{
DvInvocationCPrivate invocationWrapper(aInvocation);
IDvInvocationC* invocationC;
void* invocationCPtr;
invocationWrapper.GetInvocationC(&invocationC, &invocationCPtr);
aInvocation.InvocationReadStart();
Brhz Id;
aInvocation.InvocationReadString("Id", Id);
aInvocation.InvocationReadEnd();
DviInvocation invocation(aInvocation);
char* UserName;
char* Password;
uint32_t PasswordLen;
uint32_t Enabled;
char* Status;
char* Data;
ASSERT(iCallbackGet != NULL);
if (0 != iCallbackGet(iPtrGet, invocationC, invocationCPtr, (const char*)Id.Ptr(), &UserName, &Password, &PasswordLen, &Enabled, &Status, &Data)) {
invocation.Error(502, Brn("Action failed"));
return;
}
DviInvocationResponseString respUserName(aInvocation, "UserName");
DviInvocationResponseBinary respPassword(aInvocation, "Password");
DviInvocationResponseBool respEnabled(aInvocation, "Enabled");
DviInvocationResponseString respStatus(aInvocation, "Status");
DviInvocationResponseString respData(aInvocation, "Data");
invocation.StartResponse();
Brhz bufUserName((const TChar*)UserName);
OhNetFreeExternal(UserName);
respUserName.Write(bufUserName);
respUserName.WriteFlush();
Brh bufPassword;
bufPassword.Set((const TByte*)Password, PasswordLen);
OhNetFreeExternal(Password);
respPassword.Write(bufPassword);
respPassword.WriteFlush();
respEnabled.Write((Enabled!=0));
Brhz bufStatus((const TChar*)Status);
OhNetFreeExternal(Status);
respStatus.Write(bufStatus);
respStatus.WriteFlush();
Brhz bufData((const TChar*)Data);
OhNetFreeExternal(Data);
respData.Write(bufData);
respData.WriteFlush();
invocation.EndResponse();
}
示例2: resp
void DvProviderUpnpOrgAVTransport1::DoGetPositionInfo(IDviInvocation& aInvocation, TUint aVersion)
{
aInvocation.InvocationReadStart();
TUint InstanceID = aInvocation.InvocationReadUint("InstanceID");
aInvocation.InvocationReadEnd();
InvocationResponse resp(aInvocation);
InvocationResponseUint respTrack(aInvocation, "Track");
InvocationResponseString respTrackDuration(aInvocation, "TrackDuration");
InvocationResponseString respTrackMetaData(aInvocation, "TrackMetaData");
InvocationResponseString respTrackURI(aInvocation, "TrackURI");
InvocationResponseString respRelTime(aInvocation, "RelTime");
InvocationResponseString respAbsTime(aInvocation, "AbsTime");
InvocationResponseInt respRelCount(aInvocation, "RelCount");
InvocationResponseInt respAbsCount(aInvocation, "AbsCount");
GetPositionInfo(resp, aVersion, InstanceID, respTrack, respTrackDuration, respTrackMetaData, respTrackURI, respRelTime, respAbsTime, respRelCount, respAbsCount);
}
示例3: respWriterSortCaps
void DvProviderUpnpOrgScheduledRecording2Cpp::DoGetSortCapabilities(IDviInvocation& aInvocation, uint32_t aVersion)
{
aInvocation.InvocationReadStart();
aInvocation.InvocationReadEnd();
std::string respSortCaps;
uint32_t respSortLevelCap;
GetSortCapabilities(aVersion, respSortCaps, respSortLevelCap);
aInvocation.InvocationWriteStart();
InvocationResponseString respWriterSortCaps(aInvocation, "SortCaps");
Brn buf_SortCaps((const TByte*)respSortCaps.c_str(), (TUint)respSortCaps.length());
respWriterSortCaps.Write(buf_SortCaps);
aInvocation.InvocationWriteStringEnd("SortCaps");
InvocationResponseUint respWriterSortLevelCap(aInvocation, "SortLevelCap");
respWriterSortLevelCap.Write(respSortLevelCap);
aInvocation.InvocationWriteEnd();
}
示例4: resp
void DvProviderUpnpOrgConnectionManager2C::DoGetCurrentConnectionInfo(IDviInvocation& aInvocation, TUint aVersion)
{
aInvocation.InvocationReadStart();
TInt ConnectionID = aInvocation.InvocationReadInt("ConnectionID");
aInvocation.InvocationReadEnd();
InvocationResponse resp(aInvocation);
int32_t RcsID;
int32_t AVTransportID;
char* ProtocolInfo;
char* PeerConnectionManager;
int32_t PeerConnectionID;
char* Direction;
char* Status;
ASSERT(iCallbackGetCurrentConnectionInfo != NULL);
if (0 != iCallbackGetCurrentConnectionInfo(iPtrGetCurrentConnectionInfo, aVersion, ConnectionID, &RcsID, &AVTransportID, &ProtocolInfo, &PeerConnectionManager, &PeerConnectionID, &Direction, &Status)) {
resp.Error(502, Brn("Action failed"));
return;
}
InvocationResponseInt respRcsID(aInvocation, "RcsID");
InvocationResponseInt respAVTransportID(aInvocation, "AVTransportID");
InvocationResponseString respProtocolInfo(aInvocation, "ProtocolInfo");
InvocationResponseString respPeerConnectionManager(aInvocation, "PeerConnectionManager");
InvocationResponseInt respPeerConnectionID(aInvocation, "PeerConnectionID");
InvocationResponseString respDirection(aInvocation, "Direction");
InvocationResponseString respStatus(aInvocation, "Status");
resp.Start();
respRcsID.Write(RcsID);
respAVTransportID.Write(AVTransportID);
Brhz bufProtocolInfo((const TChar*)ProtocolInfo);
OhNetFreeExternal(ProtocolInfo);
respProtocolInfo.Write(bufProtocolInfo);
respProtocolInfo.WriteFlush();
Brhz bufPeerConnectionManager((const TChar*)PeerConnectionManager);
OhNetFreeExternal(PeerConnectionManager);
respPeerConnectionManager.Write(bufPeerConnectionManager);
respPeerConnectionManager.WriteFlush();
respPeerConnectionID.Write(PeerConnectionID);
Brhz bufDirection((const TChar*)Direction);
OhNetFreeExternal(Direction);
respDirection.Write(bufDirection);
respDirection.WriteFlush();
Brhz bufStatus((const TChar*)Status);
OhNetFreeExternal(Status);
respStatus.Write(bufStatus);
respStatus.WriteFlush();
resp.End();
}
示例5: Invoke
void DviService::Invoke(IDviInvocation& aInvocation, const Brx& aActionName)
{
iLock.Wait();
#if 0 // debug logging
{
Bws<512> debugBuf("Service: ");
debugBuf.Append(iServiceType.Name());
debugBuf.Append(", Action: ");
debugBuf.Append(aActionName);
debugBuf.Append("\n");
Log::Print(debugBuf);
}
#endif
TBool disabled = iDisabled;
if (disabled) {
iLock.Signal();
aInvocation.InvocationReportError(502, Brn("Action not available"));
}
iCurrentInvocationCount++;
(void)iDisabledSem.Clear();
iLock.Signal();
{
AutoFunctor a(MakeFunctor(*this, &DviService::InvocationCompleted));
for (TUint i=0; i<iDvActions.size(); i++) {
if (iDvActions[i].Action()->Name() == aActionName) {
try {
iDvActions[i].Functor()(aInvocation);
}
catch (InvocationError&) {
// avoid calls to aInvocation.InvocationReportError in other catch blocks
throw;
}
catch (Exception& e) {
Brn msg(e.Message());
aInvocation.InvocationReportError(801, msg);
}
catch (...) {
aInvocation.InvocationReportError(801, Brn("Unknown error"));
}
return;
}
}
}
aInvocation.InvocationReportError(501, Brn("Action not implemented"));
}
示例6: invocation
void DvProviderLinnCoUkVolkano1Cpp::DoSoftwareUpdate(IDviInvocation& aInvocation)
{
aInvocation.InvocationReadStart();
aInvocation.InvocationReadEnd();
bool respaAvailable;
std::string respaSoftwareVersion;
DvInvocationStd invocation(aInvocation);
SoftwareUpdate(invocation, respaAvailable, respaSoftwareVersion);
aInvocation.InvocationWriteStart();
DviInvocationResponseBool respWriteraAvailable(aInvocation, "aAvailable");
respWriteraAvailable.Write(respaAvailable);
DviInvocationResponseString respWriteraSoftwareVersion(aInvocation, "aSoftwareVersion");
Brn buf_aSoftwareVersion((const TByte*)respaSoftwareVersion.c_str(), (TUint)respaSoftwareVersion.length());
respWriteraSoftwareVersion.Write(buf_aSoftwareVersion);
aInvocation.InvocationWriteStringEnd("aSoftwareVersion");
aInvocation.InvocationWriteEnd();
}
示例7: invocationWrapper
void DvProviderAvOpenhomeOrgRadio1C::DoStop(IDviInvocation& aInvocation)
{
DvInvocationCPrivate invocationWrapper(aInvocation);
IDvInvocationC* invocationC;
void* invocationCPtr;
invocationWrapper.GetInvocationC(&invocationC, &invocationCPtr);
aInvocation.InvocationReadStart();
aInvocation.InvocationReadEnd();
DviInvocation invocation(aInvocation);
ASSERT(iCallbackStop != NULL);
if (0 != iCallbackStop(iPtrStop, invocationC, invocationCPtr)) {
invocation.Error(502, Brn("Action failed"));
return;
}
invocation.StartResponse();
invocation.EndResponse();
}
示例8: invocation
void DvProviderUpnpOrgDimming1Cpp::DoGetOnEffectParameters(IDviInvocation& aInvocation)
{
aInvocation.InvocationReadStart();
aInvocation.InvocationReadEnd();
std::string respretOnEffect;
uint32_t respretOnEffectLevel;
DvInvocationStd invocation(aInvocation);
GetOnEffectParameters(invocation, respretOnEffect, respretOnEffectLevel);
aInvocation.InvocationWriteStart();
DviInvocationResponseString respWriterretOnEffect(aInvocation, "retOnEffect");
Brn buf_retOnEffect((const TByte*)respretOnEffect.c_str(), (TUint)respretOnEffect.length());
respWriterretOnEffect.Write(buf_retOnEffect);
aInvocation.InvocationWriteStringEnd("retOnEffect");
DviInvocationResponseUint respWriterretOnEffectLevel(aInvocation, "retOnEffectLevel");
respWriterretOnEffectLevel.Write(respretOnEffectLevel);
aInvocation.InvocationWriteEnd();
}
示例9: respWriterTrackCount
void DvProviderAvOpenhomeOrgTime1Cpp::DoTime(IDviInvocation& aInvocation, uint32_t aVersion)
{
aInvocation.InvocationReadStart();
aInvocation.InvocationReadEnd();
uint32_t respTrackCount;
uint32_t respDuration;
uint32_t respSeconds;
Time(aVersion, respTrackCount, respDuration, respSeconds);
aInvocation.InvocationWriteStart();
InvocationResponseUint respWriterTrackCount(aInvocation, "TrackCount");
respWriterTrackCount.Write(respTrackCount);
InvocationResponseUint respWriterDuration(aInvocation, "Duration");
respWriterDuration.Write(respDuration);
InvocationResponseUint respWriterSeconds(aInvocation, "Seconds");
respWriterSeconds.Write(respSeconds);
aInvocation.InvocationWriteEnd();
}
示例10: Elements
void DvProviderUpnpOrgScheduledRecording2Cpp::DoCreateRecordSchedule(IDviInvocation& aInvocation)
{
aInvocation.InvocationReadStart();
Brhz buf_Elements;
aInvocation.InvocationReadString("Elements", buf_Elements);
std::string Elements((const char*)buf_Elements.Ptr(), buf_Elements.Bytes());
aInvocation.InvocationReadEnd();
std::string respRecordScheduleID;
std::string respResult;
uint32_t respUpdateID;
DvInvocationStd invocation(aInvocation);
CreateRecordSchedule(invocation, Elements, respRecordScheduleID, respResult, respUpdateID);
aInvocation.InvocationWriteStart();
DviInvocationResponseString respWriterRecordScheduleID(aInvocation, "RecordScheduleID");
Brn buf_RecordScheduleID((const TByte*)respRecordScheduleID.c_str(), (TUint)respRecordScheduleID.length());
respWriterRecordScheduleID.Write(buf_RecordScheduleID);
aInvocation.InvocationWriteStringEnd("RecordScheduleID");
DviInvocationResponseString respWriterResult(aInvocation, "Result");
Brn buf_Result((const TByte*)respResult.c_str(), (TUint)respResult.length());
respWriterResult.Write(buf_Result);
aInvocation.InvocationWriteStringEnd("Result");
DviInvocationResponseUint respWriterUpdateID(aInvocation, "UpdateID");
respWriterUpdateID.Write(respUpdateID);
aInvocation.InvocationWriteEnd();
}
示例11: invocationWrapper
void DvProviderUpnpOrgAVTransport1C::DoPrevious(IDviInvocation& aInvocation)
{
DvInvocationCPrivate invocationWrapper(aInvocation);
IDvInvocationC* invocationC;
void* invocationCPtr;
invocationWrapper.GetInvocationC(&invocationC, &invocationCPtr);
aInvocation.InvocationReadStart();
TUint InstanceID = aInvocation.InvocationReadUint("InstanceID");
aInvocation.InvocationReadEnd();
DviInvocation invocation(aInvocation);
ASSERT(iCallbackPrevious != NULL);
if (0 != iCallbackPrevious(iPtrPrevious, invocationC, invocationCPtr, InstanceID)) {
invocation.Error(502, Brn("Action failed"));
return;
}
invocation.StartResponse();
invocation.EndResponse();
}
示例12: invocation
void DvProviderAvOpenhomeOrgTransport1Cpp::DoStreamInfo(IDviInvocation& aInvocation)
{
aInvocation.InvocationReadStart();
aInvocation.InvocationReadEnd();
uint32_t respStreamId;
bool respCanSeek;
bool respCanPause;
DvInvocationStd invocation(aInvocation);
StreamInfo(invocation, respStreamId, respCanSeek, respCanPause);
aInvocation.InvocationWriteStart();
DviInvocationResponseUint respWriterStreamId(aInvocation, "StreamId");
respWriterStreamId.Write(respStreamId);
DviInvocationResponseBool respWriterCanSeek(aInvocation, "CanSeek");
respWriterCanSeek.Write(respCanSeek);
DviInvocationResponseBool respWriterCanPause(aInvocation, "CanPause");
respWriterCanPause.Write(respCanPause);
aInvocation.InvocationWriteEnd();
}
示例13: invocation
void DvProviderAvOpenhomeOrgInfo1Cpp::DoCounters(IDviInvocation& aInvocation)
{
aInvocation.InvocationReadStart();
aInvocation.InvocationReadEnd();
uint32_t respTrackCount;
uint32_t respDetailsCount;
uint32_t respMetatextCount;
DvInvocationStd invocation(aInvocation);
Counters(invocation, respTrackCount, respDetailsCount, respMetatextCount);
aInvocation.InvocationWriteStart();
DviInvocationResponseUint respWriterTrackCount(aInvocation, "TrackCount");
respWriterTrackCount.Write(respTrackCount);
DviInvocationResponseUint respWriterDetailsCount(aInvocation, "DetailsCount");
respWriterDetailsCount.Write(respDetailsCount);
DviInvocationResponseUint respWriterMetatextCount(aInvocation, "MetatextCount");
respWriterMetatextCount.Write(respMetatextCount);
aInvocation.InvocationWriteEnd();
}
示例14: invocationWrapper
void DvProviderUpnpOrgContentDirectory1C::DoStopTransferResource(IDviInvocation& aInvocation)
{
DvInvocationCPrivate invocationWrapper(aInvocation);
IDvInvocationC* invocationC;
void* invocationCPtr;
invocationWrapper.GetInvocationC(&invocationC, &invocationCPtr);
aInvocation.InvocationReadStart();
TUint TransferID = aInvocation.InvocationReadUint("TransferID");
aInvocation.InvocationReadEnd();
DviInvocation invocation(aInvocation);
ASSERT(iCallbackStopTransferResource != NULL);
if (0 != iCallbackStopTransferResource(iPtrStopTransferResource, invocationC, invocationCPtr, TransferID)) {
invocation.Error(502, Brn("Action failed"));
return;
}
invocation.StartResponse();
invocation.EndResponse();
}
示例15: invocation
void DvProviderUpnpOrgAVTransport2Cpp::DoGetPositionInfo(IDviInvocation& aInvocation)
{
aInvocation.InvocationReadStart();
uint32_t InstanceID = aInvocation.InvocationReadUint("InstanceID");
aInvocation.InvocationReadEnd();
uint32_t respTrack;
std::string respTrackDuration;
std::string respTrackMetaData;
std::string respTrackURI;
std::string respRelTime;
std::string respAbsTime;
int32_t respRelCount;
int32_t respAbsCount;
DvInvocationStd invocation(aInvocation);
GetPositionInfo(invocation, InstanceID, respTrack, respTrackDuration, respTrackMetaData, respTrackURI, respRelTime, respAbsTime, respRelCount, respAbsCount);
aInvocation.InvocationWriteStart();
DviInvocationResponseUint respWriterTrack(aInvocation, "Track");
respWriterTrack.Write(respTrack);
DviInvocationResponseString respWriterTrackDuration(aInvocation, "TrackDuration");
Brn buf_TrackDuration((const TByte*)respTrackDuration.c_str(), (TUint)respTrackDuration.length());
respWriterTrackDuration.Write(buf_TrackDuration);
aInvocation.InvocationWriteStringEnd("TrackDuration");
DviInvocationResponseString respWriterTrackMetaData(aInvocation, "TrackMetaData");
Brn buf_TrackMetaData((const TByte*)respTrackMetaData.c_str(), (TUint)respTrackMetaData.length());
respWriterTrackMetaData.Write(buf_TrackMetaData);
aInvocation.InvocationWriteStringEnd("TrackMetaData");
DviInvocationResponseString respWriterTrackURI(aInvocation, "TrackURI");
Brn buf_TrackURI((const TByte*)respTrackURI.c_str(), (TUint)respTrackURI.length());
respWriterTrackURI.Write(buf_TrackURI);
aInvocation.InvocationWriteStringEnd("TrackURI");
DviInvocationResponseString respWriterRelTime(aInvocation, "RelTime");
Brn buf_RelTime((const TByte*)respRelTime.c_str(), (TUint)respRelTime.length());
respWriterRelTime.Write(buf_RelTime);
aInvocation.InvocationWriteStringEnd("RelTime");
DviInvocationResponseString respWriterAbsTime(aInvocation, "AbsTime");
Brn buf_AbsTime((const TByte*)respAbsTime.c_str(), (TUint)respAbsTime.length());
respWriterAbsTime.Write(buf_AbsTime);
aInvocation.InvocationWriteStringEnd("AbsTime");
DviInvocationResponseInt respWriterRelCount(aInvocation, "RelCount");
respWriterRelCount.Write(respRelCount);
DviInvocationResponseInt respWriterAbsCount(aInvocation, "AbsCount");
respWriterAbsCount.Write(respAbsCount);
aInvocation.InvocationWriteEnd();
}