ReconstructMe SDK  2.6.43-0
Real-time 3D reconstruction engine
License

Authenticate your copy of ReconstructMe SDK. More...

Typedefs

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...
 

Detailed Description

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

// Create a license object
reme_error_t e = reme_license_authenticate(c, l, "license.txt.sgn");
if (e == REME_ERROR_SUCCESS) {
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>());
e = reme_license_authenticate(c, l, loaded_license.c_str());
if (e == REME_ERROR_SUCCESS) {
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.

// Specify your HASP specific values.
std::string hasp_dll("hasp_windows_<vendor_id>.dll");
std::string hasp_vendor_code(".....");
reme_license_add_hardware_collector_hasp(c, l, hasp_vendor_code.c_str(), (int)hasp_vendor_code.size(), hasp_dll.c_str(), (int)hasp_dll.size());
e = reme_license_authenticate(c, l, "dongle_protected_license.txt.sgn");
if (e == REME_ERROR_SUCCESS) {
puts("Now running in commercial mode");
} else {
puts("Failed to authenticate.");
}

More complex authentication mechanisms are explained upon request.

Typedef Documentation

◆ reme_license_t

typedef int reme_license_t

Handle referencing a license object.

ReconstructMe SDK commercial requires a valid license to be used.

Function Documentation

◆ reme_license_create()

reme_error_t reme_license_create ( reme_context_t  c,
reme_license_t l 
)

Creates a new license object.

Only one license object can be around for a context. Multiple invocations will return the same handle.

Parameters
cA valid context object
lA pointer that will receive the license handle.
Return values
REME_ERROR_SUCCESSOn success
REME_ERROR_UNSPECIFIEDOn failure
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_destroy()

reme_error_t reme_license_destroy ( reme_context_t  c,
reme_license_t l 
)

Destroy a previously created license object.

Parameters
cA pointer to a valid context object
lA mutable pointer to a valid license handle to destroy
Return values
REME_ERROR_SUCCESSOn success
REME_ERROR_UNSPECIFIEDOn failure

◆ reme_license_clear_runtime_info()

reme_error_t reme_license_clear_runtime_info ( reme_context_t  c,
reme_license_t  l 
)

Reset data related to runtime information.

Parameters
cA pointer to a valid context object
lA valid license handle
Return values
REME_ERROR_SUCCESSOn success
REME_ERROR_UNSPECIFIEDOn failure

◆ reme_license_add_software()

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.

These values are required when the license is bound to specific software

Parameters
cA pointer to a valid context object
lA valid license handle
moduleName 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_lengthlength of module string in bytes
shashthe signed checksum of the module
shash_lengthlength of the signed checksum in bytes
Return values
REME_ERROR_SUCCESSOn success
REME_ERROR_UNSPECIFIEDOn failure

◆ 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
cA pointer to a valid context object
lA valid license handle
hasp_vendor_codeThe vendor specific code issues by Sentinel HASP.
hasp_vendor_code_lengthLength of vendor code string in bytes.
hasp_vendor_dllPath to the vendor specific Sentinel HASP dynamic library. Please note that HASP dlls for x86 and x64 architectures are named differently.
hasp_vendor_dll_lengthLength of path to dynamic library in bytes.
Return values
REME_ERROR_SUCCESSOn success
REME_ERROR_UNSPECIFIEDOn failure
Examples:
example_reconstructmesdk_license.cpp.

◆ reme_license_add_serial_number()

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.

When the license is bound to serial number validation, use this method to specify the serial number your received.

Parameters
cA pointer to a valid context object
lA valid license handle
serial_numberThe serial number
serial_number_lengthThe number of bytes in the serial number
Return values
REME_ERROR_SUCCESSOn success
REME_ERROR_UNSPECIFIEDOn failure

◆ reme_license_authenticate()

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.

Unless a valid ReconstructMe SDK license is specified, this SDK runs in non-commercial mode.

Parameters
cA valid context handle
lA valid license handle
licenseEither the path to a license file on disk, or the license content directly.
Return values
REME_ERROR_SUCCESSOn success
REME_ERROR_INVALID_LICENSEOn authentication error. reme_context_bind_error_info contains details.
REME_ERROR_UNSPECIFIEDOn failure.
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()

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.

Associated Protocol Buffers Specification
// Hardware hashes
message hardware {
repeated string hashes = 1;
}
Parameters
cA valid context object
lA valid license object
oA valid options binding
Return values
REME_ERROR_SUCCESSOn success
REME_ERROR_UNSPECIFIEDOn failure