libgsf r990 - in trunk: . doc doc/tmpl gsf



Author: jody
Date: Tue Jul  1 12:21:12 2008
New Revision: 990
URL: http://svn.gnome.org/viewvc/libgsf?rev=990&view=rev

Log:
* Add additional MS OpenPkg support to facilitate pivots.
* gtk-doc improvements.


Modified:
   trunk/ChangeLog
   trunk/NEWS
   trunk/doc/gsf-sections.txt
   trunk/doc/tmpl/gsf-unused.sgml
   trunk/doc/tmpl/memory.sgml
   trunk/gsf/gsf-doc-meta-data.c
   trunk/gsf/gsf-infile-msole.c
   trunk/gsf/gsf-infile-msvba.c
   trunk/gsf/gsf-infile-zip.c
   trunk/gsf/gsf-infile.c
   trunk/gsf/gsf-libxml.c
   trunk/gsf/gsf-open-pkg-utils.c
   trunk/gsf/gsf-open-pkg-utils.h
   trunk/gsf/gsf-output.c
   trunk/gsf/gsf-structured-blob.c
   trunk/gsf/gsf-utils.c

Modified: trunk/NEWS
==============================================================================
--- trunk/NEWS	(original)
+++ trunk/NEWS	Tue Jul  1 12:21:12 2008
@@ -7,6 +7,8 @@
 	* Add MS OOX support to gsf-vba-dump.
 	* Extend the utility wrappers for GsfInfile.
 	* Be more forgiving of corrupt ole2.
+	* Add additional MS OpenPkg support to facilitate pivots.
+	* gtk-doc improvements.
 
 Morten:
 	* Use g_base64_-routines from glib when available.

Modified: trunk/doc/gsf-sections.txt
==============================================================================
--- trunk/doc/gsf-sections.txt	(original)
+++ trunk/doc/gsf-sections.txt	Tue Jul  1 12:21:12 2008
@@ -165,7 +165,6 @@
 
 GsfOutputMemory
 gsf_output_memory_get_bytes
-gsf_output_memory_get_type
 gsf_output_memory_new
 
 <SUBSECTION Standard>
@@ -405,15 +404,15 @@
 <FILE>open-pkg</FILE>
 GsfOpenPkgRel
 GsfOpenPkgRels
+GsfOpenPkgIter
 gsf_open_pkg_rel_get_target
 gsf_open_pkg_rel_get_type
 gsf_open_pkg_rel_is_extern
 
+gsf_open_pkg_foreach_rel
+gsf_open_pkg_open_rel
 gsf_open_pkg_lookup_rel_by_id
 gsf_open_pkg_lookup_rel_by_type
-gsf_open_pkg_open_rel_by_id
-gsf_open_pkg_open_rel_by_type
-gsf_open_pkg_parse_rel_by_id
 
 gsf_open_pkg_error_id
 
@@ -431,6 +430,9 @@
 gsf_outfile_open_pkg_get_type
 
 <SUBSECTION Deprecated>
+gsf_open_pkg_open_rel_by_id
+gsf_open_pkg_open_rel_by_type
+gsf_open_pkg_parse_rel_by_id
 gsf_open_pkg_get_rel_by_type
 gsf_open_pkg_get_rel_by_id
 </SECTION>

Modified: trunk/doc/tmpl/gsf-unused.sgml
==============================================================================
--- trunk/doc/tmpl/gsf-unused.sgml	(original)
+++ trunk/doc/tmpl/gsf-unused.sgml	Tue Jul  1 12:21:12 2008
@@ -173,6 +173,13 @@
 @output: 
 @Returns: 
 
+<!-- ##### FUNCTION gsf_output_memory_get_type ##### -->
+<para>
+
+</para>
+
+ Returns: 
+
 <!-- ##### FUNCTION gsf_output_name ##### -->
 <para>
 

Modified: trunk/doc/tmpl/memory.sgml
==============================================================================
--- trunk/doc/tmpl/memory.sgml	(original)
+++ trunk/doc/tmpl/memory.sgml	Tue Jul  1 12:21:12 2008
@@ -79,14 +79,6 @@
 @Returns: 
 
 
