iface-modem-messaging: instead of mem1,mem2,mem3 use just a new default storage

There is no point in specifying a default 'mem1' memory storage, which is used
for reading/listing/deleting, as those are operations that need a specific
'mem1' set each time.

Also, there is no point in specifying separate default 'mem2' and 'mem3' memory
storages, specially because now we allow Sms.Store() to specify a storage.

So, we will now only have a 'default' memory storage, which is applicable for
both 'mem2' and 'mem3' (storing, sending from storage and deleting).
This commit is contained in:
Aleksander Morgado
2012-09-10 18:03:29 +02:00
parent 584fc77bb3
commit bddcc2fb07
10 changed files with 90 additions and 164 deletions

View File

@@ -107,5 +107,13 @@
-->
<property name="SupportedStorages" type="au" access="read" />
<!--
DefaultStorage:
A <link linkend="MMSmsStorage">MMSmsStorage</link> value,
specifying the storage to be used when receiving or storing SMS.
-->
<property name="DefaultStorage" type="u" access="read" />
</interface>
</node>

View File

@@ -1163,7 +1163,7 @@ mm_broadband_modem_cinterion_new (const gchar *device,
MM_BASE_MODEM_PLUGIN, plugin,
MM_BASE_MODEM_VENDOR_ID, vendor_id,
MM_BASE_MODEM_PRODUCT_ID, product_id,
MM_IFACE_MODEM_MESSAGING_SMS_MEM3_STORAGE, MM_SMS_STORAGE_MT,
MM_IFACE_MODEM_MESSAGING_SMS_DEFAULT_STORAGE, MM_SMS_STORAGE_MT,
NULL);
}

View File

@@ -410,9 +410,8 @@ mm_broadband_modem_iridium_new (const gchar *device,
MM_BASE_MODEM_MAX_TIMEOUTS, 3,
/* Only CS network is supported by the Iridium modem */
MM_IFACE_MODEM_3GPP_PS_NETWORK_SUPPORTED, FALSE,
MM_IFACE_MODEM_MESSAGING_SMS_MEM1_STORAGE, MM_SMS_STORAGE_SM,
MM_IFACE_MODEM_MESSAGING_SMS_MEM2_STORAGE, MM_SMS_STORAGE_SM,
MM_IFACE_MODEM_MESSAGING_SMS_MEM3_STORAGE, MM_SMS_STORAGE_SM,
/* 'ME' storage not supported */
MM_IFACE_MODEM_MESSAGING_SMS_DEFAULT_STORAGE, MM_SMS_STORAGE_SM,
NULL);
}

View File

@@ -432,9 +432,8 @@ mm_broadband_modem_novatel_lte_new (const gchar *device,
MM_BASE_MODEM_PLUGIN, plugin,
MM_BASE_MODEM_VENDOR_ID, vendor_id,
MM_BASE_MODEM_PRODUCT_ID, product_id,
MM_IFACE_MODEM_MESSAGING_SMS_MEM1_STORAGE, MM_SMS_STORAGE_SM,
MM_IFACE_MODEM_MESSAGING_SMS_MEM2_STORAGE, MM_SMS_STORAGE_SM,
MM_IFACE_MODEM_MESSAGING_SMS_MEM3_STORAGE, MM_SMS_STORAGE_SM,
/* 'ME' storage not supported */
MM_IFACE_MODEM_MESSAGING_SMS_DEFAULT_STORAGE, MM_SMS_STORAGE_SM,
NULL);
}

View File

@@ -753,10 +753,8 @@ mm_broadband_modem_novatel_new (const gchar *device,
MM_BASE_MODEM_PLUGIN, plugin,
MM_BASE_MODEM_VENDOR_ID, vendor_id,
MM_BASE_MODEM_PRODUCT_ID, product_id,
/* Use SM storage always */
MM_IFACE_MODEM_MESSAGING_SMS_MEM1_STORAGE, MM_SMS_STORAGE_SM,
MM_IFACE_MODEM_MESSAGING_SMS_MEM2_STORAGE, MM_SMS_STORAGE_SM,
MM_IFACE_MODEM_MESSAGING_SMS_MEM3_STORAGE, MM_SMS_STORAGE_SM,
/* 'ME' storage not supported */
MM_IFACE_MODEM_MESSAGING_SMS_DEFAULT_STORAGE, MM_SMS_STORAGE_SM,
NULL);
}

View File

