even nicer indentation, thanks to LRN's indent patch
[oweals/gnunet.git] / src / fs / fs_tree.h
index 5cd4d0afecef817f0b2a6fbd04a05b2f67677ac9..b39a47cd31f8361a00303e979f92e406121358ba 100644 (file)
@@ -69,9 +69,8 @@ GNUNET_FS_tree_compute_tree_size (unsigned int depth);
  * @return number of bytes stored in this node
  */
 size_t
-GNUNET_FS_tree_calculate_block_size (uint64_t fsize,
-                                    uint64_t offset,
-                                    unsigned int depth);
+GNUNET_FS_tree_calculate_block_size (uint64_t fsize, uint64_t offset,
+                                     unsigned int depth);
 
 
 /**
@@ -95,14 +94,14 @@ struct GNUNET_FS_TreeEncoder;
  * @param block the (encrypted) block
  * @param block_size size of block (in bytes)
  */
-typedef void (*GNUNET_FS_TreeBlockProcessor)(void *cls,
-                                            const struct ContentHashKey *chk,
-                                            uint64_t offset,
-                                            unsigned int depth,
-                                            enum GNUNET_BLOCK_Type type,
-                                            const void *block,
-                                            uint16_t block_size);
-                                            
+typedef void (*GNUNET_FS_TreeBlockProcessor) (void *cls,
+                                              const struct ContentHashKey * chk,
+                                              uint64_t offset,
+                                              unsigned int depth,
+                                              enum GNUNET_BLOCK_Type type,
+                                              const void *block,
+                                              uint16_t block_size);
+
 
 /**
  * Function called with information about our
@@ -114,12 +113,11 @@ typedef void (*GNUNET_FS_TreeBlockProcessor)(void *cls,
  * @param pt_size size of pt_block
  * @param depth depth of the block in the tree, 0 for DBLOCKS
  */
-typedef void (*GNUNET_FS_TreeProgressCallback)(void *cls,
-                                              uint64_t offset,
-                                              const void *pt_block,
-                                              size_t pt_size,
-                                              unsigned int depth);
-                                              
+typedef void (*GNUNET_FS_TreeProgressCallback) (void *cls, uint64_t offset,
+                                                const void *pt_block,
+                                                size_t pt_size,
+                                                unsigned int depth);
+
 
 /**
  * Initialize a tree encoder.  This function will call "proc" and
@@ -140,13 +138,11 @@ typedef void (*GNUNET_FS_TreeProgressCallback)(void *cls,
  * @return tree encoder context
  */
 struct GNUNET_FS_TreeEncoder *
-GNUNET_FS_tree_encoder_create (struct GNUNET_FS_Handle *h,
-                              uint64_t size,
-                              void *cls,
-                              GNUNET_FS_DataReader reader,
-                              GNUNET_FS_TreeBlockProcessor proc,
-                              GNUNET_FS_TreeProgressCallback progress,
-                              GNUNET_SCHEDULER_Task cont);
+GNUNET_FS_tree_encoder_create (struct GNUNET_FS_Handle *h, uint64_t size,
+                               void *cls, GNUNET_FS_DataReader reader,
+                               GNUNET_FS_TreeBlockProcessor proc,
+                               GNUNET_FS_TreeProgressCallback progress,
+                               GNUNET_SCHEDULER_Task cont);
 
 
 /**
@@ -157,7 +153,8 @@ GNUNET_FS_tree_encoder_create (struct GNUNET_FS_Handle *h,
  *
  * @param te tree encoder to use
  */
-void GNUNET_FS_tree_encoder_next (struct GNUNET_FS_TreeEncoder * te);
+void
+GNUNET_FS_tree_encoder_next (struct GNUNET_FS_TreeEncoder *te);
 
 
 /**
@@ -171,9 +168,9 @@ void GNUNET_FS_tree_encoder_next (struct GNUNET_FS_TreeEncoder * te);
  *        prior to completion and prior to an internal error,
  *        both "*uri" and "*emsg" will be set to NULL).
  */
-void GNUNET_FS_tree_encoder_finish (struct GNUNET_FS_TreeEncoder *te,
-                                   struct GNUNET_FS_Uri **uri,
-                                   char **emsg);
+void
+GNUNET_FS_tree_encoder_finish (struct GNUNET_FS_TreeEncoder *te,
+                               struct GNUNET_FS_Uri **uri, char **emsg);
 
 
 #if 0
@@ -187,9 +184,9 @@ void GNUNET_FS_tree_encoder_finish (struct GNUNET_FS_TreeEncoder *te,
  * @param data set to the resume data
  * @param size set to the size of the resume data
  */
-void GNUNET_FS_tree_encoder_resume_get_data (const struct GNUNET_FS_TreeEncoder *te,
-                                            void **data,
-                                            size_t *size);
+void
+GNUNET_FS_tree_encoder_resume_get_data (const struct GNUNET_FS_TreeEncoder *te,
+                                        void **data, size_t * size);
 
 
 /**
@@ -200,9 +197,9 @@ void GNUNET_FS_tree_encoder_resume_get_data (const struct GNUNET_FS_TreeEncoder
  * @param data the resume data
  * @param size the size of the resume data
  */
-void GNUNET_FS_tree_encoder_resume (struct GNUNET_FS_TreeEncoder *te,
-                                   const void *data,
-                                   size_t size);
+void
+GNUNET_FS_tree_encoder_resume (struct GNUNET_FS_TreeEncoder *te,
+                               const void *data, size_t size);
 #endif
 
 #endif