-<!-- ##### FUNCTION gsf_output_memory_get_type ##### -->
-<para>
-
-</para>
-
- Returns: 
-
-
 <!-- ##### FUNCTION gsf_output_memory_new ##### -->
 <para>
 

Modified: trunk/gsf/gsf-doc-meta-data.c
==============================================================================
--- trunk/gsf/gsf-doc-meta-data.c	(original)
+++ trunk/gsf/gsf-doc-meta-data.c	Tue Jul  1 12:21:12 2008
@@ -98,7 +98,7 @@
 /**
  * gsf_doc_meta_data_insert :
  * @meta : #GsfDocMetaData
- * @name :
+ * @name : the id.
  * @value : #GValue
  *
  * Take ownership of @name and @value and insert a property into @meta.

Modified: trunk/gsf/gsf-infile-msole.c
==============================================================================
--- trunk/gsf/gsf-infile-msole.c	(original)
+++ trunk/gsf/gsf-infile-msole.c	Tue Jul  1 12:21:12 2008
@@ -105,7 +105,7 @@
 /**
  * ole_get_block :
  * @ole: the infile
- * @block:
+ * @block: block number
  * @buffer: optionally NULL
  *
  * Read a block of data from the underlying input.
@@ -188,16 +188,9 @@
 	}
 }
 
-/**
- * ole_info_read_metabat :
- * @ole:
- * @bats:
- *
- * A small utility routine to read a set of references to bat blocks
+/* A small utility routine to read a set of references to bat blocks
  * either from the OLE header, or a meta-bat block.
- *
- * Returns: a pointer to the element after the last position filled.
- **/
+ * Returns: a pointer to the element after the last position filled. */
 static guint32 *
 ole_info_read_metabat (GsfInfileMSOle *ole, guint32 *bats, guint32 max_bat,
 		       guint32 const *metabat, guint32 const *metabat_end)
@@ -228,14 +221,7 @@
 	return bats;
 }
 
-/**
- * gsf_ole_get_guint32s :
- * @dst:
- * @src:
- * @num_bytes:
- *
- * Copy some some raw data into an array of guint32.
- **/
+/* Copy some some raw data into an array of guint32. */
 static void
 gsf_ole_get_guint32s (guint32 *dst, guint8 const *src, int num_bytes)
 {
@@ -287,16 +273,8 @@
 	return strcmp (b->collation_name, a->collation_name);
 }
 
-/**
- * ole_dirent_new :
- * @ole:
- * @entry:
- * @parent: optional
- *
- * Parse dirent number @entry and recursively handle its siblings and children.
- *
- * Returns: The dirent
- **/
+/* Parse dirent number @entry and recursively handle its siblings and children.
+ * parent is optional. */
 static MSOleDirent *
 ole_dirent_new (GsfInfileMSOle *ole, guint32 entry, MSOleDirent *parent,
 		guint8 *seen_before)
@@ -482,16 +460,9 @@
 	return dst;
 }
 
