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" 16 #define FACE_SDK_REMOTE_LICENSE_TIME_BOUND "FACE_SDK_REMOTE_LICENSE_TIME_BOUND" 34 virtual std::string get_license_info()
const = 0;
38 virtual bool is_time_bound()
const = 0;
51 std::shared_ptr<face_sdk::license> FACE_SDK_EXPORT
load_licence_from_file(
const std::string &license_file);
57 std::shared_ptr<face_sdk::license> FACE_SDK_EXPORT
load_licence_from_data(
const std::vector<uint8_t> &data);
64 std::vector<uint8_t> FACE_SDK_EXPORT
generate_license_request(std::vector<uint32_t> gpu_ids = std::vector<uint32_t>());
84 virtual std::vector<uint8_t> on_load() = 0;
90 virtual void on_updated(
const std::vector<uint8_t> &license_data) = 0;
104 virtual void force_update() = 0;
113 std::shared_ptr<face_sdk::remote_license> FACE_SDK_EXPORT
make_remote_license(
const std::string &token);
122 std::shared_ptr<face_sdk::remote_license> FACE_SDK_EXPORT
make_remote_license(
const std::string &token,
123 const std::string &filename);
132 std::shared_ptr<face_sdk::remote_license> FACE_SDK_EXPORT
make_remote_license(
const std::string &token,
133 const std::shared_ptr<face_sdk::license_callback> &callback);
143 std::shared_ptr<face_sdk::remote_license> FACE_SDK_EXPORT
make_remote_license(
const std::string &token,
144 const std::vector<uint8_t> &request,
145 const std::shared_ptr<face_sdk::license_callback> &callback);
155 std::shared_ptr<face_sdk::remote_license> FACE_SDK_EXPORT
make_remote_license(
const std::string &token,
166 std::shared_ptr<face_sdk::remote_license> FACE_SDK_EXPORT
make_remote_license(
const std::string &token,
167 const std::string &filename,
178 std::shared_ptr<face_sdk::remote_license> FACE_SDK_EXPORT
make_remote_license(
const std::string &token,
179 const std::shared_ptr<face_sdk::license_callback> &callback,
191 std::shared_ptr<face_sdk::remote_license> FACE_SDK_EXPORT
make_remote_license(
const std::string &token,
192 const std::vector<uint8_t> &request,
193 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, bool time_bound)
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, FACE_SDK_REMOTE_LIC...
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.
std::vector< uint8_t > generate_time_bound_license_request()
Api function to generate time bound license request (the same time bound only license works on any de...
The license object. A license object provides information about your limits in face_sdk. See Licensing.
Definition: license.h:27
Callback interface for remote license.
Definition: license.h:74
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:95
std::shared_ptr< face_sdk::license > load_licence_from_file(const std::string &license_file)
Load license from specified file.