Skip to content

Commit da13227

Browse files
committed
clarify what should happen on multiple calls
1 parent 1bf3035 commit da13227

File tree

1 file changed

+17
-5
lines changed

1 file changed

+17
-5
lines changed

deltachat-ffi/deltachat.h

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1228,12 +1228,15 @@ uint32_t dc_init_webxdc_integration (dc_context_t* context, uint32_t c
12281228
* who will get informed by an #DC_EVENT_INCOMING_CALL event and rings.
12291229
*
12301230
* Possible actions during ringing:
1231+
* - caller cancels the call using dc_end_call(), callee receives #DC_EVENT_CALL_ENDED.
12311232
* - callee accepts using dc_accept_incoming_call(), caller receives #DC_EVENT_OUTGOING_CALL_ACCEPTED,
12321233
* callee's devices receive #DC_EVENT_INCOMING_CALL_ACCEPTED, call starts
12331234
* - callee rejects using dc_end_call(), caller receives #DC_EVENT_CALL_ENDED,
1234-
* callee's other devices receive #DC_EVENT_CALL_ENDED, done.
1235-
* - caller cancels the call using dc_end_call(), callee receives #DC_EVENT_CALL_ENDED, done.
1236-
* - after 1 minute without action, caller and callee receive #DC_EVENT_CALL_ENDED
1235+
* callee's other devices receive #DC_EVENT_CALL_ENDED.
1236+
* - callee is already in a call. in this case,
1237+
* UI may decide to show a notification instead of ringing.
1238+
* otherwise, this is same as timeout.
1239+
* - timeout: after 1 minute without action, caller and callee receive #DC_EVENT_CALL_ENDED
12371240
* to prevent endless ringing of callee
12381241
* in case caller got offline without being able to send cancellation message.
12391242
*
@@ -1246,6 +1249,9 @@ uint32_t dc_init_webxdc_integration (dc_context_t* context, uint32_t c
12461249
* In the UI, the sorted chatlist is used as an overview about calls as well as messages.
12471250
* To place a call with a contact that has no chat yet, use dc_create_chat_by_contact_id() first.
12481251
*
1252+
* UI will usually allow only one call at the same time,
1253+
* this has to be tracked by UI across profile, the core does not track this.
1254+
*
12491255
* @memberof dc_context_t
12501256
* @param context The context object.
12511257
* @param chat_id The chat to place a call for.
@@ -6650,14 +6656,20 @@ void dc_event_unref(dc_event_t* event);
66506656

66516657
/**
66526658
* Incoming call.
6653-
* UI will usually start ringing.
6659+
* UI will usually start ringing,
6660+
* or show a notification if there is already a call in some profile.
6661+
*
6662+
* Together with this event,
6663+
* an info-message is added to the corresponding chat.
6664+
* The info-message, however, is _not_ additionally notified using #DC_EVENT_INCOMING_MSG,
6665+
* if needed, this has to be done by the UI explicitly.
66546666
*
66556667
* If user takes action, dc_accept_incoming_call() or dc_end_call() should be called.
66566668
*
66576669
* Otherwise, ringing should end on #DC_EVENT_CALL_ENDED
66586670
* or #DC_EVENT_INCOMING_CALL_ACCEPTED
66596671
*
6660-
* @param data1 (int) msg_id
6672+
* @param data1 (int) msg_id ID of the info-message referring to the call,
66616673
*/
66626674
#define DC_EVENT_INCOMING_CALL 2550
66636675

0 commit comments

Comments
 (0)