Home
last modified time | relevance | path

Searched refs:SpIBinder (Results 1 – 17 of 17) sorted by relevance

/frameworks/native/libs/binder/rust/src/
Dproxy.rs43 pub struct SpIBinder(ptr::NonNull<sys::AIBinder>); struct
45 impl fmt::Debug for SpIBinder { implementation
53 unsafe impl Send for SpIBinder {} implementation
57 unsafe impl Sync for SpIBinder {} implementation
59 impl SpIBinder { impl
132 use super::{sys, SpIBinder};
141 pub unsafe fn new_spibinder(ptr: *mut sys::AIBinder) -> Option<SpIBinder> { in new_spibinder() argument
143 unsafe { SpIBinder::from_raw(ptr) } in new_spibinder()
160 impl AssociateClass for SpIBinder { implementation
170 impl Ord for SpIBinder { implementation
[all …]
Dservice.rs19 use crate::proxy::SpIBinder;
32 pub fn add_service(identifier: &str, mut binder: SpIBinder) -> Result<()> { in add_service()
53 pub fn register_lazy_service(identifier: &str, mut binder: SpIBinder) -> Result<()> { in register_lazy_service()
137 fn interface_cast<T: FromIBinder + ?Sized>(service: Option<SpIBinder>) -> Result<Strong<T>> { in interface_cast()
148 pub fn get_service(name: &str) -> Option<SpIBinder> { in get_service() argument
153 unsafe { SpIBinder::from_raw(sys::AServiceManager_getService(name.as_ptr())) } in get_service()
157 pub fn check_service(name: &str) -> Option<SpIBinder> { in check_service() argument
162 unsafe { SpIBinder::from_raw(sys::AServiceManager_checkService(name.as_ptr())) } in check_service()
167 pub fn wait_for_service(name: &str) -> Option<SpIBinder> { in wait_for_service() argument
172 unsafe { SpIBinder::from_raw(sys::AServiceManager_waitForService(name.as_ptr())) } in wait_for_service()
Dnative.rs22 use crate::proxy::SpIBinder;
173 pub fn set_extension(&mut self, extension: &mut SpIBinder) -> Result<()> { in set_extension()
235 fn as_binder(&self) -> SpIBinder { in as_binder() argument
244 SpIBinder::from_raw(self.ibinder).unwrap() in as_binder()
427 impl<B: Remotable> TryFrom<SpIBinder> for Binder<B> {
430 fn try_from(mut ibinder: SpIBinder) -> Result<Self> { in try_from()
Dbinder.rs21 use crate::proxy::{DeathRecipient, SpIBinder, WpIBinder};
57 fn as_binder(&self) -> SpIBinder { in as_binder() argument
207 fn get_extension(&mut self) -> Result<Option<SpIBinder>>; in get_extension() argument
643 fn try_from(ibinder: SpIBinder) -> Result<Strong<Self>>; in try_from()
864 binder: $crate::SpIBinder,
869 fn as_binder(&self) -> $crate::SpIBinder {
882 … fn from_binder(mut binder: $crate::SpIBinder) -> std::result::Result<Self, $crate::StatusCode> {
960 …fn try_from(mut ibinder: $crate::SpIBinder) -> std::result::Result<$crate::Strong<dyn $interface>,…
1028 …fn try_from(mut ibinder: $crate::SpIBinder) -> std::result::Result<$crate::Strong<dyn $async_inter…
Dlib.rs114 pub use proxy::{DeathRecipient, SpIBinder, WpIBinder};
Dparcel.rs21 use crate::proxy::SpIBinder;
651 pub(crate) fn write_binder(&mut self, binder: Option<&SpIBinder>) -> Result<()> { in write_binder()
670 pub(crate) fn read_binder(&self) -> Result<Option<SpIBinder>> { in read_binder() argument
682 Ok(unsafe { SpIBinder::from_raw(binder) }) in read_binder()
/frameworks/native/libs/binder/trusty/rust/binder_rpc_test/binder_rpc_test_session/
Dlib.rs17 use binder::{Interface, ParcelFileDescriptor, SpIBinder, Status, StatusCode, Strong};
76 fn getNullBinder(&self) -> Result<SpIBinder, Status> { in getNullBinder() argument
79 fn pingMe(&self, _binder: &SpIBinder) -> Result<i32, Status> { in pingMe()
82 fn repeatBinder(&self, _binder: Option<&SpIBinder>) -> Result<Option<SpIBinder>, Status> { in repeatBinder() argument
85 fn holdBinder(&self, _binder: Option<&SpIBinder>) -> Result<(), Status> { in holdBinder()
88 fn getHeldBinder(&self) -> Result<Option<SpIBinder>, Status> { in getHeldBinder() argument
102 fn alwaysGiveMeTheSameBinder(&self) -> Result<SpIBinder, Status> { in alwaysGiveMeTheSameBinder() argument
/frameworks/native/libs/binder/trusty/rust/binder_rpc_test/service/
Dmain.rs17 BinderFeatures, IBinder, Interface, ParcelFileDescriptor, SpIBinder, Status, StatusCode, Strong,
34 static HOLD_BINDER: Mutex<Option<SpIBinder>> = Mutex::new(None);
35 static SAME_BINDER: Mutex<Option<SpIBinder>> = Mutex::new(None);
84 fn getNullBinder(&self) -> Result<SpIBinder, Status> { in getNullBinder() argument
87 fn pingMe(&self, binder: &SpIBinder) -> Result<i32, Status> { in pingMe()
93 fn repeatBinder(&self, binder: Option<&SpIBinder>) -> Result<Option<SpIBinder>, Status> { in repeatBinder() argument
99 fn holdBinder(&self, binder: Option<&SpIBinder>) -> Result<(), Status> { in holdBinder()
103 fn getHeldBinder(&self) -> Result<Option<SpIBinder>, Status> { in getHeldBinder() argument
117 fn alwaysGiveMeTheSameBinder(&self) -> Result<SpIBinder, Status> { in alwaysGiveMeTheSameBinder() argument
/frameworks/native/libs/binder/rust/rpcbinder/src/server/
Dandroid.rs18 use binder::{unstable_api::AsNative, SpIBinder};
47 pub fn new_vsock(mut service: SpIBinder, cid: u32, port: u32) -> Result<RpcServer, Error> { in new_vsock() argument
63 mut service: SpIBinder, in new_bound_socket() argument
84 mut service: SpIBinder, in new_unix_domain_bootstrap() argument
102 pub fn new_inet(mut service: SpIBinder, address: &str, port: u32) -> Result<RpcServer, Error> { in new_inet() argument
Dtrusty.rs17 use binder::{unstable_api::AsNative, SpIBinder};
23 pub trait PerSessionCallback: Fn(Uuid) -> Option<SpIBinder> + Send + Sync + 'static {}
24 impl<T> PerSessionCallback for T where T: Fn(Uuid) -> Option<SpIBinder> + Send + Sync + 'static {}
48 pub fn new(service: SpIBinder) -> RpcServer { in new()
/frameworks/native/libs/binder/rust/tests/parcel_fuzzer/
Dread_utils.rs18 use binder::{ParcelFileDescriptor, Parcelable, SpIBinder};
96 read_parcel_interface!(SpIBinder),
97 read_parcel_interface!(Vec<SpIBinder>),
98 read_parcel_interface!(Vec<Option<SpIBinder>>),
99 read_parcel_interface!(Option<Vec<SpIBinder>>),
100 read_parcel_interface!(Option<Vec<Option<SpIBinder>>>),
Dparcel_fuzzer.rs27 declare_binder_interface, BinderFeatures, Interface, Parcelable, ParcelableHolder, SpIBinder,
75 let spibinder: Option<SpIBinder> = in do_transact()
/frameworks/native/libs/binder/rust/tests/parcel_fuzzer/random_parcel/src/
Dlib.rs19 use binder::SpIBinder;
37 pub fn fuzz_service(binder: &mut SpIBinder, fuzzer_data: &[u8]) { in fuzz_service() argument
43 pub fn fuzz_multiple_services(binders: &mut [&mut SpIBinder], fuzzer_data: &[u8]) { in fuzz_multiple_services() argument
/frameworks/native/libs/binder/rust/tests/
Dserialization.rs22 BinderFeatures, ExceptionCode, Interface, ParcelFileDescriptor, SpIBinder, Status, StatusCode,
73 static SERVICE: OnceLock<SpIBinder> = OnceLock::new();
272 assert!(parcel.read::<Option<SpIBinder>>()?.is_some()); in on_transact()
273 assert!(parcel.read::<Option<SpIBinder>>()?.is_none()); in on_transact()
274 let ibinders = parcel.read::<Option<Vec<Option<SpIBinder>>>>()?.unwrap(); in on_transact()
278 assert!(parcel.read::<Option<Vec<Option<SpIBinder>>>>()?.is_none()); in on_transact()
282 reply.write(&(None as Option<&SpIBinder>))?; in on_transact()
284 reply.write(&(None as Option<Vec<Option<&SpIBinder>>>))?; in on_transact()
Dintegration.rs379 BinderFeatures, DeathRecipient, FromIBinder, IBinder, Interface, SpIBinder, StatusCode,
689 fn register_death_notification(binder: &mut SpIBinder) -> (Bools, DeathRecipient) { in register_death_notification()
/frameworks/native/libs/binder/rust/rpcbinder/src/
Dsession.rs18 use binder::{FromIBinder, SpIBinder, StatusCode, Strong};
218 service: Option<SpIBinder>, in get_interface() argument
/frameworks/native/libs/binder/rust/src/parcel/
Dparcelable.rs20 use crate::proxy::SpIBinder;
864 let ibinder: SpIBinder = parcel.read()?; in deserialize()
873 fn try_from(_: SpIBinder) -> Result<Strong<Self>> { in try_from()
880 let ibinder: Option<SpIBinder> = parcel.read()?; in deserialize_option()