1#ifndef LS_LICENSE_FEATURE_H
2#define LS_LICENSE_FEATURE_H
7#pragma warning( disable : 4251 )
54 int32_t maxConsumption, int32_t totalConsumption, int32_t localConsumption,
55 const tm& expiryDate,
bool allowOverages, int32_t maxOverages,
56 bool resetConsumption,
bool allowUnlimitedConsumptions,
ConsumptionPeriod consumptionPeriod,
const std::string& metadata,
57 bool isFloating,
bool isOfflineFloating, int32_t floatingTimeout, int32_t floatingUsers,
58 int32_t floatingInUseCount,
const tm& floatingStartDateTime,
const tm& floatingEndDateTime );
62 const std::string&
code()
const;
66 const std::string&
name()
const;
189 int32_t m_maxConsumption;
190 int32_t m_totalConsumption;
191 int32_t m_localConsumption;
192 int32_t m_maxOverages;
193 bool m_allowOverages;
194 bool m_allowUnlimitedConsumptions;
195 bool m_resetConsumption;
198 std::string m_metadata;
200 bool m_isOfflineFloating;
201 int32_t m_floatingTimeout;
202 int32_t m_floatingUsers;
203 int32_t m_floatingInUseCount;
204 tm m_floatingStartDateTime;
205 tm m_floatingEndDateTime;
210#pragma warning( pop )
#define LS_API
Macros that expands to dllexport, dllimport or nothing on non Windows platforms or in case of static ...
LSFeatureType
Product feature type.
Class used for encapsulating LSConsumptionPeriod and converting cosumption period to/from string.
Class that encapsulates information about license feature.
static std::string FeatureTypeToString(LSFeatureType value)
Helper method, converts LSFeatureType to string.
bool isUnlimitedConsumptionAllowed() const
Checks if unlimited consumption is allowed for Consumption license feature.
tm floatingEndDateTime() const
Getter method for floating license feature expiry date.
LicenseFeature(const std::string &code, const std::string &name, LSFeatureType type, int32_t maxConsumption, int32_t totalConsumption, int32_t localConsumption, const tm &expiryDate, bool allowOverages, int32_t maxOverages, bool resetConsumption, bool allowUnlimitedConsumptions, ConsumptionPeriod consumptionPeriod, const std::string &metadata, bool isFloating, bool isOfflineFloating, int32_t floatingTimeout, int32_t floatingUsers, int32_t floatingInUseCount, const tm &floatingStartDateTime, const tm &floatingEndDateTime)
Constructs license feature with all of provided info.
LicenseFeature()
Constructs invalid license feature with no information.
LSFeatureType featureType() const
Getter method for license feature type.
int32_t floatingInUseCount() const
Getter for current number of simultaneous users using this feature.
bool isOfflineFloating() const
Checks if feature is and offline server floating feature.
const std::string & name() const
Getter method for license feature name.
bool isExpired() const
Checks if license feature expired.
int32_t floatingTimeout() const
Getter for floating license timeout.
const std::string & metadata() const
Getter method for license feature metadata.
static LSFeatureType FeatureTypeFromString(const std::string &value)
Helper method, converts string to LSFeatureType.
bool isResetConsumptionEnabled() const
Checks if consumption reset is allowed for Consumption license feature.
bool isOveragesAllowed() const
Checks if overage is allowed for Consumption license feature.
std::string toString() const
Helper method, compose license feature info into string.
int32_t floatingUsers() const
Getter for maximum number of simultaneous users for this feature.
ConsumptionPeriod consumptionPeriod() const
Returns period of time after which consumption is reset.
bool floatingIsExpired() const
Checks if floating license feature expired.
LicenseFeature(const std::string &code, const std::string &name, LSFeatureType type)
Constructs license feature with given code, name and type.
int32_t totalConsumption() const
Getter method for license feature current total consumption.
bool isFloating() const
Checks if feature is a floating feature.
tm floatingEndDateTimeUtc() const
Getter method for license feature expiry date in UTC.
int32_t localConsumption() const
Getter method for license feature local consumption.
tm expiryDateUtc() const
Getter method for license feature expiry date in UTC.
int32_t maxOverages() const
Returns maximum overage allowed for the license feature.
int32_t maxConsumption() const
Getter method for license feature maximum consumption.
tm expiryDate() const
Getter method for license feature expiry date.
const std::string & code() const
Getter method for license feature code.