MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / trialGetStatus

Method trialGetStatus

app/src/API/Handlers/LicensingHandler.cpp:346–360  ·  view source on GitHub ↗

* @brief Get the current trial status and remaining days. */

Source from the content-addressed store, hash-verified

344 * @brief Get the current trial status and remaining days.
345 */
346API::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.

Callers

nothing calls this directly

Calls 6

firstRunMethod · 0.80
trialEnabledMethod · 0.80
trialExpiredMethod · 0.80
trialAvailableMethod · 0.80
busyMethod · 0.45
daysRemainingMethod · 0.45

Tested by

no test coverage detected