Banuba SDK
utility_manager.hpp
Go to the documentation of this file.
1 /// \file
2 /// \addtogroup Recognizer
3 /// @{
4 ///
5 // AUTOGENERATED FILE - DO NOT MODIFY!
6 // This file generated by Djinni from recognizer.djinni
7 
8 #pragma once
9 
13 #include <bnb/utils/defs.hpp>
14 #include <cstdint>
15 #include <memory>
16 #include <string>
17 #include <vector>
18 
19 namespace bnb { namespace interfaces {
20 
21 class BNB_EXPORT utility_manager {
22 public:
23  virtual ~utility_manager() {}
24 
25  static void initialize(const std::vector<std::string> & resource_paths, const std::string & client_token);
26 
27  static void release();
28 
29  /** Add resources search path */
30  static void add_resource_path(const std::string & resource_path);
31 
32  /** Remove resources search path */
33  static void remove_resource_path(const std::string & resource_path);
34 
35  /** Diagnostic crash. Use this to check you crash analytics systems. */
36  static void diagnostic_crash();
37 
38  /**
39  * Get information about CPU capabilities. Mainly for usage on Android
40  * @return JSON-string describing CPU capabilties
41  */
42  static std::string cpu_env();
43 
44  /**
45  * Check device SoC class.
46  * On Android first call may require presence of OpenGL context to
47  * get info about GPU.
48  * @return hardware class of device
49  */
50  static ::bnb::interfaces::hardware_class get_hardware_class();
51 
52  static void set_log_level(::bnb::interfaces::severity_level level);
53 
54  /**
55  * Set callback to recieve log events from Banuba SDK.
56  * @param cb Callback
57  * @param lvl recieve logs with specified and higher levels
58  */
59  static void set_log_record_callback(const std::shared_ptr<::bnb::interfaces::log_record_callback> & cb, ::bnb::interfaces::severity_level lvl);
60 
61  /** Returns SDK version as string */
62  static std::string get_banuba_sdk_version_string();
63 
64  /**
65  * Returns SDK version as number
66  * major = version / 10000000
67  * minor = (version - major * 10000000) / 100000
68  * patch = (version - major * 10000000 - minor * 100000) / 1000
69  * revision = version % 1000
70  */
71  static int32_t get_banuba_sdk_version();
72 
73  /**
74  * The Banuba SDK tracks the resource version of Neural Networks (NN) resources it built for.
75  * Returns version of NN resources as string, represented in the following format
76  * “Major.Minor.Patch”.
77  */
78  static std::string get_banuba_sdk_nn_version_string();
79 
80  /**
81  * Returns NN version as number
82  * major = version / 10000000
83  * minor = (version - major * 10000000) / 100000
84  * patch = (version - major * 10000000 - minor * 100000) / 1000
85  * revision = version % 1000
86  */
87  static int32_t get_banuba_sdk_nn_version();
88 
89  /**
90  * The Banuba SDK supports external NN resources archives.
91  * After the initialization of the Banuba SDK,
92  * API provides the capability to request the version of the archive.
93  * Returns version of NN resources archive as string,
94  * represented in the following format “Major.Minor.Patch”.
95  * Such a version coincides with the Banuba SDK NN resources version
96  * if no external NN resources are used.
97  */
99 
100  /**
101  * Checks if the current version of NN resources
102  * is equal to Banuba SDK expected NN resources version
103  */
105 
106  /** Checks if Banuba SDK treats as valid the version of external NN resources */
108 
109  /**
110  * load GL functions, for dynamic libraries only
111  * should be called with active GL context
112  */
113  static void load_gl_functions();
114 };
115 
116 } } // namespace bnb::interfaces
117 /// @}
118 
bnb::interfaces::utility_manager::add_resource_path
static void add_resource_path(const std::string &resource_path)
Add resources search path.
bnb::interfaces::utility_manager::cpu_env
static std::string cpu_env()
Get information about CPU capabilities.
bnb::interfaces::utility_manager::get_banuba_sdk_version_string
static std::string get_banuba_sdk_version_string()
Returns SDK version as string.
bnb::interfaces::utility_manager
Definition: utility_manager.hpp:21
bnb::interfaces::utility_manager::diagnostic_crash
static void diagnostic_crash()
Diagnostic crash.
bnb::interfaces::utility_manager::get_banuba_sdk_version
static int32_t get_banuba_sdk_version()
Returns SDK version as number major = version / 10000000 minor = (version - major * 10000000) / 10000...
bnb::interfaces::utility_manager::check_banuba_sdk_nn_version
static bool check_banuba_sdk_nn_version()
Checks if the current version of NN resources is equal to Banuba SDK expected NN resources version.
hardware_class.hpp
bnb::interfaces::utility_manager::remove_resource_path
static void remove_resource_path(const std::string &resource_path)
Remove resources search path.
bnb::interfaces::utility_manager::load_gl_functions
static void load_gl_functions()
load GL functions, for dynamic libraries only should be called with active GL context
bnb::interfaces::utility_manager::get_banuba_sdk_nn_version_string
static std::string get_banuba_sdk_nn_version_string()
The Banuba SDK tracks the resource version of Neural Networks (NN) resources it built for.
bnb::interfaces::utility_manager::get_banuba_sdk_nn_version_archive_string
static std::string get_banuba_sdk_nn_version_archive_string()
The Banuba SDK supports external NN resources archives.
bnb::interfaces::utility_manager::get_banuba_sdk_nn_version
static int32_t get_banuba_sdk_nn_version()
Returns NN version as number major = version / 10000000 minor = (version - major * 10000000) / 100000...
log_record_callback.hpp
bnb::interfaces::utility_manager::set_log_record_callback
static void set_log_record_callback(const std::shared_ptr<::bnb::interfaces::log_record_callback > &cb, ::bnb::interfaces::severity_level lvl)
Set callback to recieve log events from Banuba SDK.
severity_level.hpp
bnb::interfaces::utility_manager::check_banuba_sdk_nn_version_ignore_patch
static bool check_banuba_sdk_nn_version_ignore_patch()
Checks if Banuba SDK treats as valid the version of external NN resources.