use std::collections::BTreeMap;
use ruma_common::{OwnedVoipId, VoipVersionId};
use ruma_macros::EventContent;
use serde::{Deserialize, Serialize};
use super::StreamMetadata;
#[derive(Clone, Debug, Deserialize, Serialize, EventContent)]
#[cfg_attr(not(ruma_unstable_exhaustive_types), non_exhaustive)]
#[ruma_event(type = "m.call.sdp_stream_metadata_changed", alias = "org.matrix.call.sdp_stream_metadata_changed", kind = MessageLike)]
pub struct CallSdpStreamMetadataChangedEventContent {
pub call_id: OwnedVoipId,
pub party_id: OwnedVoipId,
pub version: VoipVersionId,
#[serde(default, skip_serializing_if = "BTreeMap::is_empty")]
pub sdp_stream_metadata: BTreeMap<String, StreamMetadata>,
}
impl CallSdpStreamMetadataChangedEventContent {
pub fn new(
call_id: OwnedVoipId,
party_id: OwnedVoipId,
version: VoipVersionId,
sdp_stream_metadata: BTreeMap<String, StreamMetadata>,
) -> Self {
Self { call_id, party_id, version, sdp_stream_metadata }
}
}