LicenseSpring C++ SDK
Easily add Software Licensing to your application
Loading...
Searching...
No Matches
ExtendedOptions.h
Go to the documentation of this file.
1#ifndef LS_C_EXTENDED_OPTIONS_H
2#define LS_C_EXTENDED_OPTIONS_H
3
4#include "../APIDef.h"
5#include "../PODTypes.h"
6#include <stdbool.h>
7#include <wchar.h>
8#include <stdint.h>
9
10#ifdef __cplusplus
11extern "C"
12{
13#endif
14
15 LS_API typedef struct LSProxySettings
16 {
17 void *inner;
18
19 void (*setProxyUri)(struct LSProxySettings *self, const char *uri);
20
21 const char *(*getProxyUri)(struct LSProxySettings *self);
22
23 void (*setUser)(struct LSProxySettings *self, const char *user);
24
25 const char *(*getUser)(struct LSProxySettings *self);
26
27 void (*setPassword)(struct LSProxySettings *self, const char *password);
28
29 const char *(*getPassword)(struct LSProxySettings *self);
30
31 bool (*isValid)(struct LSProxySettings *self);
32
34
36 const char *proxy, const char *user, const char *password);
37
39
49
53
56 {
57 void *inner;
58
60 void (*setTargetSerial)(struct LSHardwareKeyOptions *self, const char *serial);
61
63 const char *(*getTargetSerial)(struct LSHardwareKeyOptions *self);
64
66 void (*setPin)(struct LSHardwareKeyOptions *self, const char *pin);
67
69 const char *(*getPin)(struct LSHardwareKeyOptions *self);
70
72
76
80
87
89 {
90 void *inner;
91
92 void (*setLicenseFilePath)(struct LSExtendedOptions *self, const wchar_t *filePath);
93
94 const wchar_t *(*getLicenseFilePath)(struct LSExtendedOptions *self);
95
96 void (*setHardwareID)(struct LSExtendedOptions *self, const char *ID);
97
98 const char *(*getHardwareID)(struct LSExtendedOptions *self);
99
100 void (*collectNetworkInfo)(struct LSExtendedOptions *self, bool collect);
101
103
104 void (*enableLogging)(struct LSExtendedOptions *self, bool enable);
105
106 bool (*isLoggingEnabled)(struct LSExtendedOptions *self);
107
108 void (*enableVMDetection)(struct LSExtendedOptions *self, bool enable);
109
111
112 void (*enableGuardFile)(struct LSExtendedOptions *self, bool enable);
113
115
116 void (*enableSSLCheck)(struct LSExtendedOptions *self, bool enable);
117
119
120 void (*setUseNativeTLS)(struct LSExtendedOptions *self, bool enable);
121
123
124 void (*enableLicenseCorruptionCheck)(struct LSExtendedOptions *self, bool enable);
125
127
128 void (*enableHardwareKey)(struct LSExtendedOptions *self, bool enable);
129
131
132 void (*setGracePeriod)(struct LSExtendedOptions *self, uint32_t value);
133
134 uint32_t (*getGracePeriod)(struct LSExtendedOptions *self);
135
136 void (*setNetworkTimeout)(struct LSExtendedOptions *self, long timeout);
137
139
140 void (*setConnectTimeout)(struct LSExtendedOptions *self, long timeout);
141
143
145 struct LSExtendedOptions *self, const struct LSProxySettings *settings);
146
147 const struct LSProxySettings *(*getProxySettings)(struct LSExtendedOptions *self);
148
149 void (*setAlternateServiceURL)(struct LSExtendedOptions *self, const char *URL);
150
151 const char *(*getAlternateServiceURL)(struct LSExtendedOptions *self);
152
153 void (*setAlternateKey)(struct LSExtendedOptions *self, const char *key);
154
155 void (*setAlternateKeyInt)(struct LSExtendedOptions *self, int32_t *key, int32_t size);
156
158
160 struct LSExtendedOptions *self, enum DeviceIDAlgorithm algorithm);
161
162 void (*setCryptoProviderKey)(struct LSExtendedOptions *self, const char *key);
163
164 void (*setCryptoProviderSalt)(struct LSExtendedOptions *self, const char *salt);
165
167 struct LSExtendedOptions *self, const struct LSHardwareKeyOptions *options);
168
170
172
174
176 const wchar_t *licenseFilePath, const char *hardwareID, const LSProxySettings *proxy);
177
179
180#ifdef __cplusplus
181} // end extern "C"
182#endif
183
184#endif // LS_C_EXTENDED_OPTIONS_H
#define LS_API
Definition APIDef.h:23
LS_API struct LSHardwareKeySerialList LSSerialList
Structure to hold a list of strings (serial numbers).
LS_API LSExtendedOptions * CreateLSExtendedOptionsByPath(const wchar_t *licenseFilePath)
LS_API void FreeLSSerialList(LSSerialList *list)
Frees the memory allocated for an LSSerialList structure.
LS_API void FreeLSExtendedOptions(LSExtendedOptions *options)
LS_API void FreeLSHardwareKeyOptions(LSHardwareKeyOptions *options)
Frees the memory associated with an LSHardwareKeyOptions object.
LS_API LSHardwareKeyOptions * CreateLSHardwareKeyOptions()
Creates a new LSHardwareKeyOptions object.
LS_API LSExtendedOptions * CreateLSExtendedOptions()
LS_API LSExtendedOptions * CreateLSExtendedOptionsEx(const wchar_t *licenseFilePath, const char *hardwareID, const LSProxySettings *proxy)
LS_API LSProxySettings * CreateLSProxySettings(const char *proxy, const char *user, const char *password)
LS_API void FreeLSProxySettings(LSProxySettings *settings)
LS_API LSSerialList ListAvailableHardwareKeys()
Lists the serial numbers of all connected YubiKeys with PIV support.
DeviceIDAlgorithm
Type of Device ID algorithm used by the SDK.
Definition PODTypes.h:119
void(* setHardwareID)(struct LSExtendedOptions *self, const char *ID)
void(* collectNetworkInfo)(struct LSExtendedOptions *self, bool collect)
bool(* isSSLCheckEnabled)(struct LSExtendedOptions *self)
void(* setUseNativeTLS)(struct LSExtendedOptions *self, bool enable)
void(* enableLicenseCorruptionCheck)(struct LSExtendedOptions *self, bool enable)
bool(* isCollectNetworkInfoEnabled)(struct LSExtendedOptions *self)
bool(* isGuardFileEnabled)(struct LSExtendedOptions *self)
void(* setAlternateServiceURL)(struct LSExtendedOptions *self, const char *URL)
void(* setHardwareKeyOptions)(struct LSExtendedOptions *self, const struct LSHardwareKeyOptions *options)
void(* setConnectTimeout)(struct LSExtendedOptions *self, long timeout)
void(* setCryptoProviderKey)(struct LSExtendedOptions *self, const char *key)
void(* enableGuardFile)(struct LSExtendedOptions *self, bool enable)
void(* setAlternateKeyInt)(struct LSExtendedOptions *self, int32_t *key, int32_t size)
bool(* isNativeTLSEnabled)(struct LSExtendedOptions *self)
void(* setAlternateKey)(struct LSExtendedOptions *self, const char *key)
long(* getConnectTimeout)(struct LSExtendedOptions *self)
void(* setCryptoProviderSalt)(struct LSExtendedOptions *self, const char *salt)
void(* enableHardwareKey)(struct LSExtendedOptions *self, bool enable)
long(* getNetworkTimeout)(struct LSExtendedOptions *self)
void(* enableSSLCheck)(struct LSExtendedOptions *self, bool enable)
void(* setGracePeriod)(struct LSExtendedOptions *self, uint32_t value)
void(* setLicenseFilePath)(struct LSExtendedOptions *self, const wchar_t *filePath)
void(* enableLogging)(struct LSExtendedOptions *self, bool enable)
bool(* isVMDetectionEnabled)(struct LSExtendedOptions *self)
bool(* isLoggingEnabled)(struct LSExtendedOptions *self)
bool(* isHardwareKeyEnabled)(struct LSExtendedOptions *self)
void(* setDeviceIdAlgorithm)(struct LSExtendedOptions *self, enum DeviceIDAlgorithm algorithm)
bool(* isLicenseCorruptionCheckEnabled)(struct LSExtendedOptions *self)
void(* setNetworkTimeout)(struct LSExtendedOptions *self, long timeout)
uint32_t(* getGracePeriod)(struct LSExtendedOptions *self)
void(* enableVMDetection)(struct LSExtendedOptions *self, bool enable)
enum DeviceIDAlgorithm(* getDeviceIdAlgorithm)(struct LSExtendedOptions *self)
void(* setProxySettings)(struct LSExtendedOptions *self, const struct LSProxySettings *settings)
C-interface struct mirroring LicenseSpring::HardwareKeyOptions.
void(* setTargetSerial)(struct LSHardwareKeyOptions *self, const char *serial)
Sets the target YubiKey serial number.
void(* setPin)(struct LSHardwareKeyOptions *self, const char *pin)
Sets the PIN for the YubiKey.
Structure to hold a list of strings (serial numbers).
int count
Number of strings in the serials array.
char ** serials
Array of null-terminated C strings (serial numbers).
void(* setUser)(struct LSProxySettings *self, const char *user)
bool(* isValid)(struct LSProxySettings *self)
void(* setProxyUri)(struct LSProxySettings *self, const char *uri)
void(* setPassword)(struct LSProxySettings *self, const char *password)