![]() |
LicenseSpring C++ SDK
Easily add Software Licensing to your application
|
Contains information about a user-based license for a given user. More...
#include <LicenseSpring/UserLicense.h>
Public Types | |
using | ptr_t = std::shared_ptr< UserLicense > |
Public Member Functions | |
UserLicense () | |
Default constructor, creates empty user license object. | |
bool | isActive () const |
Checker for if the license is active. | |
bool | isEnabled () const |
Checker for if the license is enabled. | |
bool | isTrial () const |
Checker for if the license is a trial. | |
bool | isUnlimitedActivationsAllowed () const |
Checker if license allows unlimited activations. | |
bool | isOveragesAllowed () const |
Checker if overage is allowed for Consumption license. | |
bool | isFloating () const |
Checker for whether the license is floating or not. | |
bool | isVMAllowed () const |
Checker for whether the license is allowed to work under virtual machine or not. | |
bool | isHardwareKeyAuth () const |
Checker for whether the license works only with a hardware key dongle. | |
bool | isAirGapped () const |
Checker for if the license is air gapped. | |
uint32_t | maxLicenseUsers () const |
Maximum number of users that can be assigned to a license. | |
int32_t | maxActivations () const |
How many times license can be activated. | |
uint32_t | timesActivated () const |
How many times license already been activated. | |
uint32_t | transferCount () const |
How many times license has been transferred between devices. | |
int32_t | transferLimit () const |
Maximum number of allowed license transfers between devices. | |
uint32_t | maxOverages () const |
Maximum overage allowed for the license. | |
uint32_t | floatingTimeout () const |
Timeout of the floating license in minutes. | |
uint32_t | maxBorrowTime () const |
Maximum borrowing period in hours. | |
uint32_t | gracePeriod () const |
Grace period in hours. | |
uint64_t | serverId () const |
Server-side license id, used for distinguishing user-based licenses of the same product. | |
const std::string & | orderStoreId () const |
order store id of the license. | |
const std::string & | startDate () const |
License start date. | |
const std::string & | metadata () const |
License metadata. | |
LicenseType | licenseType () const |
License type. | |
Customer | owner () const |
License owner. | |
ProductDetails | productDetails () const |
Product details. | |
std::vector< CustomField > | customFields () const |
List of custom fields associated with the license. | |
std::vector< LicenseFeature > | features () const |
List of license features associated with the license. | |
tm | validityPeriod () const |
License validity period in UTC. | |
tm | maintenancePeriod () const |
Maintenance period in UTC. | |
Static Public Member Functions | |
static UserLicense | fromJsonString (const std::string &jsonString) |
Helper method, creates UserLicense object from JSON string. | |
Contains information about a user-based license for a given user.
Definition at line 21 of file UserLicense.h.
using LicenseSpring::UserLicense::ptr_t = std::shared_ptr<UserLicense> |
Definition at line 24 of file UserLicense.h.
LicenseSpring::UserLicense::UserLicense | ( | ) |
Default constructor, creates empty user license object.
bool LicenseSpring::UserLicense::isActive | ( | ) | const |
Checker for if the license is active.
bool LicenseSpring::UserLicense::isEnabled | ( | ) | const |
Checker for if the license is enabled.
bool LicenseSpring::UserLicense::isTrial | ( | ) | const |
Checker for if the license is a trial.
bool LicenseSpring::UserLicense::isUnlimitedActivationsAllowed | ( | ) | const |
Checker if license allows unlimited activations.
bool LicenseSpring::UserLicense::isOveragesAllowed | ( | ) | const |
Checker if overage is allowed for Consumption license.
Meaningful only for Consumption license type.
bool LicenseSpring::UserLicense::isFloating | ( | ) | const |
Checker for whether the license is floating or not.
bool LicenseSpring::UserLicense::isVMAllowed | ( | ) | const |
Checker for whether the license is allowed to work under virtual machine or not.
See product and license settings on the LicenseSpring platform for more details.
bool LicenseSpring::UserLicense::isHardwareKeyAuth | ( | ) | const |
Checker for whether the license works only with a hardware key dongle.
bool LicenseSpring::UserLicense::isAirGapped | ( | ) | const |
Checker for if the license is air gapped.
uint32_t LicenseSpring::UserLicense::maxLicenseUsers | ( | ) | const |
Maximum number of users that can be assigned to a license.
int32_t LicenseSpring::UserLicense::maxActivations | ( | ) | const |
How many times license can be activated.
uint32_t LicenseSpring::UserLicense::timesActivated | ( | ) | const |
How many times license already been activated.
uint32_t LicenseSpring::UserLicense::transferCount | ( | ) | const |
How many times license has been transferred between devices.
int32_t LicenseSpring::UserLicense::transferLimit | ( | ) | const |
Maximum number of allowed license transfers between devices.
uint32_t LicenseSpring::UserLicense::maxOverages | ( | ) | const |
Maximum overage allowed for the license.
Meaningful only for Consumption license type, returns maximum possible value in case of unlimited overages.
uint32_t LicenseSpring::UserLicense::floatingTimeout | ( | ) | const |
Timeout of the floating license in minutes.
uint32_t LicenseSpring::UserLicense::maxBorrowTime | ( | ) | const |
Maximum borrowing period in hours.
Meaningful only for floating license.
uint32_t LicenseSpring::UserLicense::gracePeriod | ( | ) | const |
Grace period in hours.
Positive value if grace period enabled, and 0 if disabled.
uint64_t LicenseSpring::UserLicense::serverId | ( | ) | const |
Server-side license id, used for distinguishing user-based licenses of the same product.
const std::string & LicenseSpring::UserLicense::orderStoreId | ( | ) | const |
order store id of the license.
const std::string & LicenseSpring::UserLicense::metadata | ( | ) | const |
License metadata.
LicenseType LicenseSpring::UserLicense::licenseType | ( | ) | const |
License type.
Customer LicenseSpring::UserLicense::owner | ( | ) | const |
License owner.
ProductDetails LicenseSpring::UserLicense::productDetails | ( | ) | const |
Product details.
std::vector< CustomField > LicenseSpring::UserLicense::customFields | ( | ) | const |
List of custom fields associated with the license.
std::vector< LicenseFeature > LicenseSpring::UserLicense::features | ( | ) | const |
List of license features associated with the license.
tm LicenseSpring::UserLicense::validityPeriod | ( | ) | const |
License validity period in UTC.
tm LicenseSpring::UserLicense::maintenancePeriod | ( | ) | const |
Maintenance period in UTC.
|
static |
Helper method, creates UserLicense object from JSON string.