gst/gsttaglist.*: Operates on a const
authorAndy Wingo <wingo@pobox.com>
Sat, 19 Nov 2005 15:51:41 +0000 (15:51 +0000)
committerAndy Wingo <wingo@pobox.com>
Sat, 19 Nov 2005 15:51:41 +0000 (15:51 +0000)
Original commit message from CVS:
2005-11-19  Andy Wingo  <wingo@pobox.com>

* gst/gsttaglist.c:
* gst/gsttaglist.h (gst_tag_list_foreach): Operates on a const
GstTagList*. Fixes #143472.

* gst/gststructure.h: Clarify what the foreach/map functions can
or can't do to their arguments.

ChangeLog
gst/gststructure.h
gst/gsttaglist.c
gst/gsttaglist.h

index 69eb580..203c1ca 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2005-11-19  Andy Wingo  <wingo@pobox.com>
+
+       * gst/gsttaglist.c:
+       * gst/gsttaglist.h (gst_tag_list_foreach): Operates on a const
+       GstTagList*. Fixes #143472.
+
+       * gst/gststructure.h: Clarify what the foreach/map functions can
+       or can't do to their arguments.
+
 2005-11-18  Wim Taymans  <wim@fluendo.com>
 
        * gst/gstclock.c: (gst_clock_set_calibration),
index 766ce02..1a73e21 100644 (file)
@@ -38,7 +38,8 @@ typedef struct _GstStructure GstStructure;
  * @value: the #GValue of the field
  * @user_data: user data
  *
- * A function that will be called in gst_structure_foreach()
+ * A function that will be called in gst_structure_foreach(). The function may
+ * not modify @value.
  *
  * Returns: TRUE if the foreach operation should continue, FALSE if
  * the foreach operation should stop with FALSE.
@@ -53,7 +54,8 @@ typedef gboolean (*GstStructureForeachFunc) (GQuark   field_id,
  * @value: the #GValue of the field
  * @user_data: user data
  *
- * A function that will be called in gst_structure_map_in_place()
+ * A function that will be called in gst_structure_map_in_place(). The function
+ * may modify @value.
  *
  * Returns: TRUE if the map operation should continue, FALSE if
  * the map operation should stop with FALSE.
index 86571e3..ac45359 100644 (file)
@@ -801,7 +801,7 @@ structure_foreach_wrapper (GQuark field_id, const GValue * value,
  * is no tag, the function won't be called at all.
  */
 void
-gst_tag_list_foreach (GstTagList * list, GstTagForeachFunc func,
+gst_tag_list_foreach (const GstTagList * list, GstTagForeachFunc func,
     gpointer user_data)
 {
   TagForeachData data;
index 20d66de..b1e5567 100644 (file)
@@ -56,7 +56,22 @@ typedef GstStructure GstTagList;
 #define GST_IS_TAG_LIST(x)     (gst_is_tag_list (GST_TAG_LIST (x)))
 #define GST_TYPE_TAG_LIST       (gst_tag_list_get_type ())
 
-typedef void           (* GstTagForeachFunc)   (const GstTagList *list, const gchar *tag, gpointer user_data);
+/**
+ * GstTagForeachFunc:
+ * @list: the #GstTagList
+ * @tag: a name of a tag in @list
+ * @user_data: user data
+ *
+ * A function that will be called in gst_tag_list_foreach(). The function may
+ * not modify the tag list.
+ *
+ * Returns: TRUE if the foreach operation should continue, FALSE if
+ * the foreach operation should stop with FALSE.
+ */
+typedef gboolean (*GstTagForeachFunc) (const GstTagList *list,
+                                      const gchar * tag,
+                                      gpointer user_data);
+
 typedef void           (* GstTagMergeFunc)     (GValue *dest, const GValue *src);
 
 /* initialize tagging system */
@@ -116,7 +131,7 @@ void                gst_tag_list_add_valist_values  (GstTagList *           list,
                                                 va_list                var_args);
 void           gst_tag_list_remove_tag         (GstTagList *           list,
                                                 const gchar *          tag);
-void           gst_tag_list_foreach            (GstTagList *           list,
+void           gst_tag_list_foreach            (const GstTagList *     list,
                                                 GstTagForeachFunc      func,
                                                 gpointer               user_data);