pub struct BinderProxy { /* private fields */ }Implementations§
Source§impl BinderProxy
impl BinderProxy
Sourcepub fn new(channel: AsyncChannel) -> Self
pub fn new(channel: AsyncChannel) -> Self
Create a new Proxy for fuchsia.starnix.binder/Binder.
Sourcepub fn take_event_stream(&self) -> BinderEventStream
pub fn take_event_stream(&self) -> BinderEventStream
Get a Stream of events from the remote end of the protocol.
§Panics
Panics if the event stream was already taken.
Sourcepub fn set_vmo(&self, vmo: Vmo, mapped_address: u64) -> Result<(), Error>
pub fn set_vmo(&self, vmo: Vmo, mapped_address: u64) -> Result<(), Error>
Set the VMO to used as a share resource between the driver and the
client. mapped_address is the address where the vmo is mapped in the
client address space.
The driver handles the other requests of the client concurrently, so it
can handle an ioctl before the VMO is mapped. Clients should use
MapVmo instead.
Sourcepub fn map_vmo(
&self,
vmo: Vmo,
mapped_address: u64,
) -> QueryResponseFut<BinderMapVmoResult, DefaultFuchsiaResourceDialect> ⓘ
pub fn map_vmo( &self, vmo: Vmo, mapped_address: u64, ) -> QueryResponseFut<BinderMapVmoResult, DefaultFuchsiaResourceDialect> ⓘ
Maps the VMO used as a shared resource between the driver and the
client. mapped_address is the address where the VMO is mapped in the
client address space.
Responds once the VMO is mapped. The driver handles the other requests of the client concurrently, so the client must wait for the response before sending any ioctl that needs the VMO.
Sourcepub fn ioctl(
&self,
tid: u64,
request: u32,
arg: u64,
vmo: Vmo,
ioctl_reads: &[IoctlReadWrite],
files: Vec<FileHandle>,
) -> QueryResponseFut<BinderIoctlResult, DefaultFuchsiaResourceDialect> ⓘ
pub fn ioctl( &self, tid: u64, request: u32, arg: u64, vmo: Vmo, ioctl_reads: &[IoctlReadWrite], files: Vec<FileHandle>, ) -> QueryResponseFut<BinderIoctlResult, DefaultFuchsiaResourceDialect> ⓘ
Processes a Binder ioctl. This message returns writes for the calling thread that must be processed to correctly handle the ioctl.
Sourcepub fn register_thread_channel(
&self,
server_end: ServerEnd<BinderThreadMarker>,
) -> QueryResponseFut<BinderRegisterThreadChannelResult, DefaultFuchsiaResourceDialect> ⓘ
pub fn register_thread_channel( &self, server_end: ServerEnd<BinderThreadMarker>, ) -> QueryResponseFut<BinderRegisterThreadChannelResult, DefaultFuchsiaResourceDialect> ⓘ
Registers a dedicated 1:1 channel for synchronous Binder transactions.
Trait Implementations§
Source§impl BinderProxyInterface for BinderProxy
impl BinderProxyInterface for BinderProxy
type MapVmoResponseFut = QueryResponseFut<Result<(), Errno>>
type IoctlResponseFut = QueryResponseFut<Result<Vec<IoctlReadWrite>, Errno>>
type RegisterThreadChannelResponseFut = QueryResponseFut<Result<(), Errno>>
fn set_vmo(&self, vmo: Vmo, mapped_address: u64) -> Result<(), Error>
fn map_vmo(&self, vmo: Vmo, mapped_address: u64) -> Self::MapVmoResponseFut
fn ioctl( &self, tid: u64, request: u32, arg: u64, vmo: Vmo, ioctl_reads: &[IoctlReadWrite], files: Vec<FileHandle>, ) -> Self::IoctlResponseFut
fn register_thread_channel( &self, server_end: ServerEnd<BinderThreadMarker>, ) -> Self::RegisterThreadChannelResponseFut
Source§impl Clone for BinderProxy
impl Clone for BinderProxy
Source§impl Debug for BinderProxy
impl Debug for BinderProxy
Source§impl Proxy for BinderProxy
impl Proxy for BinderProxy
Source§type Protocol = BinderMarker
type Protocol = BinderMarker
Proxy controls.