diff options
author | Aleksander Morgado <aleksander@aleksander.es> | 2019-06-16 16:15:28 +0200 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2019-07-11 23:01:08 +0200 |
commit | faaaf2027662b3f00bbdb90076abd72d5eed9397 (patch) | |
tree | 9ff7582891b5e51c8fd8872f0addb6e329b05a31 | |
parent | b22f90c4c4f874b5bef0e0b7a45b8888328e6aa4 (diff) |
cinterion: when ^SLCC is supported, detailed call state updates are implicit
-rw-r--r-- | plugins/cinterion/mm-broadband-modem-cinterion.c | 2 | ||||
-rw-r--r-- | plugins/cinterion/mm-broadband-modem-qmi-cinterion.c | 2 | ||||
-rw-r--r-- | plugins/cinterion/mm-shared-cinterion.c | 29 | ||||
-rw-r--r-- | plugins/cinterion/mm-shared-cinterion.h | 7 |
4 files changed, 40 insertions, 0 deletions
diff --git a/plugins/cinterion/mm-broadband-modem-cinterion.c b/plugins/cinterion/mm-broadband-modem-cinterion.c index 01531a01..0021d444 100644 --- a/plugins/cinterion/mm-broadband-modem-cinterion.c +++ b/plugins/cinterion/mm-broadband-modem-cinterion.c @@ -1965,6 +1965,8 @@ iface_modem_voice_init (MMIfaceModemVoice *iface) { iface_modem_voice_parent = g_type_interface_peek_parent (iface); + iface->create_call = mm_shared_cinterion_create_call; + iface->enable_unsolicited_events = mm_shared_cinterion_voice_enable_unsolicited_events; iface->enable_unsolicited_events_finish = mm_shared_cinterion_voice_enable_unsolicited_events_finish; iface->disable_unsolicited_events = mm_shared_cinterion_voice_disable_unsolicited_events; diff --git a/plugins/cinterion/mm-broadband-modem-qmi-cinterion.c b/plugins/cinterion/mm-broadband-modem-qmi-cinterion.c index a2d45e67..ff864082 100644 --- a/plugins/cinterion/mm-broadband-modem-qmi-cinterion.c +++ b/plugins/cinterion/mm-broadband-modem-qmi-cinterion.c @@ -89,6 +89,8 @@ iface_modem_voice_init (MMIfaceModemVoice *iface) { iface_modem_voice_parent = g_type_interface_peek_parent (iface); + iface->create_call = mm_shared_cinterion_create_call; + iface->enable_unsolicited_events = mm_shared_cinterion_voice_enable_unsolicited_events; iface->enable_unsolicited_events_finish = mm_shared_cinterion_voice_enable_unsolicited_events_finish; iface->disable_unsolicited_events = mm_shared_cinterion_voice_disable_unsolicited_events; diff --git a/plugins/cinterion/mm-shared-cinterion.c b/plugins/cinterion/mm-shared-cinterion.c index 59bf3266..cfc5b0ca 100644 --- a/plugins/cinterion/mm-shared-cinterion.c +++ b/plugins/cinterion/mm-shared-cinterion.c @@ -799,6 +799,35 @@ mm_shared_cinterion_enable_location_gathering (MMIfaceModemLocation *self, } /*****************************************************************************/ + +MMBaseCall * +mm_shared_cinterion_create_call (MMIfaceModemVoice *self, + MMCallDirection direction, + const gchar *number) +{ + Private *priv; + + /* If ^SLCC is supported create a cinterion call object */ + priv = get_private (MM_SHARED_CINTERION (self)); + if (priv->slcc_support == FEATURE_SUPPORTED) { + mm_dbg ("Created new call with ^SLCC support"); + return mm_base_call_new (MM_BASE_MODEM (self), + direction, + number, + /* When SLCC is supported we have support for detailed + * call list events via call list report URCs */ + TRUE, /* incoming timeout not required */ + TRUE, /* dialing->ringing supported */ + TRUE); /* ringing->active supported */ + } + + /* otherwise, run parent's generic base call logic */ + g_assert (priv->iface_modem_voice_parent); + g_assert (priv->iface_modem_voice_parent->create_call); + return priv->iface_modem_voice_parent->create_call (self, direction, number); +} + +/*****************************************************************************/ /* Common enable/disable voice unsolicited events */ typedef struct { diff --git a/plugins/cinterion/mm-shared-cinterion.h b/plugins/cinterion/mm-shared-cinterion.h index f1dbac25..8569419d 100644 --- a/plugins/cinterion/mm-shared-cinterion.h +++ b/plugins/cinterion/mm-shared-cinterion.h @@ -70,6 +70,13 @@ gboolean mm_shared_cinterion_disable_location_gathering_finish (MMI GAsyncResult *res, GError **error); +/*****************************************************************************/ +/* Create call (Voice interface) */ + +MMBaseCall *mm_shared_cinterion_create_call (MMIfaceModemVoice *self, + MMCallDirection direction, + const gchar *number); + void mm_shared_cinterion_voice_setup_unsolicited_events (MMIfaceModemVoice *self, GAsyncReadyCallback callback, gpointer user_data); |