iface-modem-3gpp-ussd: new helper to get current state
This commit is contained in:

committed by
Dan Williams

parent
d16a1711fd
commit
e90ced5e0f
@@ -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)
|
||||
|
@@ -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);
|
||||
|
Reference in New Issue
Block a user