Cryptolens Client API for C++
Public Member Functions | List of all members
cryptolens_io::v20190401::LicenseKeyChecker Class Reference

Public Member Functions

 LicenseKeyChecker (LicenseKeyInformation const *license_key)
 
 operator bool () const
 
LicenseKeyCheckerhas_feature (int feature)
 
LicenseKeyCheckerhas_not_feature (int feature)
 
LicenseKeyCheckerhas_expired (std::uint64_t now)
 
LicenseKeyCheckerhas_not_expired (std::uint64_t now)
 
LicenseKeyCheckeris_blocked ()
 
LicenseKeyCheckeris_not_blocked ()
 
LicenseKeyCheckeris_on_right_machine (std::string const &machine_code)
 

Constructor & Destructor Documentation

◆ LicenseKeyChecker()

cryptolens_io::v20190401::LicenseKeyChecker::LicenseKeyChecker ( LicenseKeyInformation const *  license_key)
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)

Member Function Documentation

◆ has_expired()

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.

◆ has_feature()

LicenseKeyChecker & cryptolens_io::v20190401::LicenseKeyChecker::has_feature ( int  feature)

Check that the underlying LicenseKey object has a certain feature.

◆ has_not_expired()

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.

◆ has_not_feature()

LicenseKeyChecker & cryptolens_io::v20190401::LicenseKeyChecker::has_not_feature ( int  feature)

Check that the underlying LicenseKey object does not have a certain feature.

◆ is_blocked()

LicenseKeyChecker & cryptolens_io::v20190401::LicenseKeyChecker::is_blocked ( )

Check that the underlying LicenseKey object is blocked.

◆ is_not_blocked()

LicenseKeyChecker & cryptolens_io::v20190401::LicenseKeyChecker::is_not_blocked ( )

Check that the underlying LicenseKey object is not blocked.

◆ is_on_right_machine()

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.

◆ operator bool()

cryptolens_io::v20190401::LicenseKeyChecker::operator bool ( ) const
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
}

The documentation for this class was generated from the following files: