#include "respdlfhymresultfile.h" #include #include #include RespDlFhymResultFile::RespDlFhymResultFile(QString json) { this->json = json; QScriptEngine engine; QScriptValue sv = engine.evaluate("value = " + this->json); QScriptValueIterator it(sv); if(json.isEmpty()) { rtnCode = RTNCODE_NETWORK_NOTAVAILABLE; rtnMemo = RTNMEMO_NETWORK_NOTAVAILABLE; } else if(json=="ABORT") { rtnCode = RTNCODE_NETWORK_ABORT; rtnMemo = RTNMEMO_NETWORK_ABORT; } else { rtnCode = RTNCODE_INVALID_FORMAT; rtnMemo = RTNMEMO_INVALID_FORMAT; while (it.hasNext()) { it.next(); if(it.name()=="rtnCode") { this->rtnCode = it.value().toInt32(); } else if(it.name()=="rtnMemo") { this->rtnMemo = it.value().toString(); } else if(it.name()=="fileName") { this->fileName = it.value().toString(); } else if(it.name()=="fileContent") { this->fileContent = it.value().toString(); } else if(it.name()=="fcEncodeType") { this->fcEncodeType = it.value().toString(); } } } } int RespDlFhymResultFile::getRtnCode() { return this->rtnCode; } QString RespDlFhymResultFile::getRtnMemo() { return this->rtnMemo; } QString RespDlFhymResultFile::getFileName() { return this->fileName; } QString RespDlFhymResultFile::getFileContent() { return this->fileContent; } QString RespDlFhymResultFile::getFcEncodeType() { return this->fcEncodeType; }