| KEYZY C++ Client Library 1.7.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
1#ifndef KEYZY_LICENSE_VALIDATOR_H
2#define KEYZY_LICENSE_VALIDATOR_H
3
4#include "KeyzyTypes.h"
5
6 namespace vk
7{
8 class AuthSys2;
9}
10
11 namespace Keyzy
12{
13 class KeyzyLicenseProvider;
14
18 class KeyzyLicenseValidator
19 {
20 public:
26 KeyzyLicenseValidator(std::shared_ptr<KeyzyLicenseProvider> licenseProvider);
27 ~KeyzyLicenseValidator();
28
35 LicenseStatus validateOnline() noexcept;
36
43 LicenseStatus validateOffline() noexcept;
44
57 LicenseStatus validateTrialLicense() noexcept;
58
64 unsigned long long getDaysToExpireTrial();
65
70 std::string getHostIdHash();
71
76 std::string getHostIdHashLegacy();
77
82 std::string getLicenseeName();
83
88 std::string getLicenseeEmail();
89
94 std::string getVersion();
95
100 std::string getSku();
101
106 std::string getLicenseType();
107
112 LicenseType getLicenseTypeEnum();
113
120 std::int64_t getStartTime();
121
130 std::int64_t getEndTime();
131
142 std::uint64_t getDaysLeft();
143
153 std::uint64_t getDaysTotal();
154
161 std::string getInfo();
162
163 private:
164 std::shared_ptr<KeyzyLicenseProvider> _licenseProvider;
165 std::unique_ptr<vk::AuthSys2> _AuthSys;
166 std::string _licenseeName;
167 std::string _licenseeEmail;
168 std::string _versionCode;
169 std::string _sku;
170 std::string _licenseType;
171 std::int64_t _startTime;
172 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 */
173 std::string _info;
174 };
175} // Keyzy
176
177#endif // KEYZY_LICENSE_VALIDATOR_H
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::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()