* @brief Adds a tag and fills in character data for that result. * * @param pResponse The response message we are adding an error to. * @param pResult The result (as a text string) *************************************************************/
| 1059 | * @param pResult The result (as a text string) |
| 1060 | *************************************************************/ |
| 1061 | void Connection::AddSimpleResultToSMLResponse(ElementXML* pResponse, char const* pResult) |
| 1062 | { |
| 1063 | ClearError() ; |
| 1064 | |
| 1065 | #ifdef DEBUG |
| 1066 | if (!pResponse || !pResult) |
| 1067 | { |
| 1068 | SetError(Error::kNullArgument) ; |
| 1069 | return ; |
| 1070 | } |
| 1071 | |
| 1072 | if (!pResponse->IsTag(sml_Names::kTagSML)) |
| 1073 | { |
| 1074 | SetError(Error::kArgumentIsNotSML) ; |
| 1075 | return ; |
| 1076 | } |
| 1077 | #endif |
| 1078 | // Create the result tag |
| 1079 | TagResult* pTag = new TagResult() ; |
| 1080 | |
| 1081 | pTag->SetCharacterData(pResult) ; |
| 1082 | pTag->AddAttributeFastFast(sml_Names::kCommandOutput, sml_Names::kRawOutput) ; |
| 1083 | |
| 1084 | pResponse->AddChild(pTag) ; |
| 1085 | } |
| 1086 | |
| 1087 | /************************************************************* |
| 1088 | * @brief Removes the top message from the incoming message queue |
no test coverage detected