LicenseSpring C++ SDK
Easily add Software Licensing to your application
Loading...
Searching...
No Matches
Configuration.h
Go to the documentation of this file.
1#ifndef LS_C_CONFIGURATION_H
2#define LS_C_CONFIGURATION_H
3
4#include "ExtendedOptions.h"
5
6#ifdef __cplusplus
7extern "C"
8{
9#endif
10
11 LS_API typedef struct LSConfiguration
12 {
13 void *inner;
14
15 const char *(*getApiKey)(struct LSConfiguration *self);
16
17 const char *(*getSharedKey)(struct LSConfiguration *self);
18
19 const char *(*getClientId)(struct LSConfiguration *self);
20
21 const char *(*getClientSecret)(struct LSConfiguration *self);
22
23 const char *(*getProductCode)(struct LSConfiguration *self);
24
25 const char *(*getAppName)(struct LSConfiguration *self);
26
27 const char *(*getAppVersion)(struct LSConfiguration *self);
28
29 const char *(*getCustomerAccount)(struct LSConfiguration *self);
30
31 const char *(*getUserInfo)(struct LSConfiguration *self);
32
33 void (*setCustomerAccount)(struct LSConfiguration *self, const char *accountCode);
34
35 void (*setUserInfo)(struct LSConfiguration *self, const char *customInfo);
36
37 const wchar_t *(*getLicenseFilePath)(struct LSConfiguration *self);
38
39 const char *(*getAlternateServiceUrl)(struct LSConfiguration *self);
40
41 const char *(*getAlternateKey)(struct LSConfiguration *self);
42
43 const char *(*getHardwareID)(struct LSConfiguration *self);
44
46
47 bool (*isLoggingEnabled)(struct LSConfiguration *self);
48
49 bool (*isGuardFileEnabled)(struct LSConfiguration *self);
50
51 bool (*isSSLCheckEnabled)(struct LSConfiguration *self);
52
53 bool (*isNativeTLSEnabled)(struct LSConfiguration *self);
54
56
58
59 uint32_t (*getGracePeriod)(struct LSConfiguration *self);
60
61 long (*getNetworkTimeout)(struct LSConfiguration *self);
62
64 struct LSConfiguration *self, long timeoutValue); // in seconds, 0 means no timeout
65
66 long (*getConnectTimeout)(struct LSConfiguration *self);
67
69 struct LSConfiguration *self, long timeoutValue); // in seconds, 0 means 300 seconds
70
71 const LSProxySettings *(*getProxySettings)(struct LSConfiguration *self);
72
73 unsigned long (*getLicenseSpringAPIVersion)(struct LSConfiguration *self);
74
75 const char *(*getSdkVersion)(struct LSConfiguration *self);
76
77 const char *(*getAirGapPublicKey)(struct LSConfiguration *self);
78
79 void (*setAirGapPublicKey)(struct LSConfiguration *self, const char *airGapKey);
80
81 const char *(*getHardwareKeyTargetSerial)(struct LSConfiguration *self);
82
83 const char *(*getHardwareKeyPin)(struct LSConfiguration *self);
84
85 const char *(*getOsVersion)(struct LSConfiguration *self);
86
87 const char *(*getHostName)(struct LSConfiguration *self); // note: string is UTF-8 encoded
88
89 const char *(*getIP)(struct LSConfiguration *self);
90
91 const char *(*getMAC)(struct LSConfiguration *self);
92
94
95 bool (*isVM)(
96 struct LSConfiguration *self); // in case VM detection enabled returns true if app
97 // currently running in virtualized environment
98
99 const char *(*getDetectedVMName)(
100 struct LSConfiguration *self); // return hypervisor name or empty string
101
103
104 LS_API LSConfiguration *CreateLSConfiguration(const char *apiKey, const char *sharedKey,
105 const char *productCode, const char *appName, const char *appVersion,
106 LSExtendedOptions *extendedOptions);
107
109 const char *clientSecret, const char *productCode, const char *appName,
110 const char *appVersion, LSExtendedOptions *extendedOptions);
111
113
114#ifdef __cplusplus
115} // end extern "C"
116#endif
117
118#endif // LS_C_CONFIGURATION_H
#define LS_API
Definition APIDef.h:23
LS_API void FreeLSConfiguration(LSConfiguration *config)
LS_API LSConfiguration * CreateLSConfiguration(const char *apiKey, const char *sharedKey, const char *productCode, const char *appName, const char *appVersion, LSExtendedOptions *extendedOptions)
LS_API LSConfiguration * CreateLSConfigurationOAuth(const char *clientId, const char *clientSecret, const char *productCode, const char *appName, const char *appVersion, LSExtendedOptions *extendedOptions)
bool(* isVMDetectionEnabled)(struct LSConfiguration *self)
void(* setAirGapPublicKey)(struct LSConfiguration *self, const char *airGapKey)
long(* getConnectTimeout)(struct LSConfiguration *self)
bool(* isCollectNetworkInfoEnabled)(struct LSConfiguration *self)
void(* setConnectTimeout)(struct LSConfiguration *self, long timeoutValue)
void(* setNetworkTimeout)(struct LSConfiguration *self, long timeoutValue)
bool(* isNativeTLSEnabled)(struct LSConfiguration *self)
void(* setUserInfo)(struct LSConfiguration *self, const char *customInfo)
uint32_t(* getGracePeriod)(struct LSConfiguration *self)
bool(* isHardwareKeyEnabled)(struct LSConfiguration *self)
void(* setCustomerAccount)(struct LSConfiguration *self, const char *accountCode)
bool(* isGuardFileEnabled)(struct LSConfiguration *self)
bool(* isLicenseCorruptionCheckEnabled)(struct LSConfiguration *self)
bool(* isVM)(struct LSConfiguration *self)
long(* getNetworkTimeout)(struct LSConfiguration *self)
bool(* isSSLCheckEnabled)(struct LSConfiguration *self)
bool(* isLoggingEnabled)(struct LSConfiguration *self)
unsigned long(* getLicenseSpringAPIVersion)(struct LSConfiguration *self)