1#ifndef LS_LICENSE_MANAGER_H
2#define LS_LICENSE_MANAGER_H
7#pragma warning( disable : 4251 )
20 using ptr_t = std::shared_ptr<LicenseManager>;
83 std::string
getSSOUrl(
const std::string& accountCode = std::string(),
bool useAuthCode =
true );
139 const std::vector<DeviceVariable>& deviceVariables );
162 bool useAuthCode =
true );
197 bool changePassword(
const std::string& user,
const std::string& password,
const std::string& newPassword );
229 const std::string& version = std::string(),
238 const std::wstring& activationRequestFile = std::wstring() );
247 const std::vector<DeviceVariable>& deviceVariables,
248 const std::wstring& activationRequestFile = std::wstring() );
257 bool isOnline(
bool throwExceptions =
false )
const;
282 std::vector<UserLicensesData::ptr_t>
getUserLicenses(
const std::string& username,
const std::string& password );
288#pragma warning( pop )
#define LS_API
Macros that expands to dllexport, dllimport or nothing on non Windows platforms or in case of static ...
DeviceIDAlgorithm
Type of Device ID algorithm used by the SDK.
Base class for license management.
std::shared_ptr< Configuration > ptr_t
Class that encapsulates information about a customer.
std::shared_ptr< Customer > ptr_t
std::shared_ptr< InstallationFile > ptr_t
std::shared_ptr< License > ptr_t
Class that represents License identifier.
Class for performing basic requests to LicenseSpring backend and managing licenses.
std::wstring createOfflineActivationFile(const LicenseID &licenseID, const std::vector< DeviceVariable > &deviceVariables, const std::wstring &activationRequestFile=std::wstring())
Creates offline activation file request.
std::shared_ptr< LicenseManager > ptr_t
std::string getSSOUrl(const std::string &accountCode=std::string(), bool useAuthCode=true)
Get URL for Single sign-on license activation.
std::string getAirGapActivationCode(const std::string &initializationCode, const std::string &licenseKey)
Get air gap Activation code.
std::vector< LicenseUser::ptr_t > getLicenseUsers(const std::string &customerEmail)
Overloaded method. See notes above. Get license users list by given customer email.
std::vector< UserLicensesData::ptr_t > getUserLicenses(const std::string &username, const std::string &password)
Retrieves all licenses for the provided username and password and the product this LicenseManager is ...
std::vector< std::string > getVersionList(const LicenseID &licenseID, const InstallFileFilter &filter=InstallFileFilter())
Get app version list available for given license.
const License::ptr_t activateLicenseOffline(const std::wstring &activationResponseFile=std::wstring())
Activate license offline with provided activation file.
bool isOnline(bool throwExceptions=false) const
Helper method, it checks connection to the LicenseSpring backend.
static LicenseManager::ptr_t create(Configuration::ptr_t config, LicenseStorage::ptr_t storage=nullptr)
Creates LicenseManager object and initialize it with given configuration.
const License::ptr_t relinkLicense(DeviceIDAlgorithm deviceIdAlgorithm, const std::string &userPassword="")
This method helps upgrade to new device id algorithm. It deactivates current license with old device ...
LicenseManager(Configuration::ptr_t config, LicenseStorage::ptr_t storage=nullptr)
Construct LicenseManager object and initialize it with given configuration.
LicenseID getTrialLicense(Customer::ptr_t user=nullptr, const std::string &licensePolicy=std::string())
Request trial license from LicenseSpring backend.
bool changePassword(const std::string &user, const std::string &password, const std::string &newPassword)
Change user password, meaningful only for user-based products.
const License::ptr_t activateLicense(const LicenseID &licenseID)
Activate license with given LicenseID.
LicenseID getTrialLicense(const std::string &userEmail)
Request trial license from LicenseSpring backend.
const License::ptr_t activateLicense(const LicenseID &licenseID, const std::vector< DeviceVariable > &deviceVariables)
Activate license with given LicenseID and device variables.
~LicenseManager() override
Destroy license manager and its configuration if there is no more references to the configuration.
std::wstring createOfflineActivationFile(const LicenseID &licenseID, const std::wstring &activationRequestFile=std::wstring())
Creates offline activation file request.
std::vector< LicenseUser::ptr_t > getLicenseUsers(const Customer &customer)
Get license users list by given customer (license owner).
InstallationFile::ptr_t getInstallationFile(const LicenseID &licenseID, const std::string &version=std::string(), const InstallFileFilter &filter=InstallFileFilter())
Get InstallationFile information for given license.
const License::ptr_t activateLicense(const std::string &authData, const std::string &accountCode=std::string(), bool useAuthCode=true)
Activate license using SSO.
const License::ptr_t activateAirGapLicense(const std::string &confirmationCode, const std::wstring &policyPath, const std::string &licenseKey, uint32_t policyId)
Verify Confirmation code and activate air gap license using given license policy or policies.
std::shared_ptr< LicenseStorage > ptr_t
Helper struct for filtering installation files by environment and channel.