IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
ipsdk::lic::LicenseManager Class Reference

singleton class used to read data contained in a IPSDK license file, and check its validity More...

#include <LicenseManager.h>

Public Member Functions

BoolResult init (const boost::filesystem::path &filePath, const std::string &preInitParamStr="")
 initialize the LicenseManager singleton from the license file specified as argument More...
 
bool isInit () const
 return true if init has been called at least once and if last call to init returned true
 
bool isLicenseExpiryDateDefined () const
 returns true if an expiry date has been defined for the license, false otherwise
 
boost::gregorian::date getLicenseDateFrom () const
 return the date from which the license takes effect More...
 
boost::gregorian::date getLicenseDateTo () const
 return the expiry date of the license More...
 
bool isLicenseMACAddressDefined () const
 returns true if a MAC address has been defined for the license, false otherwise
 
ipsdk::hard::MacAddress getLicenseMacAddress (const ipUInt64 addrIdx) const
 return the MAC address of the addrIdx^th licensed machine More...
 
std::vector< ipsdk::hard::MacAddressgetLicenseMacAddresses () const
 return the MAC addresses of all the licensed machines More...
 
IPSDKMajorVersion getLicenseIPSDKMajorVersion () const
 return the major version of IPSDK on which the license is applied More...
 
std::set< eLicenseFeaturegetSupportedFeatures () const
 return the collection of features supported by the license More...
 
bool isFeatureSupported (const eLicenseFeature &feature) const
 return true if feature specifiede as argument is supported by the license, false otherwise More...
 
void removeFeature (const eLicenseFeature &feature)
 method allowing to remove a specific feature from license More...
 
ipInt32 nbDaysToExpiration () const
 return the number of days left before license expiry date More...
 
bool are3dProcessesSupported () const
 return true if 3d processes are allowed, false otherwise (i.e. only 2d algorithms can be called) More...
 
bool areModulesHiddenInExplorer () const
 return true if Explorer hides IPSDK modules false otherwise More...
 
bool isFreeTrial () const
 return true if no license has been registered and the license is initialized with "Free trial" features false otherwise More...
 
ipInt32 getNbDaysForFreeTrialExpiration () const
 return the number of remaining days for the "Free trial" period validity 0 if the free trial period expired and no license has been registered -1 if a license has been registered More...
 
bool hasFreeTrialExpired () const
 return true if the license is initialized as free trial and the period has expired or if the license is not initialized with a free trial period More...
 
bool needToCheckLicenseValidity () const
 return true if the license validity needs to be checked
 
BoolResult checkLicenseValidity ()
 return true if the license is valid the tested license is accessed by the private static function getFunction() in the LicenseManager.cpp file
 
BoolResult checkDongle ()
 return false if the license is based on serial drive and the drive serial number is not detected Returns true otherwise
 

Static Public Member Functions

static LicenseManagergetInstance ()
 retrieve unique instance of factory
 

Protected Member Functions

Constructors and destructors
 LicenseManager ()
 
 ~LicenseManager ()
 

Protected Attributes

std::string _preInitParamsStr
 pre-initialiation parameter
 
Chrono _chronoValidity
 Chrono to allow to check the license validity.
 

Detailed Description

singleton class used to read data contained in a IPSDK license file, and check its validity

Author
H. Delestre
Date
2014/08/20

Member Function Documentation

◆ init()

BoolResult ipsdk::lic::LicenseManager::init ( const boost::filesystem::path &  filePath,
const std::string &  preInitParamStr = "" 
)

initialize the LicenseManager singleton from the license file specified as argument

Returns
false if file could not be read, file signature is invalid, license has expired, current PC is not licensed or currently used IPSDK major version is not licensed, return true otherwise

◆ getLicenseDateFrom()

boost::gregorian::date ipsdk::lic::LicenseManager::getLicenseDateFrom ( ) const

return the date from which the license takes effect

Exceptions
IPSDKLicensingExceptionif isInit() == false
IPSDKLicensingExceptionif isLicenseExpiryDateDefined() == false

