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  /**
62  * Set callback to recieve log events from Banuba SDK.
63  * @param cb Callback
64  * @param lvl recieve logs with specified and higher levels
65  */
66  static void set_log_record_callback(const std::shared_ptr<::bnb::interfaces::log_record_callback> & cb, ::bnb::interfaces::severity_level lvl);
67 
68  /** Returns SDK version as string */
69  static std::string get_banuba_sdk_version_string();
70 
71  /**
72  * Returns SDK version as number
73  * major = version / 10000000
74  * minor = (version - major * 10000000) / 100000
75  * patch = (version - major * 10000000 - minor * 100000) / 1000
76  * revision = version % 1000
77  */
78  static int32_t get_banuba_sdk_version();
79 
80  /**
81  * The Banuba SDK tracks the resource version it built for.
82  * Returns version of resources as string, represented in the following format
83  * “Major.Minor.Patch”.
84  */
85  static std::string get_banuba_sdk_resources_version_string();
86 
87  /**
88  * Returns version as number
89  * major = version / 10000000
90  * minor = (version - major * 10000000) / 100000
91  * patch = (version - major * 10000000 - minor * 100000) / 1000
92  * revision = version % 1000
93  */
94  static int32_t get_banuba_sdk_resources_version();
95 
96  /**
97  * The Banuba SDK supports external resources archives.
98  * After the initialization of the Banuba SDK,
99  * API provides the capability to request the version of the archive.
100  * Returns version of resources archive as string,
101  * represented in the following format “Major.Minor.Patch”.
102  * Such a version coincides with the Banuba SDK resources version
103  * if no external resources are used.
104  */
105  static std::string get_banuba_sdk_resources_version_archive_string();
106 
107  /**
108  * Checks if the current version of resources
109  * is equal to Banuba SDK expected resources version
110  */
111  static bool check_banuba_sdk_resources_version();
112 
113  /** Checks if Banuba SDK treats as valid the version of external resources */
114  static bool check_banuba_sdk_resources_version_ignore_patch();
115 
116  /**
117  * load GL functions, for dynamic libraries only
118  * should be called with active GL context
119  */
120  static void load_gl_functions();
121 };
122 
123 } } // namespace bnb::interfaces
124 /// @}
125 
bnb::interfaces::utility_manager
Definition: utility_manager.hpp:21
hardware_class.hpp
log_record_callback.hpp
severity_level.hpp