-/**
- * ole_init_info :
- * @ole:
- * @err: optionally NULL
- *
- * Read an OLE header and do some sanity checking
+/* Read an OLE header and do some sanity checking
  * along the way.
- *
- * Returns: TRUE on error setting @err if it is supplied.
- **/
+ * Returns: %TRUE on error setting @err if it is supplied. */
 static gboolean
 ole_init_info (GsfInfileMSOle *ole, GError **err)
 {
@@ -942,8 +913,8 @@
 
 /**
  * gsf_infile_msole_new :
- * @source:
- * @err:
+ * @source: #GsfInput
+ * @err: optional place to store an error
  *
  * Opens the root directory of an MS OLE file.
  * <note>This adds a reference to @source.</note>

Modified: trunk/gsf/gsf-infile-msvba.c
==============================================================================
--- trunk/gsf/gsf-infile-msvba.c	(original)
+++ trunk/gsf/gsf-infile-msvba.c	Tue Jul  1 12:21:12 2008
@@ -89,13 +89,13 @@
 
 /**
  * vba_dir_read :
- * @vba :
+ * @vba : #GsfInfileMSVBA
  * @err : optionally NULL
  *
  * Read an VBA dirctory and its project file.
  * along the way.
  *
- * Return value: FALSE on error setting @err if it is supplied.
+ * Returns: %FALSE on error setting @err if it is supplied.
  **/
 static gboolean
 vba_dir_read (GsfInfileMSVBA *vba, GError **err)
@@ -276,13 +276,13 @@
 #if 0
 /**
  * vba_project_read :
- * @vba :
+ * @vba : #GsfInfileMSVBA
  * @err : optionally NULL
  *
  * Read an VBA dirctory and its project file.
  * along the way.
  *
- * Return value: FALSE on error setting @err if it is supplied.
+ * Returns: %FALSE on error setting @err if it is supplied.
  **/
 static gboolean
 vba_project_read (GsfInfileMSVBA *vba, GError **err)

Modified: trunk/gsf/gsf-infile-zip.c
==============================================================================
--- trunk/gsf/gsf-infile-zip.c	(original)
+++ trunk/gsf/gsf-infile-zip.c	Tue Jul  1 12:21:12 2008
@@ -291,12 +291,12 @@
 
 /**
  * zip_read_dirents:
- * @zip :
+ * @zip : #GsfInfileZip
  *
  * Read zip headers and do some sanity checking
  * along the way.
  *
- * Return value: TRUE on error setting zip->err.
+ * Returns: %TRUE on error setting zip->err.
  **/
 static gboolean
 zip_read_dirents (GsfInfileZip *zip)
@@ -365,12 +365,12 @@
 
 /**
  * zip_init_info :
- * @zip :
+ * @zip : #GsfInfileZip
  *
  * Read zip headers and do some sanity checking
  * along the way.
  *
- * Return value: TRUE on error setting zip->err.
+ * Returns: TRUE on error setting zip->err.
  **/
 static gboolean
 zip_init_info (GsfInfileZip *zip)

Modified: trunk/gsf/gsf-infile.c
==============================================================================
--- trunk/gsf/gsf-infile.c	(original)
+++ trunk/gsf/gsf-infile.c	Tue Jul  1 12:21:12 2008
@@ -60,8 +60,8 @@
 
 /**
  * gsf_infile_child_by_index :
- * @infile :
- * @i :
+ * @infile : #GsfInfile
+ * @i : target index
  *
  * TODO : For 2.0 api will change to include a GError.
  * Returns: a newly created child which must be unrefed.
@@ -89,8 +89,8 @@
 
 /**
  * gsf_infile_child_by_name :
- * @infile :
- * @name :
+ * @infile : #GsfInfile
+ * @name : target name
  *
  * TODO : For 2.0 api will change to include a GError.
  * Returns: a newly created child which must be unrefed.
@@ -166,8 +166,6 @@
 
 		infile = tmp = GSF_INFILE (child);
 	}
-	if (tmp != NULL)
-		g_object_unref (G_OBJECT (tmp));
 
 	return child;
 }

Modified: trunk/gsf/gsf-libxml.c
==============================================================================
--- trunk/gsf/gsf-libxml.c	(original)
+++ trunk/gsf/gsf-libxml.c	Tue Jul  1 12:21:12 2008
@@ -350,12 +350,12 @@
 
 /**
  * gsf_xml_output_buffer_new :
- * @output:
+ * @output: #GsfOutput
  * @encoding: optionally %NULL.
  *
  * <note>This adds a reference to @output.</note>
  * <note>This is <emphasis>not</emphasis> releated to #GsfXMLOut.</note>
- */
+ **/
 static xmlOutputBufferPtr
 gsf_xml_output_buffer_new (GsfOutput *output,
 			   xmlCharEncodingHandlerPtr handler)
@@ -990,7 +990,7 @@
  * gsf_xml_in_push_state :
  * @xin : #GsfXMLIn
  * @doc : #GsfXMLInDoc
- * @new_state :
+ * @new_state : arbitrary content for the parser
  * @dtor : #GsfXMLInExtDtor
  * @attrs : array of xmlChar const *
  *
@@ -1023,7 +1023,7 @@
  * gsf_xml_in_doc_parse :
  * @doc : #GsfXMLInDoc
  * @input : #GsfInput
- * @user_state :
+ * @user_state : arbitrary content stored in the parser
  *
  * Read an xml document from @input and parse based on the the descriptor in
  * @doc
@@ -1073,13 +1073,13 @@
 /**
  * gsf_xml_in_check_ns :
  * @xin : #GsfXMLIn
- * @str :
- * @ns_id :
+ * @str : string to check
+ * @ns_id : the namespace id
  * 
  * According to @state is @str in the namespace @ns_id ?
  *
  * Returns: a pointer to @str after the namespace if successful,
- * 	otherwise NULL.
+ * 	otherwise %NULL.
  **/
 char const *
 gsf_xml_in_check_ns (GsfXMLIn const *xin, char const *str, unsigned int ns_id)

Modified: trunk/gsf/gsf-open-pkg-utils.c
==============================================================================
--- trunk/gsf/gsf-open-pkg-utils.c	(original)
+++ trunk/gsf/gsf-open-pkg-utils.c	Tue Jul  1 12:21:12 2008
@@ -150,26 +150,20 @@
 	return rel->type;
 }
 
