mm_client_common

Trait AttachmentDelegate

Source
pub trait AttachmentDelegate:
    Send
    + Sync
    + Debug {
    // Required methods
    fn video_stream_start(&self, stream_seq: u64, params: VideoStreamParams);
    fn video_packet(&self, packet: Arc<Packet>);
    fn dropped_video_packet(&self, dropped: DroppedPacket);
    fn audio_stream_start(&self, stream_seq: u64, params: AudioStreamParams);
    fn audio_packet(&self, packet: Arc<Packet>);
    fn update_cursor(
        &self,
        icon: CursorIcon,
        image: Option<Vec<u8>>,
        hotspot_x: u32,
        hotspot_y: u32,
    );
    fn lock_pointer(&self, x: f64, y: f64);
    fn release_pointer(&self);
    fn display_params_changed(
        &self,
        params: DisplayParams,
        reattach_required: bool,
    );
    fn error(&self, err: ClientError);
    fn attachment_ended(&self);
}
Expand description

Used by client implementations to handle attachment events.

Required Methods§

Source

fn video_stream_start(&self, stream_seq: u64, params: VideoStreamParams)

The video stream is starting or restarting.

Source

fn video_packet(&self, packet: Arc<Packet>)

A video packet is available.

Source

fn dropped_video_packet(&self, dropped: DroppedPacket)

A video packet was lost.

Source

fn audio_stream_start(&self, stream_seq: u64, params: AudioStreamParams)

The audio stream is starting or restarting.

Source

fn audio_packet(&self, packet: Arc<Packet>)

An audio packet is available.

Source

fn update_cursor( &self, icon: CursorIcon, image: Option<Vec<u8>>, hotspot_x: u32, hotspot_y: u32, )

Source

fn lock_pointer(&self, x: f64, y: f64)

The pointer should be locked to the given location.

Source

fn release_pointer(&self)

The pointer should be released.

Source

fn display_params_changed(&self, params: DisplayParams, reattach_required: bool)

The remote session display params were changed. This usually requires the client to reattach. If reattach_required is true, the attachment should be considered ended. [attachment_ended] will not be called.

Source

fn error(&self, err: ClientError)

The client encountered an error. The attachment should be considered ended. [attachment_ended] will not be called.

Source

fn attachment_ended(&self)

The attachment was ended by the server.

Trait Implementations§

Source§

impl<T> FfiConverterArc<T> for dyn AttachmentDelegate

Source§

const TYPE_ID_META: MetadataBuffer

Source§

type FfiType = *const c_void

Source§

fn lower(obj: Arc<Self>) -> Self::FfiType

Source§

fn try_lift(v: Self::FfiType) -> Result<Arc<Self>>

Source§

fn write(obj: Arc<Self>, buf: &mut Vec<u8>)

Source§

fn try_read(buf: &mut &[u8]) -> Result<Arc<Self>>

Source§

impl<T> LiftRef<T> for dyn AttachmentDelegate

Implementors§