Skip to content

Commit af59b53

Browse files
committed
clarify what should happen on multiple calls
1 parent aded170 commit af59b53

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.
@@ -6707,14 +6713,20 @@ void dc_event_unref(dc_event_t* event);
67076713

67086714
/**
67096715
* Incoming call.
6710-
* UI will usually start ringing.
6716+
* UI will usually start ringing,
6717+
* or show a notification if there is already a call in some profile.
6718+
*
6719+
* Together with this event,
6720+
* an info-message is added to the corresponding chat.
6721+
* The info-message, however, is _not_ additionally notified using #DC_EVENT_INCOMING_MSG,
6722+
* if needed, this has to be done by the UI explicitly.
67116723
*
67126724
* If user takes action, dc_accept_incoming_call() or dc_end_call() should be called.
67136725
*
67146726
* Otherwise, ringing should end on #DC_EVENT_CALL_ENDED
67156727
* or #DC_EVENT_INCOMING_CALL_ACCEPTED
67166728
*
6717-
* @param data1 (int) msg_id
6729+
* @param data1 (int) msg_id ID of the info-message referring to the call,
67186730
*/
67196731
#define DC_EVENT_INCOMING_CALL 2550
67206732

0 commit comments

Comments
 (0)