diff options
author | Dan Williams <dan@ioncontrol.co> | 2025-04-17 21:54:14 -0500 |
---|---|---|
committer | Dan Williams <dan@ioncontrol.co> | 2025-05-08 20:24:37 -0500 |
commit | 1283ee8c2a92c40d653168f94d8d6816d8be82b9 (patch) | |
tree | 41e3a0d00001909dbbbad425d0b7e38b66e1d647 /src/mm-iface-modem-messaging.c | |
parent | 683a33b3034e962bdd247708aa2170112a9f8d12 (diff) |
base-sms,iface-modem-messaging: move lock/unlock logic into the interface
Allows us to test things that rely on MMBaseSms more easily..
Signed-off-by: Dan Williams <dan@ioncontrol.co>
Diffstat (limited to 'src/mm-iface-modem-messaging.c')
-rw-r--r-- | src/mm-iface-modem-messaging.c | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/src/mm-iface-modem-messaging.c b/src/mm-iface-modem-messaging.c index 581843c5..ef6b546c 100644 --- a/src/mm-iface-modem-messaging.c +++ b/src/mm-iface-modem-messaging.c @@ -101,6 +101,49 @@ mm_iface_modem_messaging_create_sms (MMIfaceModemMessaging *self) /*****************************************************************************/ +void +mm_iface_modem_messaging_lock_storages (MMIfaceModemMessaging *self, + MMSmsStorage mem1, + MMSmsStorage mem2, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_assert (MM_IFACE_MODEM_MESSAGING_GET_IFACE (self)->lock_storages != NULL); + + MM_IFACE_MODEM_MESSAGING_GET_IFACE (self)->lock_storages (self, + mem1, + mem2, + callback, + user_data); +} + +gboolean +mm_iface_modem_messaging_lock_storages_finish (MMIfaceModemMessaging *self, + GAsyncResult *res, + GError **error) + +{ + g_assert (MM_IFACE_MODEM_MESSAGING_GET_IFACE (self)->lock_storages_finish != NULL); + + return MM_IFACE_MODEM_MESSAGING_GET_IFACE (self)->lock_storages_finish (self, + res, + error); +} + +void +mm_iface_modem_messaging_unlock_storages (MMIfaceModemMessaging *self, + gboolean mem1, + gboolean mem2) +{ + g_assert (MM_IFACE_MODEM_MESSAGING_GET_IFACE (self)->unlock_storages != NULL); + + MM_IFACE_MODEM_MESSAGING_GET_IFACE (self)->unlock_storages (self, + mem1, + mem2); +} + +/*****************************************************************************/ + typedef struct { GArray *supported_mem1; GArray *supported_mem2; |