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


C++ QtSoapMessage::header方法代码示例

本文整理汇总了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);
}
开发者ID:ctrirxu,项目名称:StateBuilder,代码行数:15,代码来源:AcsMessageBuilder.cpp

示例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);
}
开发者ID:ctrirxu,项目名称:StateBuilder,代码行数:16,代码来源:AcsMessageBuilder.cpp

示例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);
}
开发者ID:ctrirxu,项目名称:StateBuilder,代码行数:18,代码来源:AcsMessageBuilder.cpp

示例4: buildDownloadRequest

void AcsMessageBuilder::buildDownloadRequest(QtSoapMessage &request, AcsParamDownload &paramDownload)
{
    //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);
}
开发者ID:ctrirxu,项目名称:StateBuilder,代码行数:22,代码来源:AcsMessageBuilder.cpp

示例5: buildSetValueRequest

void AcsMessageBuilder::buildSetValueRequest(QtSoapMessage &request, AcsParamList &paramList)
{
    //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);
    }
开发者ID:ctrirxu,项目名称:StateBuilder,代码行数:23,代码来源:AcsMessageBuilder.cpp


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