| KEYZY C++ Client Library 1.9.0 To develop software that is compiled with a C++ compiler and utilizes the KEYZY service (www.keyzy.io)

Loading...
Searching...
No Matches
KeyzyLicenseValidator.h
Go to the documentation of this file.
1#ifndef KEYZY_LICENSE_VALIDATOR_H
2#define KEYZY_LICENSE_VALIDATOR_H
3
8
9#include "KeyzyTypes.h"
10
11 namespace vk
12{
13 class AuthSys2;
14}
15
16 namespace Keyzy
17{
18 class KeyzyLicenseProvider;
19
23 class KeyzyLicenseValidator
24 {
25 public:
31 KeyzyLicenseValidator(std::shared_ptr<KeyzyLicenseProvider> licenseProvider);
32 ~KeyzyLicenseValidator();
33
40 LicenseStatus validateOnline() noexcept;
41
48 LicenseStatus validateOffline() noexcept;
49
62 LicenseStatus validateTrialLicense() noexcept;
63
69 unsigned long long getDaysToExpireTrial();
70
75 std::string getHostIdHash();
76
81 std::string getHostIdHashLegacy();
82
87 std::string getLicenseeName();
88
93 std::string getLicenseeEmail();
94
99 std::string getVersion();
100
105 std::string getSku();
106
111 std::string getLicenseType();
112
117 LicenseType getLicenseTypeEnum();
118
125 std::int64_t getStartTime();
126
135 std::int64_t getEndTime();
136
147 std::uint64_t getDaysLeft();
148
158 std::uint64_t getDaysTotal();
159
166 std::string getInfo();
167
175 std::string getDealerName();
176
177 private:
178 std::shared_ptr<KeyzyLicenseProvider> _licenseProvider;
179 std::unique_ptr<vk::AuthSys2> _AuthSys;
180 std::string _licenseeName;
181 std::string _licenseeEmail;
182 std::string _versionCode;
183 std::string _sku;
184 std::string _licenseType;
185 std::int64_t _startTime;
186 std::int64_t _endTime; //*!< If the license type is perpetual, it represents offline_license_life. If Offline License Life is set to 0 on KEYZY dashboard, it returns 315522000 as default value */
187 std::string _info;
188 std::string _dealerName;
189 };
190} // Keyzy
191
192#endif // KEYZY_LICENSE_VALIDATOR_H
KeyzyTypes.h
Public types for the Keyzy client SDK: LicenseStatus, LicenseType, ProductData, License.
Keyzy::LicenseType
LicenseType
Definition KeyzyTypes.h:164
Keyzy::LicenseStatus
LicenseStatus
Definition KeyzyTypes.h:110
Keyzy::KeyzyLicenseValidator::getLicenseeEmail
std::string getLicenseeEmail()
Keyzy::KeyzyLicenseValidator::getDaysTotal
std::uint64_t getDaysTotal()
Keyzy::KeyzyLicenseValidator::getSku
std::string getSku()
Keyzy::KeyzyLicenseValidator::validateOnline
LicenseStatus validateOnline() noexcept
Keyzy::KeyzyLicenseValidator::getLicenseType
std::string getLicenseType()
Keyzy::KeyzyLicenseValidator::validateOffline
LicenseStatus validateOffline() noexcept
Keyzy::KeyzyLicenseValidator::getLicenseeName
std::string getLicenseeName()
Keyzy::KeyzyLicenseValidator::getDealerName
std::string getDealerName()
Keyzy::KeyzyLicenseValidator::getDaysLeft
std::uint64_t getDaysLeft()
Keyzy::KeyzyLicenseValidator::getVersion
std::string getVersion()
Keyzy::KeyzyLicenseValidator::getLicenseTypeEnum
LicenseType getLicenseTypeEnum()
Keyzy::KeyzyLicenseValidator::getInfo
std::string getInfo()
Keyzy::KeyzyLicenseValidator::getHostIdHash
std::string getHostIdHash()
Keyzy::KeyzyLicenseValidator::getDaysToExpireTrial
unsigned long long getDaysToExpireTrial()
Keyzy::KeyzyLicenseValidator::getEndTime
std::int64_t getEndTime()
Keyzy::KeyzyLicenseValidator::getStartTime
std::int64_t getStartTime()
Keyzy::KeyzyLicenseValidator::validateTrialLicense
LicenseStatus validateTrialLicense() noexcept
Keyzy::KeyzyLicenseValidator::KeyzyLicenseValidator
KeyzyLicenseValidator(std::shared_ptr< KeyzyLicenseProvider > licenseProvider)
Keyzy::KeyzyLicenseValidator::getHostIdHashLegacy
std::string getHostIdHashLegacy()