C++ License Manager API¶
oneML class that manages licensing of all oneML APIs.
-
class
oneML
::
LicenseManager
¶ The oneML LicenseManager object.
Class to manage licensing.
Public Functions
-
LicenseManager
()¶ Construct a LicenseManager object.
-
void
set_key
(const std::string &key)¶ set the oneML product key
- Parameters
[in] key
: string of product key
-
std::string
get_key
() const¶ get a product key
- Return
string of product key
-
LicenseStatus
activate_key
()¶ activate a product key, requires to set a key first
- Return
LicenseStatus::Ok if activate success, LicenseStatus::Error otherwise
-
LicenseStatus
activate_trial
()¶ activate trial version.
- Return
LicenseStatus::Ok if activate success, LicenseStatus::Error otherwise
-
std::string
get_machine_code
() const¶ get a machine code used as a machine unique identifier
- Return
string of a machine code
-
bool
is_trial
() const¶ check if the current activation is trial or not.
- Return
true if the activation is trial, false otherwise
-
LicenseStatus
validate_activation
() const¶ validate the license and return LicenseStatus.
It also updates a type of the current activation. Call
get_activation_type
after caliing this function to get the type of the current activation.- Return
LicenseStatus
-
LicenseActivationType
get_activation_type
() const¶ get the type of the current activation
- Return
LicenseActivationType an enum of activation type
None: If a license is not activated or not found
KeyOnline: If an activation is done by a license key and an online service
TrialOnline: If a trial activation is done by an online service
-
uint64_t
get_activation_expiry_date
() const¶ get the expiry date of the current activation
- Return
uint64_t unix time
-
uint64_t
get_activation_suspended_date
() const¶ get the suspended date of the current activation
- Return
uint64_t unix time
-