types
[oweals/gnunet.git] / src / fs / fs_tree.h
index f24130a3cd4eb1a8d22fd8fd17258586f0543c9f..bfbd7019b492699b66e35ce7a1f33e025da17226 100644 (file)
 
 #include "fs.h"
 
+/**
+ * Compute the depth of the CHK tree.
+ *
+ * @param flen file length for which to compute the depth
+ * @return depth of the tree
+ */
+unsigned int
+GNUNET_FS_compute_depth (uint64_t flen);
+
+
 /**
  * Context for an ECRS-based file encoder that computes
  * the Merkle-ish-CHK tree.
@@ -57,7 +67,7 @@ struct GNUNET_FS_TreeEncoder;
 typedef void (*GNUNET_FS_TreeBlockProcessor)(void *cls,
                                             const GNUNET_HashCode *query,
                                             uint64_t offset,
-                                            unsigned int type,
+                                            uint32_t type,
                                             const void *block,
                                             uint16_t block_size);
                                             
@@ -95,6 +105,7 @@ typedef void (*GNUNET_FS_TreeProgressCallback)(void *cls,
  * @param proc function to call on each encrypted block
  * @param progress function to call with progress information 
  * @param cont function to call when done
+ * @return tree encoder context
  */
 struct GNUNET_FS_TreeEncoder *
 GNUNET_FS_tree_encoder_create (struct GNUNET_FS_Handle *h,