llkGetFeatureInfo
Descriptionโ
Provides information about the requested Feature of the activated license
Important
The function allocates memory. To release it, use the llkFree function
Syntaxโ
llkGetFeatureInfo
LLKStatus LLK_API llkGetFeatureInfo(uint32_t featureId, char** featureInfoJson);
Parametersโ
Param | Description |
---|---|
featureId | Feature number |
featureInfoJson | Pointer to the retrieved information, in JSON format |
Return Valuesโ
Status Code | No. | Description |
---|---|---|
LLK_OK | 0 | Request was successfully completed. The operation status is successful |
LLK_INVALID_PARAMETER | 1 | The parameter featureInfoJson is invalid (null pointers are forbidden) |
LLK_FEATURE_NOT_FOUND | 2 | Requested Feature not found |
LLK_LICENSE_NOT_ACTIVATED_YET | 12 | The entitlement has not been activated yet. For activation/initialization, use llkActivateLicense |
LLK_INTERNAL_TRY_AGAIN | 701 | Internal error. In the case of this function, an error means that the operating system can't allocate memory |
Examplesโ
C++ example
char* featureInfoJson = nullptr;
const uint32_t featureId = 0;
const LLKStatus status = llkGetFeatureInfo(featureId, &featureInfoJson);
if (status == LLKStatus::LLK_OK) {
std::cout << json::parse(featureInfoJson).dump(1) << std::endl;
}
/*null pointers are ok for llkFree*/
llkFree(featureInfoJson);
Example of a successful operation
{
"Feature": {
"ID": 0,
"Name": "Test_0",
"executionsLimit": 0,
"licenseType": 2,
"validFromDate": 1700410608,
"validUpToDate": 1701993600
}
}
In this example, used the library nlohmann json, to format and print the captured data
Description of featureInfoJson
โ
Param | Description |
---|---|
ID | Unique Feature number |
Name | Feature name (string) |
executionsLimit | Amount of executions (balance) |
licenseType | Limitation type |
validFromDate | timestamp when the Feature became available as part of the current license |
validUpToDate | An expiration timestamp. After that, the feature is no longer available |
Related Topics
More about Feature limitation types - LLKFeatureLicenseType
Version historyโ
- Added in version
1.0.0