broadband-modem: implement HangupAndAccept() with +CHLD=1
This commit is contained in:
@@ -7670,6 +7670,30 @@ modem_voice_create_call (MMIfaceModemVoice *_self,
|
||||
self->priv->clcc_supported); /* ringing->active supported */
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/* Hangup and accept (Voice interface) */
|
||||
|
||||
static gboolean
|
||||
modem_voice_hangup_and_accept_finish (MMIfaceModemVoice *self,
|
||||
GAsyncResult *res,
|
||||
GError **error)
|
||||
{
|
||||
return !!mm_base_modem_at_command_finish (MM_BASE_MODEM (self), res, error);
|
||||
}
|
||||
|
||||
static void
|
||||
modem_voice_hangup_and_accept (MMIfaceModemVoice *self,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data)
|
||||
{
|
||||
mm_base_modem_at_command (MM_BASE_MODEM (self),
|
||||
"+CHLD=1",
|
||||
20,
|
||||
FALSE,
|
||||
callback,
|
||||
user_data);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/* ESN loading (CDMA interface) */
|
||||
|
||||
@@ -11892,6 +11916,8 @@ iface_modem_voice_init (MMIfaceModemVoice *iface)
|
||||
iface->create_call = modem_voice_create_call;
|
||||
iface->load_call_list = modem_voice_load_call_list;
|
||||
iface->load_call_list_finish = modem_voice_load_call_list_finish;
|
||||
iface->hangup_and_accept = modem_voice_hangup_and_accept;
|
||||
iface->hangup_and_accept_finish = modem_voice_hangup_and_accept_finish;
|
||||
}
|
||||
|
||||
static void
|
||||
|
Reference in New Issue
Block a user