base-call: split AT-specific call code into MMCallAt

Signed-off-by: Dan Williams <dan@ioncontrol.co>
This commit is contained in:
Dan Williams
2025-05-30 07:57:50 -05:00
parent 3ed7f37876
commit 8392f30388
8 changed files with 521 additions and 352 deletions
+10 -9
View File
@@ -31,6 +31,7 @@
#include "mm-base-modem-at.h"
#include "mm-shared-cinterion.h"
#include "mm-modem-helpers-cinterion.h"
#include "mm-call-at.h"
G_DEFINE_INTERFACE (MMSharedCinterion, mm_shared_cinterion, MM_TYPE_IFACE_MODEM)
@@ -1005,15 +1006,15 @@ mm_shared_cinterion_create_call (MMIfaceModemVoice *self,
priv = get_private (MM_SHARED_CINTERION (self));
if (priv->slcc_support == FEATURE_SUPPORTED) {
mm_obj_dbg (self, "created new call with ^SLCC support");
return mm_base_call_new (MM_BASE_MODEM (self),
G_OBJECT (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 */
return mm_call_at_new (MM_BASE_MODEM (self),
G_OBJECT (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 */
@@ -49,6 +49,7 @@
#include "mm-broadband-bearer.h"
#include "mm-bearer-list.h"
#include "mm-sim-huawei.h"
#include "mm-call-at.h"
static void iface_modem_init (MMIfaceModemInterface *iface);
static void iface_modem_3gpp_init (MMIfaceModem3gppInterface *iface);
@@ -3880,13 +3881,13 @@ create_call (MMIfaceModemVoice *self,
MMCallDirection direction,
const gchar *number)
{
return mm_base_call_new (MM_BASE_MODEM (self),
G_OBJECT (self),
direction,
number,
TRUE, /* skip_incoming_timeout */
TRUE, /* supports_dialing_to_ringing */
TRUE); /* supports_ringing_to_active) */
return mm_call_at_new (MM_BASE_MODEM (self),
G_OBJECT (self),
direction,
number,
TRUE, /* skip_incoming_timeout */
TRUE, /* supports_dialing_to_ringing */
TRUE); /* supports_ringing_to_active) */
}
/*****************************************************************************/
+8 -7
View File
@@ -33,6 +33,7 @@
#include "mm-sim-ublox.h"
#include "mm-modem-helpers-ublox.h"
#include "mm-ublox-enums-types.h"
#include "mm-call-at.h"
static void iface_modem_init (MMIfaceModemInterface *iface);
static void iface_modem_voice_init (MMIfaceModemVoiceInterface *iface);
@@ -1505,13 +1506,13 @@ create_call (MMIfaceModemVoice *self,
MMCallDirection direction,
const gchar *number)
{
return mm_base_call_new (MM_BASE_MODEM (self),
G_OBJECT (self),
direction,
number,
TRUE, /* skip_incoming_timeout */
TRUE, /* supports_dialing_to_ringing */
TRUE); /* supports_ringing_to_active */
return mm_call_at_new (MM_BASE_MODEM (self),
G_OBJECT (self),
direction,
number,
TRUE, /* skip_incoming_timeout */
TRUE, /* supports_dialing_to_ringing */
TRUE); /* supports_ringing_to_active */
}
/*****************************************************************************/