* @brief Set the named pipe / FIFO path for NamedPipe mode. */
| 186 | * @brief Set the named pipe / FIFO path for NamedPipe mode. |
| 187 | */ |
| 188 | API::CommandResponse API::Handlers::ProcessHandler::setPipePath(const QString& id, |
| 189 | const QJsonObject& params) |
| 190 | { |
| 191 | if (!params.contains(QStringLiteral("pipePath"))) { |
| 192 | return CommandResponse::makeError( |
| 193 | id, ErrorCode::MissingParam, QStringLiteral("Missing required parameter: pipePath")); |
| 194 | } |
| 195 | |
| 196 | const QString path = params.value(QStringLiteral("pipePath")).toString(); |
| 197 | IO::ConnectionManager::instance().process()->setPipePath(path); |
| 198 | |
| 199 | QJsonObject result; |
| 200 | result[QStringLiteral("pipePath")] = path; |
| 201 | return CommandResponse::makeSuccess(id, result); |
| 202 | } |
| 203 | |
| 204 | //-------------------------------------------------------------------------------------------------- |
| 205 | // Getters |