Example

Loading...
Searching...
No Matches
CLicenseManager.h
Go to the documentation of this file.
1// Copyright. 2019 - 2024 PSBD. All rights reserved.
2
3#pragma once
4
5#include "Capsule/CClient.h"
6#include "Capsule/CDefinesPrivate.h"
7#include "Capsule/CDevice.h"
8
9#ifdef __cplusplus
10 extern "C" {
11#endif
12
13 CLC_CLASS_WN(LicenseManagerPrivate, clCLicenseManager);
14
18 typedef enum clCLicenseError {
19 clC_LicenseError_OK,
20 clC_LicenseError_InvalidOrExpiredKey,
21 clC_LicenseError_InvalidKeyFormatOrDeviceSerial,
22 clC_LicenseError_LicenseServiceNotFound,
23 clC_LicenseError_LicenseServiceInaccessible,
24 clC_LicenseError_GracePeriodExpired
25} clCLicenseError;
26
36 CL_DLL clCLicenseManager clCClient_GetLicenseManager(clCClient client) NOEXCEPT;
37
47 void clCLicenseManager_VerifyLicense(clCLicenseManager licenseManager, const char* licenseKey, clCDevice device) NOEXCEPT;
53 bool clCLicenseManager_IsLicenseValid(clCLicenseManager licenseManager) NOEXCEPT;
54
55 CLC_STRUCT(clCLicenseManagerDelegateLicenseVerified);
56 typedef void (*clCLicenseManagerHandlerLicenseVerified)(clCLicenseManager, bool, clCLicenseError);
65 CL_DLL void
66 clCLicenseManagerDelegateLicenseVerified_Set(clCLicenseManagerDelegateLicenseVerified delegate,
67 clCLicenseManagerHandlerLicenseVerified callback) NOEXCEPT;
75 CL_DLL clCLicenseManagerDelegateLicenseVerified
76 clCLicenseManager_GetOnLicenseVerifiedEvent(clCLicenseManager licenseManager) NOEXCEPT;
77
78#ifdef __cplusplus
79}
80#endif
CClient.h
CDefinesPrivate.h
CLC_STRUCT
#define CLC_STRUCT(Name)
Definition CDefinesPrivate.h:24
NOEXCEPT
#define NOEXCEPT
Definition CDefinesPrivate.h:52
CL_DLL
#define CL_DLL
Definition CDefinesPrivate.h:21
CLC_CLASS_WN
#define CLC_CLASS_WN(Wrapped, Name)
Definition CDefinesPrivate.h:54
CDevice.h
clCClient_GetLicenseManager
CL_DLL clCLicenseManager clCClient_GetLicenseManager(clCClient client) NOEXCEPT
Get license manager instance.
clCLicenseManager_VerifyLicense
void clCLicenseManager_VerifyLicense(clCLicenseManager licenseManager, const char *licenseKey, clCDevice device) NOEXCEPT
Request license verification.
clCLicenseManager_GetOnLicenseVerifiedEvent
CL_DLL clCLicenseManagerDelegateLicenseVerified clCLicenseManager_GetOnLicenseVerifiedEvent(clCLicenseManager licenseManager) NOEXCEPT
Get delegate for license verified event.
clCLicenseManagerHandlerLicenseVerified
void(* clCLicenseManagerHandlerLicenseVerified)(clCLicenseManager, bool, clCLicenseError)
Definition CLicenseManager.h:56
clCLicenseError
clCLicenseError
License error.
Definition CLicenseManager.h:18
clC_LicenseError_OK
@ clC_LicenseError_OK
Definition CLicenseManager.h:19
clC_LicenseError_LicenseServiceNotFound
@ clC_LicenseError_LicenseServiceNotFound
Definition CLicenseManager.h:22
clC_LicenseError_InvalidOrExpiredKey
@ clC_LicenseError_InvalidOrExpiredKey
Definition CLicenseManager.h:20
clC_LicenseError_InvalidKeyFormatOrDeviceSerial
@ clC_LicenseError_InvalidKeyFormatOrDeviceSerial
Definition CLicenseManager.h:21
clC_LicenseError_GracePeriodExpired
@ clC_LicenseError_GracePeriodExpired
Definition CLicenseManager.h:24
clC_LicenseError_LicenseServiceInaccessible
@ clC_LicenseError_LicenseServiceInaccessible
Definition CLicenseManager.h:23
clCLicenseManagerDelegateLicenseVerified_Set
CL_DLL void clCLicenseManagerDelegateLicenseVerified_Set(clCLicenseManagerDelegateLicenseVerified delegate, clCLicenseManagerHandlerLicenseVerified callback) NOEXCEPT
Set callback for license verified event.
clCLicenseManager_IsLicenseValid
bool clCLicenseManager_IsLicenseValid(clCLicenseManager licenseManager) NOEXCEPT
Check whether the license is valid.