libmm-glib,profile-manager: new getters for the 'IndexField' property

This commit is contained in:
Aleksander Morgado
2021-12-11 22:41:52 +01:00
parent 049ebb7084
commit f97957046b
2 changed files with 84 additions and 38 deletions

View File

@@ -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,

View File

@@ -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);
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_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_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);
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