fidl_fuchsia_ui_pointerinjector

Enum RegistryRequest

Source
pub enum RegistryRequest {
    Register {
        config: Config,
        injector: ServerEnd<DeviceMarker>,
        responder: RegistryRegisterResponder,
    },
}
Expand description

A coordination mechanism to clearly define the injecting of pointer events into the scene (injection policy, injection context, etc), for dispatching pointer events to UI clients (referenced by |fuchsia.ui.views.ViewRef|).

NOTE WELL! ONLY COMPONENTS IN THE TRUSTED COMPUTING BASE SHOULD BE GRANTED ACCESS TO THIS PROTOCOL. (1) The injector device acts with the user’s authority. UI clients cannot tell the difference between a real user and an injector device. (2) The context is self-specified when registering the injector device. An injector device that gains access to a sensitive context will operate in that scope. (3) The injected events may be arbitrary. An injector device can inject whatever it wants to the clients it can reach.

This protocol defines the context and target for an injector |Device|, places a viewport in spatial relation to the target, and connects the |Device| to the viewport. These parameters are set up in the |Config|. A |Device| may inject pointer events on the viewport, but the dispatch of pointer events to UI clients in the target will depend on the dispatch policy and the scene topology.

A |Device| operates within a context, and it serves two purposes: (1) Scoping. It confirms the |Device|’s authority to inject pointer events on the specified target. (2) Coordinate system. It provides the reference coordinate system to define the viewport’s position and size, relative to the target.

Guarantees. A |Device| is directed at a specified target in the scene, and such a target is afforded some guarantees against snooping and interference from UI clients outside the target’s view tree (“non-target clients”). Non-target clients never have injected events dispatched to them: a |Device| preserves confidentiality for target clients. Non-target clients never block injected events from reaching the target on injection, or from reaching target clients on dispatch: a |Device| preserves integrity and availability for target clients. However, the |Device| itself is subject to disruption by ancestor views of the target (see connectivity invariant).

Note. This protocol, and its policies, are not a sufficient guard against UI redress attacks! The confidentiality, integrity, and availability guarantees apply only with respect to non-target clients. Within a target, UI redress attacks can still happen, between target clients.

Connectivity invariant. A |Device| operates in a stable view tree that is connected to the root view. When either the target, or both context and target, are disconnected from the view tree by a UI client, the |Device| channel is closed. If an event stream was in flight, the server dispatches a final CANCEL event following channel closure; this CANCEL event is then propagated according to dispatch policy.

Variants§

§

Register

Sets up a context for a |Device|, the target for the |Device|, and directs the |Device| at the target via a viewport, positioned in the context. These parameters are specified in a |Config|.

If |config| is invalid (e.g., missing important data), the |Device| request will be denied: the channel will be closed.

The return event tells the caller that (1) the server has processed the call, and (2) the |Device| is connected.

Fields

§config: Config
§injector: ServerEnd<DeviceMarker>

Implementations§

Source§

impl RegistryRequest

Source

pub fn into_register( self, ) -> Option<(Config, ServerEnd<DeviceMarker>, RegistryRegisterResponder)>

Source

pub fn method_name(&self) -> &'static str

Name of the method defined in FIDL

Trait Implementations§

Source§

impl Debug for RegistryRequest

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T, D> Encode<Ambiguous1, D> for T
where D: ResourceDialect,

§

unsafe fn encode( self, _encoder: &mut Encoder<'_, D>, _offset: usize, _depth: Depth, ) -> Result<(), Error>

Encodes the object into the encoder’s buffers. Any handles stored in the object are swapped for Handle::INVALID. Read more
§

impl<T, D> Encode<Ambiguous2, D> for T
where D: ResourceDialect,

§

unsafe fn encode( self, _encoder: &mut Encoder<'_, D>, _offset: usize, _depth: Depth, ) -> Result<(), Error>

Encodes the object into the encoder’s buffers. Any handles stored in the object are swapped for Handle::INVALID. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> Pointable for T

§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more