| 457 | } |
| 458 | |
| 459 | QString methodData(int id, const QString &method, const QJsonObject ¶ms) |
| 460 | { |
| 461 | QJsonObject retObj; |
| 462 | retObj[K_JSON_RPC] = V_2_0; |
| 463 | retObj[K_PARAMS] = params; |
| 464 | retObj[K_ID] = id; |
| 465 | retObj[K_METHOD] = method; |
| 466 | QJsonDocument jsonDoc(retObj); |
| 467 | QString jsonStr = jsonDoc.toJson(QJsonDocument::JsonFormat::Compact); |
| 468 | return H_CONTENT_LENGTH + QString(": %0\r\n\r\n").arg(jsonStr.length()) + jsonStr + "\n"; |
| 469 | } |
| 470 | |
| 471 | QString notificationData(const QString &method, const QJsonObject ¶ms) |
| 472 | { |
no test coverage detected