From 724f2bdcc6d7e9d1a22e3956bfad3dd2ab8d4deb Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Wed, 13 Nov 2013 14:39:04 +0000 Subject: [PATCH 08/26] mcd_storage_dup_attributes: remove Nothing calls it, and getting rid of it is a step towards having McdStorage just be a "view". --- src/mcd-storage.c | 33 --------------------------------- src/mcd-storage.h | 4 ---- 2 files changed, 37 deletions(-) diff --git a/src/mcd-storage.c b/src/mcd-storage.c index b8f5ffc..b3a4bc9 100644 --- a/src/mcd-storage.c +++ b/src/mcd-storage.c @@ -688,39 +688,6 @@ mcd_storage_dup_accounts (McdStorage *self, } /* - * mcd_storage_dup_attributes: - * @storage: An object implementing the #McdStorage interface - * @account: unique name of the account - * @n: place for the number of attributes to be written to (or %NULL) - * - * Returns: a newly allocated GStrv containing the names of all the - * attributes or parameters currently stored for @account. Must be - * freed by the caller with g_strfreev(). - */ -GStrv -mcd_storage_dup_attributes (McdStorage *self, - const gchar *account, - gsize *n) -{ - GPtrArray *ret = g_ptr_array_new (); - McdStorageAccount *sa = lookup_account (self, account); - - if (sa != NULL) - { - GHashTableIter iter; - gpointer k; - - g_hash_table_iter_init (&iter, sa->attributes); - - while (g_hash_table_iter_next (&iter, &k, NULL)) - g_ptr_array_add (ret, g_strdup (k)); - } - - g_ptr_array_add (ret, NULL); - return (GStrv) g_ptr_array_free (ret, FALSE); -} - -/* * mcd_storage_get_plugin: * @storage: An object implementing the #McdStorage interface * @account: unique name of the account diff --git a/src/mcd-storage.h b/src/mcd-storage.h index 930b04b..5f608af 100644 --- a/src/mcd-storage.h +++ b/src/mcd-storage.h @@ -66,10 +66,6 @@ void mcd_storage_load (McdStorage *storage); GStrv mcd_storage_dup_accounts (McdStorage *storage, gsize *n); -GStrv mcd_storage_dup_attributes (McdStorage *storage, - const gchar *account, - gsize *n); - gboolean mcd_storage_set_string (McdStorage *storage, const gchar *account, const gchar *attribute, -- 1.8.4.3