Documents > BPS V2 C++ API
bpslicensetoken.h
Go to the documentation of this file.
00001 
00004 #ifndef BPSLICENSETOKEN_H
00005 #define BPSLICENSETOKEN_H
00006 
00007 #include "bpscore_global.h"
00008 #include <QDate>
00009 #include <QObject>
00010 #include <QMetaType>
00011 
00012 class BpsDatastore;
00013 
00024 class BPSCORE_EXPORT BpsLicenseToken : public QObject
00025 {
00026     Q_OBJECT
00027     BPS_PRIVATE(BpsLicenseToken)
00028 
00029 public:
00030 
00040     BpsLicenseToken(
00041         BpsDatastore* aDatastore, 
00042         const QString& aLicenser, 
00043         const QString& aLicenseGroup, 
00044         const QString& aProgram, 
00045         QObject *aParent = 0);
00046 
00050     virtual ~BpsLicenseToken();
00051 
00055     bool isValid() const;
00056 
00064     QDate validate();
00065 
00071     void update();
00072 
00076     void clear();
00077 
00081     QString licenser() const;
00082 
00086     QString licenseGroup() const;
00087 
00091     QString program() const;
00092 
00096     BpsDatastore* datastore() const;
00097 
00104     virtual int checkLicense(QDate* aExpires = 0);
00105 };
00106 
00107 Q_DECLARE_METATYPE(BpsLicenseToken*)
00108 
00109 #endif // BPSLICENSETOKEN_H