iface-modem-messaging: new property to handle the list of SMS objects
This commit is contained in:
@@ -18,6 +18,7 @@
|
|||||||
|
|
||||||
#include "mm-iface-modem.h"
|
#include "mm-iface-modem.h"
|
||||||
#include "mm-iface-modem-messaging.h"
|
#include "mm-iface-modem-messaging.h"
|
||||||
|
#include "mm-sms-list.h"
|
||||||
#include "mm-log.h"
|
#include "mm-log.h"
|
||||||
|
|
||||||
#define SUPPORT_CHECKED_TAG "messaging-support-checked-tag"
|
#define SUPPORT_CHECKED_TAG "messaging-support-checked-tag"
|
||||||
@@ -103,6 +104,11 @@ interface_disabling_step (DisablingContext *ctx)
|
|||||||
ctx->step++;
|
ctx->step++;
|
||||||
|
|
||||||
case DISABLING_STEP_LAST:
|
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! */
|
/* We are done without errors! */
|
||||||
g_simple_async_result_set_op_res_gboolean (ctx->result, TRUE);
|
g_simple_async_result_set_op_res_gboolean (ctx->result, TRUE);
|
||||||
disabling_context_complete_and_free (ctx);
|
disabling_context_complete_and_free (ctx);
|
||||||
@@ -186,7 +192,18 @@ static void
|
|||||||
interface_enabling_step (EnablingContext *ctx)
|
interface_enabling_step (EnablingContext *ctx)
|
||||||
{
|
{
|
||||||
switch (ctx->step) {
|
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 */
|
/* Fall down to next step */
|
||||||
ctx->step++;
|
ctx->step++;
|
||||||
|
|
||||||
@@ -434,6 +451,14 @@ iface_modem_messaging_init (gpointer g_iface)
|
|||||||
MM_GDBUS_TYPE_MODEM_MESSAGING_SKELETON,
|
MM_GDBUS_TYPE_MODEM_MESSAGING_SKELETON,
|
||||||
G_PARAM_READWRITE));
|
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;
|
initialized = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -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_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_DBUS_SKELETON "iface-modem-messaging-dbus-skeleton"
|
||||||
|
#define MM_IFACE_MODEM_MESSAGING_SMS_LIST "iface-modem-messaging-sms-list"
|
||||||
|
|
||||||
typedef struct _MMIfaceModemMessaging MMIfaceModemMessaging;
|
typedef struct _MMIfaceModemMessaging MMIfaceModemMessaging;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user