Cryptolens Client API for C++
|
#include <LicenseKey.hpp>
Public Member Functions | |
LicenseKey (LicenseKeyInformation &&license_key_information, RawLicenseKey &&raw_license_key) | |
std::string | to_string () const |
LicenseKeyInformation & | get_license_key_information () |
LicenseKeyInformation const & | get_license_key_information () const |
LicenseKeyChecker | check () const |
int | get_product_id () const |
std::uint64_t | get_created () const |
std::uint64_t | get_expires () const |
int | get_period () const |
bool | get_block () const |
bool | get_trial_activation () const |
std::uint64_t | get_sign_date () const |
bool | get_f1 () const |
bool | get_f2 () const |
bool | get_f3 () const |
bool | get_f4 () const |
bool | get_f5 () const |
bool | get_f6 () const |
bool | get_f7 () const |
bool | get_f8 () const |
optional< int > const & | get_id () const |
optional< std::string > const & | get_key () const |
optional< std::string > const & | get_notes () const |
optional< int > const & | get_global_id () const |
optional< Customer > const & | get_customer () const |
optional< std::vector< ActivationData > > const & | get_activated_machines () const |
optional< int > const & | get_maxnoofmachines () const |
optional< std::string > const & | get_allowed_machines () const |
optional< std::vector< DataObject > > const & | get_data_objects () const |
This immutable class represents a license key.
The class is constructed using the static factory make().
The check() method can be used to create a LicenseKeyChecker, which can be used to check properties of a license key in a convenient fashion. I.e.
if (key.check().has_feature(1).has_not_feature(2)) { DO_SOMETHING(); }
LicenseKeyChecker cryptolens_io::v20190401::LicenseKey::check | ( | ) | const |
Return a LicenseKeyChecker working on this LicenseKey object
optional< std::vector< ActivationData > > const & cryptolens_io::v20190401::LicenseKey::get_activated_machines | ( | ) | const |
Returns the list of activated machines
optional< std::string > const & cryptolens_io::v20190401::LicenseKey::get_allowed_machines | ( | ) | const |
Returns the machine codes of those devices that will be prioritized during activation. Even if the limit is achieved, these will still be activated.
bool cryptolens_io::v20190401::LicenseKey::get_block | ( | ) | const |
Returns if the license key is blocked
std::uint64_t cryptolens_io::v20190401::LicenseKey::get_created | ( | ) | const |
Returns the date and time the license key was created
Format is a unix time stamp in seconds.
optional< Customer > const & cryptolens_io::v20190401::LicenseKey::get_customer | ( | ) | const |
Returns the customer object assigned to the license key
optional< std::vector< DataObject > > const & cryptolens_io::v20190401::LicenseKey::get_data_objects | ( | ) | const |
Returns the data objects associated with the license key.
std::uint64_t cryptolens_io::v20190401::LicenseKey::get_expires | ( | ) | const |
Returns the date and time the license key expires
Format is a unix time stamp in seconds.
bool cryptolens_io::v20190401::LicenseKey::get_f1 | ( | ) | const |
Returns if the license key has feature 1
bool cryptolens_io::v20190401::LicenseKey::get_f2 | ( | ) | const |
Returns if the license key has feature 2
bool cryptolens_io::v20190401::LicenseKey::get_f3 | ( | ) | const |
Returns if the license key has feature 3
bool cryptolens_io::v20190401::LicenseKey::get_f4 | ( | ) | const |
Returns if the license key has feature 4
bool cryptolens_io::v20190401::LicenseKey::get_f5 | ( | ) | const |
Returns if the license key has feature 5
bool cryptolens_io::v20190401::LicenseKey::get_f6 | ( | ) | const |
Returns if the license key has feature 6
bool cryptolens_io::v20190401::LicenseKey::get_f7 | ( | ) | const |
Returns if the license key has feature 7
bool cryptolens_io::v20190401::LicenseKey::get_f8 | ( | ) | const |
Returns if the license key has feature 8
optional< int > const & cryptolens_io::v20190401::LicenseKey::get_global_id | ( | ) | const |
Returns a unique global identifier for the license key
optional< int > const & cryptolens_io::v20190401::LicenseKey::get_id | ( | ) | const |
Returns the Id of the license key
optional< std::string > const & cryptolens_io::v20190401::LicenseKey::get_key | ( | ) | const |
Return the license key string, eg. ABCDE-EFGHI-JKLMO-PQRST
optional< int > const & cryptolens_io::v20190401::LicenseKey::get_maxnoofmachines | ( | ) | const |
Returns the maximum number of machines/devices that may activate this license key.
optional< std::string > const & cryptolens_io::v20190401::LicenseKey::get_notes | ( | ) | const |
Returns the notes field of the license key
int cryptolens_io::v20190401::LicenseKey::get_period | ( | ) | const |
Returns the duration of current license cycle, eg. 30 days
Format is given as number of days.
int cryptolens_io::v20190401::LicenseKey::get_product_id | ( | ) | const |
Returns the product Id of the license key
std::uint64_t cryptolens_io::v20190401::LicenseKey::get_sign_date | ( | ) | const |
Returns the date the license key was created by the Web API
Format is a unix time stamp in seconds.
bool cryptolens_io::v20190401::LicenseKey::get_trial_activation | ( | ) | const |
Returns if trial activation is enabled