| LicenseSpring C++ SDK 7.32.0 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
7 extern "C" {
8#endif
9
10 LS_API typedef struct LSConfiguration
11 {
12 void* inner;
13
14 const char* ( *getApiKey )( struct LSConfiguration* self );
15
16 const char* ( *getSharedKey )( struct LSConfiguration* self );
17
18 const char* ( *getProductCode )( struct LSConfiguration* self );
19
20 const char* ( *getAppName )( struct LSConfiguration* self );
21
22 const char* ( *getAppVersion )( struct LSConfiguration* self );
23
24 const char* ( *getCustomerAccount )( struct LSConfiguration* self );
25
26 const char* ( *getUserInfo )( struct LSConfiguration* self );
27
28 void ( *setCustomerAccount )( struct LSConfiguration* self, const char* accountCode );
29
30 void ( *setUserInfo )( struct LSConfiguration* self, const char* customInfo );
31
32 const wchar_t* ( *getLicenseFilePath )( struct LSConfiguration* self );
33
34 const char* ( *getAlternateServiceUrl )( struct LSConfiguration* self );
35
36 const char* ( *getAlternateKey )( struct LSConfiguration* self );
37
38 const char* ( *getHardwareID )( struct LSConfiguration* self );
39
40 bool ( *isCollectNetworkInfoEnabled )( struct LSConfiguration* self );
41
42 bool ( *isLoggingEnabled )( struct LSConfiguration* self );
43
44 bool ( *isGuardFileEnabled )( struct LSConfiguration* self );
45
46 bool ( *isSSLCheckEnabled )( struct LSConfiguration* self );
47
48 bool ( *isNativeTLSEnabled )( struct LSConfiguration* self );
49
50 uint32_t ( *getGracePeriod )( struct LSConfiguration* self );
51
52 long ( *getNetworkTimeout )( struct LSConfiguration* self );
53
54 void ( *setNetworkTimeout )( struct LSConfiguration* self, long timeoutValue ); // in seconds, 0 means no timeout
55
56 const LSProxySettings* ( *getProxySettings )( struct LSConfiguration* self );
57
58 unsigned long ( *getLicenseSpringAPIVersion )( struct LSConfiguration* self );
59
60 const char* ( *getSdkVersion )( struct LSConfiguration* self );
61
62 const char* ( *getAirGapPublicKey )( struct LSConfiguration* self );
63
64 void ( *setAirGapPublicKey )( struct LSConfiguration* self, const char* airGapKey );
65
66 const char* ( *getOsVersion )( struct LSConfiguration* self );
67
68 const char* ( *getHostName )( struct LSConfiguration* self ); // note: string is UTF-8 encoded
69
70 const char* ( *getIP )( struct LSConfiguration* self );
71
72 const char* ( *getMAC )( struct LSConfiguration* self );
73
74 bool ( *isVMDetectionEnabled )( struct LSConfiguration* self );
75
76 bool ( *isVM )( struct LSConfiguration* self ); // in case VM detection enabled returns true if app currently running in virtualized environment
77
78 const char* ( *getDetectedVMName )( struct LSConfiguration* self ); // return hypervisor name or empty string
79
80 } LSConfiguration;
81
82 LS_API LSConfiguration* CreateLSConfiguration( const char* apiKey,
83 const char* sharedKey,
84 const char* productCode,
85 const char* appName,
86 const char* appVersion,
87 LSExtendedOptions* extendedOptions );
88
89 LS_API void FreeLSConfiguration( LSConfiguration* config );
90
91#ifdef __cplusplus
92} // end extern "C"
93#endif
94
95#endif // LS_C_CONFIGURATION_H
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
FreeLSConfiguration
LS_API void FreeLSConfiguration(LSConfiguration *config)
CreateLSConfiguration
LS_API LSConfiguration * CreateLSConfiguration(const char *apiKey, const char *sharedKey, const char *productCode, const char *appName, const char *appVersion, LSExtendedOptions *extendedOptions)
ExtendedOptions.h
LSConfiguration
Definition Configuration.h:11
LSConfiguration::isVMDetectionEnabled
bool(* isVMDetectionEnabled)(struct LSConfiguration *self)
Definition Configuration.h:74
LSConfiguration::setAirGapPublicKey
void(* setAirGapPublicKey)(struct LSConfiguration *self, const char *airGapKey)
Definition Configuration.h:64
LSConfiguration::isCollectNetworkInfoEnabled
bool(* isCollectNetworkInfoEnabled)(struct LSConfiguration *self)
Definition Configuration.h:40
LSConfiguration::setNetworkTimeout
void(* setNetworkTimeout)(struct LSConfiguration *self, long timeoutValue)
Definition Configuration.h:54
LSConfiguration::isNativeTLSEnabled
bool(* isNativeTLSEnabled)(struct LSConfiguration *self)
Definition Configuration.h:48
LSConfiguration::setUserInfo
void(* setUserInfo)(struct LSConfiguration *self, const char *customInfo)
Definition Configuration.h:30
LSConfiguration::inner
void * inner
Definition Configuration.h:12
LSConfiguration::getGracePeriod
uint32_t(* getGracePeriod)(struct LSConfiguration *self)
Definition Configuration.h:50
LSConfiguration::setCustomerAccount
void(* setCustomerAccount)(struct LSConfiguration *self, const char *accountCode)
Definition Configuration.h:28
LSConfiguration::isGuardFileEnabled
bool(* isGuardFileEnabled)(struct LSConfiguration *self)
Definition Configuration.h:44
LSConfiguration::isVM
bool(* isVM)(struct LSConfiguration *self)
Definition Configuration.h:76
LSConfiguration::getNetworkTimeout
long(* getNetworkTimeout)(struct LSConfiguration *self)
Definition Configuration.h:52
LSConfiguration::isSSLCheckEnabled
bool(* isSSLCheckEnabled)(struct LSConfiguration *self)
Definition Configuration.h:46
LSConfiguration::isLoggingEnabled
bool(* isLoggingEnabled)(struct LSConfiguration *self)
Definition Configuration.h:42
LSConfiguration::getLicenseSpringAPIVersion
unsigned long(* getLicenseSpringAPIVersion)(struct LSConfiguration *self)
Definition Configuration.h:58
LSExtendedOptions
Definition ExtendedOptions.h:40
LSProxySettings
Definition ExtendedOptions.h:15