aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_fs_service.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/gnunet_fs_service.h')
-rw-r--r--src/include/gnunet_fs_service.h565
1 files changed, 280 insertions, 285 deletions
diff --git a/src/include/gnunet_fs_service.h b/src/include/gnunet_fs_service.h
index 2962a9cf2..e8026a66f 100644
--- a/src/include/gnunet_fs_service.h
+++ b/src/include/gnunet_fs_service.h
@@ -89,8 +89,8 @@ typedef int (*GNUNET_FS_KeywordIterator) (void *cls, const char *keyword,
89 * @param uri uri to convert to a unique key 89 * @param uri uri to convert to a unique key
90 * @param key wherer to store the unique key 90 * @param key wherer to store the unique key
91 */ 91 */
92void GNUNET_FS_uri_to_key (const struct GNUNET_FS_Uri *uri, 92void
93 GNUNET_HashCode * key); 93GNUNET_FS_uri_to_key (const struct GNUNET_FS_Uri *uri, GNUNET_HashCode * key);
94 94
95/** 95/**
96 * Convert a URI to a UTF-8 String. 96 * Convert a URI to a UTF-8 String.
@@ -98,7 +98,8 @@ void GNUNET_FS_uri_to_key (const struct GNUNET_FS_Uri *uri,
98 * @param uri uri to convert to a string 98 * @param uri uri to convert to a string
99 * @return the UTF-8 string 99 * @return the UTF-8 string
100 */ 100 */
101char *GNUNET_FS_uri_to_string (const struct GNUNET_FS_Uri *uri); 101char *
102GNUNET_FS_uri_to_string (const struct GNUNET_FS_Uri *uri);
102 103
103/** 104/**
104 * Convert keyword URI to a human readable format 105 * Convert keyword URI to a human readable format
@@ -107,7 +108,8 @@ char *GNUNET_FS_uri_to_string (const struct GNUNET_FS_Uri *uri);
107 * @param uri ksk uri to convert to a string 108 * @param uri ksk uri to convert to a string
108 * @return string with the keywords 109 * @return string with the keywords
109 */ 110 */
110char *GNUNET_FS_uri_ksk_to_string_fancy (const struct GNUNET_FS_Uri *uri); 111char *
112GNUNET_FS_uri_ksk_to_string_fancy (const struct GNUNET_FS_Uri *uri);
111 113
112 114
113/** 115/**
@@ -118,8 +120,9 @@ char *GNUNET_FS_uri_ksk_to_string_fancy (const struct GNUNET_FS_Uri *uri);
118 * @param keyword keyword to add 120 * @param keyword keyword to add
119 * @param is_mandatory is this keyword mandatory? 121 * @param is_mandatory is this keyword mandatory?
120 */ 122 */
121void GNUNET_FS_uri_ksk_add_keyword (struct GNUNET_FS_Uri *uri, 123void
122 const char *keyword, int is_mandatory); 124GNUNET_FS_uri_ksk_add_keyword (struct GNUNET_FS_Uri *uri, const char *keyword,
125 int is_mandatory);
123 126
124 127
125/** 128/**
@@ -129,8 +132,9 @@ void GNUNET_FS_uri_ksk_add_keyword (struct GNUNET_FS_Uri *uri,
129 * @param uri ksk uri to modify 132 * @param uri ksk uri to modify
130 * @param keyword keyword to add 133 * @param keyword keyword to add
131 */ 134 */
132void GNUNET_FS_uri_ksk_remove_keyword (struct GNUNET_FS_Uri *uri, 135void
133 const char *keyword); 136GNUNET_FS_uri_ksk_remove_keyword (struct GNUNET_FS_Uri *uri,
137 const char *keyword);
134 138
135 139
136/** 140/**
@@ -140,14 +144,16 @@ void GNUNET_FS_uri_ksk_remove_keyword (struct GNUNET_FS_Uri *uri,
140 * @param emsg where to store the parser error message (if any) 144 * @param emsg where to store the parser error message (if any)
141 * @return NULL on error 145 * @return NULL on error
142 */ 146 */
143struct GNUNET_FS_Uri *GNUNET_FS_uri_parse (const char *uri, char **emsg); 147struct GNUNET_FS_Uri *
148GNUNET_FS_uri_parse (const char *uri, char **emsg);
144 149
145/** 150/**
146 * Free URI. 151 * Free URI.
147 * 152 *
148 * @param uri uri to free 153 * @param uri uri to free
149 */ 154 */
150void GNUNET_FS_uri_destroy (struct GNUNET_FS_Uri *uri); 155void
156GNUNET_FS_uri_destroy (struct GNUNET_FS_Uri *uri);
151 157
152 158
153/** 159/**
@@ -156,8 +162,8 @@ void GNUNET_FS_uri_destroy (struct GNUNET_FS_Uri *uri);
156 * @param uri ksk uri to get the number of keywords from 162 * @param uri ksk uri to get the number of keywords from
157 * @return 0 if this is not a keyword URI 163 * @return 0 if this is not a keyword URI
158 */ 164 */
159unsigned int GNUNET_FS_uri_ksk_get_keyword_count (const struct GNUNET_FS_Uri 165unsigned int
160 *uri); 166GNUNET_FS_uri_ksk_get_keyword_count (const struct GNUNET_FS_Uri *uri);
161 167
162 168
163/** 169/**
@@ -169,9 +175,10 @@ unsigned int GNUNET_FS_uri_ksk_get_keyword_count (const struct GNUNET_FS_Uri
169 * @return -1 if this is not a keyword URI, otherwise number of 175 * @return -1 if this is not a keyword URI, otherwise number of
170 * keywords iterated over until iterator aborted 176 * keywords iterated over until iterator aborted
171 */ 177 */
172int GNUNET_FS_uri_ksk_get_keywords (const struct GNUNET_FS_Uri *uri, 178int
173 GNUNET_FS_KeywordIterator iterator, 179GNUNET_FS_uri_ksk_get_keywords (const struct GNUNET_FS_Uri *uri,
174 void *iterator_cls); 180 GNUNET_FS_KeywordIterator iterator,
181 void *iterator_cls);
175 182
176 183
177/** 184/**
@@ -181,8 +188,9 @@ int GNUNET_FS_uri_ksk_get_keywords (const struct GNUNET_FS_Uri *uri,
181 * @param peer where to store the identify of the peer (presumably) offering the content 188 * @param peer where to store the identify of the peer (presumably) offering the content
182 * @return GNUNET_SYSERR if this is not a location URI, otherwise GNUNET_OK 189 * @return GNUNET_SYSERR if this is not a location URI, otherwise GNUNET_OK
183 */ 190 */
184int GNUNET_FS_uri_loc_get_peer_identity (const struct GNUNET_FS_Uri *uri, 191int
185 struct GNUNET_PeerIdentity *peer); 192GNUNET_FS_uri_loc_get_peer_identity (const struct GNUNET_FS_Uri *uri,
193 struct GNUNET_PeerIdentity *peer);
186 194
187 195
188/** 196/**
@@ -191,8 +199,8 @@ int GNUNET_FS_uri_loc_get_peer_identity (const struct GNUNET_FS_Uri *uri,
191 * @param uri location URI to get the content URI from 199 * @param uri location URI to get the content URI from
192 * @return NULL if argument is not a location URI 200 * @return NULL if argument is not a location URI
193 */ 201 */
194struct GNUNET_FS_Uri *GNUNET_FS_uri_loc_get_uri (const struct GNUNET_FS_Uri 202struct GNUNET_FS_Uri *
195 *uri); 203GNUNET_FS_uri_loc_get_uri (const struct GNUNET_FS_Uri *uri);
196 204
197 205
198/** 206/**
@@ -201,9 +209,8 @@ struct GNUNET_FS_Uri *GNUNET_FS_uri_loc_get_uri (const struct GNUNET_FS_Uri
201 * @param uri location URI to get the expiration from 209 * @param uri location URI to get the expiration from
202 * @return expiration time of the URI 210 * @return expiration time of the URI
203 */ 211 */
204struct GNUNET_TIME_Absolute GNUNET_FS_uri_loc_get_expiration (const struct 212struct GNUNET_TIME_Absolute
205 GNUNET_FS_Uri 213GNUNET_FS_uri_loc_get_expiration (const struct GNUNET_FS_Uri *uri);
206 *uri);
207 214
208 215
209/** 216/**
@@ -214,13 +221,10 @@ struct GNUNET_TIME_Absolute GNUNET_FS_uri_loc_get_expiration (const struct
214 * @param expiration_time how long will the content be offered? 221 * @param expiration_time how long will the content be offered?
215 * @return the location URI, NULL on error 222 * @return the location URI, NULL on error
216 */ 223 */
217struct GNUNET_FS_Uri *GNUNET_FS_uri_loc_create (const struct GNUNET_FS_Uri 224struct GNUNET_FS_Uri *
218 *baseUri, 225GNUNET_FS_uri_loc_create (const struct GNUNET_FS_Uri *baseUri,
219 const struct 226 const struct GNUNET_CONFIGURATION_Handle *cfg,
220 GNUNET_CONFIGURATION_Handle 227 struct GNUNET_TIME_Absolute expiration_time);
221 *cfg,
222 struct GNUNET_TIME_Absolute
223 expiration_time);
224 228
225 229
226/** 230/**
@@ -231,8 +235,8 @@ struct GNUNET_FS_Uri *GNUNET_FS_uri_loc_create (const struct GNUNET_FS_Uri
231 * @param uri the URI to canonicalize 235 * @param uri the URI to canonicalize
232 * @return canonicalized version of the URI, NULL on error 236 * @return canonicalized version of the URI, NULL on error
233 */ 237 */
234struct GNUNET_FS_Uri *GNUNET_FS_uri_ksk_canonicalize (const struct GNUNET_FS_Uri 238struct GNUNET_FS_Uri *
235 *uri); 239GNUNET_FS_uri_ksk_canonicalize (const struct GNUNET_FS_Uri *uri);
236 240
237 241
238/** 242/**
@@ -244,8 +248,9 @@ struct GNUNET_FS_Uri *GNUNET_FS_uri_ksk_canonicalize (const struct GNUNET_FS_Uri
244 * @param u2 second uri 248 * @param u2 second uri
245 * @return merged URI, NULL on error 249 * @return merged URI, NULL on error
246 */ 250 */
247struct GNUNET_FS_Uri *GNUNET_FS_uri_ksk_merge (const struct GNUNET_FS_Uri *u1, 251struct GNUNET_FS_Uri *
248 const struct GNUNET_FS_Uri *u2); 252GNUNET_FS_uri_ksk_merge (const struct GNUNET_FS_Uri *u1,
253 const struct GNUNET_FS_Uri *u2);
249 254
250 255
251/** 256/**
@@ -254,7 +259,8 @@ struct GNUNET_FS_Uri *GNUNET_FS_uri_ksk_merge (const struct GNUNET_FS_Uri *u1,
254 * @param uri the URI to duplicate 259 * @param uri the URI to duplicate
255 * @return copy of the URI 260 * @return copy of the URI
256 */ 261 */
257struct GNUNET_FS_Uri *GNUNET_FS_uri_dup (const struct GNUNET_FS_Uri *uri); 262struct GNUNET_FS_Uri *
263GNUNET_FS_uri_dup (const struct GNUNET_FS_Uri *uri);
258 264
259 265
260/** 266/**
@@ -274,8 +280,8 @@ struct GNUNET_FS_Uri *GNUNET_FS_uri_dup (const struct GNUNET_FS_Uri *uri);
274 * @return an FS URI for the given keywords, NULL 280 * @return an FS URI for the given keywords, NULL
275 * if keywords is not legal (i.e. empty). 281 * if keywords is not legal (i.e. empty).
276 */ 282 */
277struct GNUNET_FS_Uri *GNUNET_FS_uri_ksk_create (const char *keywords, 283struct GNUNET_FS_Uri *
278 char **emsg); 284GNUNET_FS_uri_ksk_create (const char *keywords, char **emsg);
279 285
280 286
281/** 287/**
@@ -295,8 +301,8 @@ struct GNUNET_FS_Uri *GNUNET_FS_uri_ksk_create (const char *keywords,
295 * @return an FS URI for the given keywords, NULL 301 * @return an FS URI for the given keywords, NULL
296 * if keywords is not legal (i.e. empty). 302 * if keywords is not legal (i.e. empty).
297 */ 303 */
298struct GNUNET_FS_Uri *GNUNET_FS_uri_ksk_create_from_args (unsigned int argc, 304struct GNUNET_FS_Uri *
299 const char **argv); 305GNUNET_FS_uri_ksk_create_from_args (unsigned int argc, const char **argv);
300 306
301 307
302/** 308/**
@@ -306,8 +312,9 @@ struct GNUNET_FS_Uri *GNUNET_FS_uri_ksk_create_from_args (unsigned int argc,
306 * @param u2 the other URI 312 * @param u2 the other URI
307 * @return GNUNET_YES if the URIs are equal 313 * @return GNUNET_YES if the URIs are equal
308 */ 314 */
309int GNUNET_FS_uri_test_equal (const struct GNUNET_FS_Uri *u1, 315int
310 const struct GNUNET_FS_Uri *u2); 316GNUNET_FS_uri_test_equal (const struct GNUNET_FS_Uri *u1,
317 const struct GNUNET_FS_Uri *u2);
311 318
312 319
313/** 320/**
@@ -316,7 +323,8 @@ int GNUNET_FS_uri_test_equal (const struct GNUNET_FS_Uri *u1,
316 * @param uri the uri to check 323 * @param uri the uri to check
317 * @return GNUNET_YES if this is an SKS uri 324 * @return GNUNET_YES if this is an SKS uri
318 */ 325 */
319int GNUNET_FS_uri_test_sks (const struct GNUNET_FS_Uri *uri); 326int
327GNUNET_FS_uri_test_sks (const struct GNUNET_FS_Uri *uri);
320 328
321 329
322/** 330/**
@@ -333,8 +341,9 @@ struct GNUNET_FS_Namespace;
333 * @param emsg where to store an error message 341 * @param emsg where to store an error message
334 * @return an FS URI for the given namespace and identifier 342 * @return an FS URI for the given namespace and identifier
335 */ 343 */
336struct GNUNET_FS_Uri *GNUNET_FS_uri_sks_create (struct GNUNET_FS_Namespace *ns, 344struct GNUNET_FS_Uri *
337 const char *id, char **emsg); 345GNUNET_FS_uri_sks_create (struct GNUNET_FS_Namespace *ns, const char *id,
346 char **emsg);
338 347
339 348
340/** 349/**
@@ -344,8 +353,8 @@ struct GNUNET_FS_Uri *GNUNET_FS_uri_sks_create (struct GNUNET_FS_Namespace *ns,
344 * @param id identifier 353 * @param id identifier
345 * @return an FS URI for the given namespace and identifier 354 * @return an FS URI for the given namespace and identifier
346 */ 355 */
347struct GNUNET_FS_Uri *GNUNET_FS_uri_sks_create_from_nsid (GNUNET_HashCode * 356struct GNUNET_FS_Uri *
348 nsid, const char *id); 357GNUNET_FS_uri_sks_create_from_nsid (GNUNET_HashCode * nsid, const char *id);
349 358
350 359
351/** 360/**
@@ -356,8 +365,9 @@ struct GNUNET_FS_Uri *GNUNET_FS_uri_sks_create_from_nsid (GNUNET_HashCode *
356 * @param nsid where to store the ID of the namespace 365 * @param nsid where to store the ID of the namespace
357 * @return GNUNET_OK on success 366 * @return GNUNET_OK on success
358 */ 367 */
359int GNUNET_FS_uri_sks_get_namespace (const struct GNUNET_FS_Uri *uri, 368int
360 GNUNET_HashCode * nsid); 369GNUNET_FS_uri_sks_get_namespace (const struct GNUNET_FS_Uri *uri,
370 GNUNET_HashCode * nsid);
361 371
362 372
363/** 373/**
@@ -366,7 +376,8 @@ int GNUNET_FS_uri_sks_get_namespace (const struct GNUNET_FS_Uri *uri,
366 * @param uri the sks uri 376 * @param uri the sks uri
367 * @return NULL on error (not a valid SKS URI) 377 * @return NULL on error (not a valid SKS URI)
368 */ 378 */
369char *GNUNET_FS_uri_sks_get_content_id (const struct GNUNET_FS_Uri *uri); 379char *
380GNUNET_FS_uri_sks_get_content_id (const struct GNUNET_FS_Uri *uri);
370 381
371 382
372/** 383/**
@@ -377,8 +388,9 @@ char *GNUNET_FS_uri_sks_get_content_id (const struct GNUNET_FS_Uri *uri);
377 * @param uri SKS uri to convert 388 * @param uri SKS uri to convert
378 * @return NULL on error (not an SKS URI) 389 * @return NULL on error (not an SKS URI)
379 */ 390 */
380char *GNUNET_FS_uri_sks_to_string_fancy (struct GNUNET_CONFIGURATION_Handle 391char *
381 *cfg, const struct GNUNET_FS_Uri *uri); 392GNUNET_FS_uri_sks_to_string_fancy (struct GNUNET_CONFIGURATION_Handle *cfg,
393 const struct GNUNET_FS_Uri *uri);
382 394
383 395
384/** 396/**
@@ -387,7 +399,8 @@ char *GNUNET_FS_uri_sks_to_string_fancy (struct GNUNET_CONFIGURATION_Handle
387 * @param uri the uri 399 * @param uri the uri
388 * @return GNUNET_YES if this is a KSK uri 400 * @return GNUNET_YES if this is a KSK uri
389 */ 401 */
390int GNUNET_FS_uri_test_ksk (const struct GNUNET_FS_Uri *uri); 402int
403GNUNET_FS_uri_test_ksk (const struct GNUNET_FS_Uri *uri);
391 404
392 405
393/** 406/**
@@ -396,7 +409,8 @@ int GNUNET_FS_uri_test_ksk (const struct GNUNET_FS_Uri *uri);
396 * @param uri the uri to check 409 * @param uri the uri to check
397 * @return GNUNET_YES if this is a CHK uri 410 * @return GNUNET_YES if this is a CHK uri
398 */ 411 */
399int GNUNET_FS_uri_test_chk (const struct GNUNET_FS_Uri *uri); 412int
413GNUNET_FS_uri_test_chk (const struct GNUNET_FS_Uri *uri);
400 414
401 415
402/** 416/**
@@ -406,7 +420,8 @@ int GNUNET_FS_uri_test_chk (const struct GNUNET_FS_Uri *uri);
406 * @param uri the CHK (or LOC) URI to inspect 420 * @param uri the CHK (or LOC) URI to inspect
407 * @return size of the file as specified in the CHK URI 421 * @return size of the file as specified in the CHK URI
408 */ 422 */
409uint64_t GNUNET_FS_uri_chk_get_file_size (const struct GNUNET_FS_Uri *uri); 423uint64_t
424GNUNET_FS_uri_chk_get_file_size (const struct GNUNET_FS_Uri *uri);
410 425
411 426
412/** 427/**
@@ -415,7 +430,8 @@ uint64_t GNUNET_FS_uri_chk_get_file_size (const struct GNUNET_FS_Uri *uri);
415 * @param uri the uri to check 430 * @param uri the uri to check
416 * @return GNUNET_YES if this is a LOC uri 431 * @return GNUNET_YES if this is a LOC uri
417 */ 432 */
418int GNUNET_FS_uri_test_loc (const struct GNUNET_FS_Uri *uri); 433int
434GNUNET_FS_uri_test_loc (const struct GNUNET_FS_Uri *uri);
419 435
420 436
421/** 437/**
@@ -426,9 +442,9 @@ int GNUNET_FS_uri_test_loc (const struct GNUNET_FS_Uri *uri);
426 * @param md metadata to use 442 * @param md metadata to use
427 * @return NULL on error, otherwise a KSK URI 443 * @return NULL on error, otherwise a KSK URI
428 */ 444 */
429struct GNUNET_FS_Uri *GNUNET_FS_uri_ksk_create_from_meta_data (const struct 445struct GNUNET_FS_Uri *
430 GNUNET_CONTAINER_MetaData 446GNUNET_FS_uri_ksk_create_from_meta_data (const struct GNUNET_CONTAINER_MetaData
431 *md); 447 *md);
432 448
433 449
434/* ******************** command-line option parsing API *********************** */ 450/* ******************** command-line option parsing API *********************** */
@@ -445,10 +461,10 @@ struct GNUNET_FS_Uri *GNUNET_FS_uri_ksk_create_from_meta_data (const struct
445 * @param value command line argument given 461 * @param value command line argument given
446 * @return GNUNET_OK on success 462 * @return GNUNET_OK on success
447 */ 463 */
448int GNUNET_FS_getopt_set_keywords (struct 464int
449 GNUNET_GETOPT_CommandLineProcessorContext 465GNUNET_FS_getopt_set_keywords (struct GNUNET_GETOPT_CommandLineProcessorContext
450 *ctx, void *scls, const char *option, 466 *ctx, void *scls, const char *option,
451 const char *value); 467 const char *value);
452 468
453 469
454/** 470/**
@@ -463,10 +479,10 @@ int GNUNET_FS_getopt_set_keywords (struct
463 * @param value command line argument given 479 * @param value command line argument given
464 * @return GNUNET_OK on success 480 * @return GNUNET_OK on success
465 */ 481 */
466int GNUNET_FS_getopt_set_metadata (struct 482int
467 GNUNET_GETOPT_CommandLineProcessorContext 483GNUNET_FS_getopt_set_metadata (struct GNUNET_GETOPT_CommandLineProcessorContext
468 *ctx, void *scls, const char *option, 484 *ctx, void *scls, const char *option,
469 const char *value); 485 const char *value);
470 486
471 487
472 488
@@ -1621,7 +1637,8 @@ struct GNUNET_FS_BlockOptions
1621/** 1637/**
1622 * Return the current year (i.e. '2011'). 1638 * Return the current year (i.e. '2011').
1623 */ 1639 */
1624unsigned int GNUNET_FS_get_current_year (void); 1640unsigned int
1641GNUNET_FS_get_current_year (void);
1625 1642
1626 1643
1627/** 1644/**
@@ -1630,7 +1647,8 @@ unsigned int GNUNET_FS_get_current_year (void);
1630 * @param year a year (after 1970, please ;-)). 1647 * @param year a year (after 1970, please ;-)).
1631 * @return absolute time for January 1st of that year. 1648 * @return absolute time for January 1st of that year.
1632 */ 1649 */
1633struct GNUNET_TIME_Absolute GNUNET_FS_year_to_time (unsigned int year); 1650struct GNUNET_TIME_Absolute
1651GNUNET_FS_year_to_time (unsigned int year);
1634 1652
1635 1653
1636/** 1654/**
@@ -1650,12 +1668,10 @@ struct GNUNET_FS_Handle;
1650 * @param ... list of optional options, terminated with GNUNET_FS_OPTIONS_END 1668 * @param ... list of optional options, terminated with GNUNET_FS_OPTIONS_END
1651 * @return NULL on error 1669 * @return NULL on error
1652 */ 1670 */
1653struct GNUNET_FS_Handle *GNUNET_FS_start (const struct 1671struct GNUNET_FS_Handle *
1654 GNUNET_CONFIGURATION_Handle *cfg, 1672GNUNET_FS_start (const struct GNUNET_CONFIGURATION_Handle *cfg,
1655 const char *client_name, 1673 const char *client_name, GNUNET_FS_ProgressCallback upcb,
1656 GNUNET_FS_ProgressCallback upcb, 1674 void *upcb_cls, enum GNUNET_FS_Flags flags, ...);
1657 void *upcb_cls,
1658 enum GNUNET_FS_Flags flags, ...);
1659 1675
1660 1676
1661/** 1677/**
@@ -1665,7 +1681,8 @@ struct GNUNET_FS_Handle *GNUNET_FS_start (const struct
1665 * 1681 *
1666 * @param h handle that was returned from GNUNET_FS_start 1682 * @param h handle that was returned from GNUNET_FS_start
1667 */ 1683 */
1668void GNUNET_FS_stop (struct GNUNET_FS_Handle *h); 1684void
1685GNUNET_FS_stop (struct GNUNET_FS_Handle *h);
1669 1686
1670 1687
1671/** 1688/**
@@ -1677,10 +1694,10 @@ void GNUNET_FS_stop (struct GNUNET_FS_Handle *h);
1677 * @return GNUNET_SYSERR on error, otherwise the number 1694 * @return GNUNET_SYSERR on error, otherwise the number
1678 * of meta-data items obtained 1695 * of meta-data items obtained
1679 */ 1696 */
1680int GNUNET_FS_meta_data_extract_from_file (struct GNUNET_CONTAINER_MetaData *md, 1697int
1681 const char *filename, 1698GNUNET_FS_meta_data_extract_from_file (struct GNUNET_CONTAINER_MetaData *md,
1682 struct EXTRACTOR_PluginList 1699 const char *filename,
1683 *extractors); 1700 struct EXTRACTOR_PluginList *extractors);
1684 1701
1685 1702
1686/** 1703/**
@@ -1721,8 +1738,8 @@ typedef int (*GNUNET_FS_FileInformationProcessor) (void *cls,
1721 * can be passed to "GNUNET_FS_file_information_recover" 1738 * can be passed to "GNUNET_FS_file_information_recover"
1722 * to read this fi-struct from disk. 1739 * to read this fi-struct from disk.
1723 */ 1740 */
1724const char *GNUNET_FS_file_information_get_id (struct GNUNET_FS_FileInformation 1741const char *
1725 *s); 1742GNUNET_FS_file_information_get_id (struct GNUNET_FS_FileInformation *s);
1726 1743
1727 1744
1728 1745
@@ -1740,17 +1757,17 @@ const char *GNUNET_FS_file_information_get_id (struct GNUNET_FS_FileInformation
1740 * @param bo block options 1757 * @param bo block options
1741 * @return publish structure entry for the file 1758 * @return publish structure entry for the file
1742 */ 1759 */
1743struct GNUNET_FS_FileInformation 1760struct GNUNET_FS_FileInformation *
1744 *GNUNET_FS_file_information_create_from_file (struct GNUNET_FS_Handle *h, 1761GNUNET_FS_file_information_create_from_file (struct GNUNET_FS_Handle *h,
1745 void *client_info, 1762 void *client_info,
1746 const char *filename, 1763 const char *filename,
1747 const struct GNUNET_FS_Uri 1764 const struct GNUNET_FS_Uri
1748 *keywords, 1765 *keywords,
1749 const struct 1766 const struct
1750 GNUNET_CONTAINER_MetaData 1767 GNUNET_CONTAINER_MetaData *meta,
1751 *meta, int do_index, 1768 int do_index,
1752 const struct 1769 const struct GNUNET_FS_BlockOptions
1753 GNUNET_FS_BlockOptions *bo); 1770 *bo);
1754 1771
1755 1772
1756/** 1773/**
@@ -1769,17 +1786,17 @@ struct GNUNET_FS_FileInformation
1769 * @param bo block options 1786 * @param bo block options
1770 * @return publish structure entry for the file 1787 * @return publish structure entry for the file
1771 */ 1788 */
1772struct GNUNET_FS_FileInformation 1789struct GNUNET_FS_FileInformation *
1773 *GNUNET_FS_file_information_create_from_data (struct GNUNET_FS_Handle *h, 1790GNUNET_FS_file_information_create_from_data (struct GNUNET_FS_Handle *h,
1774 void *client_info, 1791 void *client_info, uint64_t length,
1775 uint64_t length, void *data, 1792 void *data,
1776 const struct GNUNET_FS_Uri 1793 const struct GNUNET_FS_Uri
1777 *keywords, 1794 *keywords,
1778 const struct 1795 const struct
1779 GNUNET_CONTAINER_MetaData 1796 GNUNET_CONTAINER_MetaData *meta,
1780 *meta, int do_index, 1797 int do_index,
1781 const struct 1798 const struct GNUNET_FS_BlockOptions
1782 GNUNET_FS_BlockOptions *bo); 1799 *bo);
1783 1800
1784 1801
1785/** 1802/**
@@ -1818,19 +1835,19 @@ typedef size_t (*GNUNET_FS_DataReader) (void *cls, uint64_t offset, size_t max,
1818 * @param bo block options 1835 * @param bo block options
1819 * @return publish structure entry for the file 1836 * @return publish structure entry for the file
1820 */ 1837 */
1821struct GNUNET_FS_FileInformation 1838struct GNUNET_FS_FileInformation *
1822 *GNUNET_FS_file_information_create_from_reader (struct GNUNET_FS_Handle *h, 1839GNUNET_FS_file_information_create_from_reader (struct GNUNET_FS_Handle *h,
1823 void *client_info, 1840 void *client_info,
1824 uint64_t length, 1841 uint64_t length,
1825 GNUNET_FS_DataReader reader, 1842 GNUNET_FS_DataReader reader,
1826 void *reader_cls, 1843 void *reader_cls,
1827 const struct GNUNET_FS_Uri 1844 const struct GNUNET_FS_Uri
1828 *keywords, 1845 *keywords,
1829 const struct 1846 const struct
1830 GNUNET_CONTAINER_MetaData 1847 GNUNET_CONTAINER_MetaData *meta,
1831 *meta, int do_index, 1848 int do_index,
1832 const struct 1849 const struct
1833 GNUNET_FS_BlockOptions *bo); 1850 GNUNET_FS_BlockOptions *bo);
1834 1851
1835 1852
1836/** 1853/**
@@ -1890,11 +1907,12 @@ typedef int (*GNUNET_FS_DirectoryScanner) (void *cls,
1890 * @param emsg where to store an error message (on errors) 1907 * @param emsg where to store an error message (on errors)
1891 * @return GNUNET_OK on success 1908 * @return GNUNET_OK on success
1892 */ 1909 */
1893int GNUNET_FS_directory_scanner_default (void *cls, struct GNUNET_FS_Handle *h, 1910int
1894 const char *dirname, int do_index, 1911GNUNET_FS_directory_scanner_default (void *cls, struct GNUNET_FS_Handle *h,
1895 const struct GNUNET_FS_BlockOptions 1912 const char *dirname, int do_index,
1896 *bo, GNUNET_FS_FileProcessor proc, 1913 const struct GNUNET_FS_BlockOptions *bo,
1897 void *proc_cls, char **emsg); 1914 GNUNET_FS_FileProcessor proc,
1915 void *proc_cls, char **emsg);
1898 1916
1899 1917
1900/** 1918/**
@@ -1917,17 +1935,16 @@ int GNUNET_FS_directory_scanner_default (void *cls, struct GNUNET_FS_Handle *h,
1917 * @param emsg where to store an error message 1935 * @param emsg where to store an error message
1918 * @return publish structure entry for the directory, NULL on error 1936 * @return publish structure entry for the directory, NULL on error
1919 */ 1937 */
1920struct GNUNET_FS_FileInformation 1938struct GNUNET_FS_FileInformation *
1921 *GNUNET_FS_file_information_create_from_directory (struct GNUNET_FS_Handle 1939GNUNET_FS_file_information_create_from_directory (struct GNUNET_FS_Handle *h,
1922 *h, void *client_info, 1940 void *client_info,
1923 const char *filename, 1941 const char *filename,
1924 GNUNET_FS_DirectoryScanner 1942 GNUNET_FS_DirectoryScanner
1925 scanner, 1943 scanner, void *scanner_cls,
1926 void *scanner_cls, 1944 int do_index,
1927 int do_index, 1945 const struct
1928 const struct 1946 GNUNET_FS_BlockOptions *bo,
1929 GNUNET_FS_BlockOptions 1947 char **emsg);
1930 *bo, char **emsg);
1931 1948
1932 1949
1933/** 1950/**
@@ -1944,17 +1961,16 @@ struct GNUNET_FS_FileInformation
1944 * @param bo block options 1961 * @param bo block options
1945 * @return publish structure entry for the directory , NULL on error 1962 * @return publish structure entry for the directory , NULL on error
1946 */ 1963 */
1947struct GNUNET_FS_FileInformation 1964struct GNUNET_FS_FileInformation *
1948 *GNUNET_FS_file_information_create_empty_directory (struct GNUNET_FS_Handle 1965GNUNET_FS_file_information_create_empty_directory (struct GNUNET_FS_Handle *h,
1949 *h, void *client_info, 1966 void *client_info,
1950 const struct 1967 const struct GNUNET_FS_Uri
1951 GNUNET_FS_Uri *keywords, 1968 *keywords,
1952 const struct 1969 const struct
1953 GNUNET_CONTAINER_MetaData 1970 GNUNET_CONTAINER_MetaData
1954 *meta, 1971 *meta,
1955 const struct 1972 const struct
1956 GNUNET_FS_BlockOptions 1973 GNUNET_FS_BlockOptions *bo);
1957 *bo);
1958 1974
1959 1975
1960/** 1976/**
@@ -1963,8 +1979,9 @@ struct GNUNET_FS_FileInformation
1963 * @param ent check if this FI represents a directory 1979 * @param ent check if this FI represents a directory
1964 * @return GNUNET_YES if so, GNUNET_NO if not 1980 * @return GNUNET_YES if so, GNUNET_NO if not
1965 */ 1981 */
1966int GNUNET_FS_file_information_is_directory (const struct 1982int
1967 GNUNET_FS_FileInformation *ent); 1983GNUNET_FS_file_information_is_directory (const struct GNUNET_FS_FileInformation
1984 *ent);
1968 1985
1969 1986
1970/** 1987/**
@@ -1978,8 +1995,9 @@ int GNUNET_FS_file_information_is_directory (const struct
1978 * must not include "dir" in its structure 1995 * must not include "dir" in its structure
1979 * @return GNUNET_OK on success, GNUNET_SYSERR on error 1996 * @return GNUNET_OK on success, GNUNET_SYSERR on error
1980 */ 1997 */
1981int GNUNET_FS_file_information_add (struct GNUNET_FS_FileInformation *dir, 1998int
1982 struct GNUNET_FS_FileInformation *ent); 1999GNUNET_FS_file_information_add (struct GNUNET_FS_FileInformation *dir,
2000 struct GNUNET_FS_FileInformation *ent);
1983 2001
1984 2002
1985/** 2003/**
@@ -1996,9 +2014,10 @@ int GNUNET_FS_file_information_add (struct GNUNET_FS_FileInformation *dir,
1996 * @param proc function to call on each entry 2014 * @param proc function to call on each entry
1997 * @param proc_cls closure for proc 2015 * @param proc_cls closure for proc
1998 */ 2016 */
1999void GNUNET_FS_file_information_inspect (struct GNUNET_FS_FileInformation *dir, 2017void
2000 GNUNET_FS_FileInformationProcessor 2018GNUNET_FS_file_information_inspect (struct GNUNET_FS_FileInformation *dir,
2001 proc, void *proc_cls); 2019 GNUNET_FS_FileInformationProcessor proc,
2020 void *proc_cls);
2002 2021
2003 2022
2004/** 2023/**
@@ -2011,9 +2030,10 @@ void GNUNET_FS_file_information_inspect (struct GNUNET_FS_FileInformation *dir,
2011 * values are ignored 2030 * values are ignored
2012 * @param cleaner_cls closure for cleaner 2031 * @param cleaner_cls closure for cleaner
2013 */ 2032 */
2014void GNUNET_FS_file_information_destroy (struct GNUNET_FS_FileInformation *fi, 2033void
2015 GNUNET_FS_FileInformationProcessor 2034GNUNET_FS_file_information_destroy (struct GNUNET_FS_FileInformation *fi,
2016 cleaner, void *cleaner_cls); 2035 GNUNET_FS_FileInformationProcessor cleaner,
2036 void *cleaner_cls);
2017 2037
2018 2038
2019/** 2039/**
@@ -2047,19 +2067,12 @@ enum GNUNET_FS_PublishOptions
2047 * @param options options for the publication 2067 * @param options options for the publication
2048 * @return context that can be used to control the publish operation 2068 * @return context that can be used to control the publish operation
2049 */ 2069 */
2050struct GNUNET_FS_PublishContext *GNUNET_FS_publish_start (struct 2070struct GNUNET_FS_PublishContext *
2051 GNUNET_FS_Handle *h, 2071GNUNET_FS_publish_start (struct GNUNET_FS_Handle *h,
2052 struct 2072 struct GNUNET_FS_FileInformation *fi,
2053 GNUNET_FS_FileInformation 2073 struct GNUNET_FS_Namespace *namespace, const char *nid,
2054 *fi, 2074 const char *nuid,
2055 struct 2075 enum GNUNET_FS_PublishOptions options);
2056 GNUNET_FS_Namespace
2057 *namespace,
2058 const char *nid,
2059 const char *nuid,
2060 enum
2061 GNUNET_FS_PublishOptions
2062 options);
2063 2076
2064 2077
2065/** 2078/**
@@ -2070,7 +2083,8 @@ struct GNUNET_FS_PublishContext *GNUNET_FS_publish_start (struct
2070 * 2083 *
2071 * @param pc context for the publication to stop 2084 * @param pc context for the publication to stop
2072 */ 2085 */
2073void GNUNET_FS_publish_stop (struct GNUNET_FS_PublishContext *pc); 2086void
2087GNUNET_FS_publish_stop (struct GNUNET_FS_PublishContext *pc);
2074 2088
2075 2089
2076/** 2090/**
@@ -2098,13 +2112,14 @@ typedef void (*GNUNET_FS_PublishContinuation) (void *cls,
2098 * @param cont continuation 2112 * @param cont continuation
2099 * @param cont_cls closure for cont 2113 * @param cont_cls closure for cont
2100 */ 2114 */
2101void GNUNET_FS_publish_ksk (struct GNUNET_FS_Handle *h, 2115void
2102 const struct GNUNET_FS_Uri *ksk_uri, 2116GNUNET_FS_publish_ksk (struct GNUNET_FS_Handle *h,
2103 const struct GNUNET_CONTAINER_MetaData *meta, 2117 const struct GNUNET_FS_Uri *ksk_uri,
2104 const struct GNUNET_FS_Uri *uri, 2118 const struct GNUNET_CONTAINER_MetaData *meta,
2105 const struct GNUNET_FS_BlockOptions *bo, 2119 const struct GNUNET_FS_Uri *uri,
2106 enum GNUNET_FS_PublishOptions options, 2120 const struct GNUNET_FS_BlockOptions *bo,
2107 GNUNET_FS_PublishContinuation cont, void *cont_cls); 2121 enum GNUNET_FS_PublishOptions options,
2122 GNUNET_FS_PublishContinuation cont, void *cont_cls);
2108 2123
2109 2124
2110/** 2125/**
@@ -2121,14 +2136,15 @@ void GNUNET_FS_publish_ksk (struct GNUNET_FS_Handle *h,
2121 * @param cont continuation 2136 * @param cont continuation
2122 * @param cont_cls closure for cont 2137 * @param cont_cls closure for cont
2123 */ 2138 */
2124void GNUNET_FS_publish_sks (struct GNUNET_FS_Handle *h, 2139void
2125 struct GNUNET_FS_Namespace *namespace, 2140GNUNET_FS_publish_sks (struct GNUNET_FS_Handle *h,
2126 const char *identifier, const char *update, 2141 struct GNUNET_FS_Namespace *namespace,
2127 const struct GNUNET_CONTAINER_MetaData *meta, 2142 const char *identifier, const char *update,
2128 const struct GNUNET_FS_Uri *uri, 2143 const struct GNUNET_CONTAINER_MetaData *meta,
2129 const struct GNUNET_FS_BlockOptions *bo, 2144 const struct GNUNET_FS_Uri *uri,
2130 enum GNUNET_FS_PublishOptions options, 2145 const struct GNUNET_FS_BlockOptions *bo,
2131 GNUNET_FS_PublishContinuation cont, void *cont_cls); 2146 enum GNUNET_FS_PublishOptions options,
2147 GNUNET_FS_PublishContinuation cont, void *cont_cls);
2132 2148
2133 2149
2134/** 2150/**
@@ -2154,10 +2170,11 @@ typedef int (*GNUNET_FS_IndexedFileProcessor) (void *cls, const char *filename,
2154 * error) or "PREREQ_DONE" (on success) 2170 * error) or "PREREQ_DONE" (on success)
2155 * @param cont_cls closure for cont 2171 * @param cont_cls closure for cont
2156 */ 2172 */
2157void GNUNET_FS_get_indexed_files (struct GNUNET_FS_Handle *h, 2173void
2158 GNUNET_FS_IndexedFileProcessor iterator, 2174GNUNET_FS_get_indexed_files (struct GNUNET_FS_Handle *h,
2159 void *iterator_cls, 2175 GNUNET_FS_IndexedFileProcessor iterator,
2160 GNUNET_SCHEDULER_Task cont, void *cont_cls); 2176 void *iterator_cls, GNUNET_SCHEDULER_Task cont,
2177 void *cont_cls);
2161 2178
2162 2179
2163/** 2180/**
@@ -2168,10 +2185,9 @@ void GNUNET_FS_get_indexed_files (struct GNUNET_FS_Handle *h,
2168 * @param cctx initial value for the client context 2185 * @param cctx initial value for the client context
2169 * @return NULL on error, otherwise handle 2186 * @return NULL on error, otherwise handle
2170 */ 2187 */
2171struct GNUNET_FS_UnindexContext *GNUNET_FS_unindex_start (struct 2188struct GNUNET_FS_UnindexContext *
2172 GNUNET_FS_Handle *h, 2189GNUNET_FS_unindex_start (struct GNUNET_FS_Handle *h, const char *filename,
2173 const char *filename, 2190 void *cctx);
2174 void *cctx);
2175 2191
2176 2192
2177/** 2193/**
@@ -2179,7 +2195,8 @@ struct GNUNET_FS_UnindexContext *GNUNET_FS_unindex_start (struct
2179 * 2195 *
2180 * @param uc handle 2196 * @param uc handle
2181 */ 2197 */
2182void GNUNET_FS_unindex_stop (struct GNUNET_FS_UnindexContext *uc); 2198void
2199GNUNET_FS_unindex_stop (struct GNUNET_FS_UnindexContext *uc);
2183 2200
2184 2201
2185/** 2202/**
@@ -2194,15 +2211,15 @@ void GNUNET_FS_unindex_stop (struct GNUNET_FS_UnindexContext *uc);
2194 * @param cont continuation 2211 * @param cont continuation
2195 * @param cont_cls closure for cont 2212 * @param cont_cls closure for cont
2196 */ 2213 */
2197void GNUNET_FS_namespace_advertise (struct GNUNET_FS_Handle *h, 2214void
2198 struct GNUNET_FS_Uri *ksk_uri, 2215GNUNET_FS_namespace_advertise (struct GNUNET_FS_Handle *h,
2199 struct GNUNET_FS_Namespace *namespace, 2216 struct GNUNET_FS_Uri *ksk_uri,
2200 const struct GNUNET_CONTAINER_MetaData 2217 struct GNUNET_FS_Namespace *namespace,
2201 *meta, 2218 const struct GNUNET_CONTAINER_MetaData *meta,
2202 const struct GNUNET_FS_BlockOptions *bo, 2219 const struct GNUNET_FS_BlockOptions *bo,
2203 const char *rootEntry, 2220 const char *rootEntry,
2204 GNUNET_FS_PublishContinuation cont, 2221 GNUNET_FS_PublishContinuation cont,
2205 void *cont_cls); 2222 void *cont_cls);
2206 2223
2207 2224
2208/** 2225/**
@@ -2213,8 +2230,8 @@ void GNUNET_FS_namespace_advertise (struct GNUNET_FS_Handle *h,
2213 * @param name name to use for the namespace 2230 * @param name name to use for the namespace
2214 * @return handle to the namespace, NULL on error 2231 * @return handle to the namespace, NULL on error
2215 */ 2232 */
2216struct GNUNET_FS_Namespace *GNUNET_FS_namespace_create (struct GNUNET_FS_Handle 2233struct GNUNET_FS_Namespace *
2217 *h, const char *name); 2234GNUNET_FS_namespace_create (struct GNUNET_FS_Handle *h, const char *name);
2218 2235
2219 2236
2220/** 2237/**
@@ -2228,8 +2245,8 @@ struct GNUNET_FS_Namespace *GNUNET_FS_namespace_create (struct GNUNET_FS_Handle
2228 * 2245 *
2229 * @return GNUNET_OK on success, GNUNET_SYSERR on error 2246 * @return GNUNET_OK on success, GNUNET_SYSERR on error
2230 */ 2247 */
2231int GNUNET_FS_namespace_delete (struct GNUNET_FS_Namespace *namespace, 2248int
2232 int freeze); 2249GNUNET_FS_namespace_delete (struct GNUNET_FS_Namespace *namespace, int freeze);
2233 2250
2234 2251
2235/** 2252/**
@@ -2254,9 +2271,9 @@ typedef void (*GNUNET_FS_NamespaceInfoProcessor) (void *cls, const char *name,
2254 * @param cb function to call on each known namespace 2271 * @param cb function to call on each known namespace
2255 * @param cb_cls closure for cb 2272 * @param cb_cls closure for cb
2256 */ 2273 */
2257void GNUNET_FS_namespace_list (struct GNUNET_FS_Handle *h, 2274void
2258 GNUNET_FS_NamespaceInfoProcessor cb, 2275GNUNET_FS_namespace_list (struct GNUNET_FS_Handle *h,
2259 void *cb_cls); 2276 GNUNET_FS_NamespaceInfoProcessor cb, void *cb_cls);
2260 2277
2261 2278
2262/** 2279/**
@@ -2296,10 +2313,11 @@ typedef void (*GNUNET_FS_IdentifierProcessor) (void *cls, const char *last_id,
2296 * @param ip function to call on each updateable identifier 2313 * @param ip function to call on each updateable identifier
2297 * @param ip_cls closure for ip 2314 * @param ip_cls closure for ip
2298 */ 2315 */
2299void GNUNET_FS_namespace_list_updateable (struct GNUNET_FS_Namespace *namespace, 2316void
2300 const char *next_id, 2317GNUNET_FS_namespace_list_updateable (struct GNUNET_FS_Namespace *namespace,
2301 GNUNET_FS_IdentifierProcessor ip, 2318 const char *next_id,
2302 void *ip_cls); 2319 GNUNET_FS_IdentifierProcessor ip,
2320 void *ip_cls);
2303 2321
2304 2322
2305/** 2323/**
@@ -2331,14 +2349,10 @@ enum GNUNET_FS_SearchOptions
2331 * @param cctx initial value for the client context 2349 * @param cctx initial value for the client context
2332 * @return context that can be used to control the search 2350 * @return context that can be used to control the search
2333 */ 2351 */
2334struct GNUNET_FS_SearchContext *GNUNET_FS_search_start (struct GNUNET_FS_Handle 2352struct GNUNET_FS_SearchContext *
2335 *h, 2353GNUNET_FS_search_start (struct GNUNET_FS_Handle *h,
2336 const struct 2354 const struct GNUNET_FS_Uri *uri, uint32_t anonymity,
2337 GNUNET_FS_Uri *uri, 2355 enum GNUNET_FS_SearchOptions options, void *cctx);
2338 uint32_t anonymity,
2339 enum
2340 GNUNET_FS_SearchOptions
2341 options, void *cctx);
2342 2356
2343 2357
2344/** 2358/**
@@ -2346,7 +2360,8 @@ struct GNUNET_FS_SearchContext *GNUNET_FS_search_start (struct GNUNET_FS_Handle
2346 * 2360 *
2347 * @param sc context for the search that should be paused 2361 * @param sc context for the search that should be paused
2348 */ 2362 */
2349void GNUNET_FS_search_pause (struct GNUNET_FS_SearchContext *sc); 2363void
2364GNUNET_FS_search_pause (struct GNUNET_FS_SearchContext *sc);
2350 2365
2351 2366
2352/** 2367/**
@@ -2354,7 +2369,8 @@ void GNUNET_FS_search_pause (struct GNUNET_FS_SearchContext *sc);
2354 * 2369 *
2355 * @param sc context for the search that should be resumed 2370 * @param sc context for the search that should be resumed
2356 */ 2371 */
2357void GNUNET_FS_search_continue (struct GNUNET_FS_SearchContext *sc); 2372void
2373GNUNET_FS_search_continue (struct GNUNET_FS_SearchContext *sc);
2358 2374
2359 2375
2360/** 2376/**
@@ -2362,7 +2378,8 @@ void GNUNET_FS_search_continue (struct GNUNET_FS_SearchContext *sc);
2362 * 2378 *
2363 * @param sc context for the search that should be stopped 2379 * @param sc context for the search that should be stopped
2364 */ 2380 */
2365void GNUNET_FS_search_stop (struct GNUNET_FS_SearchContext *sc); 2381void
2382GNUNET_FS_search_stop (struct GNUNET_FS_SearchContext *sc);
2366 2383
2367 2384
2368 2385
@@ -2437,26 +2454,14 @@ enum GNUNET_FS_DownloadOptions
2437 * for top-level downloads; useful for manually-triggered recursive downloads) 2454 * for top-level downloads; useful for manually-triggered recursive downloads)
2438 * @return context that can be used to control this download 2455 * @return context that can be used to control this download
2439 */ 2456 */
2440struct GNUNET_FS_DownloadContext *GNUNET_FS_download_start (struct 2457struct GNUNET_FS_DownloadContext *
2441 GNUNET_FS_Handle *h, 2458GNUNET_FS_download_start (struct GNUNET_FS_Handle *h,
2442 const struct 2459 const struct GNUNET_FS_Uri *uri,
2443 GNUNET_FS_Uri *uri, 2460 const struct GNUNET_CONTAINER_MetaData *meta,
2444 const struct 2461 const char *filename, const char *tempname,
2445 GNUNET_CONTAINER_MetaData 2462 uint64_t offset, uint64_t length, uint32_t anonymity,
2446 *meta, 2463 enum GNUNET_FS_DownloadOptions options, void *cctx,
2447 const char 2464 struct GNUNET_FS_DownloadContext *parent);
2448 *filename,
2449 const char
2450 *tempname,
2451 uint64_t offset,
2452 uint64_t length,
2453 uint32_t anonymity,
2454 enum
2455 GNUNET_FS_DownloadOptions
2456 options, void *cctx,
2457 struct
2458 GNUNET_FS_DownloadContext
2459 *parent);
2460 2465
2461 2466
2462/** 2467/**
@@ -2493,29 +2498,14 @@ struct GNUNET_FS_DownloadContext *GNUNET_FS_download_start (struct
2493 * @param cctx initial value for the client context for this download 2498 * @param cctx initial value for the client context for this download
2494 * @return context that can be used to control this download 2499 * @return context that can be used to control this download
2495 */ 2500 */
2496struct GNUNET_FS_DownloadContext *GNUNET_FS_download_start_from_search (struct 2501struct GNUNET_FS_DownloadContext *
2497 GNUNET_FS_Handle 2502GNUNET_FS_download_start_from_search (struct GNUNET_FS_Handle *h,
2498 *h, 2503 struct GNUNET_FS_SearchResult *sr,
2499 struct 2504 const char *filename,
2500 GNUNET_FS_SearchResult 2505 const char *tempname, uint64_t offset,
2501 *sr, 2506 uint64_t length, uint32_t anonymity,
2502 const 2507 enum GNUNET_FS_DownloadOptions options,
2503 char 2508 void *cctx);
2504 *filename,
2505 const
2506 char
2507 *tempname,
2508 uint64_t
2509 offset,
2510 uint64_t
2511 length,
2512 uint32_t
2513 anonymity,
2514 enum
2515 GNUNET_FS_DownloadOptions
2516 options,
2517 void
2518 *cctx);
2519 2509
2520 2510
2521/** 2511/**
@@ -2524,8 +2514,8 @@ struct GNUNET_FS_DownloadContext *GNUNET_FS_download_start_from_search (struct
2524 * @param dc handle for the download 2514 * @param dc handle for the download
2525 * @param do_delete delete files of incomplete downloads 2515 * @param do_delete delete files of incomplete downloads
2526 */ 2516 */
2527void GNUNET_FS_download_stop (struct GNUNET_FS_DownloadContext *dc, 2517void
2528 int do_delete); 2518GNUNET_FS_download_stop (struct GNUNET_FS_DownloadContext *dc, int do_delete);
2529 2519
2530 2520
2531 2521
@@ -2543,8 +2533,9 @@ void GNUNET_FS_download_stop (struct GNUNET_FS_DownloadContext *dc,
2543 * @return GNUNET_YES if it is, GNUNET_NO if it is not, GNUNET_SYSERR if 2533 * @return GNUNET_YES if it is, GNUNET_NO if it is not, GNUNET_SYSERR if
2544 * we have no mime-type information (treat as 'GNUNET_NO') 2534 * we have no mime-type information (treat as 'GNUNET_NO')
2545 */ 2535 */
2546int GNUNET_FS_meta_data_test_for_directory (const struct 2536int
2547 GNUNET_CONTAINER_MetaData *md); 2537GNUNET_FS_meta_data_test_for_directory (const struct GNUNET_CONTAINER_MetaData
2538 *md);
2548 2539
2549 2540
2550/** 2541/**
@@ -2553,7 +2544,8 @@ int GNUNET_FS_meta_data_test_for_directory (const struct
2553 * 2544 *
2554 * @param md metadata to add mimetype to 2545 * @param md metadata to add mimetype to
2555 */ 2546 */
2556void GNUNET_FS_meta_data_make_directory (struct GNUNET_CONTAINER_MetaData *md); 2547void
2548GNUNET_FS_meta_data_make_directory (struct GNUNET_CONTAINER_MetaData *md);
2557 2549
2558 2550
2559/** 2551/**
@@ -2562,8 +2554,9 @@ void GNUNET_FS_meta_data_make_directory (struct GNUNET_CONTAINER_MetaData *md);
2562 * @param md given meta data 2554 * @param md given meta data
2563 * @return NULL if meta data is useless for suggesting a filename 2555 * @return NULL if meta data is useless for suggesting a filename
2564 */ 2556 */
2565char *GNUNET_FS_meta_data_suggest_filename (const struct 2557char *
2566 GNUNET_CONTAINER_MetaData *md); 2558GNUNET_FS_meta_data_suggest_filename (const struct GNUNET_CONTAINER_MetaData
2559 *md);
2567 2560
2568 2561
2569/** 2562/**
@@ -2610,10 +2603,11 @@ typedef void (*GNUNET_FS_DirectoryEntryProcessor) (void *cls,
2610 * GNUNET_NO if this could be part of a directory (but not 100% OK) 2603 * GNUNET_NO if this could be part of a directory (but not 100% OK)
2611 * GNUNET_SYSERR if 'data' does not represent a directory 2604 * GNUNET_SYSERR if 'data' does not represent a directory
2612 */ 2605 */
2613int GNUNET_FS_directory_list_contents (size_t size, const void *data, 2606int
2614 uint64_t offset, 2607GNUNET_FS_directory_list_contents (size_t size, const void *data,
2615 GNUNET_FS_DirectoryEntryProcessor dep, 2608 uint64_t offset,
2616 void *dep_cls); 2609 GNUNET_FS_DirectoryEntryProcessor dep,
2610 void *dep_cls);
2617 2611
2618 2612
2619/** 2613/**
@@ -2626,10 +2620,9 @@ struct GNUNET_FS_DirectoryBuilder;
2626 * 2620 *
2627 * @param mdir metadata for the directory 2621 * @param mdir metadata for the directory
2628 */ 2622 */
2629struct GNUNET_FS_DirectoryBuilder *GNUNET_FS_directory_builder_create (const 2623struct GNUNET_FS_DirectoryBuilder *
2630 struct 2624GNUNET_FS_directory_builder_create (const struct GNUNET_CONTAINER_MetaData
2631 GNUNET_CONTAINER_MetaData 2625 *mdir);
2632 *mdir);
2633 2626
2634 2627
2635/** 2628/**
@@ -2642,10 +2635,11 @@ struct GNUNET_FS_DirectoryBuilder *GNUNET_FS_directory_builder_create (const
2642 * data must point to exactly the number of bytes specified 2635 * data must point to exactly the number of bytes specified
2643 * by the uri 2636 * by the uri
2644 */ 2637 */
2645void GNUNET_FS_directory_builder_add (struct GNUNET_FS_DirectoryBuilder *bld, 2638void
2646 const struct GNUNET_FS_Uri *uri, 2639GNUNET_FS_directory_builder_add (struct GNUNET_FS_DirectoryBuilder *bld,
2647 const struct GNUNET_CONTAINER_MetaData 2640 const struct GNUNET_FS_Uri *uri,
2648 *md, const void *data); 2641 const struct GNUNET_CONTAINER_MetaData *md,
2642 const void *data);
2649 2643
2650 2644
2651/** 2645/**
@@ -2658,8 +2652,9 @@ void GNUNET_FS_directory_builder_add (struct GNUNET_FS_DirectoryBuilder *bld,
2658 * @param rdata set to the encoded directory 2652 * @param rdata set to the encoded directory
2659 * @return GNUNET_OK on success 2653 * @return GNUNET_OK on success
2660 */ 2654 */
2661int GNUNET_FS_directory_builder_finish (struct GNUNET_FS_DirectoryBuilder *bld, 2655int
2662 size_t * rsize, void **rdata); 2656GNUNET_FS_directory_builder_finish (struct GNUNET_FS_DirectoryBuilder *bld,
2657 size_t * rsize, void **rdata);
2663 2658
2664 2659
2665#if 0 /* keep Emacsens' auto-indent happy */ 2660#if 0 /* keep Emacsens' auto-indent happy */