* @brief Get the current trial status and remaining days. */
| 344 | * @brief Get the current trial status and remaining days. |
| 345 | */ |
| 346 | API::CommandResponse API::Handlers::LicensingHandler::trialGetStatus(const QString& id, |
| 347 | const QJsonObject&) |
| 348 | { |
| 349 | const auto& trial = Licensing::Trial::instance(); |
| 350 | |
| 351 | QJsonObject result; |
| 352 | result[QStringLiteral("busy")] = trial.busy(); |
| 353 | result[QStringLiteral("firstRun")] = trial.firstRun(); |
| 354 | result[QStringLiteral("trialEnabled")] = trial.trialEnabled(); |
| 355 | result[QStringLiteral("trialExpired")] = trial.trialExpired(); |
| 356 | result[QStringLiteral("trialAvailable")] = trial.trialAvailable(); |
| 357 | result[QStringLiteral("daysRemaining")] = trial.daysRemaining(); |
| 358 | |
| 359 | return CommandResponse::makeSuccess(id, result); |
| 360 | } |
| 361 | |
| 362 | /** |
| 363 | * @brief Start the trial period for this machine. |
nothing calls this directly
no test coverage detected