ruma_events/call/
sdp_stream_metadata_changed.rs1use std::collections::BTreeMap;
6
7use ruma_common::{OwnedVoipId, VoipVersionId};
8use ruma_macros::EventContent;
9use serde::{Deserialize, Serialize};
10
11use super::StreamMetadata;
12
13#[derive(Clone, Debug, Deserialize, Serialize, EventContent)]
17#[cfg_attr(not(ruma_unstable_exhaustive_types), non_exhaustive)]
18#[ruma_event(type = "m.call.sdp_stream_metadata_changed", alias = "org.matrix.call.sdp_stream_metadata_changed", kind = MessageLike)]
19pub struct CallSdpStreamMetadataChangedEventContent {
20 pub call_id: OwnedVoipId,
22
23 pub party_id: OwnedVoipId,
25
26 pub version: VoipVersionId,
30
31 #[serde(default, skip_serializing_if = "BTreeMap::is_empty")]
35 pub sdp_stream_metadata: BTreeMap<String, StreamMetadata>,
36}
37
38impl CallSdpStreamMetadataChangedEventContent {
39 pub fn new(
42 call_id: OwnedVoipId,
43 party_id: OwnedVoipId,
44 version: VoipVersionId,
45 sdp_stream_metadata: BTreeMap<String, StreamMetadata>,
46 ) -> Self {
47 Self { call_id, party_id, version, sdp_stream_metadata }
48 }
49}