[nautilus/wip/antoniof/metadata-lists-optimization: 2/2] file: Document ::{get, set}_metadata_list()




commit 4ffe95e64caddd4d11934d4f0d96b62fae075a9f
Author: António Fernandes <antoniof gnome org>
Date:   Mon Jul 26 19:09:04 2021 +0100

    file: Document ::{get,set}_metadata_list()
    
    As they have been touched in the last two commits, and to clarify they
    don't actually mean a GList but rather a GStrv.

 src/nautilus-file.c | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
---
diff --git a/src/nautilus-file.c b/src/nautilus-file.c
index f0d32caf3..e602740d3 100644
--- a/src/nautilus-file.c
+++ b/src/nautilus-file.c
@@ -4138,6 +4138,15 @@ nautilus_file_get_metadata (NautilusFile *file,
     return g_strdup (default_metadata);
 }
 
+/**
+ * nautilus_file_get_metadata_list:
+ * @file: A #NautilusFile to get metadata from.
+ * @key: A string representation of the metadata key (use macros when possible).
+ *
+ * Get the value of a metadata attribute which holds a list of strings.
+ *
+ * Returns: (transfer full): A zero-terminated array of newly allocated strings.
+ */
 gchar **
 nautilus_file_get_metadata_list (NautilusFile *file,
                                  const char   *key)
@@ -4185,6 +4194,14 @@ nautilus_file_set_metadata (NautilusFile *file,
     NAUTILUS_FILE_CLASS (G_OBJECT_GET_CLASS (file))->set_metadata (file, key, val);
 }
 
+/**
+ * nautilus_file_set_metadata_list:
+ * @file: A #NautilusFile to set metadata into.
+ * @key: A string representation of the metadata key (use macros when possible).
+ * @list: (transfer none): A zero-terminated array of newly allocated strings.
+ *
+ * Set the value of a metadata attribute which takes a list of strings.
+ */
 void
 nautilus_file_set_metadata_list (NautilusFile  *file,
                                  const char    *key,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]