4 #ifndef FACE_SDK_LICENSE_H 5 #define FACE_SDK_LICENSE_H 8 #include <face_sdk_base/data_container.h> 14 #define FACE_SDK_REMOTE_LICENSE_DEFAULT "FACE_SDK_REMOTE_LICENSE_DEFAULT" 15 #define FACE_SDK_REMOTE_LICENSE_TOKEN "FACE_SDK_REMOTE_LICENSE_TOKEN" 33 virtual std::string get_license_info()
const = 0;
46 std::shared_ptr<face_sdk::license> FACE_SDK_EXPORT
load_licence_from_file(
const std::string &license_file);
52 std::shared_ptr<face_sdk::license> FACE_SDK_EXPORT
load_licence_from_data(
const std::vector<uint8_t> &data);
59 std::vector<uint8_t> FACE_SDK_EXPORT
generate_license_request(std::vector<uint32_t> gpu_ids = std::vector<uint32_t>());
73 virtual std::vector<uint8_t> on_load() = 0;
79 virtual void on_updated(
const std::vector<uint8_t> &license_data) = 0;
93 virtual void force_update() = 0;
102 std::shared_ptr<face_sdk::remote_license> FACE_SDK_EXPORT
make_remote_license(
const std::string &token);
111 std::shared_ptr<face_sdk::remote_license> FACE_SDK_EXPORT
make_remote_license(
const std::string &token,
112 const std::string &filename);
121 std::shared_ptr<face_sdk::remote_license> FACE_SDK_EXPORT
make_remote_license(
const std::string &token,
122 const std::shared_ptr<face_sdk::license_callback> &callback);
132 std::shared_ptr<face_sdk::remote_license> FACE_SDK_EXPORT
make_remote_license(
const std::string &token,
133 const std::vector<uint8_t> &request,
134 const std::shared_ptr<face_sdk::license_callback> &callback);
std::shared_ptr< face_sdk::remote_license > make_remote_license(const std::string &token, const std::vector< uint8_t > &request, const std::shared_ptr< face_sdk::license_callback > &callback)
Makes remote license with specified token, request and callback.
std::shared_ptr< face_sdk::license > make_default_license()
Make license depending on environment variables (FACE_SDK_REMOTE_LICENSE_DEFAULT and FACE_SDK_REMOTE_...
Definition: alignment_info.h:8
std::shared_ptr< face_sdk::license > load_licence_from_data(const std::vector< uint8_t > &data)
Load license from memory.
The license object. A license object provides information about your limits in face_sdk. See Licensing.
Definition: license.h:26
Callback interface for remote license.
Definition: license.h:63
std::vector< uint8_t > generate_license_request(std::vector< uint32_t > gpu_ids=std::vector< uint32_t >())
Api function to generate license request. Usually you can use face_sdk_utils for this purpose...
Remote license. Fetches license from server or from local cache.
Definition: license.h:84
std::shared_ptr< face_sdk::license > load_licence_from_file(const std::string &license_file)
Load license from specified file.