diff options
author | Dan Williams <dan@ioncontrol.co> | 2025-05-08 20:36:44 -0500 |
---|---|---|
committer | Dan Williams <dan@ioncontrol.co> | 2025-05-08 20:36:44 -0500 |
commit | 4bb6026e37e74aad4faa50e89f3f4d98bec7368d (patch) | |
tree | 63d214f48abebcd33bf3f0f17ddcf8fa28cae3c5 /src/mm-iface-modem-messaging.h | |
parent | efcc960b130356e6b05d05a915ff0f9646b00d5f (diff) | |
parent | 1d5cc0addb6576d007183454c0702d8ee3ab586f (diff) |
Merge request !1341 from 'mbim-multipart-fix'
sms: always use SMS_PART_INVALID_INDEX unstored parts
https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1341
Closes #979
Diffstat (limited to 'src/mm-iface-modem-messaging.h')
-rw-r--r-- | src/mm-iface-modem-messaging.h | 46 |
1 files changed, 35 insertions, 11 deletions
diff --git a/src/mm-iface-modem-messaging.h b/src/mm-iface-modem-messaging.h index 44cb077b..6cf7a0f6 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, @@ -127,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) */ @@ -166,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, @@ -179,12 +193,22 @@ gboolean mm_iface_modem_messaging_is_storage_supported_for_receiving (MMIfaceMod MMSmsStorage storage, GError **error); +MMSmsStorage mm_iface_modem_messaging_get_default_storage (MMIfaceModemMessaging *self); + /* SMS creation */ MMBaseSms *mm_iface_modem_messaging_create_sms (MMIfaceModemMessaging *self); -/* Look for a new valid multipart reference */ -guint8 mm_iface_modem_messaging_get_local_multipart_reference (MMIfaceModemMessaging *self, - const gchar *number, - GError **error); +/* 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); #endif /* MM_IFACE_MODEM_MESSAGING_H */ |