binder_rpc_unstable_bindgen/
lib.rs#![allow(dead_code)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
#![allow(non_upper_case_globals)]
#![allow(clippy::missing_safety_doc)]
use binder_ndk_sys::AIBinder;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ARpcServer {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ARpcSession {
_unused: [u8; 0],
}
#[repr(i32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum ARpcSession_FileDescriptorTransportMode {
None = 0,
Unix = 1,
Trusty = 2,
}
unsafe extern "C" {
pub fn ARpcServer_newVsock(
service: *mut AIBinder,
cid: ::std::os::raw::c_uint,
port: ::std::os::raw::c_uint,
assignedPort: *mut ::std::os::raw::c_uint,
) -> *mut ARpcServer;
}
unsafe extern "C" {
pub fn ARpcServer_newBoundSocket(
service: *mut AIBinder,
socketFd: ::std::os::raw::c_int,
) -> *mut ARpcServer;
}
unsafe extern "C" {
pub fn ARpcServer_newUnixDomainBootstrap(
service: *mut AIBinder,
bootstrapFd: ::std::os::raw::c_int,
) -> *mut ARpcServer;
}
unsafe extern "C" {
pub fn ARpcServer_newInet(
service: *mut AIBinder,
address: *const ::std::os::raw::c_char,
port: ::std::os::raw::c_uint,
) -> *mut ARpcServer;
}
unsafe extern "C" {
pub fn ARpcServer_setSupportedFileDescriptorTransportModes(
handle: *mut ARpcServer,
modes: *const ARpcSession_FileDescriptorTransportMode,
modes_len: usize,
);
}
unsafe extern "C" {
pub fn ARpcServer_setMaxThreads(server: *mut ARpcServer, threads: usize);
}
unsafe extern "C" {
pub fn ARpcServer_start(server: *mut ARpcServer);
}
unsafe extern "C" {
pub fn ARpcServer_join(server: *mut ARpcServer);
}
unsafe extern "C" {
pub fn ARpcServer_shutdown(server: *mut ARpcServer) -> bool;
}
unsafe extern "C" {
pub fn ARpcServer_free(server: *mut ARpcServer);
}
unsafe extern "C" {
pub fn ARpcSession_new() -> *mut ARpcSession;
}
unsafe extern "C" {
pub fn ARpcSession_setupVsockClient(
session: *mut ARpcSession,
cid: ::std::os::raw::c_uint,
port: ::std::os::raw::c_uint,
) -> *mut AIBinder;
}
unsafe extern "C" {
pub fn ARpcSession_setupUnixDomainClient(
session: *mut ARpcSession,
name: *const ::std::os::raw::c_char,
) -> *mut AIBinder;
}
unsafe extern "C" {
pub fn ARpcSession_setupUnixDomainBootstrapClient(
session: *mut ARpcSession,
bootstrapFd: ::std::os::raw::c_int,
) -> *mut AIBinder;
}
unsafe extern "C" {
pub fn ARpcSession_setupInet(
session: *mut ARpcSession,
address: *const ::std::os::raw::c_char,
port: ::std::os::raw::c_uint,
) -> *mut AIBinder;
}
unsafe extern "C" {
pub fn ARpcSession_setupPreconnectedClient(
session: *mut ARpcSession,
requestFd: ::std::option::Option<
unsafe extern "C" fn(param: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_int,
>,
param: *mut ::std::os::raw::c_void,
) -> *mut AIBinder;
}
unsafe extern "C" {
pub fn ARpcSession_setFileDescriptorTransportMode(
session: *mut ARpcSession,
mode: ARpcSession_FileDescriptorTransportMode,
);
}
unsafe extern "C" {
pub fn ARpcSession_setMaxIncomingThreads(session: *mut ARpcSession, threads: usize);
}
unsafe extern "C" {
pub fn ARpcSession_setMaxOutgoingConnections(session: *mut ARpcSession, connections: usize);
}
unsafe extern "C" {
pub fn ARpcSession_free(session: *mut ARpcSession);
}