-/**
- * gsf_open_pkg_get_rels :
- * @in : #GsfInput
- *
- * Returns: a hashtable of the relationships associated with @in
- **/
 static GsfOpenPkgRels *
-gsf_open_pkg_get_rels (GsfInput *in)
+gsf_open_pkg_get_rels (GsfInput *opkg)
 {
 	GsfOpenPkgRels *rels;
 
-	g_return_val_if_fail (in != NULL, NULL);
+	g_return_val_if_fail (opkg != NULL, NULL);
 
-	if (NULL == (rels = g_object_get_data (G_OBJECT (in), "OpenPkgRels"))) {
-		char const *part_name = gsf_input_name (in);
+	if (NULL == (rels = g_object_get_data (G_OBJECT (opkg), "OpenPkgRels"))) {
+		char const *part_name = gsf_input_name (opkg);
 		GsfXMLInDoc *rel_doc;
 		GsfInput *rel_stream;
 
 		if (NULL != part_name) {
-			GsfInfile *container = gsf_input_container (in);
+			GsfInfile *container = gsf_input_container (opkg);
 			char *rel_name;
 
 			g_return_val_if_fail (container != NULL, NULL);
@@ -178,7 +172,7 @@
 			rel_stream = gsf_infile_child_by_vname (container, "_rels", rel_name, NULL);
 			g_free (rel_name);
 		} else /* the root */
-			rel_stream = gsf_infile_child_by_vname (GSF_INFILE (in), "_rels", ".rels", NULL);
+			rel_stream = gsf_infile_child_by_vname (GSF_INFILE (opkg), "_rels", ".rels", NULL);
 
 		g_return_val_if_fail (rel_stream != NULL, NULL);
 
@@ -193,15 +187,23 @@
 		gsf_xml_in_doc_free (rel_doc);
 		g_object_unref (G_OBJECT (rel_stream));
 
-		g_object_set_data_full (G_OBJECT (in), "OpenPkgRels", rels,
+		g_object_set_data_full (G_OBJECT (opkg), "OpenPkgRels", rels,
 			(GDestroyNotify) gsf_open_pkg_rels_free);
 	}
 
 	return rels;
 }
 
-static GsfInput *
-gsf_open_pkg_open_rel (GsfInput *in, GsfOpenPkgRel *rel,
+/**
+ * gsf_open_pkg_open_rel :
+ * @opkg : #GsfInput
+ * @rel : #GsfOpenPkgRel
+ * @err : #GError.
+ *
+ * Returns: a new #GsfInput which the called needs to unref, or %NULL and sets @err
+ **/
+GsfInput *
+gsf_open_pkg_open_rel (GsfInput *opkg, GsfOpenPkgRel const *rel,
 		       G_GNUC_UNUSED GError **err /* just in case we need it one day */ )
 {
 	GsfInfile *container, *prev;
@@ -209,10 +211,10 @@
 	unsigned i;
 
 	g_return_val_if_fail (rel != NULL, NULL);
-	g_return_val_if_fail (in != NULL, NULL);
+	g_return_val_if_fail (opkg != NULL, NULL);
 
-	container = gsf_input_name (in)
-		? gsf_input_container (in) : GSF_INFILE (in);
+	container = gsf_input_name (opkg)
+		? gsf_input_container (opkg) : GSF_INFILE (opkg);
 
 	/* parts can not have '/' in their names ? TODO : PROVE THIS
 	 * right now the only test is that worksheets can not have it
@@ -226,128 +228,165 @@
 			g_return_val_if_fail (container != NULL, NULL);
 
 			g_object_ref (container);
-			in = NULL;
+			opkg = NULL;
 		} else if (0 == strcmp (elems[i], ".")) {
-			in = NULL; /* Be pedantic and ignore '.' */
+			opkg = NULL; /* Be pedantic and ignore '.' */
 			continue;
 		} else {
-			in = gsf_infile_child_by_name (container, elems[i]);
+			opkg = gsf_infile_child_by_name (container, elems[i]);
 
 			if (NULL != elems[i+1]) {
-				g_return_val_if_fail (GSF_IS_INFILE (in), NULL);
-				container = GSF_INFILE (in);
+				g_return_val_if_fail (GSF_IS_INFILE (opkg), NULL);
+				container = GSF_INFILE (opkg);
 			}
 		}
 		if (i > 0)
 			g_object_unref (G_OBJECT (prev));
-
 	}
 	g_strfreev (elems);
 
-	return in;
+	return opkg;
 }
 
 /**
  * gsf_open_pkg_lookup_rel_by_type :
- * @in : #GsfInput
- * @type :
+ * @opkg : #GsfInput
+ * @type : target
  *
  * New in 1.14.6
  *
- * Finds _a_ relation of @in with @type (no order is guaranteed)
+ * Finds _a_ relation of @opkg with @type (no order is guaranteed)
  *
  * Returns: A #GsfOpenPkgRel or %NULL
  **/
 GsfOpenPkgRel *
-gsf_open_pkg_lookup_rel_by_type (GsfInput *in, char const *type)
+gsf_open_pkg_lookup_rel_by_type (GsfInput *opkg, char const *type)
 {
-	GsfOpenPkgRels *rels = gsf_open_pkg_get_rels (in);
+	GsfOpenPkgRels *rels = gsf_open_pkg_get_rels (opkg);
 	g_return_val_if_fail (rels != NULL, NULL);
 	return g_hash_table_lookup (rels->by_type, type);
 }
 
 /**
  * gsf_open_pkg_open_rel_by_id :
- * @in : #GsfInput
+ * @opkg : #GsfInput
  * @id :
  *
  * New in 1.14.6
  *
- * Finds @in's relation with @id
+ * Finds @opkg's relation with @id
  *
  * Returns: A #GsfOpenPkgRel or %NULL
  **/
 GsfOpenPkgRel *
-gsf_open_pkg_lookup_rel_by_id (GsfInput *in, char const *id)
+gsf_open_pkg_lookup_rel_by_id (GsfInput *opkg, char const *id)
 {
-	GsfOpenPkgRels *rels = gsf_open_pkg_get_rels (in);
+	GsfOpenPkgRels *rels = gsf_open_pkg_get_rels (opkg);
 	g_return_val_if_fail (rels != NULL, NULL);
 	return g_hash_table_lookup (rels->by_id, id);
 }
 
+struct pkg_iter_data {
+	GsfInput *opkg;
+	GsfOpenPkgIter func;
+	gpointer user_data;
+};
+
+static void
+cb_foreach_rel (G_GNUC_UNUSED gpointer id,
+		GsfOpenPkgRel *rel,
+		struct pkg_iter_data *dat)
+{
+	(*dat->func) (dat->opkg, rel, dat->user_data);
+}
+
+/**
+ * gsf_open_pkg_foreach_rel:
+ * @opkg : #GsfInput
+ * @func : #GsfOpenPkgIter
+ * @user_data : gpointer
+ *
+ * Walks each relationship associated with @opkg and calls @func with @user_data.
+ **/
+void
+gsf_open_pkg_foreach_rel (GsfInput *opkg,
+			  GsfOpenPkgIter func,
+			  gpointer       user_data)
+{
+	GsfOpenPkgRels *rels = gsf_open_pkg_get_rels (opkg);
+	struct pkg_iter_data dat;
+
+	g_return_if_fail (rels != NULL);
+
+	dat.opkg = opkg;
+	dat.func = func;
+	dat.user_data = user_data;
+	g_hash_table_foreach (rels->by_id, (GHFunc)&cb_foreach_rel, &dat);
+}
+
 /**
  * gsf_open_pkg_open_rel_by_id :
- * @in : #GsfInput
- * @id :
+ * @opkg : #GsfInput
+ * @id : target id
  * @err : optionally %NULL
  *
- * New in 1.15.0
+ * New in 1.14.7
  *
- * Open @in's relation @id
+ * Open @opkg's relation @id
  *
  * Returns: A new GsfInput or %NULL, and sets @err if possible.
  **/
 GsfInput *
-gsf_open_pkg_open_rel_by_id (GsfInput *in, char const *id, GError **err)
+gsf_open_pkg_open_rel_by_id (GsfInput *opkg, char const *id, GError **err)
 {
 	GsfOpenPkgRel *rel = NULL;
-	GsfOpenPkgRels *rels = gsf_open_pkg_get_rels (in);
+	GsfOpenPkgRels *rels = gsf_open_pkg_get_rels (opkg);
 
 	g_return_val_if_fail (rels != NULL, NULL);
 
 	if (NULL != (rel = g_hash_table_lookup (rels->by_id, id)))
-		return gsf_open_pkg_open_rel (in, rel, err);
+		return gsf_open_pkg_open_rel (opkg, rel, err);
 	if (err)
 		*err = g_error_new (gsf_input_error_id(), gsf_open_pkg_error_id (),
 			_("Unable to find part id='%s' for '%s'"),
-			id, gsf_input_name (in) );
+			id, gsf_input_name (opkg) );
 	return NULL;
 }
 
 /**
  * gsf_open_pkg_open_rel_by_type :
- * @in : #GsfInput
- * @type :
+ * @opkg : #GsfInput
+ * @type : target type
  * @err : optionally %NULL
  *
- * New in 1.15.0
+ * New in 1.14.9
  *
- * Open one of @in's relationships with type= type 
+ * Open one of @opkg's relationships with type= type 
  *
  * Returns: A new GsfInput or %NULL, and sets @err if possible.
  **/
 GsfInput *
