LicenseSpring C++ SDK
Easily add Software Licensing to your application
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
11 extern "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 
40  LS_API typedef struct LSExtendedOptions
41  {
42  void *inner;
43 
44  void (*setLicenseFilePath)(struct LSExtendedOptions *self, const wchar_t *filePath);
45 
46  const wchar_t *(*getLicenseFilePath)(struct LSExtendedOptions *self);
47 
48  void (*setHardwareID)(struct LSExtendedOptions *self, const char *ID);
49 
50  const char *(*getHardwareID)(struct LSExtendedOptions *self);
51 
52  void (*collectNetworkInfo)(struct LSExtendedOptions *self, bool collect);
53 
55 
56  void (*enableLogging)(struct LSExtendedOptions *self, bool enable);
57 
58  bool (*isLoggingEnabled)(struct LSExtendedOptions *self);
59 
60  void (*enableVMDetection)(struct LSExtendedOptions *self, bool enable);
61 
62  bool (*isVMDetectionEnabled)(struct LSExtendedOptions *self);
63 
64  void (*enableGuardFile)(struct LSExtendedOptions *self, bool enable);
65 
66  bool (*isGuardFileEnabled)(struct LSExtendedOptions *self);
67 
68  void (*enableSSLCheck)(struct LSExtendedOptions *self, bool enable);
69 
70  bool (*isSSLCheckEnabled)(struct LSExtendedOptions *self);
71 
72  void (*setUseNativeTLS)(struct LSExtendedOptions *self, bool enable);
73 
74  bool (*isNativeTLSEnabled)(struct LSExtendedOptions *self);
75 
76  void (*enableLicenseCorruptionCheck)(struct LSExtendedOptions *self, bool enable);
77 
79 
80  void (*setGracePeriod)(struct LSExtendedOptions *self, uint32_t value);
81 
82  uint32_t (*getGracePeriod)(struct LSExtendedOptions *self);
83 
84  void (*setNetworkTimeout)(struct LSExtendedOptions *self, long timeout);
85 
86  long (*getNetworkTimeout)(struct LSExtendedOptions *self);
87 
88  void (*setConnectTimeout)(struct LSExtendedOptions *self, long timeout);
89 
90  long (*getConnectTimeout)(struct LSExtendedOptions *self);
91 
93  struct LSExtendedOptions *self, const struct LSProxySettings *settings);
94 
95  const struct LSProxySettings *(*getProxySettings)(struct LSExtendedOptions *self);
96 
97  void (*setAlternateServiceURL)(struct LSExtendedOptions *self, const char *URL);
98 
99  const char *(*getAlternateServiceURL)(struct LSExtendedOptions *self);
100 
101  void (*setAlternateKey)(struct LSExtendedOptions *self, const char *key);
102 
103  void (*setAlternateKeyInt)(struct LSExtendedOptions *self, int32_t *key, int32_t size);
104 
106 
108  struct LSExtendedOptions *self, enum DeviceIDAlgorithm algorithm);
109 
110  void (*setCryptoProviderKey)(struct LSExtendedOptions *self, const char *key);
111 
112  void (*setCryptoProviderSalt)(struct LSExtendedOptions *self, const char *salt);
113 
115 
117 
118  LS_API LSExtendedOptions *CreateLSExtendedOptionsByPath(const wchar_t *licenseFilePath);
119 
121  const wchar_t *licenseFilePath, const char *hardwareID, const LSProxySettings *proxy);
122 
124 
125 #ifdef __cplusplus
126 } // end extern "C"
127 #endif
128 
129 #endif // LS_C_EXTENDED_OPTIONS_H
LS_API LSExtendedOptions * CreateLSExtendedOptionsEx(const wchar_t *licenseFilePath, const char *hardwareID, const LSProxySettings *proxy)
void(* enableLicenseCorruptionCheck)(struct LSExtendedOptions *self, bool enable)
bool(* isLoggingEnabled)(struct LSExtendedOptions *self)
bool(* isVMDetectionEnabled)(struct LSExtendedOptions *self)
enum DeviceIDAlgorithm(* getDeviceIdAlgorithm)(struct LSExtendedOptions *self)
void(* setCryptoProviderSalt)(struct LSExtendedOptions *self, const char *salt)
long(* getConnectTimeout)(struct LSExtendedOptions *self)
void(* enableLogging)(struct LSExtendedOptions *self, bool enable)
LS_API void FreeLSProxySettings(LSProxySettings *settings)
void(* enableSSLCheck)(struct LSExtendedOptions *self, bool enable)
void(* setAlternateServiceURL)(struct LSExtendedOptions *self, const char *URL)
void(* setProxySettings)(struct LSExtendedOptions *self, const struct LSProxySettings *settings)
bool(* isValid)(struct LSProxySettings *self)
LS_API struct LSProxySettings LSProxySettings
LS_API struct LSExtendedOptions LSExtendedOptions
void(* setHardwareID)(struct LSExtendedOptions *self, const char *ID)
bool(* isCollectNetworkInfoEnabled)(struct LSExtendedOptions *self)
void(* setUser)(struct LSProxySettings *self, const char *user)
LS_API LSExtendedOptions * CreateLSExtendedOptionsByPath(const wchar_t *licenseFilePath)
LS_API LSProxySettings * CreateLSProxySettings(const char *proxy, const char *user, const char *password)
LS_API void FreeLSExtendedOptions(LSExtendedOptions *options)
void(* setPassword)(struct LSProxySettings *self, const char *password)
bool(* isGuardFileEnabled)(struct LSExtendedOptions *self)
bool(* isNativeTLSEnabled)(struct LSExtendedOptions *self)
DeviceIDAlgorithm
Type of Device ID algorithm used by the SDK.
Definition: PODTypes.h:114
uint32_t(* getGracePeriod)(struct LSExtendedOptions *self)
void(* enableGuardFile)(struct LSExtendedOptions *self, bool enable)
long(* getNetworkTimeout)(struct LSExtendedOptions *self)
void(* setAlternateKey)(struct LSExtendedOptions *self, const char *key)
void(* setAlternateKeyInt)(struct LSExtendedOptions *self, int32_t *key, int32_t size)
void(* collectNetworkInfo)(struct LSExtendedOptions *self, bool collect)
bool(* isLicenseCorruptionCheckEnabled)(struct LSExtendedOptions *self)
void(* setConnectTimeout)(struct LSExtendedOptions *self, long timeout)
void(* enableVMDetection)(struct LSExtendedOptions *self, bool enable)
LS_API LSExtendedOptions * CreateLSExtendedOptions()
void(* setUseNativeTLS)(struct LSExtendedOptions *self, bool enable)
#define LS_API
Definition: APIDef.h:23
void(* setNetworkTimeout)(struct LSExtendedOptions *self, long timeout)
void(* setProxyUri)(struct LSProxySettings *self, const char *uri)
void(* setCryptoProviderKey)(struct LSExtendedOptions *self, const char *key)
void(* setDeviceIdAlgorithm)(struct LSExtendedOptions *self, enum DeviceIDAlgorithm algorithm)
void(* setGracePeriod)(struct LSExtendedOptions *self, uint32_t value)
bool(* isSSLCheckEnabled)(struct LSExtendedOptions *self)