From 0bf4ad6b66b1ea7626df28dc2417686b9e2d03f7 Mon Sep 17 00:00:00 2001 From: Riccardo Vangelisti Date: Mon, 27 Apr 2015 11:38:57 +0200 Subject: libmm-glib: added support for Modem.Voice and Call interfaces --- libmm-glib/mm-object.c | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) (limited to 'libmm-glib/mm-object.c') diff --git a/libmm-glib/mm-object.c b/libmm-glib/mm-object.c index fa8fae25..9015ad32 100644 --- a/libmm-glib/mm-object.c +++ b/libmm-glib/mm-object.c @@ -340,6 +340,42 @@ mm_object_peek_modem_messaging (MMObject *self) /*****************************************************************************/ +/** + * mm_object_get_modem_voice: + * @self: A #MMObject. + * + * Gets the #MMModemVoice instance for the D-Bus interface org.freedesktop.ModemManager1.Modem.Modemvoice on @self, if any. + * + * Returns: (transfer full): A #MMModemVoice that must be freed with g_object_unref() or %NULL if @self does not implement the interface. + */ +MMModemVoice * +mm_object_get_modem_voice (MMObject *self) +{ + g_return_val_if_fail (MM_IS_OBJECT (MM_GDBUS_OBJECT (self)), NULL); + + return (MMModemVoice *)mm_gdbus_object_get_modem_voice (MM_GDBUS_OBJECT (self)); +} + +/** + * mm_object_peek_modem_voice: (skip) + * @self: A #MMObject. + * + * Like mm_object_get_modem_voice() 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 #MMModemVoice or %NULL if @self does not implement the interface. Do not free the returned object, it is owned by @self. + */ +MMModemVoice * +mm_object_peek_modem_voice (MMObject *self) +{ + g_return_val_if_fail (MM_IS_OBJECT (MM_GDBUS_OBJECT (self)), NULL); + + return (MMModemVoice *)mm_gdbus_object_peek_modem_voice (MM_GDBUS_OBJECT (self)); +} + +/*****************************************************************************/ + /** * mm_object_get_modem_time: * @self: A #MMObject. -- cgit v1.2.3-70-g09d2