-gsf_open_pkg_open_rel_by_type (GsfInput *in, char const *type, GError **err)
+gsf_open_pkg_open_rel_by_type (GsfInput *opkg, char const *type, GError **err)
 {
 	GsfOpenPkgRel *rel = NULL;
-	GsfOpenPkgRels *rels = gsf_open_pkg_get_rels (in);
+	GsfOpenPkgRels *rels = gsf_open_pkg_get_rels (opkg);
 
 	g_return_val_if_fail (rels != NULL, NULL);
 
 	if (NULL != (rel = g_hash_table_lookup (rels->by_type, type)))
-		return gsf_open_pkg_open_rel (in, rel, err);
+		return gsf_open_pkg_open_rel (opkg, rel, err);
 
 	if (err)
 		*err = g_error_new (gsf_input_error_id(), gsf_open_pkg_error_id (),
 			_("Unable to find part with type='%s' for '%s'"),
-			type, gsf_input_name (in) );
+			type, gsf_input_name (opkg) );
 	return NULL;
 }
 
 /**
  * gsf_open_pkg_parse_rel_by_id :
  * @xin : #GsfXMLIn
- * @id :
+ * @id : target id
  * @dtd : #GsfXMLInNode
  * @ns : #GsfXMLInNS
  *
@@ -390,8 +429,8 @@
 }
 
 /* DEPRECATED in 1.14.6 */
