summaryrefslogtreecommitdiff
path: root/src/fs/fs_tree.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/fs/fs_tree.h')
-rw-r--r--src/fs/fs_tree.h36
1 files changed, 18 insertions, 18 deletions
diff --git a/src/fs/fs_tree.h b/src/fs/fs_tree.h
index 7ce7e461b..12b5b5d07 100644
--- a/src/fs/fs_tree.h
+++ b/src/fs/fs_tree.h
@@ -41,7 +41,7 @@
41 * @return depth of the tree, always > 0. A depth of 1 means only a DBLOCK. 41 * @return depth of the tree, always > 0. A depth of 1 means only a DBLOCK.
42 */ 42 */
43unsigned int 43unsigned int
44GNUNET_FS_compute_depth(uint64_t flen); 44GNUNET_FS_compute_depth (uint64_t flen);
45 45
46 46
47/** 47/**
@@ -54,7 +54,7 @@ GNUNET_FS_compute_depth(uint64_t flen);
54 * @return number of bytes of payload a subtree of this depth may correspond to 54 * @return number of bytes of payload a subtree of this depth may correspond to
55 */ 55 */
56uint64_t 56uint64_t
57GNUNET_FS_tree_compute_tree_size(unsigned int depth); 57GNUNET_FS_tree_compute_tree_size (unsigned int depth);
58 58
59 59
60/** 60/**
@@ -69,8 +69,8 @@ GNUNET_FS_tree_compute_tree_size(unsigned int depth);
69 * @return number of bytes stored in this node 69 * @return number of bytes stored in this node
70 */ 70 */
71size_t 71size_t
72GNUNET_FS_tree_calculate_block_size(uint64_t fsize, uint64_t offset, 72GNUNET_FS_tree_calculate_block_size (uint64_t fsize, uint64_t offset,
73 unsigned int depth); 73 unsigned int depth);
74 74
75 75
76/** 76/**
@@ -95,7 +95,7 @@ struct GNUNET_FS_TreeEncoder;
95 * @param block_size size of block (in bytes) 95 * @param block_size size of block (in bytes)
96 */ 96 */
97typedef void (*GNUNET_FS_TreeBlockProcessor) (void *cls, 97typedef void (*GNUNET_FS_TreeBlockProcessor) (void *cls,
98 const struct ContentHashKey * chk, 98 const struct ContentHashKey *chk,
99 uint64_t offset, 99 uint64_t offset,
100 unsigned int depth, 100 unsigned int depth,
101 enum GNUNET_BLOCK_Type type, 101 enum GNUNET_BLOCK_Type type,
@@ -138,11 +138,11 @@ typedef void (*GNUNET_FS_TreeProgressCallback) (void *cls, uint64_t offset,
138 * @return tree encoder context 138 * @return tree encoder context
139 */ 139 */
140struct GNUNET_FS_TreeEncoder * 140struct GNUNET_FS_TreeEncoder *
141GNUNET_FS_tree_encoder_create(struct GNUNET_FS_Handle *h, uint64_t size, 141GNUNET_FS_tree_encoder_create (struct GNUNET_FS_Handle *h, uint64_t size,
142 void *cls, GNUNET_FS_DataReader reader, 142 void *cls, GNUNET_FS_DataReader reader,
143 GNUNET_FS_TreeBlockProcessor proc, 143 GNUNET_FS_TreeBlockProcessor proc,
144 GNUNET_FS_TreeProgressCallback progress, 144 GNUNET_FS_TreeProgressCallback progress,
145 GNUNET_SCHEDULER_TaskCallback cont); 145 GNUNET_SCHEDULER_TaskCallback cont);
146 146
147 147
148/** 148/**
@@ -154,7 +154,7 @@ GNUNET_FS_tree_encoder_create(struct GNUNET_FS_Handle *h, uint64_t size,
154 * @param te tree encoder to use 154 * @param te tree encoder to use
155 */ 155 */
156void 156void
157GNUNET_FS_tree_encoder_next(struct GNUNET_FS_TreeEncoder *te); 157GNUNET_FS_tree_encoder_next (struct GNUNET_FS_TreeEncoder *te);
158 158
159 159
160/** 160/**
@@ -164,7 +164,7 @@ GNUNET_FS_tree_encoder_next(struct GNUNET_FS_TreeEncoder *te);
164 * @return uri set to the resulting URI (if encoding finished), NULL otherwise 164 * @return uri set to the resulting URI (if encoding finished), NULL otherwise
165 */ 165 */
166struct GNUNET_FS_Uri * 166struct GNUNET_FS_Uri *
167GNUNET_FS_tree_encoder_get_uri(struct GNUNET_FS_TreeEncoder *te); 167GNUNET_FS_tree_encoder_get_uri (struct GNUNET_FS_TreeEncoder *te);
168 168
169 169
170/** 170/**
@@ -178,8 +178,8 @@ GNUNET_FS_tree_encoder_get_uri(struct GNUNET_FS_TreeEncoder *te);
178 * both "*emsg" will be set to NULL). 178 * both "*emsg" will be set to NULL).
179 */ 179 */
180void 180void
181GNUNET_FS_tree_encoder_finish(struct GNUNET_FS_TreeEncoder *te, 181GNUNET_FS_tree_encoder_finish (struct GNUNET_FS_TreeEncoder *te,
182 char **emsg); 182 char **emsg);
183 183
184 184
185#if 0 185#if 0
@@ -194,8 +194,8 @@ GNUNET_FS_tree_encoder_finish(struct GNUNET_FS_TreeEncoder *te,
194 * @param size set to the size of the resume data 194 * @param size set to the size of the resume data
195 */ 195 */
196void 196void
197GNUNET_FS_tree_encoder_resume_get_data(const struct GNUNET_FS_TreeEncoder *te, 197GNUNET_FS_tree_encoder_resume_get_data (const struct GNUNET_FS_TreeEncoder *te,
198 void **data, size_t * size); 198 void **data, size_t *size);
199 199
200 200
201/** 201/**
@@ -207,8 +207,8 @@ GNUNET_FS_tree_encoder_resume_get_data(const struct GNUNET_FS_TreeEncoder *te,
207 * @param size the size of the resume data 207 * @param size the size of the resume data
208 */ 208 */
209void 209void
210GNUNET_FS_tree_encoder_resume(struct GNUNET_FS_TreeEncoder *te, 210GNUNET_FS_tree_encoder_resume (struct GNUNET_FS_TreeEncoder *te,
211 const void *data, size_t size); 211 const void *data, size_t size);
212 212
213#endif 213#endif
214 214