◆ getLicenseDateTo()

boost::gregorian::date ipsdk::lic::LicenseManager::getLicenseDateTo ( ) const

return the expiry date of the license

Exceptions
IPSDKLicensingExceptionif isInit() == false
IPSDKLicensingExceptionif isLicenseExpiryDateDefined() == false

◆ getLicenseMacAddress()

ipsdk::hard::MacAddress ipsdk::lic::LicenseManager::getLicenseMacAddress ( const ipUInt64  addrIdx) const

return the MAC address of the addrIdx^th licensed machine

Exceptions
IPSDKLicensingExceptionif isInit() == false
IPSDKLicensingExceptionif isLicenseMACAddressDefined() == false

◆ getLicenseMacAddresses()

std::vector<ipsdk::hard::MacAddress> ipsdk::lic::LicenseManager::getLicenseMacAddresses ( ) const

return the MAC addresses of all the licensed machines

Exceptions
IPSDKLicensingExceptionif isInit() == false
IPSDKLicensingExceptionif isLicenseMACAddressDefined() == false

◆ getLicenseIPSDKMajorVersion()

IPSDKMajorVersion ipsdk::lic::LicenseManager::getLicenseIPSDKMajorVersion ( ) const

return the major version of IPSDK on which the license is applied

Exceptions
IPSDKLicensingExceptionif isInit() == false

◆ getSupportedFeatures()

std::set<eLicenseFeature> ipsdk::lic::LicenseManager::getSupportedFeatures ( ) const

return the collection of features supported by the license

Exceptions
IPSDKLicensingExceptionif isInit() == false

◆ isFeatureSupported()

bool ipsdk::lic::LicenseManager::isFeatureSupported ( const eLicenseFeature feature) const

return true if feature specifiede as argument is supported by the license, false otherwise

Exceptions
IPSDKLicensingExceptionif isInit() == false

◆ removeFeature()

void ipsdk::lic::LicenseManager::removeFeature ( const eLicenseFeature feature)

method allowing to remove a specific feature from license

Exceptions
IPSDKLicensingExceptionif isFeatureSupported(feature) == false

◆ nbDaysToExpiration()

ipInt32 ipsdk::lic::LicenseManager::nbDaysToExpiration ( ) const

return the number of days left before license expiry date

Exceptions
IPSDKLicensingExceptionif isInit() == false
IPSDKLicensingExceptionif isLicenseExpiryDateDefined() == false

◆ are3dProcessesSupported()

bool ipsdk::lic::LicenseManager::are3dProcessesSupported ( ) const

return true if 3d processes are allowed, false otherwise (i.e. only 2d algorithms can be called)

Exceptions
IPSDKLicensingExceptionif isInit() == false

◆ areModulesHiddenInExplorer()

bool ipsdk::lic::LicenseManager::areModulesHiddenInExplorer ( ) const

return true if Explorer hides IPSDK modules false otherwise

Exceptions
IPSDKLicensingExceptionif isInit() == false

◆ isFreeTrial()

bool ipsdk::lic::LicenseManager::isFreeTrial ( ) const

return true if no license has been registered and the license is initialized with "Free trial" features false otherwise

Exceptions
IPSDKLicensingExceptionif isInit() == false

◆ getNbDaysForFreeTrialExpiration()

ipInt32 ipsdk::lic::LicenseManager::getNbDaysForFreeTrialExpiration ( ) const

return the number of remaining days for the "Free trial" period validity 0 if the free trial period expired and no license has been registered -1 if a license has been registered

Exceptions
IPSDKLicensingExceptionif isInit() == false

◆ hasFreeTrialExpired()

bool ipsdk::lic::LicenseManager::hasFreeTrialExpired ( ) const

return true if the license is initialized as free trial and the period has expired or if the license is not initialized with a free trial period

Exceptions
IPSDKLicensingExceptionif isInit() == false

The documentation for this class was generated from the following file: