iface-modem: add mm_iface_modem_get_model helper to query model

This commit is contained in:
Ben Chan
2013-08-14 09:30:41 +02:00
committed by Aleksander Morgado
parent c94943322b
commit f515cd1d90
2 changed files with 23 additions and 0 deletions
+20
View File
@@ -4806,6 +4806,26 @@ mm_iface_modem_is_cdma_only (MMIfaceModem *self)
/*****************************************************************************/
const gchar *
mm_iface_modem_get_model (MMIfaceModem *self)
{
const gchar *model = NULL;
MmGdbusModem *skeleton;
g_object_get (self,
MM_IFACE_MODEM_DBUS_SKELETON, &skeleton,
NULL);
if (skeleton) {
model = mm_gdbus_modem_get_model (skeleton);
g_object_unref (skeleton);
}
return model;
}
/*****************************************************************************/
static void
iface_modem_init (gpointer g_iface)
{
+3
View File
@@ -344,6 +344,9 @@ gboolean mm_iface_modem_is_3g_only (MMIfaceModem *self);
gboolean mm_iface_modem_is_4g (MMIfaceModem *self);
gboolean mm_iface_modem_is_4g_only (MMIfaceModem *self);
/* Helper to query model */
const gchar *mm_iface_modem_get_model (MMIfaceModem *self);
/* Initialize Modem interface (async) */
void mm_iface_modem_initialize (MMIfaceModem *self,
GCancellable *cancellable,