![]() |
ImFusion SDK 4.3
|
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.
Functions | |
int | setKeyAndCode (const std::string &key, const std::string &code=std::string("")) |
Set license information If a code is provided an offline activation will be performed otherwise an online activation is performed. | |
int | setLicenseKey (std::string_view key) |
Set license key An online activation is performed. | |
bool | setProxy (const std::string &host) |
Set proxy to use for connecting to license server. | |
std::string | token () |
Return base64 encoded token for this machine. | |
std::string | key () |
Return currently used license key. | |
bool | isActivated () |
Check whether a valid license is installed. | |
void | addCustomToken (const std::string &token) |
Add custom token used for licensing. Needs to be called before any other method of LicenseManagerSDK is called. | |
std::optional< std::chrono::system_clock::time_point > | expirationDate () |
Returns an optional point in time at which the license will expire. The optional will be empty if the license does not expire. | |
std::optional< DateTime::TimePoint > | expirationDateTimePoint () |
Returns an optional point in time at which the license will expire. The optional will be empty if the license does not expire. | |
int setKeyAndCode | ( | const std::string & | key, |
const std::string & | code = std::string("") ) |
Set license information If a code is provided an offline activation will be performed otherwise an online activation is performed.
key | License key |
code | Activation code |
int setLicenseKey | ( | std::string_view | key | ) |
Set license key An online activation is performed.
key | License key |
bool 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.
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. |
std::optional< std::chrono::system_clock::time_point > expirationDate | ( | ) |
Returns an optional point in time at which the license will expire. The optional will be empty if the license does not expire.