summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mm-iface-modem-3gpp-ussd.c18
-rw-r--r--src/mm-iface-modem-3gpp-ussd.h2
2 files changed, 20 insertions, 0 deletions
diff --git a/src/mm-iface-modem-3gpp-ussd.c b/src/mm-iface-modem-3gpp-ussd.c
index a366f69a8..5f81d0f8a 100644
--- a/src/mm-iface-modem-3gpp-ussd.c
+++ b/src/mm-iface-modem-3gpp-ussd.c
@@ -402,6 +402,24 @@ mm_iface_modem_3gpp_ussd_decode (MMIfaceModem3gppUssd *self,
/*****************************************************************************/
+MMModem3gppUssdSessionState
+mm_iface_modem_3gpp_ussd_get_state (MMIfaceModem3gppUssd *self)
+{
+ MmGdbusModem3gppUssd *skeleton = NULL;
+ MMModem3gppUssdSessionState state;
+
+ g_object_get (self,
+ MM_IFACE_MODEM_3GPP_USSD_DBUS_SKELETON, &skeleton,
+ NULL);
+
+ if (!skeleton)
+ return MM_MODEM_3GPP_USSD_SESSION_STATE_UNKNOWN;
+
+ state = (MMModem3gppUssdSessionState) mm_gdbus_modem3gpp_ussd_get_state (skeleton);
+ g_object_unref (skeleton);
+ return state;
+}
+
void
mm_iface_modem_3gpp_ussd_update_state (MMIfaceModem3gppUssd *self,
MMModem3gppUssdSessionState new_state)
diff --git a/src/mm-iface-modem-3gpp-ussd.h b/src/mm-iface-modem-3gpp-ussd.h
index 9357442dd..37c60133c 100644
--- a/src/mm-iface-modem-3gpp-ussd.h
+++ b/src/mm-iface-modem-3gpp-ussd.h
@@ -132,6 +132,8 @@ gboolean mm_iface_modem_3gpp_ussd_disable_finish (MMIfaceModem3gppUssd *self,
GAsyncResult *res,
GError **error);
+MMModem3gppUssdSessionState mm_iface_modem_3gpp_ussd_get_state (MMIfaceModem3gppUssd *self);
+
/* Property updaters */
void mm_iface_modem_3gpp_ussd_update_state (MMIfaceModem3gppUssd *self,
MMModem3gppUssdSessionState new_state);