License Management
The setLicenseDataKeyType:keyExpired:keyActivated:keyBlacklisted:keyWhitelisted:sessionID: method sets or clears the license data. The legal parameter values include RUI_KEY_STATUS_UNCHANGED (-1).
Note:Different from V4 of the Usage Intelligence SDK, a sessionID parameter can be supplied.
The setLicenseDataKeyType:keyExpired:keyActivated:keyBlacklisted:keyWhitelisted:sessionID: method can be called between createConfig and stopSDK: and can be called zero or more times. However, the usage requirements of the sessionID parameter are different if setLicenseDataKeyType:keyExpired:keyActivated:keyBlacklisted:keyWhitelisted:sessionID: is called before startSDK or called after startSDK.
When Called |
Description |
Before startSDK regardless of multiSessionEnabled |
sessionID must be empty. |
After startSDK and multiSessionEnabled = false |
sessionID must be empty. This is similar to event tracking APIs. |
After startSDK and multiSessionEnabled = true |
sessionID must be a current valid value used in startSession:, or it can be empty. This is different than normal event tracking APIs, whereby a empty value is not allowed. |
The setLicenseDataKeyType:keyExpired:keyActivated:keyBlacklisted:keyWhitelisted:sessionID: method can be called while a New Registration is being performed (createConfig, startSDK). However, the event data is not written to the log file until the New Registration completes, and if the New Registration fails, the data will be lost.
The setLicenseDataKeyType:keyExpired:keyActivated:keyBlacklisted:keyWhitelisted:sessionID: method is an asynchronous function, returning immediately with further functionality executed on separate thread(s).
setLicenseDataKeyType:keyExpired:keyActivated:keyBlacklisted:keyWhitelisted:sessionID:
(RUIRESULTOBJC) setLicenseDataKeyType: (int32_t)keyType keyExpired: (int32_t)keyExpired keyActivated: (int32_t)keyActivated keyBlacklisted: (int32_t)keyBlacklisted keyWhitelisted: (int32_t)keyWhitelisted sessionID: (NSString*)sessionID
Parameters
The setLicenseDataKeyType:keyExpired:keyActivated:keyBlacklisted:keyWhitelisted:sessionID: method has the following parameters.
Parameter |
Description |
|
keyType (int32_t) |
The keyType parameter can be set to one of the key types from the integer list below. Note:Customer types can be used for application specific license types. |
|
RUI_KEY_TYPE_UNCHANGED (-1) |
Key type is unchanged (when in parameter) or Unknown (when out of parameter) |
|
RUI_KEY_TYPE_EVALUATION (0) |
|
|
RUI_KEY_TYPE_PURCHASED (1) |
|
|
RUI_KEY_TYPE_FREEWARE (2) |
|
|
RUI_KEY_TYPE_UNKNOWN (3) |
|
|
RUI_KEY_TYPE_NFR (4) |
Key type is not for resale. |
|
RUI_KEY_TYPE_CUSTOM1 (5) |
|
|
RUI_KEY_TYPE_CUSTOM2 (6) |
|
|
RUI_KEY_TYPE_CUSTOM3 (7) |
|
|
expiredStatus (int32_t) |
Indicates whether the client license has expired. One of the possible values: |
|
RUI_KEY_STATUS_UNCHANGED (-1) |
Key Status is Unchanged (when in parameter) or Unknown (when out parameter). |
|
RUI_KEY_STATUS_NO (0) |
Key Status is No. |
|
RUI_KEY_STATUS_YES (1) |
Key Status is Yes |
|
activatedStatus (int32_t) |
Indicates whether the client license has been activated. One of the values below: |
|
RUI_KEY_STATUS_UNCHANGED (-1) |
Key Status is Unchanged (when in parameter) or Unknown (when out parameter). |
|
RUI_KEY_STATUS_NO (0) |
Key Status is No. |
|
RUI_KEY_STATUS_YES (1) |
Key Status is Yes. |
|
blacklistedStatus (int32_t) |
Indicates whether the client license key has been blacklisted. One of the values below: |
|
RUI_KEY_STATUS_UNCHANGED (-1) |
Key Status is Unchanged (when in parameter) or Unknown (when out parameter). |
|
RUI_KEY_STATUS_NO (0) |
Key Status is No. |
|
RUI_KEY_STATUS_YES (1) |
Key Status is Yes. |
|
whitelistedStatus (int32_t) |
Indicates whether the client license key has been whitelisted. One of the values below: |
|
RUI_KEY_STATUS_UNCHANGED (-1) |
Key Status is Unchanged (when in parameter) or Unknown (when out parameter). |
|
RUI_KEY_STATUS_NO (0) |
Key Status is No. |
|
RUI_KEY_STATUS_YES (1) |
Key Status is Yes. |
Returns
The setLicenseDataKeyType:keyExpired:keyActivated:keyBlacklisted:keyWhitelisted:sessionID: method returns one of the return status constants below.
Return |
Description |
RUI_OK |
Function successful. |
RUI_SDK_INTERNAL_ERROR_FATAL |
Irrecoverable internal fatal error. No further API calls should be made. |
RUI_SDK_ABORTED |
A required New Registration has failed, and hence the SDK is aborted. stopSDK: and Objective-C instance release are possible. |
RUI_SDK_SUSPENDED |
The Server has instructed a temporary back-off. |
RUI_SDK_PERMANENTLY_DISABLED |
The Server has instructed a permanent disable. |
RUI_SDK_OPTED_OUT |
Instance has been instructed by the application to opt-out. |
RUI_CONFIG_NOT_CREATED |
Configuration has not been successfully created. |
RUI_SDK_ALREADY_STOPPED |
SDK has already been successfully stopped. |
RUI_INVALID_SESSION_ID_EXPECTED_EMPTY |
The sessionID is expected to be empty, and it was not. |
RUI_INVALID_SESSION_ID_EXPECTED_NON_EMPTY |
The sessionID is expected to be non-empty, and it was not. |
RUI_INVALID_SESSION_ID_TOO_SHORT |
The sessionID violates its allowable minimum length. |
RUI_INVALID_SESSION_ID_TOO_LONG |
The sessionID violates its allowable maximum length. |
RUI_INVALID_SESSION_ID_NOT_ACTIVE |
The sessionID is not currently in use. |