License Management
The RUI.SetLicenseData function sets or clears the license data. The legal parameter values include unchanged (-1).
Note:Different from the V4 of the Usage Intelligence SDK, a sessionID parameter can be supplied.
The RUI.SetLicenseData function can be called between RUISDK.CreateConfig and RUISDK.StopSDK and can be called zero or more times. However, the usage requirements of the sessionID parameter are different if RUI.SetLicenseData is called before RUISDK.StartSDK or called after RUISDK.StartSDK. See sessionId for more information.
The RUI.SetLicenseData function can be called while a New Registration is being performed (RUISDK.CreateConfig, RUISDK.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 RUI.SetLicenseData function is an asynchronous function, returning immediately with further functionality executed on separate thread(s).
RUIResult RUISDK.SetLicenseData (Int32 keyType, Int32 keyExpired, Int32 keyActivated, Int32 keyBlacklisted, Int32 keyWhitelisted, String sessionID = “”)
Parameters
The RUI.SetLicenseData function has the following parameters.
Parameter |
Description |
|||||||||
keyType (Int32) |
One of the key types from the RUILicenseKeyType enum. Note that custom types can be used for application specific license types: unchanged (-1) evaluation (0) purchased (1) freeware (2) unknown (3) nfr (4) // Not For Resale custom1 (5) custom2 (6) custom3 (7) |
|||||||||
keyExpired (Int32) |
Indicates whether the client license has expired. Use one of the RUILicenseKeyStatus enum choices for the values: unchanged (-1) no (0) yes (1) |
|||||||||
keyActivated (Int32 |
Indicates whether the client license has been activated. Use one of the RUILicenseKeyStatus enum choices for the values: unchanged (-1) no (0) yes (1) |
|||||||||
keyBlacklisted (Int32) |
Indicates whether the client license key has been blacklisted. Use one of the RUILicenseKeyStatus enum choices for the values: unchanged (-1) no (0) yes (1) |
|||||||||
keyWhitelisted (Int32) |
Indicates whether the client license key has been whitelisted. Use one of the RUILicenseKeyStatus enum choices for the values: unchanged (-1) no (0) yes (1) |
|||||||||
Optional session ID complying with the following usage content conditioning and validation) rules in RUISDK.StartSession). The usage requirements of the sessionID parameter are different if RUI.SetLicenseData is called before RUISDK.StartSDK or called after RUISDK.StartSDK.
|
Returns
The RUI.SetLicenseData function returns a RUIResult enum value with the following possible values:
Return |
Description |
ok |
Function successful. |
sdkInternalErrorFatal |
Irrecoverable internal fatal error. No further API calls should be made. |
sdkAborted |
A required New Registration has failed, and hence the SDK is aborted. RUISDK.StopSDK and RUISDK destructor are possible. |
sdkSuspended |
The Server has instructed a temporary back-off. |
sdkPermantelyDisabled |
The Server has instructed a permanent disable. |
sdkOptedOut |
|
configNotCreated |
Configuration has not been successfully created. |
sdkAlreadyStopped |
SDK has already been successfully stopped. |
invalidSessionIDExpectedEmpty |
The sessionID is expected to be empty, and it was not. |
invalidSessionIDExpectedNonEmpty |
The sessionID is expected to be non-empty, and it was not. |
invalidSessionIDTooShort |
The sessionID violates its allowable minimum length. Minimum length is 10. |
invalidSessionIDTooLong |
The sessionID violates its allowable maximum length. Maximum length is 64. |
invalidSessionIDNotActive |
The sessionID is not currently in use. |