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 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 
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 
126 } } // namespace bnb::interfaces
127 /// @}
128 
bnb::interfaces::utility_manager
Definition: utility_manager.hpp:21
hardware_class.hpp
log_record_callback.hpp
severity_level.hpp