* @brief Get player status */
| 289 | * @brief Get player status |
| 290 | */ |
| 291 | API::CommandResponse API::Handlers::CSVPlayerHandler::getStatus(const QString& id, |
| 292 | const QJsonObject& params) |
| 293 | { |
| 294 | Q_UNUSED(params) |
| 295 | |
| 296 | auto& player = CSV::Player::instance(); |
| 297 | |
| 298 | QJsonObject result; |
| 299 | result[QStringLiteral("isOpen")] = player.isOpen(); |
| 300 | result[QStringLiteral("isPlaying")] = player.isPlaying(); |
| 301 | result[QStringLiteral("frameCount")] = player.frameCount(); |
| 302 | result[QStringLiteral("framePosition")] = player.framePosition(); |
| 303 | result[QStringLiteral("progress")] = player.progress(); |
| 304 | result[QStringLiteral("timestamp")] = player.timestamp(); |
| 305 | result[QStringLiteral("filename")] = player.filename(); |
| 306 | |
| 307 | return CommandResponse::makeSuccess(id, result); |
| 308 | } |
nothing calls this directly
no test coverage detected