aboutsummaryrefslogtreecommitdiff
path: root/src/mm-broadband-modem.h
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@lanedo.com>2012-09-10 13:45:23 +0200
committerAleksander Morgado <aleksander@lanedo.com>2012-09-14 07:05:22 +0200
commit4f9817741ff6284c895a90ff15cab3ab056ac21b (patch)
treecbe6f5b12768b252ed640403ccbc154a9f4ca11c /src/mm-broadband-modem.h
parent83dc9e3e1d32eb72ed60163a066c20d553f4c468 (diff)
broadband-modem: new methods to lock/unlock current SMS storages
The default AT commands to play with SMS rely on AT+CPMS to select the default memory storages for different operations. AT+CPMS defines 3 different storages, called 'mem1' (for reading/listing/deleting), 'mem2' (for storing or sending from storage) and 'mem3' (for receiving). For example, when an SMS is to be deleted, we first need to select with AT+CPMS the proper 'mem1' storage before issuing the command to delete the SMS part. But, in order to do this properly we need to synchronize the access to the currently set storages, so that no more than one action is run in the storages at the same time (e.g. don't store an SMS while another SMS is being deleted). In order to synchronize this access, we now provide commands to lock()/unlock() the storages, which should be used when we want to do some operation on them. Note that this logic is only required because we cannot specify the storage explicitly in the specific AT command operations. With QMI we don't need this locking/unlocking.
Diffstat (limited to 'src/mm-broadband-modem.h')
-rw-r--r--src/mm-broadband-modem.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/mm-broadband-modem.h b/src/mm-broadband-modem.h
index 33ea53f3..db987c6e 100644
--- a/src/mm-broadband-modem.h
+++ b/src/mm-broadband-modem.h
@@ -22,6 +22,7 @@
#include <glib-object.h>
#include "mm-base-modem.h"
+#include "ModemManager-enums.h"
#define MM_TYPE_BROADBAND_MODEM (mm_broadband_modem_get_type ())
#define MM_BROADBAND_MODEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MM_TYPE_BROADBAND_MODEM, MMBroadbandModem))
@@ -98,4 +99,15 @@ gchar *mm_broadband_modem_create_device_identifier (MMBroadbandModem *self,
const gchar *ati,
const gchar *ati1);
+/* Locking/unlocking SMS storages */
+void mm_broadband_modem_lock_storages (MMBroadbandModem *self,
+ MMSmsStorage mem1, /* reading/listing/deleting */
+ MMSmsStorage mem2, /* storing/sending */
+ GAsyncReadyCallback callback,
+ gpointer user_data);
+gboolean mm_broadband_modem_lock_sms_storages_finish (MMBroadbandModem *self,
+ GAsyncResult *res,
+ GError **error);
+void mm_broadband_modem_unlock_sms_storages (MMBroadbandModem *self);
+
#endif /* MM_BROADBAND_MODEM_H */