From b81f23e24aad7d4fb37e837bbdcab4f43bccfc71 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Sat, 19 Apr 2025 10:30:58 -0500 Subject: base-sms,sms-list,iface-messaging: move MMBaseSms creation to MMBroadbandModem class This commit moves creation of the MMBaseSms objects out of MMSmsList and up into MMIfaceModemMessaging (which is already a MMBroadbandModem) and the MMBroadbandModem subclasses themselves. This flattens the creation of MMBaseSms objects by passing them down from the object that creates the SMS parts, rather than having a convoluted callback scheme relying on MMSmsList and MMBaseSms having direct knowledge of their owning modem. The goal is to eventually remove usage of MMBaseModem from MMBaseSms and MMSmsList so that we can test them more easily. Signed-off-by: Dan Williams --- src/mm-iface-modem-messaging.h | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'src/mm-iface-modem-messaging.h') diff --git a/src/mm-iface-modem-messaging.h b/src/mm-iface-modem-messaging.h index d341d3b0..f62324c9 100644 --- a/src/mm-iface-modem-messaging.h +++ b/src/mm-iface-modem-messaging.h @@ -142,9 +142,6 @@ struct _MMIfaceModemMessagingInterface { gboolean (*load_initial_sms_parts_finish) (MMIfaceModemMessaging *self, GAsyncResult *res, GError **error); - - /* Create SMS objects */ - MMBaseSms * (* create_sms) (MMIfaceModemMessaging *self); }; /* Initialize Messaging interface (async) */ @@ -181,10 +178,12 @@ void mm_iface_modem_messaging_bind_simple_status (MMIfaceModemMessaging *self, MMSimpleStatus *status); /* Report new SMS part */ -gboolean mm_iface_modem_messaging_take_part (MMIfaceModemMessaging *self, - MMSmsPart *sms_part, - MMSmsState state, - MMSmsStorage storage); +gboolean mm_iface_modem_messaging_take_part (MMIfaceModemMessaging *self, + MMBaseSms *uninitialized_sms, + MMSmsPart *sms_part, + MMSmsState state, + MMSmsStorage storage, + GError **error); /* Check storage support */ gboolean mm_iface_modem_messaging_is_storage_supported_for_storing (MMIfaceModemMessaging *self, -- cgit v1.2.3-70-g09d2