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

Method activateOffline

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

* @brief Activate Pro from a signed offline certificate file, with no network access. */

Source from the content-addressed store, hash-verified

179 * @brief Activate Pro from a signed offline certificate file, with no network access.
180 */
181API::CommandResponse API::Handlers::LicensingHandler::activateOffline(const QString& id,
182 const QJsonObject& params)
183{
184 if (!params.contains(QStringLiteral("path"))) {
185 return CommandResponse::makeError(
186 id, ErrorCode::MissingParam, QStringLiteral("Missing required parameter: path"));
187 }
188
189 auto& offline = Licensing::OfflineLicense::instance();
190 if (!offline.activateFromFile(params.value(QStringLiteral("path")).toString()))
191 return CommandResponse::makeError(id, ErrorCode::ExecutionError, offline.lastError());
192
193 return CommandResponse::makeSuccess(id, {});
194}
195
196/**
197 * @brief Activate the stored license key against the LemonSqueezy server.

Callers

nothing calls this directly

Calls 4

activateFromFileMethod · 0.80
containsMethod · 0.45
valueMethod · 0.45
lastErrorMethod · 0.45

Tested by

no test coverage detected