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.h | |
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.h')
-rw-r--r-- | src/mm-iface-modem-messaging.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/mm-iface-modem-messaging.h b/src/mm-iface-modem-messaging.h index 44cb077b..d341d3b0 100644 --- a/src/mm-iface-modem-messaging.h +++ b/src/mm-iface-modem-messaging.h @@ -78,6 +78,21 @@ struct _MMIfaceModemMessagingInterface { GAsyncResult *res, GError **error); + /* Lock storages (async) */ + void (*lock_storages) (MMIfaceModemMessaging *self, + MMSmsStorage mem1, /* reading/listing/deleting */ + MMSmsStorage mem2, /* storing/sending */ + GAsyncReadyCallback callback, + gpointer user_data); + gboolean (*lock_storages_finish) (MMIfaceModemMessaging *self, + GAsyncResult *res, + GError **error); + + /* Unlock storages */ + void (*unlock_storages) (MMIfaceModemMessaging *self, + gboolean mem1, + gboolean mem2); + /* Setup SMS format (async) */ void (* setup_sms_format) (MMIfaceModemMessaging *self, GAsyncReadyCallback callback, @@ -182,6 +197,19 @@ gboolean mm_iface_modem_messaging_is_storage_supported_for_receiving (MMIfaceMod /* SMS creation */ MMBaseSms *mm_iface_modem_messaging_create_sms (MMIfaceModemMessaging *self); +/* Locking/unlocking SMS storages */ +void mm_iface_modem_messaging_lock_storages (MMIfaceModemMessaging *self, + MMSmsStorage mem1, + MMSmsStorage mem2, + GAsyncReadyCallback callback, + gpointer user_data); +gboolean mm_iface_modem_messaging_lock_storages_finish (MMIfaceModemMessaging *self, + GAsyncResult *res, + GError **error); +void mm_iface_modem_messaging_unlock_storages (MMIfaceModemMessaging *self, + gboolean mem1, + gboolean mem2); + /* Look for a new valid multipart reference */ guint8 mm_iface_modem_messaging_get_local_multipart_reference (MMIfaceModemMessaging *self, const gchar *number, |