@@ -4919,12 +4919,12 @@ messaging_load_supported_storages (MMIfaceModemMessaging *self,
}
/*****************************************************************************/
/* Set preferred storages (Messaging interface) */
/* Set default storage (Messaging interface) */
static gboolean
messaging_set_preferred_storages_finish (MMIfaceModemMessaging *self,
GAsyncResult *res,
GError **error)
messaging_set_default_storage_finish (MMIfaceModemMessaging *self,
GAsyncResult *res,
GError **error)
{
return !g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (res), error);
}
@@ -4956,29 +4956,11 @@ wms_set_routes_ready (QmiClientWms *client,
}
static void
messaging_set_preferred_storages (MMIfaceModemMessaging *self,
MMSmsStorage mem1,
MMSmsStorage mem2,
MMSmsStorage mem3,
GAsyncReadyCallback callback,
gpointer user_data)
messaging_set_default_storage (MMIfaceModemMessaging *self,
MMSmsStorage storage,
GAsyncReadyCallback callback,
gpointer user_data)
{
/* In QMI, we don't need to specify neither a default 'mem1' storage (the
* one used for listing, reading, deleting) nor a default 'mem2' storage
* (the one used for writing/sending), as the QMI operations allow to
* pass the specific storage directly in the command, as opposed to the
* AT-way which is specifying the storage first and then performing an
* operation on the default storage.
*
* Whenever a list/read/delete/write/send operation is received, we'll just
* read the corresponding property to know in which storage to perform the
* action.
*
* But for 'mem3', we do need to specify custom 'routes' to identify to
* which storage the incoming messages should be transferred, so we'll use
* that one.
*/
GSimpleAsyncResult *result;
QmiClient *client = NULL;
QmiMessageWmsSetRoutesInput *input;
@@ -4993,7 +4975,7 @@ messaging_set_preferred_storages (MMIfaceModemMessaging *self,
result = g_simple_async_result_new (G_OBJECT (self),
callback,
user_data,
messaging_set_preferred_storages);
messaging_set_default_storage);
/* Build routes array and add it as input
* Just worry about Class 0 and Class 1 messages for now */
@@ -5001,7 +4983,7 @@ messaging_set_preferred_storages (MMIfaceModemMessaging *self,
routes_array = g_array_sized_new (FALSE, FALSE, sizeof (route), 2);
route.message_type = QMI_WMS_MESSAGE_TYPE_POINT_TO_POINT;
route.message_class = QMI_WMS_MESSAGE_CLASS_0;
route.storage = mm_sms_storage_to_qmi_storage_type (mem3);
route.storage = mm_sms_storage_to_qmi_storage_type (storage);
route.receipt_action = QMI_WMS_RECEIPT_ACTION_STORE_AND_NOTIFY;
g_array_append_val (routes_array, route);
route.message_class = QMI_WMS_MESSAGE_CLASS_1;
@@ -5932,8 +5914,8 @@ iface_modem_messaging_init (MMIfaceModemMessaging *iface)
iface->load_supported_storages_finish = messaging_load_supported_storages_finish;
iface->setup_sms_format = NULL;
iface->setup_sms_format_finish = NULL;
iface->set_preferred_storages = messaging_set_preferred_storages;
iface->set_preferred_storages_finish = messaging_set_preferred_storages_finish;
iface->set_default_storage = messaging_set_default_storage;
iface->set_default_storage_finish = messaging_set_default_storage_finish;
iface->load_initial_sms_parts = load_initial_sms_parts;
iface->load_initial_sms_parts_finish = load_initial_sms_parts_finish;
iface->setup_unsolicited_events = messaging_setup_unsolicited_events;

View File

@@ -88,9 +88,7 @@ enum {
PROP_MODEM_CDMA_EVDO_NETWORK_SUPPORTED,
PROP_MODEM_MESSAGING_SMS_LIST,
PROP_MODEM_MESSAGING_SMS_PDU_MODE,
PROP_MODEM_MESSAGING_SMS_MEM1_STORAGE,
PROP_MODEM_MESSAGING_SMS_MEM2_STORAGE,
PROP_MODEM_MESSAGING_SMS_MEM3_STORAGE,
PROP_MODEM_MESSAGING_SMS_DEFAULT_STORAGE,
PROP_MODEM_SIMPLE_STATUS,
PROP_LAST
};
@@ -164,9 +162,7 @@ struct _MMBroadbandModemPrivate {
GObject *modem_messaging_dbus_skeleton;
MMBearerList *modem_messaging_sms_list;
gboolean modem_messaging_sms_pdu_mode;
MMSmsStorage modem_messaging_sms_mem1_storage;
MMSmsStorage modem_messaging_sms_mem2_storage;
MMSmsStorage modem_messaging_sms_mem3_storage;
MMSmsStorage modem_messaging_sms_default_storage;
/* Implementation helpers */
gboolean sms_supported_modes_checked;
GHashTable *known_sms_parts;
@@ -4315,12 +4311,12 @@ mm_broadband_modem_lock_sms_storages (MMBroadbandModem *self,
}
/*****************************************************************************/
/* Set preferred SMS storage (Messaging interface) */
/* Set default SMS storage (Messaging interface) */
static gboolean
modem_messaging_set_preferred_storages_finish (MMIfaceModemMessaging *self,
GAsyncResult *res,
GError **error)
modem_messaging_set_default_storage_finish (MMIfaceModemMessaging *self,
GAsyncResult *res,
GError **error)
{
return !g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (res), error);
}
@@ -4342,42 +4338,33 @@ cpms_set_ready (MMBroadbandModem *self,
}
static void
modem_messaging_set_preferred_storages (MMIfaceModemMessaging *_self,
MMSmsStorage mem1,
MMSmsStorage mem2,
MMSmsStorage mem3,
GAsyncReadyCallback callback,
gpointer user_data)
modem_messaging_set_default_storage (MMIfaceModemMessaging *_self,
MMSmsStorage storage,
GAsyncReadyCallback callback,
gpointer user_data)
{
MMBroadbandModem *self = MM_BROADBAND_MODEM (_self);
gchar *cmd;
GSimpleAsyncResult *result;
gchar *mem1_str;
gchar *mem2_str;
gchar *mem3_str;
gchar *mem_str;
result = g_simple_async_result_new (G_OBJECT (self),
callback,
user_data,
modem_messaging_set_preferred_storages);
modem_messaging_set_default_storage);
/* Set defaults as current */
self->priv->current_sms_mem1_storage = mem1;
self->priv->current_sms_mem2_storage = mem2;
self->priv->current_sms_mem2_storage = storage;
mem1_str = g_ascii_strup (mm_sms_storage_get_string (mem1), -1);
mem2_str = g_ascii_strup (mm_sms_storage_get_string (mem2), -1);
mem3_str = g_ascii_strup (mm_sms_storage_get_string (mem3), -1);
cmd = g_strdup_printf ("+CPMS=\"%s\",\"%s\",\"%s\"", mem1_str, mem2_str, mem3_str);
mem_str = g_ascii_strup (mm_sms_storage_get_string (storage), -1);
cmd = g_strdup_printf ("+CPMS=\"\",\"%s\",\"%s\"", mem_str, mem_str);
mm_base_modem_at_command (MM_BASE_MODEM (self),
cmd,
3,
FALSE,
(GAsyncReadyCallback)cpms_set_ready,
result);
g_free (mem1_str);
g_free (mem2_str);
g_free (mem3_str);
g_free (mem_str);
g_free (cmd);
}
@@ -4562,8 +4549,7 @@ sms_part_ready (MMBroadbandModem *self,
mm_iface_modem_messaging_take_part (MM_IFACE_MODEM_MESSAGING (self),
part,
MM_SMS_STATE_RECEIVED,
/* use default reception (mem3) storage */
self->priv->modem_messaging_sms_mem3_storage);
self->priv->modem_messaging_sms_default_storage);
} else {
/* Don't treat the error as critical */
mm_dbg ("Error parsing PDU (%d): %s", ctx->idx, error->message);
@@ -7863,14 +7849,8 @@ set_property (GObject *object,
case PROP_MODEM_MESSAGING_SMS_PDU_MODE:
self->priv->modem_messaging_sms_pdu_mode = g_value_get_boolean (value);
break;
case PROP_MODEM_MESSAGING_SMS_MEM1_STORAGE:
self->priv->modem_messaging_sms_mem1_storage = g_value_get_enum (value);
break;
case PROP_MODEM_MESSAGING_SMS_MEM2_STORAGE:
self->priv->modem_messaging_sms_mem2_storage = g_value_get_enum (value);
break;
case PROP_MODEM_MESSAGING_SMS_MEM3_STORAGE:
self->priv->modem_messaging_sms_mem3_storage = g_value_get_enum (value);
case PROP_MODEM_MESSAGING_SMS_DEFAULT_STORAGE:
self->priv->modem_messaging_sms_default_storage = g_value_get_enum (value);
break;
case PROP_MODEM_SIMPLE_STATUS:
g_clear_object (&self->priv->modem_simple_status);
@@ -7951,14 +7931,8 @@ get_property (GObject *object,
case PROP_MODEM_MESSAGING_SMS_PDU_MODE:
g_value_set_boolean (value, self->priv->modem_messaging_sms_pdu_mode);
break;
case PROP_MODEM_MESSAGING_SMS_MEM1_STORAGE:
g_value_set_enum (value, self->priv->modem_messaging_sms_mem1_storage);
break;
case PROP_MODEM_MESSAGING_SMS_MEM2_STORAGE:
g_value_set_enum (value, self->priv->modem_messaging_sms_mem2_storage);
break;
case PROP_MODEM_MESSAGING_SMS_MEM3_STORAGE:
g_value_set_enum (value, self->priv->modem_messaging_sms_mem3_storage);
case PROP_MODEM_MESSAGING_SMS_DEFAULT_STORAGE:
g_value_set_enum (value, self->priv->modem_messaging_sms_default_storage);
break;
case PROP_MODEM_SIMPLE_STATUS:
g_value_set_object (value, self->priv->modem_simple_status);
@@ -7986,9 +7960,9 @@ mm_broadband_modem_init (MMBroadbandModem *self)
self->priv->modem_cdma_evdo_registration_state = MM_MODEM_CDMA_REGISTRATION_STATE_UNKNOWN;
self->priv->modem_cdma_cdma1x_network_supported = TRUE;
self->priv->modem_cdma_evdo_network_supported = TRUE;
self->priv->modem_messaging_sms_mem1_storage = MM_SMS_STORAGE_ME;
self->priv->modem_messaging_sms_mem2_storage = MM_SMS_STORAGE_ME;
self->priv->modem_messaging_sms_mem3_storage = MM_SMS_STORAGE_ME;
self->priv->modem_messaging_sms_default_storage = MM_SMS_STORAGE_ME;
self->priv->current_sms_mem1_storage = MM_SMS_STORAGE_UNKNOWN;
self->priv->current_sms_mem2_storage = MM_SMS_STORAGE_UNKNOWN;
}
static void
@@ -8224,8 +8198,8 @@ iface_modem_messaging_init (MMIfaceModemMessaging *iface)
iface->check_support_finish = modem_messaging_check_support_finish;
iface->load_supported_storages = modem_messaging_load_supported_storages;
iface->load_supported_storages_finish = modem_messaging_load_supported_storages_finish;
iface->set_preferred_storages = modem_messaging_set_preferred_storages;
iface->set_preferred_storages_finish = modem_messaging_set_preferred_storages_finish;
iface->set_default_storage = modem_messaging_set_default_storage;
iface->set_default_storage_finish = modem_messaging_set_default_storage_finish;
iface->setup_sms_format = modem_messaging_setup_sms_format;
iface->setup_sms_format_finish = modem_messaging_setup_sms_format_finish;
iface->load_initial_sms_parts = modem_messaging_load_initial_sms_parts;
@@ -8354,16 +8328,8 @@ mm_broadband_modem_class_init (MMBroadbandModemClass *klass)
MM_IFACE_MODEM_MESSAGING_SMS_PDU_MODE);
g_object_class_override_property (object_class,
PROP_MODEM_MESSAGING_SMS_MEM1_STORAGE,
MM_IFACE_MODEM_MESSAGING_SMS_MEM1_STORAGE);
g_object_class_override_property (object_class,
PROP_MODEM_MESSAGING_SMS_MEM2_STORAGE,
MM_IFACE_MODEM_MESSAGING_SMS_MEM2_STORAGE);
g_object_class_override_property (object_class,
PROP_MODEM_MESSAGING_SMS_MEM3_STORAGE,
MM_IFACE_MODEM_MESSAGING_SMS_MEM3_STORAGE);
PROP_MODEM_MESSAGING_SMS_DEFAULT_STORAGE,
MM_IFACE_MODEM_MESSAGING_SMS_DEFAULT_STORAGE);
g_object_class_override_property (object_class,
PROP_MODEM_SIMPLE_STATUS,

View File

@@ -719,14 +719,14 @@ load_initial_sms_parts_ready (MMIfaceModemMessaging *self,
}
static void
set_preferred_storages_ready (MMIfaceModemMessaging *self,
GAsyncResult *res,
EnablingContext *ctx)
set_default_storage_ready (MMIfaceModemMessaging *self,
GAsyncResult *res,
EnablingContext *ctx)
{
GError *error = NULL;
if (!MM_IFACE_MODEM_MESSAGING_GET_INTERFACE (self)->set_preferred_storages_finish (self, res, &error)) {
mm_dbg ("Couldn't set preferred storages: '%s'", error->message);
if (!MM_IFACE_MODEM_MESSAGING_GET_INTERFACE (self)->set_default_storage_finish (self, res, &error)) {
mm_dbg ("Couldn't set default storage: '%s'", error->message);
g_error_free (error);
}
@@ -838,39 +838,34 @@ interface_enabling_step (EnablingContext *ctx)
case ENABLING_STEP_STORAGE_DEFAULTS:
/* Set storage defaults */
if (MM_IFACE_MODEM_MESSAGING_GET_INTERFACE (ctx->self)->set_preferred_storages &&
MM_IFACE_MODEM_MESSAGING_GET_INTERFACE (ctx->self)->set_preferred_storages_finish) {
if (MM_IFACE_MODEM_MESSAGING_GET_INTERFACE (ctx->self)->set_default_storage &&
MM_IFACE_MODEM_MESSAGING_GET_INTERFACE (ctx->self)->set_default_storage_finish) {
StorageContext *storage_ctx;
MMSmsStorage default_mem1 = MM_SMS_STORAGE_UNKNOWN;
MMSmsStorage default_mem2 = MM_SMS_STORAGE_UNKNOWN;
MMSmsStorage default_mem3 = MM_SMS_STORAGE_UNKNOWN;
MMSmsStorage default_storage = MM_SMS_STORAGE_UNKNOWN;
GError *error = NULL;
mm_dbg ("Setting default preferred storages...");
mm_dbg ("Setting default storage...");
g_object_get (ctx->self,
MM_IFACE_MODEM_MESSAGING_SMS_MEM1_STORAGE, &default_mem1,
MM_IFACE_MODEM_MESSAGING_SMS_MEM2_STORAGE, &default_mem2,
MM_IFACE_MODEM_MESSAGING_SMS_MEM3_STORAGE, &default_mem3,
MM_IFACE_MODEM_MESSAGING_SMS_DEFAULT_STORAGE, &default_storage,
NULL);
g_assert (default_mem1 != MM_SMS_STORAGE_UNKNOWN);
g_assert (default_mem2 != MM_SMS_STORAGE_UNKNOWN);
g_assert (default_mem3 != MM_SMS_STORAGE_UNKNOWN);
g_assert (default_storage != MM_SMS_STORAGE_UNKNOWN);
/* Check if the requested storages are really supported */
storage_ctx = get_storage_context (ctx->self);
if (!is_storage_supported (storage_ctx->supported_mem1, default_mem1, "reading/listing/deleting", &error) ||
!is_storage_supported (storage_ctx->supported_mem2, default_mem2, "storing", &error) ||
!is_storage_supported (storage_ctx->supported_mem3, default_mem3, "receiving", &error)) {
if (!is_storage_supported (storage_ctx->supported_mem2, default_storage, "storing", &error) ||
!is_storage_supported (storage_ctx->supported_mem3, default_storage, "receiving", &error)) {
g_simple_async_result_take_error (ctx->result, error);
enabling_context_complete_and_free (ctx);
return;
}
MM_IFACE_MODEM_MESSAGING_GET_INTERFACE (ctx->self)->set_preferred_storages (
mm_gdbus_modem_messaging_set_default_storage (ctx->skeleton, default_storage);
MM_IFACE_MODEM_MESSAGING_GET_INTERFACE (ctx->self)->set_default_storage (
ctx->self,
default_mem1, default_mem2, default_mem3,
(GAsyncReadyCallback)set_preferred_storages_ready,
default_storage,
(GAsyncReadyCallback)set_default_storage_ready,
ctx);
return;
}
@@ -1231,6 +1226,7 @@ mm_iface_modem_messaging_initialize (MMIfaceModemMessaging *self,
NULL);
if (!skeleton) {
skeleton = mm_gdbus_modem_messaging_skeleton_new ();
mm_gdbus_modem_messaging_set_supported_storages (skeleton, NULL);
g_object_set (self,
MM_IFACE_MODEM_MESSAGING_DBUS_SKELETON, skeleton,
@@ -1294,27 +1290,9 @@ iface_modem_messaging_init (gpointer g_iface)
g_object_interface_install_property
(g_iface,
g_param_spec_enum (MM_IFACE_MODEM_MESSAGING_SMS_MEM1_STORAGE,
"SMS mem1 storage",
"Default storage to be used when listing/reading/deleting SMS messages",
MM_TYPE_SMS_STORAGE,
MM_SMS_STORAGE_ME,
G_PARAM_READWRITE));
g_object_interface_install_property
(g_iface,
g_param_spec_enum (MM_IFACE_MODEM_MESSAGING_SMS_MEM2_STORAGE,
"SMS mem2 storage",
"Default storage to be used when writing/sending SMS messages",
MM_TYPE_SMS_STORAGE,
MM_SMS_STORAGE_ME,
G_PARAM_READWRITE));
g_object_interface_install_property
(g_iface,
g_param_spec_enum (MM_IFACE_MODEM_MESSAGING_SMS_MEM3_STORAGE,
"SMS mem3 storage",
"Default storage to be used when receiving SMS messages",
g_param_spec_enum (MM_IFACE_MODEM_MESSAGING_SMS_DEFAULT_STORAGE,
"SMS default storage",
"Default storage to be used when storing/receiving SMS messages",
MM_TYPE_SMS_STORAGE,
MM_SMS_STORAGE_ME,
G_PARAM_READWRITE));

View File

@@ -28,12 +28,10 @@
#define MM_IS_IFACE_MODEM_MESSAGING(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MM_TYPE_IFACE_MODEM_MESSAGING))
#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"
#define MM_IFACE_MODEM_MESSAGING_SMS_PDU_MODE "iface-modem-messaging-sms-pdu-mode"
#define MM_IFACE_MODEM_MESSAGING_SMS_MEM1_STORAGE "iface-modem-messaging-sms-mem1-storage"
#define MM_IFACE_MODEM_MESSAGING_SMS_MEM2_STORAGE "iface-modem-messaging-sms-mem2-storage"
#define MM_IFACE_MODEM_MESSAGING_SMS_MEM3_STORAGE "iface-modem-messaging-sms-mem3-storage"
#define MM_IFACE_MODEM_MESSAGING_DBUS_SKELETON "iface-modem-messaging-dbus-skeleton"
#define MM_IFACE_MODEM_MESSAGING_SMS_LIST "iface-modem-messaging-sms-list"
#define MM_IFACE_MODEM_MESSAGING_SMS_PDU_MODE "iface-modem-messaging-sms-pdu-mode"
#define MM_IFACE_MODEM_MESSAGING_SMS_DEFAULT_STORAGE "iface-modem-messaging-sms-default-storage"
typedef struct _MMIfaceModemMessaging MMIfaceModemMessaging;
@@ -63,16 +61,14 @@ struct _MMIfaceModemMessaging {
GArray **mem3,
GError **error);
/* Set preferred storages (async) */
void (* set_preferred_storages) (MMIfaceModemMessaging *self,
MMSmsStorage mem1,
MMSmsStorage mem2,
MMSmsStorage mem3,
GAsyncReadyCallback callback,
gpointer user_data);
gboolean (*set_preferred_storages_finish) (MMIfaceModemMessaging *self,
GAsyncResult *res,
GError **error);
/* Set default storage (async) */
void (* set_default_storage) (MMIfaceModemMessaging *self,
MMSmsStorage storage,
GAsyncReadyCallback callback,
gpointer user_data);
gboolean (*set_default_storage_finish) (MMIfaceModemMessaging *self,
GAsyncResult *res,
GError **error);
/* Setup SMS format (async) */
void (* setup_sms_format) (MMIfaceModemMessaging *self,

View File

@@ -187,7 +187,7 @@ handle_store (MMSms *self,
if (ctx->storage == MM_SMS_STORAGE_UNKNOWN) {
/* We'll set now the proper storage, taken from the default mem2 one */
g_object_get (self->priv->modem,
MM_IFACE_MODEM_MESSAGING_SMS_MEM2_STORAGE, &ctx->storage,
MM_IFACE_MODEM_MESSAGING_SMS_DEFAULT_STORAGE, &ctx->storage,
NULL);
g_assert (ctx->storage != MM_SMS_STORAGE_UNKNOWN);
}