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>;
156 bool m_allowUnlimitedActivations;
157 bool m_allowOverages;
159 bool m_isOfflineFloating;
161 bool m_isHardwareKeyAuth;
163 uint32_t m_maxLicenseUsers;
164 int32_t m_maxActivations;
165 uint32_t m_timesActivated;
166 uint32_t m_transferCount;
167 int32_t m_transferLimit;
168 uint32_t m_maxOverages;
169 uint32_t m_floatingTimeout;
170 uint32_t m_maxBorrowTime;
171 uint32_t m_gracePeriod;
173 std::string m_orderStoreId;
174 std::string m_startDate;
175 std::string m_metadata;
177 tm m_maintenancePeriod;
182 std::vector<CustomField> m_customFields;
183 std::vector<LicenseFeature> m_features;
188#pragma warning( pop )
#define LS_API
Macros that expands to dllexport, dllimport or nothing on non Windows platforms or in case of static ...
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.