aboutsummaryrefslogtreecommitdiff
path: root/libmm-glib
diff options
context:
space:
mode:
Diffstat (limited to 'libmm-glib')
-rw-r--r--libmm-glib/mm-modem-simple.c50
-rw-r--r--libmm-glib/mm-modem-simple.h11
2 files changed, 61 insertions, 0 deletions
diff --git a/libmm-glib/mm-modem-simple.c b/libmm-glib/mm-modem-simple.c
index d4e059d8..bec8c23d 100644
--- a/libmm-glib/mm-modem-simple.c
+++ b/libmm-glib/mm-modem-simple.c
@@ -245,3 +245,53 @@ mm_modem_simple_disconnect_sync (MMModemSimple *self,
cancellable,
error);
}
+
+MMModemSimpleStatusProperties *
+mm_modem_simple_get_status_finish (MMModemSimple *self,
+ GAsyncResult *res,
+ GError **error)
+{
+ MMCommonSimpleProperties *properties;
+ GVariant *dictionary = NULL;
+
+ g_return_val_if_fail (MM_GDBUS_IS_MODEM_SIMPLE (self), NULL);
+
+ if (!mm_gdbus_modem_simple_call_get_status_finish (self, &dictionary, res, error))
+ return NULL;
+
+ properties = mm_common_simple_properties_new_from_dictionary (dictionary, error);
+ g_variant_unref (dictionary);
+ return (MMModemSimpleStatusProperties *)properties;
+}
+
+void
+mm_modem_simple_get_status (MMModemSimple *self,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
+{
+ g_return_if_fail (MM_GDBUS_IS_MODEM_SIMPLE (self));
+
+ mm_gdbus_modem_simple_call_get_status (self,
+ cancellable,
+ callback,
+ user_data);
+}
+
+MMModemSimpleStatusProperties *
+mm_modem_simple_get_status_sync (MMModemSimple *self,
+ GCancellable *cancellable,
+ GError **error)
+{
+ MMCommonSimpleProperties *properties;
+ GVariant *dictionary = NULL;
+
+ g_return_val_if_fail (MM_GDBUS_IS_MODEM_SIMPLE (self), NULL);
+
+ if (!mm_gdbus_modem_simple_call_get_status_sync (self, &dictionary, cancellable, error))
+ return NULL;
+
+ properties = mm_common_simple_properties_new_from_dictionary (dictionary, error);
+ g_variant_unref (dictionary);
+ return (MMModemSimpleStatusProperties *)properties;
+}
diff --git a/libmm-glib/mm-modem-simple.h b/libmm-glib/mm-modem-simple.h
index bfc69d30..96737b1a 100644
--- a/libmm-glib/mm-modem-simple.h
+++ b/libmm-glib/mm-modem-simple.h
@@ -28,6 +28,7 @@
#include "mm-bearer.h"
#include "mm-modem-simple-connect-properties.h"
+#include "mm-modem-simple-status-properties.h"
G_BEGIN_DECLS
@@ -65,6 +66,16 @@ gboolean mm_modem_simple_disconnect_sync (MMModemSimple *self,
GCancellable *cancellable,
GError **error);
+void mm_modem_simple_get_status (MMModemSimple *self,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
+MMModemSimpleStatusProperties *mm_modem_simple_get_status_finish (MMModemSimple *self,
+ GAsyncResult *res,
+ GError **error);
+MMModemSimpleStatusProperties *mm_modem_simple_get_status_sync (MMModemSimple *self,
+ GCancellable *cancellable,
+ GError **error);
G_END_DECLS
#endif /* _MM_MODEM_SIMPLE_H_ */