libmm-glib: new `mm_modem_messaging_get_default_storage()' method

This commit is contained in:
Aleksander Morgado
2012-09-10 18:26:50 +02:00
parent 4f7534452d
commit fdb9db8d28
2 changed files with 20 additions and 3 deletions

View File

@@ -87,6 +87,22 @@ mm_modem_messaging_get_supported_storages (MMModemMessaging *self,
*storages = (MMSmsStorage *)g_array_free (array, FALSE); *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 { typedef struct {
MMModemMessaging *self; MMModemMessaging *self;
GSimpleAsyncResult *result; GSimpleAsyncResult *result;

View File

@@ -42,6 +42,7 @@ gchar *mm_modem_messaging_dup_path (MMModemMessaging *self);
void mm_modem_messaging_get_supported_storages (MMModemMessaging *self, void mm_modem_messaging_get_supported_storages (MMModemMessaging *self,
MMSmsStorage **storages, MMSmsStorage **storages,
guint *n_storages); guint *n_storages);
MMSmsStorage mm_modem_messaging_get_default_storage (MMModemMessaging *self);
void mm_modem_messaging_create (MMModemMessaging *self, void mm_modem_messaging_create (MMModemMessaging *self,
MMSmsProperties *properties, MMSmsProperties *properties,