diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/mm-iface-modem-messaging.c | 27 | ||||
-rw-r--r-- | src/mm-iface-modem-messaging.h | 1 |
2 files changed, 27 insertions, 1 deletions
diff --git a/src/mm-iface-modem-messaging.c b/src/mm-iface-modem-messaging.c index d5aa01bb..88f23e5e 100644 --- a/src/mm-iface-modem-messaging.c +++ b/src/mm-iface-modem-messaging.c @@ -18,6 +18,7 @@ #include "mm-iface-modem.h" #include "mm-iface-modem-messaging.h" +#include "mm-sms-list.h" #include "mm-log.h" #define SUPPORT_CHECKED_TAG "messaging-support-checked-tag" @@ -103,6 +104,11 @@ interface_disabling_step (DisablingContext *ctx) ctx->step++; case DISABLING_STEP_LAST: + /* Clear SMS list */ + g_object_set (ctx->self, + MM_IFACE_MODEM_MESSAGING_SMS_LIST, NULL, + NULL); + /* We are done without errors! */ g_simple_async_result_set_op_res_gboolean (ctx->result, TRUE); disabling_context_complete_and_free (ctx); @@ -186,7 +192,18 @@ static void interface_enabling_step (EnablingContext *ctx) { switch (ctx->step) { - case ENABLING_STEP_FIRST: + case ENABLING_STEP_FIRST: { + MMSmsList *list; + + list = mm_sms_list_new (MM_BASE_MODEM (ctx->self)); + g_object_set (ctx->self, + MM_IFACE_MODEM_MESSAGING_SMS_LIST, list, + NULL); + g_object_unref (list); + + /* Fall down to next step */ + ctx->step++; + } /* Fall down to next step */ ctx->step++; @@ -434,6 +451,14 @@ iface_modem_messaging_init (gpointer g_iface) MM_GDBUS_TYPE_MODEM_MESSAGING_SKELETON, G_PARAM_READWRITE)); + g_object_interface_install_property + (g_iface, + g_param_spec_object (MM_IFACE_MODEM_MESSAGING_SMS_LIST, + "SMS list", + "List of SMS objects managed in the interface", + MM_TYPE_SMS_LIST, + G_PARAM_READWRITE)); + initialized = TRUE; } diff --git a/src/mm-iface-modem-messaging.h b/src/mm-iface-modem-messaging.h index 95527778..5a06ec90 100644 --- a/src/mm-iface-modem-messaging.h +++ b/src/mm-iface-modem-messaging.h @@ -27,6 +27,7 @@ #define MM_IFACE_MODEM_MESSAGING_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), MM_TYPE_IFACE_MODEM_MESSAGING, MMIfaceModemMessaging)) #define MM_IFACE_MODEM_MESSAGING_DBUS_SKELETON "iface-modem-messaging-dbus-skeleton" +#define MM_IFACE_MODEM_MESSAGING_SMS_LIST "iface-modem-messaging-sms-list" typedef struct _MMIfaceModemMessaging MMIfaceModemMessaging; |