LicenseManagerSDK provide an interface to our license system for SDK users.
More...
LicenseManagerSDK provide an interface to our license system for SDK users.
Note: You must call Framework::init() before calling any function of LicenseManagerSDK (except for addCustomToken()). The earliest you are allowed to call any function of LicenseManagerSDK is in Framework::InitConfig::licenseInitFunction.
◆ activateKeyOnline()
Perform regular online license activation of the SDK.
- Parameters
-
- Returns
- Error struct with further details in case of failure, empty otherwise
- Note
- This method needs to be called as part of Framework::InitConfig::licenseInitFunction. See Framework.h for details. Usually there is no need to call this method if isActivated() returns true.
◆ writeOfflineActivationRequestFile()
| bool ImFusion::LicenseManagerSDK::writeOfflineActivationRequestFile |
( |
const std::string & | key, |
|
|
const std::string & | outputPath ) |
Write offline activation request file to disk.
- Parameters
-
| key | License key |
| outputPath | Filesystem path for create license request file |
- Returns
- true on success, false otherwise (which usually means the outputPath was not writable)
- Note
- The resulting file needs to be uploaded to offlineActivationURL() to perform an offline activation. This method needs to be called as part of Framework::InitConfig::licenseInitFunction. See Framework.h for details.
◆ readOfflineActivationUnlockFile()
| bool ImFusion::LicenseManagerSDK::readOfflineActivationUnlockFile |
( |
const std::string & | path | ) |
|
Read offline activation unlock file and activate license.
- Parameters
-
| path | Path to the unlock file produced by the portal at offlineActivationURL |
- Returns
- true on success, false otherwise
- Note
- The input file of this function is produced by uploading the result of writeOfflineActivationRequestFile to offlineActivationURL. The request file must have been created by the same machine making this call, but upload to the portal can be done anywhere. Uploading the request file to the portal already consumed an activation for the license on the backend, which this function lets the SDK know about. This method needs to be called as part of Framework::InitConfig::licenseInitFunction. See Framework.h for details.
◆ setProxy()
| bool ImFusion::LicenseManagerSDK::setProxy |
( |
const std::string & | host | ) |
|
Set proxy to use for connecting to license server.
To disable a previously set proxy pass in an empty string.
- Parameters
-
| host | Host address of proxy server. Optionally can contain port in form :[port] at the end and a specific proxy type in the front (e.g. http://). If no port or proxy type is given 1080 and http are used. |
- Returns
- True if proxy was set, false if proxy could not be set or is not supported
◆ expirationDate()
| std::optional< std::chrono::system_clock::time_point > ImFusion::LicenseManagerSDK::expirationDate |
( |
| ) |
|
Returns an optional point in time at which the license will expire. The optional will be empty if the license does not expire.
- Deprecated
- "Use expirationDateTimePoint instead"