Banuba SDK
Loading...
Searching...
No Matches
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 was 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
19namespace bnb { namespace interfaces {
20
21class BNB_EXPORT utility_manager {
22public:
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 * Turns on SDK feature - analytics collection
56 * @param output_folder here log files would be written
57 * could be documents directory for mobile apps
58 */
59 static void enable_diagnostics(const std::string & output_folder);
60
61 /** Turns on SDK feature - telemetry collection */
62 static void enable_telemetry();
63
64 /**
65 * Set callback to recieve log events from Banuba SDK.
66 * @param cb Callback
67 * @param lvl recieve logs with specified and higher levels
68 */
69 static void set_log_record_callback(const std::shared_ptr<::bnb::interfaces::log_record_callback> & cb, ::bnb::interfaces::severity_level lvl);
70
71 /** Returns SDK version as string */
72 static std::string get_banuba_sdk_version_string();
73
74 /**
75 * Returns SDK version as number
76 * major = version / 10000000
77 * minor = (version - major * 10000000) / 100000
78 * patch = (version - major * 10000000 - minor * 100000) / 1000
79 * revision = version % 1000
80 */
81 static int32_t get_banuba_sdk_version();
82
83 /**
84 * The Banuba SDK tracks the resource version it built for.
85 * Returns version of resources as string, represented in the following format
86 * “Major.Minor.Patch”.
87 */
89
90 /**
91 * Returns version as number
92 * major = version / 10000000
93 * minor = (version - major * 10000000) / 100000
94 * patch = (version - major * 10000000 - minor * 100000) / 1000
95 * revision = version % 1000
96 */
98
99 /**
100 * The Banuba SDK supports external resources archives.
101 * After the initialization of the Banuba SDK,
102 * API provides the capability to request the version of the archive.
103 * Returns version of resources archive as string,
104 * represented in the following format “Major.Minor.Patch”.
105 * Such a version coincides with the Banuba SDK resources version
106 * if no external resources are used.
107 */
109
110 /**
111 * Checks if the current version of resources
112 * is equal to Banuba SDK expected resources version
113 */
115
116 /** Checks if Banuba SDK treats as valid the version of external resources */
118
119 /**
120 * load GL functions, for dynamic libraries only
121 * should be called with active GL context
122 */
123 static void load_gl_functions();
124};
125
126} } // namespace bnb::interfaces
127/// @}
128
static void enable_diagnostics(const std::string &output_folder)
Turns on SDK feature - analytics collection.
static std::string get_banuba_sdk_resources_version_archive_string()
The Banuba SDK supports external resources archives.
static void diagnostic_crash()
Diagnostic crash.
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.
static std::string get_banuba_sdk_version_string()
Returns SDK version as string.
static int32_t get_banuba_sdk_resources_version()
Returns version as number major = version / 10000000 minor = (version - major * 10000000) / 100000 pa...
static int32_t get_banuba_sdk_version()
Returns SDK version as number major = version / 10000000 minor = (version - major * 10000000) / 10000...
static bool check_banuba_sdk_resources_version_ignore_patch()
Checks if Banuba SDK treats as valid the version of external resources.
static bool check_banuba_sdk_resources_version()
Checks if the current version of resources is equal to Banuba SDK expected resources version.
static void enable_telemetry()
Turns on SDK feature - telemetry collection.
static std::string cpu_env()
Get information about CPU capabilities.
static void load_gl_functions()
load GL functions, for dynamic libraries only should be called with active GL context
static void remove_resource_path(const std::string &resource_path)
Remove resources search path.
static void add_resource_path(const std::string &resource_path)
Add resources search path.
static std::string get_banuba_sdk_resources_version_string()
The Banuba SDK tracks the resource version it built for.
::bnb::interfaces::hardware_class get_hardware_class()
Check device SoC class.