Library Initialization
Functions Index
| static QarResult | qar_library_destroy (void) |
|
Deinitialize global library state and free process-wide resources. More... | |
| static QarResult | qar_library_init (const QarLibraryInit *init) |
|
Initialize global library state. More... | |
| static QarResult | qar_platform_set_android_java_vm (void *java_vm) |
|
Give the library the process's Java VM (Android). More... | |
| static QarResult | qar_runtime_info (QarRuntimeInfo *out_info) |
|
Version, flavor and C API generation of the loaded qar-streaming-c. More... | |
Functions
qar_library_destroy()
| inline static |
Deinitialize global library state and free process-wide resources.
After this call, no other API should be used until the next qar_library_init(). It also removes the crash hooks qar_library_init() installed in the process, so the library can then be unloaded with qar_library_unload() while the application keeps running. A crash handler the application installed after qar_library_init() is left in place.
- Returns
QarResult Success or error code.
Definition at line 3112 of file qar_streaming.h.
qar_library_init()
| inline static |
Initialize global library state.
Must be called once before using any other API. Safe to call from a single thread. Repeated calls without a matching destroy may return an error.
- Parameters
-
init Pointer to initialization parameters; must not be NULL.
- Returns
QarResult Success or error code with optional diagnostic handle.
Definition at line 3099 of file qar_streaming.h.
qar_platform_set_android_java_vm()
| inline static |
Give the library the process's Java VM (Android).
The secure store protects its keys with the Android Keystore, which native code reaches through the Java VM. Pass ANativeActivity::vm, the JavaVM* of JNI_OnLoad, or the one Unity or your engine exposes, before the first runtime or session is created. Without it the library asks libnativehelper.so for the created VM (Android 12, API 31, and newer), and otherwise protects stored secrets with a file key instead of the Android Keystore. Android has one VM per process; calling again replaces the earlier pointer. Works before qar_library_init(). The library never destroys the VM, and only attaches threads it calls from that are not yet attached, detaching them again afterwards.
- Parameters
-
java_vm The process's JavaVM*, passed as void* so this header needs no jni.h; must not be NULL.
- Returns
QarResult Success; QAR_STATUS_LOGIC_ERROR for a NULL java_vm; QAR_STATUS_ARGUMENT_NOT_SUPPORTED on every platform other than Android.
Definition at line 3152 of file qar_streaming.h.
qar_runtime_info()
| inline static |
Version, flavor and C API generation of the loaded qar-streaming-c.
Works before qar_library_init(). With one QAROS installation per PC, this is the installed runtime's identity. The strings are static and stay valid until the library is unloaded.
For logs and messages to the user only. Never compare the version for equality and never decide from it which functions to call: any header works with any runtime, older or newer. A function appended after a release returns QAR_STATUS_NOT_IMPLEMENTED on a runtime that lacks it; call it and handle that status instead.
- Parameters
-
out_info Receives the info; must not be NULL.
- Returns
QarResult Success, or QAR_STATUS_LOGIC_ERROR for a NULL out_info.
Definition at line 3130 of file qar_streaming.h.
Generated via doxygen2docusaurus 2.2.1 by Doxygen 1.9.8.