| LicenseSpring C++ SDK 7.32.0 Easily add Software Licensing to your application

Loading...
Searching...
No Matches
LicenseHandler.h
Go to the documentation of this file.
1#ifndef LS_LICENSE_HANDLER_H
2#define LS_LICENSE_HANDLER_H
3
4#ifdef _MSC_VER
5#pragma once
6#endif
7
8#include "Configuration.h"
9#include "ProductDetails.h"
10#include "License.h"
11#include "LicenseStorage.h"
12#include "CryptoProvider.h"
13
14 namespace LicenseSpring
15{
16 class LicenseHandlerImpl;
17
26 class LS_API LicenseHandler
27 {
28 public:
29
36 static LicenseHandler& instance( bool globalInit = false );
37
41 LicenseHandler( Configuration::ptr_t config = nullptr, LicenseStorage::ptr_t storage = nullptr );
42 LicenseHandler( const LicenseHandler& ) = delete;
43 LicenseHandler& operator=( const LicenseHandler& ) = delete;
45 ~LicenseHandler();
46
48 void reconfigure( Configuration::ptr_t config, LicenseStorage::ptr_t storage = nullptr );
50 Configuration::ptr_t currentConfig() const;
51
53 const std::wstring& dataLocation() const;
55 void setDataLocation( const std::wstring& path );
57 std::wstring licenseFileName() const;
59 void setLicenseFileName( const std::wstring& name );
61 std::wstring licenseFilePath() const;
62
63 // ---------- Requests to the LicenseSpring backend ----------
64
66 bool isOnline() const;
68 ProductDetails::ptr_t getProductDetails( bool includeLatestVersion = false ) const;
70 const LicenseID& getTrialLicense( Customer::ptr_t user = nullptr,
71 const std::string& licensePolicy = std::string() ) const;
73 const LicenseID& getTrialLicense( const std::string& userEmail ) const;
75 const std::string& getSSOUrl( const std::string& accountCode = std::string(), bool useAuthCode = true );
77 const std::string& getAirGapActivationCode( const std::string& initializationCode, const std::string& licenseKey );
79 const std::string& getAirGapDeactivationCode( const std::string& initializationCode );
81 void activateAirGapLicense( const std::string& confirmationCode, const std::wstring& activationResponseFile, const std::string& licenseKey, uint32_t policyId );
83 void deactivateAirGapLicense( const std::string& confirmationCode );
85 std::vector<LicenseUser::ptr_t> getLicenseUsers( const Customer& customer );
87 std::vector<LicenseUser::ptr_t> getLicenseUsers( const std::string& customerEmail );
89 void activateLicense( const LicenseID& licenseID );
91 void activateLicense( const std::string& authData, const std::string& accountCode = std::string(), bool useAuthCode = true );
93 bool deactivateLicense();
95 bool changePassword( const std::string& password, const std::string& newPassword,
96 const std::string& user = std::string() );
98 void relinkLicense( DeviceIDAlgorithm deviceIdAlgorithm, const std::string& userPassword = std::string() );
100 InstallationFile::ptr_t checkLicense( const InstallFileFilter& filter = InstallFileFilter(), bool includeExpiredFeatures = false );
102 const std::vector<std::string>& getVersionList( const LicenseID& licenseID = LicenseID(),
103 const InstallFileFilter& filter = InstallFileFilter() );
105 InstallationFile::ptr_t getInstallFile( const LicenseID& licenseID = LicenseID(),
106 const std::string& version = std::string(),
107 const InstallFileFilter& filter = InstallFileFilter() );
109 void sendDeviceVariables();
111 std::vector<DeviceVariable> getDeviceVariables( bool getFromBackend = false );
113 void syncConsumption( int32_t requestOverage = -1 );
115 void syncFeatureConsumption( const std::string& featureCode = std::string() );
117 void registerFloatingLicense();
119 void borrowFloatingLicense( uint32_t hours, uint32_t days = 0 );
121 void borrowFloatingLicense( const std::string& borrowEndDateTime = std::string() );
123 void releaseFloatingLicense();
125 void registerFloatingFeature( const std::string& featureCode, bool addToWatchdog = true );
127 void releaseFloatingFeature( const std::string& featureCode );
128
129 // ------------------------------------------------------------
130
131 // -------- Local license management and helper methods -------
132 bool isInitialized() const;
133 bool isLicenseExists() const;
135 void updateConsumption( int32_t value = 1, bool saveLicense = true );
137 void updateFeatureConsumption( const std::string& featureCode, int32_t value = 1, bool saveLicense = true );
139 void checkLicenseLocal();
141 void clearLocalStorage(); // remove local license and also all license information from memory
142
144 void addUserData( const CustomField& data, bool saveLicense = true );
146 void removeUserData( const std::string& key = std::string(), bool saveLicense = true );
148 const std::vector<CustomField>& userData();
150 std::string userData( const std::string& key );
151
153 bool isAutoReleaseSet() const;
155 void setAutoRelease( bool autoRelease );
157 void setupLicenseWatchdog( LicenseWatchdogCallback callback, uint32_t timeout = 0 );
159 void resumeLicenseWatchdog();
161 void stopLicenseWatchdog();
163 void setupFeatureWatchdog( LicenseWatchdogCallback callback, uint32_t timeout = 0 );
165 void resumeFeatureWatchdog();
167 void stopFeatureWatchdog();
168
170 void addDeviceVariable( const std::string& name, const std::string& value, bool saveLicense = true );
172 void addDeviceVariable( const DeviceVariable& variable, bool saveLicense = true );
174 void addDeviceVariables( const std::vector<DeviceVariable>& variables );
176 DeviceVariable deviceVariable( const std::string& name ) const;
178 const std::string& deviceVariableValue( const std::string& name ) const;
179 // ------------------------------------------------------------
180
181 // ---------------- Offline license management ----------------
183 const std::wstring& createOfflineActivationFile( const LicenseID& licenseID,
184 const std::wstring& activationRequestFile = std::wstring() );
186 void activateLicenseOffline( const std::wstring& activationResponseFile = std::wstring() );
188 const std::wstring& deactivateLicenseOffline( const std::wstring& deactivationRequestFile = std::wstring() );
190 bool updateOffline( const std::wstring& path = std::wstring(), bool resetConsumption = false );
191 // ------------------------------------------------------------
192
193 // ----------------------- License data -----------------------
195 bool isLicenseValid() const;
197 bool isLicenseTrial() const;
199 bool isLicenseAirGapped() const;
201 bool isLicenseActive() const;
203 bool isLicenseEnabled() const;
205 bool isLicenseExpired() const;
207 bool isLicenseMaintenanceExpired() const;
209 bool isLicenseOfflineActivated() const;
211 bool isLicenseFloating() const;
213 bool isLicenseBorrowed() const;
215 bool isLicenseOveragesAllowed() const;
217 bool isLicenseUnlimitedConsumptionAllowed() const;
219 bool isLicenseVMAllowed() const;
221 bool isSubscriptionGracePeriodStarted() const;
223 bool isGracePeriodStarted() const;
225 tm gracePeriodEndDateTime() const;
227 tm gracePeriodEndDateTimeUTC() const;
229 int gracePeriodHoursRemaining() const;
231 uint32_t getLicenseTrialPeriod() const;
232
234 const LicenseID& getLicenseID() const;
236 const std::string& getLicenseKey() const;
238 const std::string& getLicenseUser() const;
240 const std::string& getLicenseStatusStr() const;
242 const std::string& getLicenseStartDate() const;
244 const std::string& getLicenseMetadata() const;
245
247 LicenseType getLicenseType() const;
248
250 tm getLicenseExpiryDate() const;
252 tm getLicenseExpiryDateUtc() const;
254 tm getLicenseMaintenancePeriod() const;
256 tm getLicenseMaintenancePeriodUtc() const;
258 tm getLicenseLastCheckDate() const;
260 tm getLicenseLastCheckDateUtc() const;
262 tm getLicenseFloatingEndDateTime() const;
264 tm getLicenseFloatingEndDateTimeUtc() const;
266 int getDaysRemaining() const;
268 int getMaintenanceDaysRemaining() const;
270 int getDaysPassedSinceLastCheck() const;
271
273 uint32_t getSubscriptionLicenseGracePeriod() const;
275 tm validityWithGracePeriod() const;
277 tm validityWithGracePeriodUtc() const;
278
280 const Customer& getLicenseOwner() const;
282 LicenseUser::ptr_t getLicenseUserPtr() const;
283
284 bool hasLicenseFeatures() const;
286 const LicenseFeature& getLicenseFeature( const std::string& featureCode ) const;
288 const std::vector<LicenseFeature>& getLicenseFeatures() const;
289
290 bool hasLicenseCustomFields() const;
292 const std::vector<CustomField>& getLicenseCustomFields() const;
293
295 uint32_t getLicenseTimesActivated() const;
297 uint32_t getLicenseMaxActivations() const;
299 uint32_t getLicenseTransferCount() const;
301 int32_t getLicenseTransferLimit() const;
303 bool isDeviceTransferAllowed() const;
305 bool isDeviceTransferLimited() const;
306
308 uint32_t getLicensePolicyId() const;
309
310 // Meaningful only for Consumption license
312 int32_t getLicenseTotalConsumption() const;
314 int32_t getLicenseMaxConsumption() const;
316 int32_t getLicenseMaxOverages() const;
317 bool isResetLicenseConsumptionEnabled() const;
318 ConsumptionPeriod getLicenseConsumptionPeriod() const;
319
320 // Meaningful only for Floating license
322 uint32_t getLicenseFloatingTimeout() const;
324 uint32_t getLicenseFloatingInUseCount() const;
326 uint32_t getLicenseMaxFloatingUsers() const;
328 uint32_t getMaxBorrowTime() const;
329 // ------------------------------------------------------------
330
331 // ---------------------- Error handling ----------------------
332 void enableExceptions( bool enable ); // By default this class does not throw exceptions
333 bool isExceptionsEnabled() const;
334 bool wasError() const;
335 LSErrorCode getLastError() const;
336 const std::string& getLastErrorMsg() const;
337 bool isInitializationError() const;
338 bool isInternalServerError() const;
339 bool isNetworkTimeoutError() const;
340 bool isNoInternetError() const;
341 bool isActivationFailed() const;
342 bool isLicenseExpiredError() const;
343 bool isLicenseNotFoundError() const;
344 bool isLicenseStateError() const;
345 bool isHardwareIDError() const;
346 bool isGeneralError() const;
347 bool isLicenseFeatureError() const;
348 bool canIgnoreError() const; // No Internet, network timeout and server errors can be ignored
349 // ------------------------------------------------------------
350
351 private:
352 LicenseHandlerImpl* m_impl;
353 };
354
355} // namespace LicenseSpirng
356
357#endif // LS_LICENSE_HANDLER_H
LS_API
#define LS_API
Macros that expands to dllexport, dllimport or nothing on non Windows platforms or in case of static ...
Definition APIDef.h:22
Configuration.h
CryptoProvider.h
License.h
LicenseStorage.h
DeviceIDAlgorithm
DeviceIDAlgorithm
Type of Device ID algorithm used by the SDK.
Definition PODTypes.h:104
LSErrorCode
LSErrorCode
LicenseSpring Error codes enum.
Definition PODTypes.h:48
ProductDetails.h
LicenseSpring::Configuration::ptr_t
std::shared_ptr< Configuration > ptr_t
Definition Configuration.h:20
LicenseSpring::ConsumptionPeriod
Class used for encapsulating LSConsumptionPeriod and converting cosumption period to/from string.
Definition ConsumptionPeriod.h:11
LicenseSpring::CustomField
Class for storing key-value data field.
Definition CustomField.h:18
LicenseSpring::Customer
Class that encapsulates information about a customer.
Definition Customer.h:18
LicenseSpring::Customer::ptr_t
std::shared_ptr< Customer > ptr_t
Definition Customer.h:20
LicenseSpring::DeviceVariable
Class for storing key-value device variable.
Definition DeviceVariable.h:19
LicenseSpring::InstallationFile::ptr_t
std::shared_ptr< InstallationFile > ptr_t
Definition InstallationFile.h:54
LicenseSpring::LicenseFeature
Class that encapsulates information about license feature.
Definition LicenseFeature.h:21
LicenseSpring::LicenseHandler
This class encapsulates functionality of the both LicenseManager and the License. .
Definition LicenseHandler.h:27
LicenseSpring::LicenseHandler::gracePeriodEndDateTime
tm gracePeriodEndDateTime() const
LicenseSpring::LicenseHandler::isInternalServerError
bool isInternalServerError() const
LicenseSpring::LicenseHandler::removeUserData
void removeUserData(const std::string &key=std::string(), bool saveLicense=true)
LicenseSpring::LicenseHandler::getAirGapDeactivationCode
const std::string & getAirGapDeactivationCode(const std::string &initializationCode)
LicenseSpring::LicenseHandler::isLicenseVMAllowed
bool isLicenseVMAllowed() const
LicenseSpring::LicenseHandler::getLicenseFloatingEndDateTimeUtc
tm getLicenseFloatingEndDateTimeUtc() const
LicenseSpring::LicenseHandler::getLastErrorMsg
const std::string & getLastErrorMsg() const
LicenseSpring::LicenseHandler::getLicenseTransferLimit
int32_t getLicenseTransferLimit() const
LicenseSpring::LicenseHandler::syncConsumption
void syncConsumption(int32_t requestOverage=-1)
LicenseSpring::LicenseHandler::updateOffline
bool updateOffline(const std::wstring &path=std::wstring(), bool resetConsumption=false)
LicenseSpring::LicenseHandler::isInitializationError
bool isInitializationError() const
LicenseSpring::LicenseHandler::registerFloatingLicense
void registerFloatingLicense()
LicenseSpring::LicenseHandler::releaseFloatingLicense
void releaseFloatingLicense()
LicenseSpring::LicenseHandler::syncFeatureConsumption
void syncFeatureConsumption(const std::string &featureCode=std::string())
LicenseSpring::LicenseHandler::isLicenseStateError
bool isLicenseStateError() const
LicenseSpring::LicenseHandler::~LicenseHandler
~LicenseHandler()
Destructor for LicenseHandler.
LicenseSpring::LicenseHandler::checkLicense
InstallationFile::ptr_t checkLicense(const InstallFileFilter &filter=InstallFileFilter(), bool includeExpiredFeatures=false)
LicenseSpring::LicenseHandler::getInstallFile
InstallationFile::ptr_t getInstallFile(const LicenseID &licenseID=LicenseID(), const std::string &version=std::string(), const InstallFileFilter &filter=InstallFileFilter())
LicenseSpring::LicenseHandler::gracePeriodEndDateTimeUTC
tm gracePeriodEndDateTimeUTC() const
LicenseSpring::LicenseHandler::userData
const std::vector< CustomField > & userData()
LicenseSpring::LicenseHandler::getDeviceVariables
std::vector< DeviceVariable > getDeviceVariables(bool getFromBackend=false)
LicenseSpring::LicenseHandler::deactivateLicense
bool deactivateLicense()
LicenseSpring::LicenseHandler::getDaysRemaining
int getDaysRemaining() const
LicenseSpring::LicenseHandler::reconfigure
void reconfigure(Configuration::ptr_t config, LicenseStorage::ptr_t storage=nullptr)
LicenseSpring::LicenseHandler::getLicenseMaxConsumption
int32_t getLicenseMaxConsumption() const
LicenseSpring::LicenseHandler::getLicenseMetadata
const std::string & getLicenseMetadata() const
LicenseSpring::LicenseHandler::getLicenseMaxOverages
int32_t getLicenseMaxOverages() const
LicenseSpring::LicenseHandler::validityWithGracePeriod
tm validityWithGracePeriod() const
LicenseSpring::LicenseHandler::getLicenseStartDate
const std::string & getLicenseStartDate() const
LicenseSpring::LicenseHandler::canIgnoreError
bool canIgnoreError() const
LicenseSpring::LicenseHandler::getSSOUrl
const std::string & getSSOUrl(const std::string &accountCode=std::string(), bool useAuthCode=true)
LicenseSpring::LicenseHandler::getLicenseMaxActivations
uint32_t getLicenseMaxActivations() const
LicenseSpring::LicenseHandler::instance
static LicenseHandler & instance(bool globalInit=false)
Get singleton object of LicenseHandler.
LicenseSpring::LicenseHandler::getLicenseTotalConsumption
int32_t getLicenseTotalConsumption() const
LicenseSpring::LicenseHandler::isDeviceTransferLimited
bool isDeviceTransferLimited() const
LicenseSpring::LicenseHandler::userData
std::string userData(const std::string &key)
LicenseSpring::LicenseHandler::licenseFileName
std::wstring licenseFileName() const
LicenseSpring::LicenseHandler::licenseFilePath
std::wstring licenseFilePath() const
LicenseSpring::LicenseHandler::setAutoRelease
void setAutoRelease(bool autoRelease)
LicenseSpring::LicenseHandler::isInitialized
bool isInitialized() const
LicenseSpring::LicenseHandler::isExceptionsEnabled
bool isExceptionsEnabled() const
LicenseSpring::LicenseHandler::releaseFloatingFeature
void releaseFloatingFeature(const std::string &featureCode)
LicenseSpring::LicenseHandler::activateLicense
void activateLicense(const LicenseID &licenseID)
LicenseSpring::LicenseHandler::changePassword
bool changePassword(const std::string &password, const std::string &newPassword, const std::string &user=std::string())
LicenseSpring::LicenseHandler::getTrialLicense
const LicenseID & getTrialLicense(const std::string &userEmail) const
LicenseSpring::LicenseHandler::isLicenseValid
bool isLicenseValid() const
LicenseSpring::LicenseHandler::isAutoReleaseSet
bool isAutoReleaseSet() const
LicenseSpring::LicenseHandler::checkLicenseLocal
void checkLicenseLocal()
LicenseSpring::LicenseHandler::getLicenseLastCheckDateUtc
tm getLicenseLastCheckDateUtc() const
LicenseSpring::LicenseHandler::deactivateLicenseOffline
const std::wstring & deactivateLicenseOffline(const std::wstring &deactivationRequestFile=std::wstring())
LicenseSpring::LicenseHandler::isLicenseUnlimitedConsumptionAllowed
bool isLicenseUnlimitedConsumptionAllowed() const
LicenseSpring::LicenseHandler::getLicenseMaintenancePeriodUtc
tm getLicenseMaintenancePeriodUtc() const
LicenseSpring::LicenseHandler::relinkLicense
void relinkLicense(DeviceIDAlgorithm deviceIdAlgorithm, const std::string &userPassword=std::string())
LicenseSpring::LicenseHandler::getLicenseUserPtr
LicenseUser::ptr_t getLicenseUserPtr() const
LicenseSpring::LicenseHandler::getLicenseFloatingEndDateTime
tm getLicenseFloatingEndDateTime() const
LicenseSpring::LicenseHandler::getLastError
LSErrorCode getLastError() const
LicenseSpring::LicenseHandler::updateFeatureConsumption
void updateFeatureConsumption(const std::string &featureCode, int32_t value=1, bool saveLicense=true)
LicenseSpring::LicenseHandler::hasLicenseFeatures
bool hasLicenseFeatures() const
LicenseSpring::LicenseHandler::getLicenseTimesActivated
uint32_t getLicenseTimesActivated() const
LicenseSpring::LicenseHandler::isLicenseActive
bool isLicenseActive() const
LicenseSpring::LicenseHandler::isLicenseExpired
bool isLicenseExpired() const
LicenseSpring::LicenseHandler::getLicenseUsers
std::vector< LicenseUser::ptr_t > getLicenseUsers(const Customer &customer)
LicenseSpring::LicenseHandler::setupFeatureWatchdog
void setupFeatureWatchdog(LicenseWatchdogCallback callback, uint32_t timeout=0)
LicenseSpring::LicenseHandler::isResetLicenseConsumptionEnabled
bool isResetLicenseConsumptionEnabled() const
LicenseSpring::LicenseHandler::setLicenseFileName
void setLicenseFileName(const std::wstring &name)
LicenseSpring::LicenseHandler::getVersionList
const std::vector< std::string > & getVersionList(const LicenseID &licenseID=LicenseID(), const InstallFileFilter &filter=InstallFileFilter())
LicenseSpring::LicenseHandler::activateAirGapLicense
void activateAirGapLicense(const std::string &confirmationCode, const std::wstring &activationResponseFile, const std::string &licenseKey, uint32_t policyId)
LicenseSpring::LicenseHandler::getLicenseExpiryDate
tm getLicenseExpiryDate() const
LicenseSpring::LicenseHandler::getLicenseStatusStr
const std::string & getLicenseStatusStr() const
LicenseSpring::LicenseHandler::enableExceptions
void enableExceptions(bool enable)
LicenseSpring::LicenseHandler::addUserData
void addUserData(const CustomField &data, bool saveLicense=true)
LicenseSpring::LicenseHandler::getLicenseTransferCount
uint32_t getLicenseTransferCount() const
LicenseSpring::LicenseHandler::registerFloatingFeature
void registerFloatingFeature(const std::string &featureCode, bool addToWatchdog=true)
LicenseSpring::LicenseHandler::getSubscriptionLicenseGracePeriod
uint32_t getSubscriptionLicenseGracePeriod() const
LicenseSpring::LicenseHandler::isLicenseBorrowed
bool isLicenseBorrowed() const
LicenseSpring::LicenseHandler::setupLicenseWatchdog
void setupLicenseWatchdog(LicenseWatchdogCallback callback, uint32_t timeout=0)
LicenseSpring::LicenseHandler::activateLicense
void activateLicense(const std::string &authData, const std::string &accountCode=std::string(), bool useAuthCode=true)
LicenseSpring::LicenseHandler::hasLicenseCustomFields
bool hasLicenseCustomFields() const
LicenseSpring::LicenseHandler::borrowFloatingLicense
void borrowFloatingLicense(uint32_t hours, uint32_t days=0)
LicenseSpring::LicenseHandler::clearLocalStorage
void clearLocalStorage()
LicenseSpring::LicenseHandler::isDeviceTransferAllowed
bool isDeviceTransferAllowed() const
LicenseSpring::LicenseHandler::isNetworkTimeoutError
bool isNetworkTimeoutError() const
LicenseSpring::LicenseHandler::resumeFeatureWatchdog
void resumeFeatureWatchdog()
LicenseSpring::LicenseHandler::getProductDetails
ProductDetails::ptr_t getProductDetails(bool includeLatestVersion=false) const
LicenseSpring::LicenseHandler::isLicenseOveragesAllowed
bool isLicenseOveragesAllowed() const
LicenseSpring::LicenseHandler::stopLicenseWatchdog
void stopLicenseWatchdog()
LicenseSpring::LicenseHandler::getAirGapActivationCode
const std::string & getAirGapActivationCode(const std::string &initializationCode, const std::string &licenseKey)
LicenseSpring::LicenseHandler::LicenseHandler
LicenseHandler(const LicenseHandler &)=delete
LicenseSpring::LicenseHandler::isNoInternetError
bool isNoInternetError() const
LicenseSpring::LicenseHandler::getLicenseFloatingInUseCount
uint32_t getLicenseFloatingInUseCount() const
LicenseSpring::LicenseHandler::gracePeriodHoursRemaining
int gracePeriodHoursRemaining() const
LicenseSpring::LicenseHandler::isLicenseAirGapped
bool isLicenseAirGapped() const
LicenseSpring::LicenseHandler::isGeneralError
bool isGeneralError() const
LicenseSpring::LicenseHandler::addDeviceVariables
void addDeviceVariables(const std::vector< DeviceVariable > &variables)
LicenseSpring::LicenseHandler::deviceVariableValue
const std::string & deviceVariableValue(const std::string &name) const
LicenseSpring::LicenseHandler::getLicenseOwner
const Customer & getLicenseOwner() const
LicenseSpring::LicenseHandler::getLicenseFeatures
const std::vector< LicenseFeature > & getLicenseFeatures() const
LicenseSpring::LicenseHandler::getLicenseType
LicenseType getLicenseType() const
LicenseSpring::LicenseHandler::currentConfig
Configuration::ptr_t currentConfig() const
LicenseSpring::LicenseHandler::activateLicenseOffline
void activateLicenseOffline(const std::wstring &activationResponseFile=std::wstring())
LicenseSpring::LicenseHandler::getLicenseConsumptionPeriod
ConsumptionPeriod getLicenseConsumptionPeriod() const
LicenseSpring::LicenseHandler::isLicenseFloating
bool isLicenseFloating() const
LicenseSpring::LicenseHandler::isActivationFailed
bool isActivationFailed() const
LicenseSpring::LicenseHandler::deviceVariable
DeviceVariable deviceVariable(const std::string &name) const
LicenseSpring::LicenseHandler::getLicenseUser
const std::string & getLicenseUser() const
LicenseSpring::LicenseHandler::getLicenseMaintenancePeriod
tm getLicenseMaintenancePeriod() const
LicenseSpring::LicenseHandler::sendDeviceVariables
void sendDeviceVariables()
LicenseSpring::LicenseHandler::getTrialLicense
const LicenseID & getTrialLicense(Customer::ptr_t user=nullptr, const std::string &licensePolicy=std::string()) const
LicenseSpring::LicenseHandler::LicenseHandler
LicenseHandler(Configuration::ptr_t config=nullptr, LicenseStorage::ptr_t storage=nullptr)
Constructor for LicenseHandler.
LicenseSpring::LicenseHandler::resumeLicenseWatchdog
void resumeLicenseWatchdog()
LicenseSpring::LicenseHandler::isLicenseExpiredError
bool isLicenseExpiredError() const
LicenseSpring::LicenseHandler::getLicenseMaxFloatingUsers
uint32_t getLicenseMaxFloatingUsers() const
LicenseSpring::LicenseHandler::getLicenseFeature
const LicenseFeature & getLicenseFeature(const std::string &featureCode) const
LicenseSpring::LicenseHandler::getMaintenanceDaysRemaining
int getMaintenanceDaysRemaining() const
LicenseSpring::LicenseHandler::isLicenseNotFoundError
bool isLicenseNotFoundError() const
LicenseSpring::LicenseHandler::validityWithGracePeriodUtc
tm validityWithGracePeriodUtc() const
LicenseSpring::LicenseHandler::isLicenseFeatureError
bool isLicenseFeatureError() const
LicenseSpring::LicenseHandler::createOfflineActivationFile
const std::wstring & createOfflineActivationFile(const LicenseID &licenseID, const std::wstring &activationRequestFile=std::wstring())
LicenseSpring::LicenseHandler::isLicenseOfflineActivated
bool isLicenseOfflineActivated() const
LicenseSpring::LicenseHandler::getLicenseKey
const std::string & getLicenseKey() const
LicenseSpring::LicenseHandler::dataLocation
const std::wstring & dataLocation() const
LicenseSpring::LicenseHandler::deactivateAirGapLicense
void deactivateAirGapLicense(const std::string &confirmationCode)
LicenseSpring::LicenseHandler::operator=
LicenseHandler & operator=(const LicenseHandler &)=delete
LicenseSpring::LicenseHandler::setDataLocation
void setDataLocation(const std::wstring &path)
LicenseSpring::LicenseHandler::getLicenseLastCheckDate
tm getLicenseLastCheckDate() const
LicenseSpring::LicenseHandler::getDaysPassedSinceLastCheck
int getDaysPassedSinceLastCheck() const
LicenseSpring::LicenseHandler::getLicensePolicyId
uint32_t getLicensePolicyId() const
LicenseSpring::LicenseHandler::isLicenseTrial
bool isLicenseTrial() const
LicenseSpring::LicenseHandler::isLicenseMaintenanceExpired
bool isLicenseMaintenanceExpired() const
LicenseSpring::LicenseHandler::getLicenseExpiryDateUtc
tm getLicenseExpiryDateUtc() const
LicenseSpring::LicenseHandler::getLicenseFloatingTimeout
uint32_t getLicenseFloatingTimeout() const
LicenseSpring::LicenseHandler::isHardwareIDError
bool isHardwareIDError() const
LicenseSpring::LicenseHandler::getMaxBorrowTime
uint32_t getMaxBorrowTime() const
LicenseSpring::LicenseHandler::isGracePeriodStarted
bool isGracePeriodStarted() const
LicenseSpring::LicenseHandler::getLicenseTrialPeriod
uint32_t getLicenseTrialPeriod() const
LicenseSpring::LicenseHandler::updateConsumption
void updateConsumption(int32_t value=1, bool saveLicense=true)
LicenseSpring::LicenseHandler::getLicenseUsers
std::vector< LicenseUser::ptr_t > getLicenseUsers(const std::string &customerEmail)
LicenseSpring::LicenseHandler::isOnline
bool isOnline() const
LicenseSpring::LicenseHandler::addDeviceVariable
void addDeviceVariable(const std::string &name, const std::string &value, bool saveLicense=true)
LicenseSpring::LicenseHandler::isLicenseExists
bool isLicenseExists() const
LicenseSpring::LicenseHandler::getLicenseCustomFields
const std::vector< CustomField > & getLicenseCustomFields() const
LicenseSpring::LicenseHandler::isSubscriptionGracePeriodStarted
bool isSubscriptionGracePeriodStarted() const
LicenseSpring::LicenseHandler::wasError
bool wasError() const
LicenseSpring::LicenseHandler::getLicenseID
const LicenseID & getLicenseID() const
LicenseSpring::LicenseHandler::isLicenseEnabled
bool isLicenseEnabled() const
LicenseSpring::LicenseHandler::stopFeatureWatchdog
void stopFeatureWatchdog()
LicenseSpring::LicenseHandler::addDeviceVariable
void addDeviceVariable(const DeviceVariable &variable, bool saveLicense=true)
LicenseSpring::LicenseHandler::borrowFloatingLicense
void borrowFloatingLicense(const std::string &borrowEndDateTime=std::string())
LicenseSpring::LicenseID
Class that represents License identifier.
Definition LicenseID.h:19
LicenseSpring::LicenseStorage::ptr_t
std::shared_ptr< LicenseStorage > ptr_t
Definition LicenseStorage.h:19
LicenseSpring::LicenseType
Class used for encapsulating the type of license, comparing types of licenses, and converting them to...
Definition LicenseType.h:19
LicenseSpring::LicenseUser::ptr_t
std::shared_ptr< LicenseUser > ptr_t
Definition LicenseUser.h:21
LicenseSpring::ProductDetails::ptr_t
std::shared_ptr< ProductDetails > ptr_t
Definition ProductDetails.h:23
LicenseSpring
Definition BaseManager.h:16
LicenseSpring::encrypt_character
constexpr Char encrypt_character(const Char character, int index)
Definition EncryptString.h:44
LicenseSpring::LicenseWatchdogCallback
std::function< void(const LicenseSpringException &ex)> LicenseWatchdogCallback
Callback function which being called in case of error in background thread (watchdog thread).
Definition License.h:29
LicenseSpring::InstallFileFilter
Helper struct for filtering installation files by environment and channel.
Definition InstallationFile.h:19