call: две фазы исходящего вызова — индикация + разные гудки (desktop/Android)

This commit is contained in:
evgeny committed 2026-09-23 19:16:53 +03:00
1 parent 7198154106
commit b90dc752d2
21 files changed
+170 -21

No files matched your search

@@ -53,6 +53,7 @@ static gui_call_id_fn g_call_ringing_cb = nullptr;
static gui_call_id_fn g_call_accepted_cb = nullptr;
static gui_call_ended_fn g_call_ended_cb = nullptr;
static gui_call_ended_fn g_call_declined_cb = nullptr;
static gui_call_error_fn g_call_error_cb = nullptr;
static gui_call_path_fn g_call_path_cb = nullptr;
static gui_radio_talk_fn g_radio_talk_cb = nullptr;
static gui_dm_msg_received_fn g_dm_msg_received_cb = nullptr;
@@ -307,6 +308,15 @@ void GuiBridgeReceiver::processPost(int eventType, QByteArray data) {
if (g_call_declined_cb) g_call_declined_cb(callId, d[8]);
}
break;
case GUI_EVT_CALL_ERROR:
if (dlen >= 9) {
uint64_t callId; memcpy(&callId, d, 8);
uint8_t err = d[8];
DEBUG_INFO(DEBUG_CATEGORY_CHAT_SYNC, "gui_bridge: CALL_ERROR id=0x%016llx err=%u text=%.*s",
(unsigned long long)callId, (unsigned)err, dlen - 9, (const char*)d + 9);
if (g_call_error_cb) g_call_error_cb(callId, err, (const char*)d + 9, dlen - 9);
}
break;
case GUI_EVT_CALL_PATH:
if (dlen >= 9) {
uint64_t callId; memcpy(&callId, d, 8);
@@ -503,6 +513,10 @@ void gui_bridge_set_call_declined_cb(gui_call_ended_fn cb) {
g_call_declined_cb = cb;
}
void gui_bridge_set_call_error_cb(gui_call_error_fn cb) {
g_call_error_cb = cb;
}
void gui_bridge_set_call_path_cb(gui_call_path_fn cb) {
g_call_path_cb = cb;
}