llkConsumeBatchOfExecutions
Description
Decreases the value of the executing balance counter.
This topic is only relevant when the license type for a Feature is LLK_EXECUTIONS.
One of the License types that can be defined for a Feature is Execution Count
.
This type contains a pool of executions from which the Feature consumes one or more executions as the protected application runs.
A typical use for this type of license is to assign a different "cost" in executions for the different functions that an application can perform. All the executions are consumed from a single pool of executions in the license. For example, the customer could be charged one execution for a save operation and three execution for a print operation. This provides an alternative to the method of assigning a different Feature ID and providing a separate executions pool for each action. With different Feature IDs, the customer might deplete all the executions for one Feature while unused executions remain for other Features
Syntax
llkConsumeBatchOfExecutions
LLKStatus LLK_API llkConsumeBatchOfExecutions(uint32_t featureId, const uint64_t executionsCount);
Parameters
Param | Description |
---|---|
featureId | Feature number |
executionsCount | Quantity to be reduced |
Return Values
Status Code | No. | Description |
---|---|---|
LLK_OK | 0 | Request was successfully completed. The operation status is successful |
LLK_FEATURE_NOT_FOUND | 2 | Requested Feature not found |
LLK_FEATURE_UNSUPPORTED_OPERATION | 5 | Feature type does not support the requested operation (relevant when the license type for a Feature is LLK_EXECUTIONS type) |
LLK_FEATURE_INSUFFICIENT_EXECUTIONS_COUNT | 6 | Requested quantity is greater than current balance. The license for the Feature does not contain enough remaining executions |
LLK_LICENSE_NOT_ACTIVATED_YET | 12 | The entitlement has not been activated yet. For activation/initialization, use llkActivateLicense |
Examples
C++ example
const LLKStatus status = llkConsumeBatchOfExecutions(featureId, 1);
std::cout << llkStatusDescription(status) << std::endl;
Example of a successful operation
The operation status is successful.
In order to successfully use all other API functions, the entitlement must be activated or initialized. For activation/initialization, use llkActivateLicense
Version history
- Added in version
1.0.0