本文整理汇总了C++中QtSoapMessage::header方法的典型用法代码示例。如果您正苦于以下问题:C++ QtSoapMessage::header方法的具体用法?C++ QtSoapMessage::header怎么用?C++ QtSoapMessage::header使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QtSoapMessage
的用法示例。
在下文中一共展示了QtSoapMessage::header方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: buildInformResponse
void AcsMessageBuilder::buildInformResponse(const QString &id, QtSoapMessage &informResponse)
{
//Envelope
buildEnvelope(informResponse);
//Header
informResponse.header().insert(new QtSoapSimpleType(QtSoapQName(nsPrefix() + TAG_ID), id));
//Body
QtSoapStruct *pInformResponseStruct = new QtSoapStruct(QtSoapQName(nsPrefix() + INFORMRESPONSE));
pInformResponseStruct->insert(new QtSoapSimpleType(QtSoapQName(TAG_MAXENVELOPES), "1"));
QtSoapStruct& body = informResponse.body();
body.insert(pInformResponseStruct);
}
示例2: buildRebootRequest
void AcsMessageBuilder::buildRebootRequest(QtSoapMessage &request)
{
//Envelope
buildEnvelope(request);
//Header
QString id = "987654321";
request.header().insert(new QtSoapSimpleType(QtSoapQName(nsPrefix() + TAG_ID), id));
//Body
QtSoapStruct *pInformResponseStruct = new QtSoapStruct(QtSoapQName(nsPrefix() + TAG_REBOOT));
pInformResponseStruct->insert(new QtSoapSimpleType(QtSoapQName(TAG_COMMAND_KEY), "Reboot Method (ACS)"));
QtSoapStruct& body = request.body();
body.insert(pInformResponseStruct);
}
示例3: buildGetParameterNamesRequest
void AcsMessageBuilder::buildGetParameterNamesRequest(QtSoapMessage &request)
{
//Envelope
buildEnvelope(request);
//Header
QString id = "123456";
request.header().insert(new QtSoapSimpleType(QtSoapQName(nsPrefix() + TAG_ID), id));
//Body
QString path = "InternetGatewayDevice.";
QtSoapStruct *pGetParameterNamesStruct = new QtSoapStruct(QtSoapQName(nsPrefix() + TAG_GETPARAMETERNAMES));
pGetParameterNamesStruct->insert(new QtSoapSimpleType(QtSoapQName("ParameterPath"), path));
pGetParameterNamesStruct->insert(new QtSoapSimpleType(QtSoapQName("NextLevel"), 1));
QtSoapStruct& body = request.body();
body.insert(pGetParameterNamesStruct);
}
示例4: buildDownloadRequest
void AcsMessageBuilder::buildDownloadRequest(QtSoapMessage &request, AcsParamDownload ¶mDownload)
{
//Envelope
buildEnvelope(request);
//Header
QString id = "987654321";
request.header().insert(new QtSoapSimpleType(QtSoapQName(nsPrefix() + TAG_ID), id));
//Body
QtSoapStruct *pInformResponseStruct = new QtSoapStruct(QtSoapQName(nsPrefix() + TAG_DOWNLOAD));
pInformResponseStruct->insert(new QtSoapSimpleType(QtSoapQName(TAG_COMMAND_KEY), TAG_DOWNLOAD_ACS));
pInformResponseStruct->insert(new QtSoapSimpleType(QtSoapQName(TAG_FILE_TYPE), TAG_FIRMWARE_UPGRADE_IMAGE));
pInformResponseStruct->insert(new QtSoapSimpleType(QtSoapQName(TAG_URL), paramDownload.url));
pInformResponseStruct->insert(new QtSoapSimpleType(QtSoapQName(TAG_USERNAME), paramDownload.username));
pInformResponseStruct->insert(new QtSoapSimpleType(QtSoapQName(TAG_PASSWORD), paramDownload.password));
pInformResponseStruct->insert(new QtSoapSimpleType(QtSoapQName(TAG_FILE_SIZE), 0));
pInformResponseStruct->insert(new QtSoapSimpleType(QtSoapQName(TAG_TARGET_FILE_NAME), paramDownload.targetFilename));
QtSoapStruct& body = request.body();
body.insert(pInformResponseStruct);
}
示例5: buildSetValueRequest
void AcsMessageBuilder::buildSetValueRequest(QtSoapMessage &request, AcsParamList ¶mList)
{
//Envelope
buildEnvelope(request);
//Header
QString id = "123458";
request.header().insert(new QtSoapSimpleType(QtSoapQName(nsPrefix() + TAG_ID), id));
//Body
QtSoapStruct *pSetParameterValuesStruct = new QtSoapStruct(QtSoapQName(nsPrefix() + TAG_SETPARAMETERVALUES));
QtSoapStruct *pParameterListStruct = new QtSoapStruct(QtSoapQName(TAG_PARAMETERLIST));
pSetParameterValuesStruct->insert(pParameterListStruct);
foreach(AcsParam param, paramList){
QtSoapStruct *pParameterValueStruct = new QtSoapStruct(QtSoapQName(TAG_PARAMETERVALUESTRUCT));
pParameterValueStruct->insert(new QtSoapSimpleType(QtSoapQName(TAG_NAME), param.name));
pParameterValueStruct->insert(new QtSoapSimpleType(QtSoapQName(TAG_VALUE), param.value));
pParameterListStruct->insert(pParameterValueStruct);
}