broadband-modem-mbim: implement supported storages loading
We'll only expose 'MT' (ME+SM) as supported, as in MBIM the device doesn't specify different storages.
This commit is contained in:
@@ -2158,6 +2158,43 @@ messaging_check_support (MMIfaceModemMessaging *_self,
|
||||
g_object_unref (result);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/* Load supported storages (Messaging interface) */
|
||||
|
||||
static gboolean
|
||||
messaging_load_supported_storages_finish (MMIfaceModemMessaging *self,
|
||||
GAsyncResult *res,
|
||||
GArray **mem1,
|
||||
GArray **mem2,
|
||||
GArray **mem3,
|
||||
GError **error)
|
||||
{
|
||||
MMSmsStorage supported;
|
||||
|
||||
*mem1 = g_array_sized_new (FALSE, FALSE, sizeof (MMSmsStorage), 2);
|
||||
supported = MM_SMS_STORAGE_MT;
|
||||
g_array_append_val (*mem1, supported);
|
||||
*mem2 = g_array_ref (*mem1);
|
||||
*mem3 = g_array_ref (*mem1);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
messaging_load_supported_storages (MMIfaceModemMessaging *self,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data)
|
||||
{
|
||||
GSimpleAsyncResult *result;
|
||||
|
||||
result = g_simple_async_result_new (G_OBJECT (self),
|
||||
callback,
|
||||
user_data,
|
||||
messaging_load_supported_storages);
|
||||
g_simple_async_result_set_op_res_gboolean (result, TRUE);
|
||||
g_simple_async_result_complete_in_idle (result);
|
||||
g_object_unref (result);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
MMBroadbandModemMbim *
|
||||
@@ -2305,8 +2342,8 @@ iface_modem_messaging_init (MMIfaceModemMessaging *iface)
|
||||
{
|
||||
iface->check_support = messaging_check_support;
|
||||
iface->check_support_finish = messaging_check_support_finish;
|
||||
iface->load_supported_storages = NULL;
|
||||
iface->load_supported_storages_finish = NULL;
|
||||
iface->load_supported_storages = messaging_load_supported_storages;
|
||||
iface->load_supported_storages_finish = messaging_load_supported_storages_finish;
|
||||
iface->setup_sms_format = NULL;
|
||||
iface->setup_sms_format_finish = NULL;
|
||||
iface->set_default_storage = NULL;
|
||||
|
||||
Reference in New Issue
Block a user