| 128 | } |
| 129 | |
| 130 | void StreamingContentParser::processNormalEvent(const ProtocolStreamExtractor::ParseResult& result) { |
| 131 | if (!_coordinator) { |
| 132 | return; |
| 133 | } |
| 134 | |
| 135 | AGenUIExeCode ret = Execute_Success; |
| 136 | const std::string& data = result.eventJson; |
| 137 | if (result.eventType == ProtocolStreamExtractor::EventType::CreateSurface) { |
| 138 | ret = _coordinator->createSurface(data); |
| 139 | } else if (result.eventType == ProtocolStreamExtractor::EventType::UpdateDataModel) { |
| 140 | ret = _coordinator->updateDataModel(data); |
| 141 | } else if (result.eventType == ProtocolStreamExtractor::EventType::AppendDataModel) { |
| 142 | ret = _coordinator->appendDataModel(data); |
| 143 | } else if (result.eventType == ProtocolStreamExtractor::EventType::DeleteSurface) { |
| 144 | ret = _coordinator->deleteSurface(data); |
| 145 | } |
| 146 | if (ret != Execute_Success) { |
| 147 | AGENUI_LOG("ret:%s, type:%d, data:%s", getExeCodeString(ret).c_str(), result.eventType, data.c_str()); |
| 148 | } |
| 149 | } |
| 150 | |
| 151 | void StreamingContentParser::sendSingleComponentUpdate(const std::string& componentJson, const std::string& surfaceId, const std::string& version) { |
| 152 | if (!_coordinator) { |
nothing calls this directly
no test coverage detected