broadband-modem: implement HangupAll() with +CHUP

This commit is contained in:
Aleksander Morgado
2019-06-27 14:30:34 +02:00
parent efcc4c60fe
commit 7ceac6f789

View File

@@ -7718,6 +7718,30 @@ modem_voice_hangup_and_accept (MMIfaceModemVoice *self,
user_data);
}
/*****************************************************************************/
/* Hangup all (Voice interface) */
static gboolean
modem_voice_hangup_all_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_all (MMIfaceModemVoice *self,
GAsyncReadyCallback callback,
gpointer user_data)
{
mm_base_modem_at_command (MM_BASE_MODEM (self),
"+CHUP",
3,
FALSE,
callback,
user_data);
}
/*****************************************************************************/
/* ESN loading (CDMA interface) */
@@ -11944,6 +11968,8 @@ iface_modem_voice_init (MMIfaceModemVoice *iface)
iface->hold_and_accept_finish = modem_voice_hold_and_accept_finish;
iface->hangup_and_accept = modem_voice_hangup_and_accept;
iface->hangup_and_accept_finish = modem_voice_hangup_and_accept_finish;
iface->hangup_all = modem_voice_hangup_all;
iface->hangup_all_finish = modem_voice_hangup_all_finish;
}
static void