diff options
-rw-r--r-- | src/mm-iface-modem-3gpp.c | 29 | ||||
-rw-r--r-- | src/mm-iface-modem-3gpp.h | 4 |
2 files changed, 33 insertions, 0 deletions
diff --git a/src/mm-iface-modem-3gpp.c b/src/mm-iface-modem-3gpp.c index e6c98505..517bb29e 100644 --- a/src/mm-iface-modem-3gpp.c +++ b/src/mm-iface-modem-3gpp.c @@ -24,6 +24,35 @@ #include "mm-modem-helpers.h" #include "mm-log.h" +/*****************************************************************************/ + +void +mm_iface_modem_3gpp_bind_simple_status (MMIfaceModem3gpp *self, + MMCommonSimpleProperties *status) +{ + MmGdbusModem3gpp *skeleton; + + g_object_get (self, + MM_IFACE_MODEM_3GPP_DBUS_SKELETON, &skeleton, + NULL); + + g_object_bind_property (skeleton, "registration-state", + status, MM_COMMON_SIMPLE_PROPERTY_3GPP_REGISTRATION_STATE, + G_BINDING_DEFAULT | G_BINDING_SYNC_CREATE); + + g_object_bind_property (skeleton, "operator-code", + status, MM_COMMON_SIMPLE_PROPERTY_3GPP_OPERATOR_CODE, + G_BINDING_DEFAULT | G_BINDING_SYNC_CREATE); + + g_object_bind_property (skeleton, "operator-name", + status, MM_COMMON_SIMPLE_PROPERTY_3GPP_OPERATOR_NAME, + G_BINDING_DEFAULT | G_BINDING_SYNC_CREATE); + + g_object_unref (skeleton); +} + +/*****************************************************************************/ + typedef struct { MmGdbusModem3gpp *skeleton; GDBusMethodInvocation *invocation; diff --git a/src/mm-iface-modem-3gpp.h b/src/mm-iface-modem-3gpp.h index 24054e2a..52a4d45d 100644 --- a/src/mm-iface-modem-3gpp.h +++ b/src/mm-iface-modem-3gpp.h @@ -211,4 +211,8 @@ void mm_iface_modem_3gpp_register_in_network (MMIfaceModem3gpp *self, GAsyncReadyCallback callback, gpointer user_data); +/* Bind properties for simple GetStatus() */ +void mm_iface_modem_3gpp_bind_simple_status (MMIfaceModem3gpp *self, + MMCommonSimpleProperties *status); + #endif /* MM_IFACE_MODEM_3GPP_H */ |