iface-modem: add mm_iface_modem_get_model helper to query model
This commit is contained in:
committed by
Aleksander Morgado
parent
c94943322b
commit
f515cd1d90
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user