Trait medea_client_api_proto::CommandHandler[][src]

pub trait CommandHandler {
    type Output;
    fn on_join_room(
        &mut self,
        member_id: MemberId,
        credential: Credential
    ) -> Self::Output;
fn on_leave_room(&mut self, member_id: MemberId) -> Self::Output;
fn on_make_sdp_offer(
        &mut self,
        peer_id: PeerId,
        sdp_offer: String,
        mids: HashMap<TrackId, String>,
        transceivers_statuses: HashMap<TrackId, bool>
    ) -> Self::Output;
fn on_make_sdp_answer(
        &mut self,
        peer_id: PeerId,
        sdp_answer: String,
        transceivers_statuses: HashMap<TrackId, bool>
    ) -> Self::Output;
fn on_set_ice_candidate(
        &mut self,
        peer_id: PeerId,
        candidate: IceCandidate
    ) -> Self::Output;
fn on_add_peer_connection_metrics(
        &mut self,
        peer_id: PeerId,
        metrics: PeerMetrics
    ) -> Self::Output;
fn on_update_tracks(
        &mut self,
        peer_id: PeerId,
        tracks_patches: Vec<TrackPatchCommand>
    ) -> Self::Output;
fn on_synchronize_me(&mut self, state: Room) -> Self::Output; }

Handler of Command variants.

Using Command::dispatch_with method dispatches Command variants to appropriate methods of this trait.

Associated Types

type Output[src]

Output type of all functions from this trait.

Loading content...

Required methods

fn on_join_room(
    &mut self,
    member_id: MemberId,
    credential: Credential
) -> Self::Output
[src]

Handles Command::JoinRoom variant of Command.

fn on_leave_room(&mut self, member_id: MemberId) -> Self::Output[src]

Handles Command::LeaveRoom variant of Command.

fn on_make_sdp_offer(
    &mut self,
    peer_id: PeerId,
    sdp_offer: String,
    mids: HashMap<TrackId, String>,
    transceivers_statuses: HashMap<TrackId, bool>
) -> Self::Output
[src]

Handles Command::MakeSdpOffer variant of Command.

fn on_make_sdp_answer(
    &mut self,
    peer_id: PeerId,
    sdp_answer: String,
    transceivers_statuses: HashMap<TrackId, bool>
) -> Self::Output
[src]

Handles Command::MakeSdpAnswer variant of Command.

fn on_set_ice_candidate(
    &mut self,
    peer_id: PeerId,
    candidate: IceCandidate
) -> Self::Output
[src]

Handles Command::SetIceCandidate variant of Command.

fn on_add_peer_connection_metrics(
    &mut self,
    peer_id: PeerId,
    metrics: PeerMetrics
) -> Self::Output
[src]

fn on_update_tracks(
    &mut self,
    peer_id: PeerId,
    tracks_patches: Vec<TrackPatchCommand>
) -> Self::Output
[src]

Handles Command::UpdateTracks variant of Command.

fn on_synchronize_me(&mut self, state: Room) -> Self::Output[src]

Handles Command::SynchronizeMe variant of Command.

Loading content...

Implementors

Loading content...