From b05430cb289e058ec118be13e4b0a813c46b1fb2 Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Wed, 18 Jan 2012 10:41:26 +0100 Subject: libmm-glib: include support for the Location interface We hide the location signaling; not sure if we should even support it. --- libmm-glib/mm-object.c | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) (limited to 'libmm-glib/mm-object.c') diff --git a/libmm-glib/mm-object.c b/libmm-glib/mm-object.c index ea924370..c9ad5be8 100644 --- a/libmm-glib/mm-object.c +++ b/libmm-glib/mm-object.c @@ -124,6 +124,22 @@ mm_object_get_modem_simple (MMObject *object) return mm_gdbus_object_get_modem_simple (object); } +/** + * mm_object_get_modem_location: + * @object: A #MMObject. + * + * Gets the #MMModemLocation instance for the D-Bus interface org.freedesktop.ModemManager1.Modem.Modemlocation on @object, if any. + * + * Returns: (transfer full): A #MMModemLocation that must be freed with g_object_unref() or %NULL if @object does not implement the interface. + */ +MMModemLocation * +mm_object_get_modem_location (MMObject *object) +{ + g_return_val_if_fail (MM_GDBUS_IS_OBJECT (object), NULL); + + return mm_gdbus_object_get_modem_location (object); +} + /** * mm_object_peek_modem: (skip) * @object: A #MMObject. @@ -177,3 +193,21 @@ mm_object_peek_modem_simple (MMObject *object) return mm_gdbus_object_peek_modem_simple (object); } + +/** + * mm_object_peek_modem_location: (skip) + * @object: A #MMObject. + * + * Like mm_object_get_modem_location() but doesn't increase the reference count on the returned object. + * + * It is not safe to use the returned object if you are on another thread than the one where the #MMManager is running. + * + * Returns: (transfer none): A #MMModemLocation or %NULL if @object does not implement the interface. Do not free the returned object, it is owned by @object. + */ +MMModemLocation * +mm_object_peek_modem_location (MMObject *object) +{ + g_return_val_if_fail (MM_GDBUS_IS_OBJECT (object), NULL); + + return mm_gdbus_object_peek_modem_location (object); +} -- cgit v1.2.3-70-g09d2