aboutsummaryrefslogtreecommitdiff
path: root/libmm-glib
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2021-12-11 22:41:52 +0100
committerAleksander Morgado <aleksander@aleksander.es>2021-12-24 14:06:13 +0100
commitf97957046b6861631483b778945ebaf5f083f70d (patch)
tree12e9ea1f91fb319ecce683bb9430dad63a096249 /libmm-glib
parent049ebb70842ad07bc5c03f096960e909ad36d85c (diff)
libmm-glib,profile-manager: new getters for the 'IndexField' property
Diffstat (limited to 'libmm-glib')
-rw-r--r--libmm-glib/mm-modem-3gpp-profile-manager.c44
-rw-r--r--libmm-glib/mm-modem-3gpp-profile-manager.h84
2 files changed, 87 insertions, 41 deletions
diff --git a/libmm-glib/mm-modem-3gpp-profile-manager.c b/libmm-glib/mm-modem-3gpp-profile-manager.c
index b993895d..67ae2928 100644
--- a/libmm-glib/mm-modem-3gpp-profile-manager.c
+++ b/libmm-glib/mm-modem-3gpp-profile-manager.c
@@ -89,6 +89,50 @@ mm_modem_3gpp_profile_manager_dup_path (MMModem3gppProfileManager *self)
/*****************************************************************************/
+/**
+ * mm_modem_3gpp_profile_manager_get_index_field:
+ * @self: A #MMModem3gppProfileManager.
+ *
+ * Gets the name of the field used as index in profile management
+ * operations.
+ *
+ * Returns: (transfer none): The index field, or %NULL if none available.
+ * Do not free the returned value, it belongs to @self.
+ *
+ * Since: 1.20
+ */
+const gchar *
+mm_modem_3gpp_profile_manager_get_index_field (MMModem3gppProfileManager *self)
+{
+ g_return_val_if_fail (MM_IS_MODEM_3GPP_PROFILE_MANAGER (self), NULL);
+
+ RETURN_NON_EMPTY_CONSTANT_STRING (
+ mm_gdbus_modem3gpp_profile_manager_get_index_field (MM_GDBUS_MODEM3GPP_PROFILE_MANAGER (self)));
+}
+
+/**
+ * mm_modem_3gpp_profile_manager_dup_index_field:
+ * @self: A #MMModem3gppProfileManager.
+ *
+ * Gets a copy of the name of the field used as index in profile management
+ * operations.
+ *
+ * Returns: (transfer full): The index field, or %NULL if none available.
+ * The returned value should be freed with g_free().
+ *
+ * Since: 1.20
+ */
+gchar *
+mm_modem_3gpp_profile_manager_dup_index_field (MMModem3gppProfileManager *self)
+{
+ g_return_val_if_fail (MM_IS_MODEM_3GPP_PROFILE_MANAGER (self), NULL);
+
+ RETURN_NON_EMPTY_STRING (
+ mm_gdbus_modem3gpp_profile_manager_dup_index_field (MM_GDBUS_MODEM3GPP_PROFILE_MANAGER (self)));
+}
+
+/*****************************************************************************/
+
static gboolean
build_list_results (GVariant *dictionaries,
GList **out_profiles,
diff --git a/libmm-glib/mm-modem-3gpp-profile-manager.h b/libmm-glib/mm-modem-3gpp-profile-manager.h
index 557bc059..5a53566c 100644
--- a/libmm-glib/mm-modem-3gpp-profile-manager.h
+++ b/libmm-glib/mm-modem-3gpp-profile-manager.h
@@ -65,47 +65,49 @@ struct _MMModem3gppProfileManagerClass {
GType mm_modem_3gpp_profile_manager_get_type (void);
G_DEFINE_AUTOPTR_CLEANUP_FUNC (MMModem3gppProfileManager, g_object_unref)
-const gchar *mm_modem_3gpp_profile_manager_get_path (MMModem3gppProfileManager *self);
-gchar *mm_modem_3gpp_profile_manager_dup_path (MMModem3gppProfileManager *self);
-
-void mm_modem_3gpp_profile_manager_list (MMModem3gppProfileManager *self,
- GCancellable *cancellable,
- GAsyncReadyCallback callback,
- gpointer user_data);
-gboolean mm_modem_3gpp_profile_manager_list_finish (MMModem3gppProfileManager *self,
- GAsyncResult *res,
- GList **profiles,
- GError **error);
-gboolean mm_modem_3gpp_profile_manager_list_sync (MMModem3gppProfileManager *self,
- GCancellable *cancellable,
- GList **profiles,
- GError **error);
-
-void mm_modem_3gpp_profile_manager_set (MMModem3gppProfileManager *self,
- MM3gppProfile *requested,
- GCancellable *cancellable,
- GAsyncReadyCallback callback,
- gpointer user_data);
-MM3gppProfile *mm_modem_3gpp_profile_manager_set_finish (MMModem3gppProfileManager *self,
- GAsyncResult *res,
- GError **error);
-MM3gppProfile *mm_modem_3gpp_profile_manager_set_sync (MMModem3gppProfileManager *self,
- MM3gppProfile *requested,
- GCancellable *cancellable,
- GError **error);
-
-void mm_modem_3gpp_profile_manager_delete (MMModem3gppProfileManager *self,
- MM3gppProfile *profile,
- GCancellable *cancellable,
- GAsyncReadyCallback callback,
- gpointer user_data);
-gboolean mm_modem_3gpp_profile_manager_delete_finish (MMModem3gppProfileManager *self,
- GAsyncResult *res,
- GError **error);
-gboolean mm_modem_3gpp_profile_manager_delete_sync (MMModem3gppProfileManager *self,
- MM3gppProfile *profile,
- GCancellable *cancellable,
- GError **error);
+const gchar *mm_modem_3gpp_profile_manager_get_path (MMModem3gppProfileManager *self);
+gchar *mm_modem_3gpp_profile_manager_dup_path (MMModem3gppProfileManager *self);
+const gchar *mm_modem_3gpp_profile_manager_get_index_field (MMModem3gppProfileManager *self);
+gchar *mm_modem_3gpp_profile_manager_dup_index_field (MMModem3gppProfileManager *self);
+
+void mm_modem_3gpp_profile_manager_list (MMModem3gppProfileManager *self,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
+gboolean mm_modem_3gpp_profile_manager_list_finish (MMModem3gppProfileManager *self,
+ GAsyncResult *res,
+ GList **profiles,
+ GError **error);
+gboolean mm_modem_3gpp_profile_manager_list_sync (MMModem3gppProfileManager *self,
+ GCancellable *cancellable,
+ GList **profiles,
+ GError **error);
+
+void mm_modem_3gpp_profile_manager_set (MMModem3gppProfileManager *self,
+ MM3gppProfile *requested,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
+MM3gppProfile *mm_modem_3gpp_profile_manager_set_finish (MMModem3gppProfileManager *self,
+ GAsyncResult *res,
+ GError **error);
+MM3gppProfile *mm_modem_3gpp_profile_manager_set_sync (MMModem3gppProfileManager *self,
+ MM3gppProfile *requested,
+ GCancellable *cancellable,
+ GError **error);
+
+void mm_modem_3gpp_profile_manager_delete (MMModem3gppProfileManager *self,
+ MM3gppProfile *profile,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
+gboolean mm_modem_3gpp_profile_manager_delete_finish (MMModem3gppProfileManager *self,
+ GAsyncResult *res,
+ GError **error);
+gboolean mm_modem_3gpp_profile_manager_delete_sync (MMModem3gppProfileManager *self,
+ MM3gppProfile *profile,
+ GCancellable *cancellable,
+ GError **error);
G_END_DECLS