Do not crash if key is NULL.
[oweals/gnunet.git] / src / fs / fs_tree.h
index 5b1c2024f41515f73ab1da5da4890fa10504efbe..cd25a6dd14ecf900758d78cdea27c2c16c05cb1d 100644 (file)
@@ -157,20 +157,29 @@ void
 GNUNET_FS_tree_encoder_next (struct GNUNET_FS_TreeEncoder *te);
 
 
+/**
+ * Get the resulting URI from the encoding.
+ *
+ * @param te the tree encoder to clean up
+ * @return uri set to the resulting URI (if encoding finished), NULL otherwise
+ */
+struct GNUNET_FS_Uri *
+GNUNET_FS_tree_encoder_get_uri (struct GNUNET_FS_TreeEncoder *te);
+
+
 /**
  * Clean up a tree encoder and return information
- * about the resulting URI or an error message.
+ * about possible errors.
  *
  * @param te the tree encoder to clean up
- * @param uri set to the resulting URI (if encoding finished)
  * @param emsg set to an error message (if an error occured
  *        within the tree encoder; if this function is called
  *        prior to completion and prior to an internal error,
- *        both "*uri" and "*emsg" will be set to NULL).
+ *        both "*emsg" will be set to NULL).
  */
 void
 GNUNET_FS_tree_encoder_finish (struct GNUNET_FS_TreeEncoder *te,
-                               struct GNUNET_FS_Uri **uri, char **emsg);
+                               char **emsg);
 
 
 #if 0
@@ -200,6 +209,7 @@ GNUNET_FS_tree_encoder_resume_get_data (const struct GNUNET_FS_TreeEncoder *te,
 void
 GNUNET_FS_tree_encoder_resume (struct GNUNET_FS_TreeEncoder *te,
                                const void *data, size_t size);
+
 #endif
 
 #endif