1#ifndef LS_USER_LICENSE_H
2#define LS_USER_LICENSE_H
7#pragma warning(disable : 4251)
24 using ptr_t = std::shared_ptr<UserLicense>;
161 bool m_allowUnlimitedActivations;
162 bool m_allowOverages;
164 bool m_isOfflineFloating;
166 bool m_isHardwareKeyAuth;
168 uint32_t m_maxLicenseUsers;
169 int32_t m_maxActivations;
170 uint32_t m_timesActivated;
171 uint32_t m_transferCount;
172 int32_t m_transferLimit;
173 uint32_t m_maxOverages;
174 uint32_t m_floatingTimeout;
175 uint32_t m_maxBorrowTime;
176 uint32_t m_gracePeriod;
178 std::string m_orderStoreId;
179 std::string m_startDate;
180 std::string m_metadata;
182 tm m_maintenancePeriod;
187 std::vector<CustomField> m_customFields;
188 std::vector<LicenseFeature> m_features;
Class that encapsulates information about a customer.
Class used for encapsulating the type of license, comparing types of licenses, and converting them to...
Class that encapsulates information about a product.
Contains information about a user-based license for a given user.
Customer owner() const
License owner.
bool isHardwareKeyAuth() const
Checker for whether the license works only with a hardware key dongle.
uint32_t gracePeriod() const
Grace period in hours.
uint32_t maxOverages() const
Maximum overage allowed for the license.
uint64_t serverId() const
Server-side license id, used for distinguishing user-based licenses of the same product.
int32_t maxActivations() const
How many times license can be activated.
bool isActive() const
Checker for if the license is active.
bool isFloating() const
Checker for whether the license is floating or not.
tm validityPeriod() const
License validity period in UTC.
uint32_t transferCount() const
How many times license has been transferred between devices.
tm maintenancePeriod() const
Maintenance period in UTC.
LicenseType licenseType() const
License type.
bool isUnlimitedActivationsAllowed() const
Checker if license allows unlimited activations.
bool isTrial() const
Checker for if the license is a trial.
std::shared_ptr< UserLicense > ptr_t
ProductDetails productDetails() const
Product details.
std::vector< LicenseFeature > features() const
List of license features associated with the license.
bool isVMAllowed() const
Checker for whether the license is allowed to work under virtual machine or not.
uint32_t maxBorrowTime() const
Maximum borrowing period in hours.
static UserLicense fromJsonString(const std::string &jsonString)
Helper method, creates UserLicense object from JSON string.
bool isOveragesAllowed() const
Checker if overage is allowed for Consumption license.
const std::string & orderStoreId() const
order store id of the license.
const std::string & metadata() const
License metadata.
int32_t transferLimit() const
Maximum number of allowed license transfers between devices.
bool isAirGapped() const
Checker for if the license is air gapped.
bool isEnabled() const
Checker for if the license is enabled.
const std::string & startDate() const
License start date.
std::vector< CustomField > customFields() const
List of custom fields associated with the license.
UserLicense()
Default constructor, creates empty user license object.
uint32_t maxLicenseUsers() const
Maximum number of users that can be assigned to a license.
uint32_t timesActivated() const
How many times license already been activated.
uint32_t floatingTimeout() const
Timeout of the floating license in minutes.