#![no_std]
use core::ffi::c_char;
use binder_ndk_compat_bindgen::{
Compat_AIBinder_Class_getFunctionName,
Compat_AIBinder_Class_setTransactionCodeToFunctionNameMap, Compat_AIBinder_isSystemStable,
Compat_AIBinder_isVendorStable, Compat_AIBinder_requiresVintfDeclaration,
};
use binder_ndk_sys::{AIBinder, AIBinder_Class};
pub unsafe fn set_transaction_code_to_function_name_map(
clazz: *mut AIBinder_Class,
map: *const *const c_char,
size: usize,
) {
unsafe {
Compat_AIBinder_Class_setTransactionCodeToFunctionNameMap(clazz, map, size);
}
}
pub unsafe fn get_function_name(clazz: *const AIBinder_Class, code: u32) -> *const c_char {
unsafe { Compat_AIBinder_Class_getFunctionName(clazz, code) }
}
pub unsafe fn requires_vintf_declaration(binder: *const AIBinder) -> bool {
unsafe { Compat_AIBinder_requiresVintfDeclaration(binder) }
}
pub unsafe fn is_vendor_stable(binder: *const AIBinder) -> bool {
unsafe { Compat_AIBinder_isVendorStable(binder) }
}
pub unsafe fn is_system_stable(binder: *const AIBinder) -> bool {
unsafe { Compat_AIBinder_isSystemStable(binder) }
}