Struct ruma_events::call::negotiate::CallNegotiateEventContent
source · pub struct CallNegotiateEventContent {
pub call_id: OwnedVoipId,
pub party_id: OwnedVoipId,
pub version: VoipVersionId,
pub lifetime: UInt,
pub description: SessionDescription,
pub sdp_stream_metadata: BTreeMap<String, StreamMetadata>,
}
Expand description
Added in VoIP version 1. The content of an m.call.negotiate
event.
This event is sent by either party after the call is established to renegotiate it. It can be used for media pause, hold/resume, ICE restarts and voice/video call up/downgrading.
First an event must be sent with an offer
session description, which is replied to with an
event with an answer
session description.
Fields§
§call_id: OwnedVoipId
The ID of the call this event relates to.
party_id: OwnedVoipId
The unique ID for this session for the duration of the call.
Must be the same as the one sent by the previous invite or answer from this session.
version: VoipVersionId
The version of the VoIP specification this messages adheres to.
lifetime: UInt
The time in milliseconds that the negotiation is valid for.
description: SessionDescription
The session description of the negotiation.
sdp_stream_metadata: BTreeMap<String, StreamMetadata>
Metadata describing the streams that will be sent.
This is a map of stream ID to metadata about the stream.
Implementations§
source§impl CallNegotiateEventContent
impl CallNegotiateEventContent
sourcepub fn new(
call_id: OwnedVoipId,
party_id: OwnedVoipId,
version: VoipVersionId,
lifetime: UInt,
description: SessionDescription,
) -> Self
pub fn new( call_id: OwnedVoipId, party_id: OwnedVoipId, version: VoipVersionId, lifetime: UInt, description: SessionDescription, ) -> Self
Creates a CallNegotiateEventContent
with the given call ID, party ID, lifetime and
description.
sourcepub fn version_1(
call_id: OwnedVoipId,
party_id: OwnedVoipId,
lifetime: UInt,
description: SessionDescription,
) -> Self
pub fn version_1( call_id: OwnedVoipId, party_id: OwnedVoipId, lifetime: UInt, description: SessionDescription, ) -> Self
Convenience method to create a version 1 CallNegotiateEventContent
with all the required
fields.
Trait Implementations§
source§impl Clone for CallNegotiateEventContent
impl Clone for CallNegotiateEventContent
source§fn clone(&self) -> CallNegotiateEventContent
fn clone(&self) -> CallNegotiateEventContent
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for CallNegotiateEventContent
impl Debug for CallNegotiateEventContent
source§impl<'de> Deserialize<'de> for CallNegotiateEventContent
impl<'de> Deserialize<'de> for CallNegotiateEventContent
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl EventContent for CallNegotiateEventContent
impl EventContent for CallNegotiateEventContent
source§type EventType = MessageLikeEventType
type EventType = MessageLikeEventType
source§fn event_type(&self) -> Self::EventType
fn event_type(&self) -> Self::EventType
m.room.message
.source§impl From<CallNegotiateEventContent> for AnyMessageLikeEventContent
impl From<CallNegotiateEventContent> for AnyMessageLikeEventContent
source§fn from(c: CallNegotiateEventContent) -> Self
fn from(c: CallNegotiateEventContent) -> Self
source§impl RedactContent for CallNegotiateEventContent
impl RedactContent for CallNegotiateEventContent
source§type Redacted = RedactedCallNegotiateEventContent
type Redacted = RedactedCallNegotiateEventContent
source§fn redact(self, version: &RoomVersionId) -> RedactedCallNegotiateEventContent
fn redact(self, version: &RoomVersionId) -> RedactedCallNegotiateEventContent
self
into a redacted form (removing most or all fields) according to the spec. Read moreimpl MessageLikeEventContent for CallNegotiateEventContent
Auto Trait Implementations§
impl Freeze for CallNegotiateEventContent
impl RefUnwindSafe for CallNegotiateEventContent
impl Send for CallNegotiateEventContent
impl Sync for CallNegotiateEventContent
impl Unpin for CallNegotiateEventContent
impl UnwindSafe for CallNegotiateEventContent
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)