| LicenseSpring C++ SDK 7.27.0 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 #endif
13
14 LS_API typedef struct LSProxySettings
15 {
16 void* inner;
17
18 void ( *setProxyUri )( struct LSProxySettings* self, const char* uri );
19
20 const char* ( *getProxyUri )( struct LSProxySettings* self );
21
22 void ( *setUser )( struct LSProxySettings* self, const char* user );
23
24 const char* ( *getUser )( struct LSProxySettings* self );
25
26 void ( *setPassword )( struct LSProxySettings* self, const char* password );
27
28 const char* ( *getPassword )( struct LSProxySettings* self );
29
30 bool ( *isValid )( struct LSProxySettings* self );
31
32 } LSProxySettings;
33
34 LS_API LSProxySettings* CreateLSProxySettings( const char* proxy, const char* user, const char* password );
35
36 LS_API void FreeLSProxySettings( LSProxySettings* settings );
37
38
39 LS_API typedef struct LSExtendedOptions
40 {
41 void* inner;
42
43 void ( *setLicenseFilePath )( struct LSExtendedOptions* self, const wchar_t* filePath );
44
45 const wchar_t* ( *getLicenseFilePath )( struct LSExtendedOptions* self );
46
47 void ( *setHardwareID )( struct LSExtendedOptions* self, const char* ID );
48
49 const char* ( *getHardwareID )( struct LSExtendedOptions* self );
50
51 void ( *collectNetworkInfo )( struct LSExtendedOptions* self, bool collect );
52
53 bool ( *isCollectNetworkInfoEnabled )( struct LSExtendedOptions* self );
54
55 void ( *enableLogging )( struct LSExtendedOptions* self, bool enable );
56
57 bool ( *isLoggingEnabled )( struct LSExtendedOptions* self );
58
59 void ( *enableVMDetection )( struct LSExtendedOptions* self, bool enable );
60
61 bool ( *isVMDetectionEnabled )( struct LSExtendedOptions* self );
62
63 void ( *enableGuardFile )( struct LSExtendedOptions* self, bool enable );
64
65 bool ( *isGuardFileEnabled )( struct LSExtendedOptions* self );
66
67 void ( *enableSSLCheck )( struct LSExtendedOptions* self, bool enable );
68
69 bool ( *isSSLCheckEnabled )( struct LSExtendedOptions* self );
70
71 void ( *setUseNativeTLS )( struct LSExtendedOptions* self, bool enable );
72
73 bool ( *isNativeTLSEnabled )( struct LSExtendedOptions* self );
74
75 void ( *setGracePeriod )( struct LSExtendedOptions* self, uint32_t value );
76
77 uint32_t ( *getGracePeriod )( struct LSExtendedOptions* self );
78
79 void ( *setNetworkTimeout )( struct LSExtendedOptions* self, long timeout );
80
81 long ( *getNetworkTimeout )( struct LSExtendedOptions* self );
82
83 void ( *setProxySettings )( struct LSExtendedOptions* self, const struct LSProxySettings* settings );
84
85 const struct LSProxySettings* ( *getProxySettings )( struct LSExtendedOptions* self );
86
87 void ( *setAlternateServiceURL )( struct LSExtendedOptions* self, const char* URL );
88
89 const char* ( *getAlternateServiceURL )( struct LSExtendedOptions* self );
90
91 void ( *setAlternateKey )( struct LSExtendedOptions* self, const char* key );
92
93 void ( *setAlternateKeyInt )( struct LSExtendedOptions* self, int32_t* key, int32_t size );
94
95 enum DeviceIDAlgorithm ( *getDeviceIdAlgorithm )( struct LSExtendedOptions* self );
96
97 void ( *setDeviceIdAlgorithm )( struct LSExtendedOptions* self, enum DeviceIDAlgorithm algorithm );
98
99 } LSExtendedOptions;
100
101 LS_API LSExtendedOptions* CreateLSExtendedOptions();
102
103 LS_API LSExtendedOptions* CreateLSExtendedOptionsByPath( const wchar_t* licenseFilePath );
104
105 LS_API LSExtendedOptions* CreateLSExtendedOptionsEx( const wchar_t* licenseFilePath, const char* hardwareID, const LSProxySettings* proxy );
106
107 LS_API void FreeLSExtendedOptions( LSExtendedOptions* options );
108
109 #ifdef __cplusplus
110 } // end extern "C"
111 #endif
112
113 #endif // LS_C_EXTENDED_OPTIONS_H
LSExtendedOptions
Definition: ExtendedOptions.h:39
CreateLSExtendedOptionsEx
LS_API LSExtendedOptions * CreateLSExtendedOptionsEx(const wchar_t *licenseFilePath, const char *hardwareID, const LSProxySettings *proxy)
LSExtendedOptions::getGracePeriod
uint32_t(* getGracePeriod)(struct LSExtendedOptions *self)
Definition: ExtendedOptions.h:77
LSExtendedOptions::isNativeTLSEnabled
bool(* isNativeTLSEnabled)(struct LSExtendedOptions *self)
Definition: ExtendedOptions.h:73
LSExtendedOptions::isLoggingEnabled
bool(* isLoggingEnabled)(struct LSExtendedOptions *self)
Definition: ExtendedOptions.h:57
LSProxySettings
Definition: ExtendedOptions.h:14
LSExtendedOptions::setNetworkTimeout
void(* setNetworkTimeout)(struct LSExtendedOptions *self, long timeout)
Definition: ExtendedOptions.h:79
LSProxySettings::isValid
bool(* isValid)(struct LSProxySettings *self)
Definition: ExtendedOptions.h:30
LSExtendedOptions::enableGuardFile
void(* enableGuardFile)(struct LSExtendedOptions *self, bool enable)
Definition: ExtendedOptions.h:63
LSExtendedOptions::collectNetworkInfo
void(* collectNetworkInfo)(struct LSExtendedOptions *self, bool collect)
Definition: ExtendedOptions.h:51
LSExtendedOptions::setGracePeriod
void(* setGracePeriod)(struct LSExtendedOptions *self, uint32_t value)
Definition: ExtendedOptions.h:75
LSExtendedOptions::getDeviceIdAlgorithm
enum DeviceIDAlgorithm(* getDeviceIdAlgorithm)(struct LSExtendedOptions *self)
Definition: ExtendedOptions.h:95
LSExtendedOptions::setAlternateKey
void(* setAlternateKey)(struct LSExtendedOptions *self, const char *key)
Definition: ExtendedOptions.h:91
LSExtendedOptions::inner
void * inner
Definition: ExtendedOptions.h:41
FreeLSProxySettings
LS_API void FreeLSProxySettings(LSProxySettings *settings)
LSExtendedOptions::getNetworkTimeout
long(* getNetworkTimeout)(struct LSExtendedOptions *self)
Definition: ExtendedOptions.h:81
LSExtendedOptions::setAlternateServiceURL
void(* setAlternateServiceURL)(struct LSExtendedOptions *self, const char *URL)
Definition: ExtendedOptions.h:87
LSProxySettings
LS_API struct LSProxySettings LSProxySettings
LSExtendedOptions
LS_API struct LSExtendedOptions LSExtendedOptions
LSExtendedOptions::setHardwareID
void(* setHardwareID)(struct LSExtendedOptions *self, const char *ID)
Definition: ExtendedOptions.h:47
CreateLSExtendedOptionsByPath
LS_API LSExtendedOptions * CreateLSExtendedOptionsByPath(const wchar_t *licenseFilePath)
LSProxySettings::setUser
void(* setUser)(struct LSProxySettings *self, const char *user)
Definition: ExtendedOptions.h:22
CreateLSProxySettings
LS_API LSProxySettings * CreateLSProxySettings(const char *proxy, const char *user, const char *password)
FreeLSExtendedOptions
LS_API void FreeLSExtendedOptions(LSExtendedOptions *options)
LSExtendedOptions::isGuardFileEnabled
bool(* isGuardFileEnabled)(struct LSExtendedOptions *self)
Definition: ExtendedOptions.h:65
LSProxySettings::setPassword
void(* setPassword)(struct LSProxySettings *self, const char *password)
Definition: ExtendedOptions.h:26
LSExtendedOptions::isSSLCheckEnabled
bool(* isSSLCheckEnabled)(struct LSExtendedOptions *self)
Definition: ExtendedOptions.h:69
DeviceIDAlgorithm
DeviceIDAlgorithm
Type of Device ID algorithm used by the SDK.
Definition: PODTypes.h:100
LSExtendedOptions::enableLogging
void(* enableLogging)(struct LSExtendedOptions *self, bool enable)
Definition: ExtendedOptions.h:55
LSExtendedOptions::setUseNativeTLS
void(* setUseNativeTLS)(struct LSExtendedOptions *self, bool enable)
Definition: ExtendedOptions.h:71
LSExtendedOptions::setAlternateKeyInt
void(* setAlternateKeyInt)(struct LSExtendedOptions *self, int32_t *key, int32_t size)
Definition: ExtendedOptions.h:93
LSExtendedOptions::isCollectNetworkInfoEnabled
bool(* isCollectNetworkInfoEnabled)(struct LSExtendedOptions *self)
Definition: ExtendedOptions.h:53
LSExtendedOptions::setDeviceIdAlgorithm
void(* setDeviceIdAlgorithm)(struct LSExtendedOptions *self, enum DeviceIDAlgorithm algorithm)
Definition: ExtendedOptions.h:97
LSProxySettings::setProxyUri
void(* setProxyUri)(struct LSProxySettings *self, const char *uri)
Definition: ExtendedOptions.h:18
LSExtendedOptions::setProxySettings
void(* setProxySettings)(struct LSExtendedOptions *self, const struct LSProxySettings *settings)
Definition: ExtendedOptions.h:83
LSExtendedOptions::enableVMDetection
void(* enableVMDetection)(struct LSExtendedOptions *self, bool enable)
Definition: ExtendedOptions.h:59
CreateLSExtendedOptions
LS_API LSExtendedOptions * CreateLSExtendedOptions()
LSExtendedOptions::isVMDetectionEnabled
bool(* isVMDetectionEnabled)(struct LSExtendedOptions *self)
Definition: ExtendedOptions.h:61
LS_API
#define LS_API
Macros that expands to dllexport, dllimport or nothing on non Windows platforms or in case of static ...
Definition: APIDef.h:22
LSExtendedOptions::enableSSLCheck
void(* enableSSLCheck)(struct LSExtendedOptions *self, bool enable)
Definition: ExtendedOptions.h:67
LSProxySettings::inner
void * inner
Definition: ExtendedOptions.h:16