aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@lanedo.com>2012-09-10 18:26:50 +0200
committerAleksander Morgado <aleksander@lanedo.com>2012-09-14 07:05:23 +0200
commitfdb9db8d2858c7c53cad0666c539faefd990f6f7 (patch)
tree3e72f967c9fc2920769158033ffe098c5dfa8a15
parent4f7534452dc9eb96c5119052707987c41c7c091d (diff)
libmm-glib: new `mm_modem_messaging_get_default_storage()' method
-rw-r--r--libmm-glib/mm-modem-messaging.c16
-rw-r--r--libmm-glib/mm-modem-messaging.h7
2 files changed, 20 insertions, 3 deletions
diff --git a/libmm-glib/mm-modem-messaging.c b/libmm-glib/mm-modem-messaging.c
index bc0b5ffb..0b66c043 100644
--- a/libmm-glib/mm-modem-messaging.c
+++ b/libmm-glib/mm-modem-messaging.c
@@ -87,6 +87,22 @@ mm_modem_messaging_get_supported_storages (MMModemMessaging *self,
*storages = (MMSmsStorage *)g_array_free (array, FALSE);
}
+/**
+ * mm_modem_messaging_get_default_storage:
+ * @self: A #MMModem.
+ *
+ * Gets the default SMS storage used when storing or receiving SMS messages.
+ *
+ * Returns: the default #MMSmsStorage.
+ */
+MMSmsStorage
+mm_modem_messaging_get_default_storage (MMModemMessaging *self)
+{
+ g_return_val_if_fail (MM_GDBUS_IS_MODEM_MESSAGING (self), MM_SMS_STORAGE_UNKNOWN);
+
+ return (MMSmsStorage)mm_gdbus_modem_messaging_get_default_storage (self);
+}
+
typedef struct {
MMModemMessaging *self;
GSimpleAsyncResult *result;
diff --git a/libmm-glib/mm-modem-messaging.h b/libmm-glib/mm-modem-messaging.h
index 6e8ad72e..866b27c2 100644
--- a/libmm-glib/mm-modem-messaging.h
+++ b/libmm-glib/mm-modem-messaging.h
@@ -39,9 +39,10 @@ typedef MmGdbusModemMessaging MMModemMessaging;
const gchar *mm_modem_messaging_get_path (MMModemMessaging *self);
gchar *mm_modem_messaging_dup_path (MMModemMessaging *self);
-void mm_modem_messaging_get_supported_storages (MMModemMessaging *self,
- MMSmsStorage **storages,
- guint *n_storages);
+void mm_modem_messaging_get_supported_storages (MMModemMessaging *self,
+ MMSmsStorage **storages,
+ guint *n_storages);
+MMSmsStorage mm_modem_messaging_get_default_storage (MMModemMessaging *self);
void mm_modem_messaging_create (MMModemMessaging *self,
MMSmsProperties *properties,