diff options
author | Aleksander Morgado <aleksander@lanedo.com> | 2012-02-08 12:54:09 +0100 |
---|---|---|
committer | Aleksander Morgado <aleksander@lanedo.com> | 2012-03-15 14:15:01 +0100 |
commit | e82db676466319ce03998b678c3c89d1385187ee (patch) | |
tree | 16ef7845c527d8e5d4cb9e4659be7bfa09f050fa /libmm-glib/mm-object.c | |
parent | 26075236f6348a942890cdc699e971c6f0cb3620 (diff) |
libmm-glib: implement support for the Messaging interface
Diffstat (limited to 'libmm-glib/mm-object.c')
-rw-r--r-- | libmm-glib/mm-object.c | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/libmm-glib/mm-object.c b/libmm-glib/mm-object.c index 36874b2c..0d6672f1 100644 --- a/libmm-glib/mm-object.c +++ b/libmm-glib/mm-object.c @@ -157,6 +157,22 @@ mm_object_get_modem_location (MMObject *object) } /** + * mm_object_get_modem_messaging: + * @object: A #MMObject. + * + * Gets the #MMModemMessaging instance for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-ModemManager1-Modem-Modemmessaging.top_of_page">org.freedesktop.ModemManager1.Modem.Modemmessaging</link> on @object, if any. + * + * Returns: (transfer full): A #MMModemMessaging that must be freed with g_object_unref() or %NULL if @object does not implement the interface. + */ +MMModemMessaging * +mm_object_get_modem_messaging (MMObject *object) +{ + g_return_val_if_fail (MM_GDBUS_IS_OBJECT (object), NULL); + + return mm_gdbus_object_get_modem_messaging (object); +} + +/** * mm_object_peek_modem: (skip) * @object: A #MMObject. * @@ -245,3 +261,21 @@ mm_object_peek_modem_location (MMObject *object) return mm_gdbus_object_peek_modem_location (object); } + +/** + * mm_object_peek_modem_messaging: (skip) + * @object: A #MMObject. + * + * Like mm_object_get_modem_messaging() but doesn't increase the reference count on the returned object. + * + * <warning>It is not safe to use the returned object if you are on another thread than the one where the #MMManager is running.</warning> + * + * Returns: (transfer none): A #MMModemMessaging or %NULL if @object does not implement the interface. Do not free the returned object, it is owned by @object. + */ +MMModemMessaging * +mm_object_peek_modem_messaging (MMObject *object) +{ + g_return_val_if_fail (MM_GDBUS_IS_OBJECT (object), NULL); + + return mm_gdbus_object_peek_modem_messaging (object); +} |