* docs/libglabels/libglabels-decl-list.txt:
* docs/libglabels/libglabels-sections.txt:
* docs/libglabels/libglabels-undocumented.txt:
* docs/libglabels/tmpl/category.sgml:
* libglabels/category.c:
* libglabels/category.h:
Added lgl_category_get_id_list() and lgl_category_free_id_list() to have
parity with paper functions.
git-svn-id: https://glabels.svn.sourceforge.net/svnroot/glabels/trunk@680
f5e0f49d-192f-0410-a22d-
a8d8700d0965
+2007-10-14 Jim Evins <evins@snaught.com>
+
+ * docs/libglabels/libglabels-decl-list.txt:
+ * docs/libglabels/libglabels-sections.txt:
+ * docs/libglabels/libglabels-undocumented.txt:
+ * docs/libglabels/tmpl/category.sgml:
+ * libglabels/category.c:
+ * libglabels/category.h:
+ Added lgl_category_get_id_list() and lgl_category_free_id_list() to have
+ parity with paper functions.
+
2007-10-12 Jim Evins <evins@snaught.com>
* docs/libglabels/libglabels-decl-list.txt:
lgl_category_new
lgl_category_dup
lgl_category_free
+lgl_category_get_id_list
+lgl_category_free_id_list
lgl_category_get_name_list
lgl_category_free_name_list
lgl_category_from_name
lgl_category_from_name
lgl_category_from_id
<SUBSECTION List Functions>
+lgl_category_get_id_list
+lgl_category_free_id_list
lgl_category_get_name_list
lgl_category_free_name_list
<SUBSECTION Conversion Functions>
99% symbol docs coverage.
-128 symbols documented.
+130 symbols documented.
0 symbols incomplete.
1 not documented.
@Returns:
+<!-- ##### FUNCTION lgl_category_get_id_list ##### -->
+<para>
+
+</para>
+
+@Returns:
+
+
+<!-- ##### FUNCTION lgl_category_free_id_list ##### -->
+<para>
+
+</para>
+
+@ids:
+
+
<!-- ##### FUNCTION lgl_category_get_name_list ##### -->
<para>
}
+/**
+ * lgl_category_get_id_list:
+ *
+ * Get a list of all category ids known to libglabels.
+ *
+ * Returns: a list of category ids.
+ *
+ */
+GList *
+lgl_category_get_id_list (void)
+{
+ GList *ids = NULL;
+ GList *p;
+ lglCategory *category;
+
+ if (!categories) {
+ lgl_category_init ();
+ }
+
+ for ( p=categories; p != NULL; p=p->next ) {
+ category = (lglCategory *)p->data;
+ ids = g_list_append (ids, g_strdup (category->id));
+ }
+
+ return ids;
+}
+
+/**
+ * lgl_category_free_id_list:
+ * @ids: List of id strings to be freed.
+ *
+ * Free up all storage associated with an id list obtained with
+ * lgl_category_get_id_list().
+ *
+ */
+void
+lgl_category_free_id_list (GList *ids)
+{
+ GList *p;
+
+ for (p = ids; p != NULL; p = p->next) {
+ g_free (p->data);
+ p->data = NULL;
+ }
+
+ g_list_free (ids);
+}
+
+
/**
* lgl_category_get_name_list:
*
void lgl_category_free (lglCategory *category);
+/*
+ * ID lists
+ */
+GList *lgl_category_get_id_list (void);
+void lgl_category_free_id_list (GList *ids);
+
+
/*
* Known category name lists
*/