Cryptolens Client API for C++
|
Public Member Functions | |
LicenseKeyChecker (LicenseKeyInformation const *license_key) | |
operator bool () const | |
LicenseKeyChecker & | has_feature (int feature) |
LicenseKeyChecker & | has_not_feature (int feature) |
LicenseKeyChecker & | has_expired (std::uint64_t now) |
LicenseKeyChecker & | has_not_expired (std::uint64_t now) |
LicenseKeyChecker & | is_blocked () |
LicenseKeyChecker & | is_not_blocked () |
LicenseKeyChecker & | is_on_right_machine (std::string const &machine_code) |
|
explicit |
Construct a LicenseKeyChecker from a LicenseKey object. This can also be accomplished by calling the check() method on the LicenseKey object instead. That is
license_key.check()
instead of
LicenseKeyChecker(license_key)
LicenseKeyChecker & cryptolens_io::v20190401::LicenseKeyChecker::has_expired | ( | std::uint64_t | now | ) |
Check that the underlying LicenseKey object has expired.
Time is given as a unix time stamp measured in seconds.
LicenseKeyChecker & cryptolens_io::v20190401::LicenseKeyChecker::has_feature | ( | int | feature | ) |
Check that the underlying LicenseKey object has a certain feature.
LicenseKeyChecker & cryptolens_io::v20190401::LicenseKeyChecker::has_not_expired | ( | std::uint64_t | now | ) |
Check that the underlying LicenseKey object has not expired.
Time is given as a unix time stamp measured in seconds.
LicenseKeyChecker & cryptolens_io::v20190401::LicenseKeyChecker::has_not_feature | ( | int | feature | ) |
Check that the underlying LicenseKey object does not have a certain feature.
LicenseKeyChecker & cryptolens_io::v20190401::LicenseKeyChecker::is_blocked | ( | ) |
Check that the underlying LicenseKey object is blocked.
LicenseKeyChecker & cryptolens_io::v20190401::LicenseKeyChecker::is_not_blocked | ( | ) |
Check that the underlying LicenseKey object is not blocked.
LicenseKeyChecker & cryptolens_io::v20190401::LicenseKeyChecker::is_on_right_machine | ( | std::string const & | machine_code | ) |
Check that machine_code is among the allowed machines for the underlying LicenseKey object.
|
explicit |
Explicit conversion to bool allowing the LicenseKeyChecker object to be used in e.g. control flow statements:
if (license_key.check().has_feature(4)) { DO_SOMETHING }