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§
Sourcefn video_stream_start(&self, stream_seq: u64, params: VideoStreamParams)
fn video_stream_start(&self, stream_seq: u64, params: VideoStreamParams)
The video stream is starting or restarting.
Sourcefn video_packet(&self, packet: Arc<Packet>)
fn video_packet(&self, packet: Arc<Packet>)
A video packet is available.
Sourcefn dropped_video_packet(&self, dropped: DroppedPacket)
fn dropped_video_packet(&self, dropped: DroppedPacket)
A video packet was lost.
Sourcefn audio_stream_start(&self, stream_seq: u64, params: AudioStreamParams)
fn audio_stream_start(&self, stream_seq: u64, params: AudioStreamParams)
The audio stream is starting or restarting.
Sourcefn audio_packet(&self, packet: Arc<Packet>)
fn audio_packet(&self, packet: Arc<Packet>)
An audio packet is available.
fn update_cursor( &self, icon: CursorIcon, image: Option<Vec<u8>>, hotspot_x: u32, hotspot_y: u32, )
Sourcefn lock_pointer(&self, x: f64, y: f64)
fn lock_pointer(&self, x: f64, y: f64)
The pointer should be locked to the given location.
Sourcefn release_pointer(&self)
fn release_pointer(&self)
The pointer should be released.
Sourcefn display_params_changed(&self, params: DisplayParams, reattach_required: bool)
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.
Sourcefn error(&self, err: ClientError)
fn error(&self, err: ClientError)
The client encountered an error. The attachment should be considered ended. [attachment_ended] will not be called.
Sourcefn attachment_ended(&self)
fn attachment_ended(&self)
The attachment was ended by the server.