-GsfInput *gsf_open_pkg_get_rel_by_type (GsfInput *in, char const *type) { return gsf_open_pkg_open_rel_by_type (in, type, NULL); }
-GsfInput *gsf_open_pkg_get_rel_by_id   (GsfInput *in, char const *id)   { return gsf_open_pkg_open_rel_by_id (in, id, NULL); }
+GsfInput *gsf_open_pkg_get_rel_by_type (GsfInput *opkg, char const *type) { return gsf_open_pkg_open_rel_by_type (opkg, type, NULL); }
+GsfInput *gsf_open_pkg_get_rel_by_id   (GsfInput *opkg, char const *id)   { return gsf_open_pkg_open_rel_by_id (opkg, id, NULL); }
 
 /*************************************************************/
 
@@ -760,7 +799,7 @@
  * gsf_outfile_open_pkg_relate:
  * @child : #GsfOutfileOpenPkg
  * @parent : #GsfOutfileOpenPkg
- * @type : 
+ * @type : target type
  *
  * Create a relationship between @child and @parent of @type.
  *
@@ -807,10 +846,10 @@
 /**
  * gsf_outfile_open_pkg_add_rel:
  * @dir : #GsfOutfile
- * @name : 
+ * @name : target name
  * @content_type :
  * @parent : #GsfOutfile
- * @type :
+ * @type : target type
  *
  * A convenience wrapper to create a child in @dir of @content_type then create
  * a @type relation to @parent
@@ -835,8 +874,8 @@
 /**
  * gsf_outfile_open_pkg_add_extern_rel :
  * @parent : #GsfOutfileOpenPkg
- * @target : 
- * @content_type : 
+ * @target : target type
+ * @content_type : target content
  *
  * Add an external relation to @parent.
  *

Modified: trunk/gsf/gsf-open-pkg-utils.h
==============================================================================
--- trunk/gsf/gsf-open-pkg-utils.h	(original)
+++ trunk/gsf/gsf-open-pkg-utils.h	Tue Jul  1 12:21:12 2008
@@ -3,7 +3,7 @@
  * gsf-open-pkg-utils.h: Utilities for handling Open Package zip files
  * 			from MS Office 2007 or XPS.
  *
- * Copyright (C) 2006-2007 Jody Goldberg (jody gnome org)
+ * Copyright (C) 2006-2008 Jody Goldberg (jody gnome org)
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of version 2.1 of the GNU Lesser General Public
@@ -30,25 +30,33 @@
 
 typedef struct _GsfOpenPkgRel	GsfOpenPkgRel;
 typedef struct _GsfOpenPkgRels	GsfOpenPkgRels;
+typedef void   (*GsfOpenPkgIter)(GsfInput *opkg,
+				 GsfOpenPkgRel const *rel,
+				 gpointer    user_data);
 
 gboolean      gsf_open_pkg_rel_is_extern	(GsfOpenPkgRel const *rel);
 char const   *gsf_open_pkg_rel_get_target	(GsfOpenPkgRel const *rel);
 char const   *gsf_open_pkg_rel_get_type		(GsfOpenPkgRel const *rel);
 
-GsfOpenPkgRel *gsf_open_pkg_lookup_rel_by_type (GsfInput *in, char const *type);
-GsfOpenPkgRel *gsf_open_pkg_lookup_rel_by_id   (GsfInput *in, char const *id);
+GsfOpenPkgRel *gsf_open_pkg_lookup_rel_by_type (GsfInput *opkg, char const *type);
+GsfOpenPkgRel *gsf_open_pkg_lookup_rel_by_id   (GsfInput *opkg, char const *id);
+void	       gsf_open_pkg_foreach_rel	       (GsfInput *opkg,
+						GsfOpenPkgIter func,
+						gpointer       user_data);
+GsfInput      *gsf_open_pkg_open_rel	       (GsfInput *opkg, GsfOpenPkgRel const *rel,
+						GError **err);
 
-GsfInput      *gsf_open_pkg_open_rel_by_type   (GsfInput *in, char const *type,
+GsfInput      *gsf_open_pkg_open_rel_by_type   (GsfInput *opkg, char const *type,
 						GError **err);
-GsfInput      *gsf_open_pkg_open_rel_by_id     (GsfInput *in, char const *id,
+GsfInput      *gsf_open_pkg_open_rel_by_id     (GsfInput *opkg, char const *id,
 						GError **err);
 GError	      *gsf_open_pkg_parse_rel_by_id    (GsfXMLIn *xin, char const *id,
 						GsfXMLInNode const *dtd,
 						GsfXMLInNS const *ns);
 
 /* DEPRECATED in 1.14.6 */
