Banuba SDK
Toggle main menu visibility
Loading...
Searching...
No Matches
libs
recognizer
bnb
recognizer
interfaces
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
10
#include "
bnb/utils/interfaces/hardware_class.hpp
"
11
#include "
bnb/utils/interfaces/log_record_callback.hpp
"
12
#include "
bnb/utils/interfaces/severity_level.hpp
"
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
* 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
*/
88
static
std::string
get_banuba_sdk_resources_version_string
();
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
*/
97
static
int32_t
get_banuba_sdk_resources_version
();
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
*/
108
static
std::string
get_banuba_sdk_resources_version_archive_string
();
109
110
/**
111
* Checks if the current version of resources
112
* is equal to Banuba SDK expected resources version
113
*/
114
static
bool
check_banuba_sdk_resources_version
();
115
116
/** Checks if Banuba SDK treats as valid the version of external resources */
117
static
bool
check_banuba_sdk_resources_version_ignore_patch
();
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
static
void
remove_url_scheme_handler(
const
std::string & scheme);
126
127
static
void
add_url_scheme_handler(
const
std::string & scheme);
128
129
static
void
use_resources_cache(
bool
enabled);
130
};
131
132
} }
// namespace bnb::interfaces
133
/// @}
134
bnb::interfaces::utility_manager
Definition
utility_manager.hpp:21
bnb::interfaces::utility_manager::enable_diagnostics
static void enable_diagnostics(const std::string &output_folder)
Turns on SDK feature - analytics collection.
bnb::interfaces::utility_manager::get_banuba_sdk_resources_version_archive_string
static std::string get_banuba_sdk_resources_version_archive_string()
The Banuba SDK supports external resources archives.
bnb::interfaces::utility_manager::diagnostic_crash
static void diagnostic_crash()
Diagnostic crash.
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.
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::get_banuba_sdk_resources_version
static int32_t get_banuba_sdk_resources_version()
Returns version as number major = version / 10000000 minor = (version - major * 10000000) / 100000 pa...
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_resources_version_ignore_patch
static bool check_banuba_sdk_resources_version_ignore_patch()
Checks if Banuba SDK treats as valid the version of external resources.
bnb::interfaces::utility_manager::check_banuba_sdk_resources_version
static bool check_banuba_sdk_resources_version()
Checks if the current version of resources is equal to Banuba SDK expected resources version.
bnb::interfaces::utility_manager::enable_telemetry
static void enable_telemetry()
Turns on SDK feature - telemetry collection.
bnb::interfaces::utility_manager::cpu_env
static std::string cpu_env()
Get information about CPU capabilities.
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::remove_resource_path
static void remove_resource_path(const std::string &resource_path)
Remove resources search path.
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::get_banuba_sdk_resources_version_string
static std::string get_banuba_sdk_resources_version_string()
The Banuba SDK tracks the resource version it built for.
bnb::interfaces::utility_manager::get_hardware_class
::bnb::interfaces::hardware_class get_hardware_class()
Check device SoC class.
hardware_class.hpp
log_record_callback.hpp
severity_level.hpp
Generated by
1.17.0