Authenticate your copy of ReconstructMe SDK.
More...
|
typedef int | reme_license_t |
| Handle referencing a license object. More...
|
|
reme_error_t | reme_license_create (reme_context_t c, reme_license_t *l) |
| Creates a new license object. More...
|
|
reme_error_t | reme_license_destroy (reme_context_t c, reme_license_t *l) |
| Destroy a previously created license object. More...
|
|
reme_error_t | reme_license_clear_runtime_info (reme_context_t c, reme_license_t l) |
| Reset data related to runtime information. More...
|
|
reme_error_t | reme_license_add_software (reme_context_t c, reme_license_t l, const char *module, int module_length, const char *shash, int shash_length) |
| Add licensed software. More...
|
|
reme_error_t | reme_license_add_hardware_collector_hasp (reme_context_t c, reme_license_t l, const char *hasp_vendor_code, int hasp_vendor_code_length, const char *hasp_vendor_dll, int hasp_vendor_dll_length) |
| Add Sentinel HASP dongle collector. More...
|
|
reme_error_t | reme_license_add_serial_number (reme_context_t c, reme_license_t l, const char *serial_number, int serial_number_length) |
| Add serial number for validation. More...
|
|
reme_error_t | reme_license_authenticate (reme_context_t c, reme_license_t l, const char *license) |
| Authenticate using the given license file and any specified runtime data. More...
|
|
reme_error_t | reme_license_bind_hardware_hashes (reme_context_t c, reme_license_t l, reme_options_t o) |
| Access hardware hashes for generating single user licenses bound to specific hardware. More...
|
|
Authenticate your copy of ReconstructMe SDK.
The license handling is responsible for activating/deactivating certain SDK features depending on the license supplied. By default ReconstructMe SDK runs in unlicensed mode. To active the commerical mode and remove the limitations from the non-commercial version, you need to authenticate using the license file you have received on purchase.
To license your application you need to create an instance of the license module.
To license ReconstructMe SDK you should have received a license file upon purchase. You can either instruct ReconstructMe to license from a path to a file as shown below
puts("Now running in commercial mode");
} else {
puts("Failed to authenticate.");
}
or use an in-memory pointer to string
std::ifstream ifs("license.txt.sgn");
std::string loaded_license((std::istreambuf_iterator<char>(ifs)),
std::istreambuf_iterator<char>());
puts("Now running in commercial mode");
} else {
puts("Failed to authenticate.");
}
When your license is bound to a Sentinal HASP dongle you will need to tell ReconstructMe about your vendor specifics.
std::string hasp_dll("hasp_windows_<vendor_id>.dll");
std::string hasp_vendor_code(".....");
puts("Now running in commercial mode");
} else {
puts("Failed to authenticate.");
}
More complex authentication mechanisms are explained upon request.
◆ reme_license_t
Handle referencing a license object.
ReconstructMe SDK commercial requires a valid license to be used.
◆ reme_license_create()
◆ reme_license_destroy()
Destroy a previously created license object.
- Parameters
-
c | A pointer to a valid context object |
l | A mutable pointer to a valid license handle to destroy |
- Return values
-
◆ reme_license_clear_runtime_info()
Reset data related to runtime information.
- Parameters
-
c | A pointer to a valid context object |
l | A valid license handle |
- Return values
-
◆ reme_license_add_software()
Add licensed software.
These values are required when the license is bound to specific software
- Parameters
-
c | A pointer to a valid context object |
l | A valid license handle |
module | Name of the module that the signed hash corresponds to. This module must be found in the current process (i.e. loaded by the current process). Wildcards *? are accepted. |
module_length | length of module string in bytes |
shash | the signed checksum of the module |
shash_length | length of the signed checksum in bytes |
- Return values
-
◆ reme_license_add_hardware_collector_hasp()
reme_error_t reme_license_add_hardware_collector_hasp |
( |
reme_context_t |
c, |
|
|
reme_license_t |
l, |
|
|
const char * |
hasp_vendor_code, |
|
|
int |
hasp_vendor_code_length, |
|
|
const char * |
hasp_vendor_dll, |
|
|
int |
hasp_vendor_dll_length |
|
) |
| |
Add Sentinel HASP dongle collector.
When the license is bound to a specific HASP dongle, use this method to specify the HASP specific vendor information to communicate with the dongle.
- Parameters
-
c | A pointer to a valid context object |
l | A valid license handle |
hasp_vendor_code | The vendor specific code issues by Sentinel HASP. |
hasp_vendor_code_length | Length of vendor code string in bytes. |
hasp_vendor_dll | Path to the vendor specific Sentinel HASP dynamic library. Please note that HASP dlls for x86 and x64 architectures are named differently. |
hasp_vendor_dll_length | Length of path to dynamic library in bytes. |
- Return values
-
- Examples:
- example_reconstructmesdk_license.cpp.
◆ reme_license_add_serial_number()
Add serial number for validation.
When the license is bound to serial number validation, use this method to specify the serial number your received.
- Parameters
-
c | A pointer to a valid context object |
l | A valid license handle |
serial_number | The serial number |
serial_number_length | The number of bytes in the serial number |
- Return values
-
◆ reme_license_authenticate()
Authenticate using the given license file and any specified runtime data.
Unless a valid ReconstructMe SDK license is specified, this SDK runs in non-commercial mode.
- Parameters
-
c | A valid context handle |
l | A valid license handle |
license | Either the path to a license file on disk, or the license content directly. |
- Return values
-
- Examples:
- example_reconstructmesdk_bust.cpp, example_reconstructmesdk_calibration.cpp, example_reconstructmesdk_color_tracking.cpp, example_reconstructmesdk_colorize.cpp, example_reconstructmesdk_csg.cpp, example_reconstructmesdk_license.cpp, example_reconstructmesdk_marker.cpp, example_reconstructmesdk_point_and_shoot_with_colors.cpp, and example_reconstructmesdk_sensor_multi_independent.cpp.
◆ reme_license_bind_hardware_hashes()
Access hardware hashes for generating single user licenses bound to specific hardware.
- Associated Protocol Buffers Specification
// Hardware hashes
message hardware {
repeated string hashes = 1;
}
- Parameters
-
c | A valid context object |
l | A valid license object |
o | A valid options binding |
- Return values
-