Banuba SDK
Static Public Member Functions | List of all members
bnb::interfaces::utility_manager Class Reference

Static Public Member Functions

static void initialize (const std::vector< std::string > &resource_paths, const std::string &client_token)
 
static void release ()
 
static void add_resource_path (const std::string &resource_path)
 Add resources search path.
 
static void remove_resource_path (const std::string &resource_path)
 Remove resources search path.
 
static void diagnostic_crash ()
 Diagnostic crash. More...
 
static std::string cpu_env ()
 Get information about CPU capabilities. More...
 
::bnb::interfaces::hardware_class get_hardware_class ()
 Check device SoC class. More...
 
static void set_log_level (::bnb::interfaces::severity_level level)
 
static void enable_diagnostics (const std::string &output_folder)
 Turns on SDK feature - analytics collection. More...
 
static void enable_telemetry ()
 Turns on SDK feature - telemetry collection.
 
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. More...
 
static std::string get_banuba_sdk_version_string ()
 Returns SDK version as string.
 
static int32_t get_banuba_sdk_version ()
 Returns SDK version as number major = version / 10000000 minor = (version - major * 10000000) / 100000 patch = (version - major * 10000000 - minor * 100000) / 1000 revision = version % 1000.
 
static std::string get_banuba_sdk_resources_version_string ()
 The Banuba SDK tracks the resource version it built for. More...
 
static int32_t get_banuba_sdk_resources_version ()
 Returns version as number major = version / 10000000 minor = (version - major * 10000000) / 100000 patch = (version - major * 10000000 - minor * 100000) / 1000 revision = version % 1000.
 
static std::string get_banuba_sdk_resources_version_archive_string ()
 The Banuba SDK supports external resources archives. More...
 
static bool check_banuba_sdk_resources_version ()
 Checks if the current version of resources is equal to Banuba SDK expected resources version.
 
static bool check_banuba_sdk_resources_version_ignore_patch ()
 Checks if Banuba SDK treats as valid the version of external resources.
 
static void load_gl_functions ()
 load GL functions, for dynamic libraries only should be called with active GL context
 

Detailed Description

Definition at line 21 of file utility_manager.hpp.

Member Function Documentation

◆ cpu_env()

static std::string bnb::interfaces::utility_manager::cpu_env ( )
static

Get information about CPU capabilities.

Mainly for usage on Android

Returns
JSON-string describing CPU capabilties

◆ diagnostic_crash()

static void bnb::interfaces::utility_manager::diagnostic_crash ( )
static

Diagnostic crash.

Use this to check you crash analytics systems.

◆ enable_diagnostics()

static void bnb::interfaces::utility_manager::enable_diagnostics ( const std::string &  output_folder)
static

Turns on SDK feature - analytics collection.

Parameters
output_folderhere log files would be written could be documents directory for mobile apps

◆ get_banuba_sdk_resources_version_archive_string()

static std::string bnb::interfaces::utility_manager::get_banuba_sdk_resources_version_archive_string ( )
static

The Banuba SDK supports external resources archives.

After the initialization of the Banuba SDK, API provides the capability to request the version of the archive. Returns version of resources archive as string, represented in the following format “Major.Minor.Patch”. Such a version coincides with the Banuba SDK resources version if no external resources are used.

◆ get_banuba_sdk_resources_version_string()

static std::string bnb::interfaces::utility_manager::get_banuba_sdk_resources_version_string ( )
static

The Banuba SDK tracks the resource version it built for.

Returns version of resources as string, represented in the following format “Major.Minor.Patch”.

◆ get_hardware_class()

::bnb::interfaces::hardware_class bnb::interfaces::utility_manager::get_hardware_class ( )
static

Check device SoC class.

On Android first call may require presence of OpenGL context to get info about GPU.

Returns
hardware class of device

◆ set_log_record_callback()

static void bnb::interfaces::utility_manager::set_log_record_callback ( const std::shared_ptr<::bnb::interfaces::log_record_callback > &  cb,
::bnb::interfaces::severity_level  lvl 
)
static

Set callback to recieve log events from Banuba SDK.

Parameters
cbCallback
lvlrecieve logs with specified and higher levels

The documentation for this class was generated from the following file: