api: add has_video attribute to incoming call events

This allows UI to show if incoming call is a video or audio call
and disable camera by default for audio calls.
This commit is contained in:
link2xt
2025-09-15 20:54:44 +00:00
committed by l
parent 66271db8c0
commit 129e970727
9 changed files with 116 additions and 4 deletions

View File

@@ -427,6 +427,8 @@ pub enum EventType {
msg_id: u32,
/// User-defined info as passed to place_outgoing_call()
place_call_info: String,
/// True if incoming call is a video call.
has_video: bool,
},
/// Incoming call accepted.
@@ -604,9 +606,11 @@ impl From<CoreEventType> for EventType {
CoreEventType::IncomingCall {
msg_id,
place_call_info,
has_video,
} => IncomingCall {
msg_id: msg_id.to_u32(),
place_call_info,
has_video,
},
CoreEventType::IncomingCallAccepted { msg_id } => IncomingCallAccepted {
msg_id: msg_id.to_u32(),