4 #ifndef BPSLICENSETOKEN_H
5 #define BPSLICENSETOKEN_H
Public include file for BPS CORE library macros.
#define BPSCORE_EXPORT
Declare class to be an import from the shared library.
Definition: bpscore_global.h:22
#define BPS_PRIVATE(Class)
Declare pointer to private object in a public class.
Definition: bpsglobals.h:102
BPS datastore class.
Definition: bpsdatastore.h:61
The license token is used to check permission of software usage, and maintains the list in table t_li...
Definition: bpslicensetoken.h:25
void clear()
Clears the token and releases the license for re-use.
BpsDatastore * datastore() const
void update()
Makes sure the token is still present and unmodified in table t_licensetokens, and updates the timest...
QString licenseGroup() const
BpsLicenseToken(BpsDatastore *aDatastore, const QString &aLicenser, const QString &aLicenseGroup, const QString &aProgram, const QVariant &aInfo, QObject *aParent=nullptr)
Create a new license token.
virtual int checkLicense(QDate *aExpires=nullptr)
This method can be overloaded to implement a check for license validity.
QDate validate()
Checks the license token.
void setLicenseGroup(const QString &aLicenseGroup)
Set a new license group.
virtual ~BpsLicenseToken()
The destructor clears the token and releases the license for re-use.