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); }
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); }
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); }
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); }