diff options
author | Aleksander Morgado <aleksander@lanedo.com> | 2011-11-29 10:38:48 +0100 |
---|---|---|
committer | Aleksander Morgado <aleksander@lanedo.com> | 2012-03-15 14:14:29 +0100 |
commit | d1072bda54344ed16a1dfbad27b6583dd73c25cc (patch) | |
tree | 8287d8f12873613038c42b6e6cbc463fb31de0b6 /src/mm-iface-modem-3gpp.c | |
parent | 68044fb01e6e7e84c4c3a53944e007167c89ab54 (diff) |
iface-modem: new RegistrationState property, bound to the one in DBus
Diffstat (limited to 'src/mm-iface-modem-3gpp.c')
-rw-r--r-- | src/mm-iface-modem-3gpp.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/mm-iface-modem-3gpp.c b/src/mm-iface-modem-3gpp.c index 5557e912..fed2a5a0 100644 --- a/src/mm-iface-modem-3gpp.c +++ b/src/mm-iface-modem-3gpp.c @@ -349,13 +349,18 @@ mm_iface_modem_3gpp_initialize (MMIfaceModem3gpp *self, /* Set all initial property defaults */ mm_gdbus_modem3gpp_set_imei (skeleton, NULL); - mm_gdbus_modem3gpp_set_registration_state (skeleton, MM_MODEM_3GPP_REGISTRATION_STATE_UNKNOWN); mm_gdbus_modem3gpp_set_operator_code (skeleton, NULL); mm_gdbus_modem3gpp_set_operator_name (skeleton, NULL); mm_gdbus_modem3gpp_set_enabled_facility_locks (skeleton, MM_MODEM_3GPP_FACILITY_NONE); + /* Bind our RegistrationState property */ + g_object_bind_property (self, MM_IFACE_MODEM_3GPP_REGISTRATION_STATE, + skeleton, "registration-state", + G_BINDING_DEFAULT); + g_object_set (self, MM_IFACE_MODEM_3GPP_DBUS_SKELETON, skeleton, + MM_IFACE_MODEM_3GPP_REGISTRATION_STATE, MM_MODEM_3GPP_REGISTRATION_STATE_UNKNOWN, NULL); } @@ -399,6 +404,15 @@ iface_modem_3gpp_init (gpointer g_iface) MM_GDBUS_TYPE_MODEM3GPP_SKELETON, G_PARAM_READWRITE)); + g_object_interface_install_property + (g_iface, + g_param_spec_enum (MM_IFACE_MODEM_3GPP_REGISTRATION_STATE, + "RegistrationState", + "Registration state of the modem", + MM_TYPE_MODEM_3GPP_REGISTRATION_STATE, + MM_MODEM_3GPP_REGISTRATION_STATE_UNKNOWN, + G_PARAM_READWRITE)); + initialized = TRUE; } |