|
| LicenseHandler (Configuration::ptr_t config=nullptr, LicenseStorage::ptr_t storage=nullptr) |
| Constructor for LicenseHandler.
|
|
| LicenseHandler (const LicenseHandler &)=delete |
|
LicenseHandler & | operator= (const LicenseHandler &)=delete |
|
| ~LicenseHandler () |
| Destructor for LicenseHandler.
|
|
void | reconfigure (Configuration::ptr_t config, LicenseStorage::ptr_t storage=nullptr) |
|
Configuration::ptr_t | currentConfig () const |
|
const std::wstring & | dataLocation () const |
|
void | setDataLocation (const std::wstring &path) |
|
std::wstring | licenseFileName () const |
|
void | setLicenseFileName (const std::wstring &name) |
|
std::wstring | licenseFilePath () const |
|
bool | isOnline () const |
|
ProductDetails::ptr_t | getProductDetails (bool includeLatestVersion=false) const |
|
const LicenseID & | getTrialLicense (Customer::ptr_t user=nullptr, const std::string &licensePolicy=std::string()) const |
|
const LicenseID & | getTrialLicense (const std::string &userEmail) const |
|
const std::string & | getSSOUrl (const std::string &accountCode=std::string(), bool useAuthCode=true) |
|
const std::string & | getAirGapActivationCode (const std::string &initializationCode, const std::string &licenseKey) |
|
const std::string & | getAirGapDeactivationCode (const std::string &initializationCode) |
|
void | activateAirGapLicense (const std::string &confirmationCode, const std::wstring &activationResponseFile, const std::string &licenseKey, uint32_t policyId) |
|
void | deactivateAirGapLicense (const std::string &confirmationCode) |
|
std::vector< LicenseUser::ptr_t > | getLicenseUsers (const Customer &customer) |
|
std::vector< LicenseUser::ptr_t > | getLicenseUsers (const std::string &customerEmail) |
|
void | activateLicense (const LicenseID &licenseID) |
|
void | activateLicense (const std::string &authData, const std::string &accountCode=std::string(), bool useAuthCode=true) |
|
bool | deactivateLicense () |
|
bool | changePassword (const std::string &password, const std::string &newPassword, const std::string &user=std::string()) |
|
void | relinkLicense (DeviceIDAlgorithm deviceIdAlgorithm, const std::string &userPassword=std::string()) |
|
InstallationFile::ptr_t | checkLicense (const InstallFileFilter &filter=InstallFileFilter(), bool includeExpiredFeatures=false) |
|
const std::vector< std::string > & | getVersionList (const LicenseID &licenseID=LicenseID(), const InstallFileFilter &filter=InstallFileFilter()) |
|
InstallationFile::ptr_t | getInstallFile (const LicenseID &licenseID=LicenseID(), const std::string &version=std::string(), const InstallFileFilter &filter=InstallFileFilter()) |
|
void | sendDeviceVariables () |
|
std::vector< DeviceVariable > | getDeviceVariables (bool getFromBackend=false) |
|
void | syncConsumption (int32_t requestOverage=-1) |
|
void | syncFeatureConsumption (const std::string &featureCode=std::string()) |
|
void | registerFloatingLicense () |
|
void | borrowFloatingLicense (uint32_t hours, uint32_t days=0) |
|
void | borrowFloatingLicense (const std::string &borrowEndDateTime=std::string()) |
|
void | releaseFloatingLicense () |
|
void | registerFloatingFeature (const std::string &featureCode, bool addToWatchdog=true) |
|
void | releaseFloatingFeature (const std::string &featureCode) |
|
bool | isInitialized () const |
|
bool | isLicenseExists () const |
|
void | updateConsumption (int32_t value=1, bool saveLicense=true) |
|
void | updateFeatureConsumption (const std::string &featureCode, int32_t value=1, bool saveLicense=true) |
|
void | checkLicenseLocal () |
|
void | clearLocalStorage () |
|
void | addUserData (const CustomField &data, bool saveLicense=true) |
|
void | removeUserData (const std::string &key=std::string(), bool saveLicense=true) |
|
const std::vector< CustomField > & | userData () |
|
std::string | userData (const std::string &key) |
|
bool | isAutoReleaseSet () const |
|
void | setAutoRelease (bool autoRelease) |
|
void | setupLicenseWatchdog (LicenseWatchdogCallback callback, uint32_t timeout=0) |
|
void | resumeLicenseWatchdog () |
|
void | stopLicenseWatchdog () |
|
void | setupFeatureWatchdog (LicenseWatchdogCallback callback, uint32_t timeout=0) |
|
void | resumeFeatureWatchdog () |
|
void | stopFeatureWatchdog () |
|
void | addDeviceVariable (const std::string &name, const std::string &value, bool saveLicense=true) |
|
void | addDeviceVariable (const DeviceVariable &variable, bool saveLicense=true) |
|
void | addDeviceVariables (const std::vector< DeviceVariable > &variables) |
|
DeviceVariable | deviceVariable (const std::string &name) const |
|
const std::string & | deviceVariableValue (const std::string &name) const |
|
const std::wstring & | createOfflineActivationFile (const LicenseID &licenseID, const std::wstring &activationRequestFile=std::wstring()) |
|
void | activateLicenseOffline (const std::wstring &activationResponseFile=std::wstring()) |
|
const std::wstring & | deactivateLicenseOffline (const std::wstring &deactivationRequestFile=std::wstring()) |
|
bool | updateOffline (const std::wstring &path=std::wstring(), bool resetConsumption=false) |
|
bool | isLicenseValid () const |
|
bool | isLicenseTrial () const |
|
bool | isLicenseAirGapped () const |
|
bool | isLicenseActive () const |
|
bool | isLicenseEnabled () const |
|
bool | isLicenseExpired () const |
|
bool | isLicenseMaintenanceExpired () const |
|
bool | isLicenseOfflineActivated () const |
|
bool | isLicenseFloating () const |
|
bool | isLicenseBorrowed () const |
|
bool | isLicenseOveragesAllowed () const |
|
bool | isLicenseUnlimitedConsumptionAllowed () const |
|
bool | isLicenseVMAllowed () const |
|
bool | isSubscriptionGracePeriodStarted () const |
|
bool | isGracePeriodStarted () const |
|
tm | gracePeriodEndDateTime () const |
|
tm | gracePeriodEndDateTimeUTC () const |
|
int | gracePeriodHoursRemaining () const |
|
uint32_t | getLicenseTrialPeriod () const |
|
const LicenseID & | getLicenseID () const |
|
const std::string & | getLicenseKey () const |
|
const std::string & | getLicenseUser () const |
|
const std::string & | getLicenseStatusStr () const |
|
const std::string & | getLicenseStartDate () const |
|
const std::string & | getLicenseMetadata () const |
|
LicenseType | getLicenseType () const |
|
tm | getLicenseExpiryDate () const |
|
tm | getLicenseExpiryDateUtc () const |
|
tm | getLicenseMaintenancePeriod () const |
|
tm | getLicenseMaintenancePeriodUtc () const |
|
tm | getLicenseLastCheckDate () const |
|
tm | getLicenseLastCheckDateUtc () const |
|
tm | getLicenseFloatingEndDateTime () const |
|
tm | getLicenseFloatingEndDateTimeUtc () const |
|
int | getDaysRemaining () const |
|
int | getMaintenanceDaysRemaining () const |
|
int | getDaysPassedSinceLastCheck () const |
|
uint32_t | getSubscriptionLicenseGracePeriod () const |
|
tm | validityWithGracePeriod () const |
|
tm | validityWithGracePeriodUtc () const |
|
const Customer & | getLicenseOwner () const |
|
LicenseUser::ptr_t | getLicenseUserPtr () const |
|
bool | hasLicenseFeatures () const |
|
const LicenseFeature & | getLicenseFeature (const std::string &featureCode) const |
|
const std::vector< LicenseFeature > & | getLicenseFeatures () const |
|
bool | hasLicenseCustomFields () const |
|
const std::vector< CustomField > & | getLicenseCustomFields () const |
|
uint32_t | getLicenseTimesActivated () const |
|
uint32_t | getLicenseMaxActivations () const |
|
uint32_t | getLicenseTransferCount () const |
|
int32_t | getLicenseTransferLimit () const |
|
bool | isDeviceTransferAllowed () const |
|
bool | isDeviceTransferLimited () const |
|
uint32_t | getLicensePolicyId () const |
|
int32_t | getLicenseTotalConsumption () const |
|
int32_t | getLicenseMaxConsumption () const |
|
int32_t | getLicenseMaxOverages () const |
|
bool | isResetLicenseConsumptionEnabled () const |
|
ConsumptionPeriod | getLicenseConsumptionPeriod () const |
|
uint32_t | getLicenseFloatingTimeout () const |
|
uint32_t | getLicenseFloatingInUseCount () const |
|
uint32_t | getLicenseMaxFloatingUsers () const |
|
uint32_t | getMaxBorrowTime () const |
|
void | enableExceptions (bool enable) |
|
bool | isExceptionsEnabled () const |
|
bool | wasError () const |
|
LSErrorCode | getLastError () const |
|
const std::string & | getLastErrorMsg () const |
|
bool | isInitializationError () const |
|
bool | isInternalServerError () const |
|
bool | isNetworkTimeoutError () const |
|
bool | isNoInternetError () const |
|
bool | isActivationFailed () const |
|
bool | isLicenseExpiredError () const |
|
bool | isLicenseNotFoundError () const |
|
bool | isLicenseStateError () const |
|
bool | isHardwareIDError () const |
|
bool | isGeneralError () const |
|
bool | isLicenseFeatureError () const |
|
bool | canIgnoreError () const |
|
This class encapsulates functionality of the both LicenseManager and the License.
.
By default it is exceptions free, but you can enable exceptions.
It's up to you whether to use LicenseManager and License directly or use this class.
This class also useful for Unreal Engine clients.
Because it is free of memory access violation problems due to runtime conflicts with UE.
- See also
- License and LicenseManager for more details on these methods.
Definition at line 26 of file LicenseHandler.h.