-GsfInput      *gsf_open_pkg_get_rel_by_type    (GsfInput *in, char const *type);
-GsfInput      *gsf_open_pkg_get_rel_by_id      (GsfInput *in, char const *id);
+GsfInput      *gsf_open_pkg_get_rel_by_type    (GsfInput *opkg, char const *type);
+GsfInput      *gsf_open_pkg_get_rel_by_id      (GsfInput *opkg, char const *id);
 
 typedef struct _GsfOutfileOpenPkg GsfOutfileOpenPkg;
 

Modified: trunk/gsf/gsf-output.c
==============================================================================
--- trunk/gsf/gsf-output.c	(original)
+++ trunk/gsf/gsf-output.c	Tue Jul  1 12:21:12 2008
@@ -211,7 +211,7 @@
 
 /**
  * gsf_output_close :
- * @output:
+ * @output: #GsfOutput
  *
  * Close a stream.
  *
@@ -237,7 +237,7 @@
 
 /**
  * gsf_output_is_closed :
- * @output:
+ * @output: #GsfOutput
  *
  * Returns: %TRUE if @output has already been closed.
  **/
@@ -373,8 +373,8 @@
 
 /**
  * gsf_output_set_name :
- * @output:
- * @name:
+ * @output: #GsfOutput
+ * @name: the new name
  *
  * <note>This is a utility routine that should only be used by derived
  * outputs.</note>
@@ -418,8 +418,8 @@
 
 /**
  * gsf_output_set_container :
- * @output:
- * @container:
+ * @output: #GsfOutput
+ * @container: #GsfOutfile
  *
  * <note>This is a utility routine that should only be used by derived
  * outputs.</note>
@@ -441,10 +441,10 @@
 
 /**
  * gsf_output_set_error :
- * @output:
- * @code:
- * @format:
- * @Varargs:
+ * @output: #GsfOutput
+ * @code: The error id
+ * @format: printf style format string
+ * @Varargs: arguments for @format
  *
  * <note>This is a utility routine that should only be used by derived
  * outputs.</note>

Modified: trunk/gsf/gsf-structured-blob.c
==============================================================================
--- trunk/gsf/gsf-structured-blob.c	(original)
+++ trunk/gsf/gsf-structured-blob.c	Tue Jul  1 12:21:12 2008
@@ -258,13 +258,13 @@
 
 /**
  * gsf_structured_blob_write :
- * @blob:
- * @container:
+ * @blob: #GsfStructuredBlob
+ * @container: #GsfOutfile
  *
  * Dumps structured blob @blob onto the @container.  Will fail if the output is
  * not an Outfile and blob has multiple streams.
  *
- * Returns: TRUE on success.
+ * Returns: %TRUE on success.
  **/
 gboolean
 gsf_structured_blob_write (GsfStructuredBlob *blob, GsfOutfile *container)

Modified: trunk/gsf/gsf-utils.c
==============================================================================
--- trunk/gsf/gsf-utils.c	(original)
+++ trunk/gsf/gsf-utils.c	Tue Jul  1 12:21:12 2008
@@ -672,8 +672,8 @@
  * This funcion should be called to when finished encoding everything, to
  * flush off the last little bit.
  *
- * Returns:
- */
+ * Returns: a count of the number of bytes in the final block.
+ **/
 size_t
 gsf_base64_encode_close (guint8 const *in, size_t inlen,
 			 gboolean break_lines, guint8 *out, int *state, unsigned int *save)



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