aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_fs_service.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2013-09-14 13:51:27 +0000
committerChristian Grothoff <christian@grothoff.org>2013-09-14 13:51:27 +0000
commitc2882d0223530d1f2ac84f9675f23bda11270d08 (patch)
tree77c5a7973735a93e58e482d1a21ecd62bf6d08bf /src/include/gnunet_fs_service.h
parente5ba359af49fac05185f5ec0b4dbb47c7060167a (diff)
downloadgnunet-c2882d0223530d1f2ac84f9675f23bda11270d08.tar.gz
gnunet-c2882d0223530d1f2ac84f9675f23bda11270d08.zip
-fixing #3034
Diffstat (limited to 'src/include/gnunet_fs_service.h')
-rw-r--r--src/include/gnunet_fs_service.h102
1 files changed, 51 insertions, 51 deletions
diff --git a/src/include/gnunet_fs_service.h b/src/include/gnunet_fs_service.h
index 0f4b5ae25..3a3228a6e 100644
--- a/src/include/gnunet_fs_service.h
+++ b/src/include/gnunet_fs_service.h
@@ -186,7 +186,7 @@ GNUNET_FS_uri_ksk_get_keyword_count (const struct GNUNET_FS_Uri *uri);
186 * 186 *
187 * @param uri ksk uri to get the keywords from 187 * @param uri ksk uri to get the keywords from
188 * @param iterator function to call on each keyword 188 * @param iterator function to call on each keyword
189 * @param iterator_cls closure for iterator 189 * @param iterator_cls closure for @a iterator
190 * @return -1 if this is not a keyword URI, otherwise number of 190 * @return -1 if this is not a keyword URI, otherwise number of
191 * keywords iterated over until iterator aborted 191 * keywords iterated over until iterator aborted
192 */ 192 */
@@ -201,7 +201,7 @@ GNUNET_FS_uri_ksk_get_keywords (const struct GNUNET_FS_Uri *uri,
201 * 201 *
202 * @param uri the location URI to inspect 202 * @param uri the location URI to inspect
203 * @param peer where to store the identify of the peer (presumably) offering the content 203 * @param peer where to store the identify of the peer (presumably) offering the content
204 * @return GNUNET_SYSERR if this is not a location URI, otherwise GNUNET_OK 204 * @return #GNUNET_SYSERR if this is not a location URI, otherwise #GNUNET_OK
205 */ 205 */
206int 206int
207GNUNET_FS_uri_loc_get_peer_identity (const struct GNUNET_FS_Uri *uri, 207GNUNET_FS_uri_loc_get_peer_identity (const struct GNUNET_FS_Uri *uri,
@@ -303,7 +303,8 @@ GNUNET_FS_uri_ksk_create (const char *keywords, char **emsg);
303 * if keywords is not legal (i.e. empty). 303 * if keywords is not legal (i.e. empty).
304 */ 304 */
305struct GNUNET_FS_Uri * 305struct GNUNET_FS_Uri *
306GNUNET_FS_uri_ksk_create_from_args (unsigned int argc, const char **argv); 306GNUNET_FS_uri_ksk_create_from_args (unsigned int argc,
307 const char **argv);
307 308
308 309
309/** 310/**
@@ -311,7 +312,7 @@ GNUNET_FS_uri_ksk_create_from_args (unsigned int argc, const char **argv);
311 * 312 *
312 * @param u1 one of the URIs 313 * @param u1 one of the URIs
313 * @param u2 the other URI 314 * @param u2 the other URI
314 * @return GNUNET_YES if the URIs are equal 315 * @return #GNUNET_YES if the URIs are equal
315 */ 316 */
316int 317int
317GNUNET_FS_uri_test_equal (const struct GNUNET_FS_Uri *u1, 318GNUNET_FS_uri_test_equal (const struct GNUNET_FS_Uri *u1,
@@ -322,7 +323,7 @@ GNUNET_FS_uri_test_equal (const struct GNUNET_FS_Uri *u1,
322 * Is this a namespace URI? 323 * Is this a namespace URI?
323 * 324 *
324 * @param uri the uri to check 325 * @param uri the uri to check
325 * @return GNUNET_YES if this is an SKS uri 326 * @return #GNUNET_YES if this is an SKS uri
326 */ 327 */
327int 328int
328GNUNET_FS_uri_test_sks (const struct GNUNET_FS_Uri *uri); 329GNUNET_FS_uri_test_sks (const struct GNUNET_FS_Uri *uri);
@@ -346,7 +347,7 @@ GNUNET_FS_uri_sks_create (const struct GNUNET_CRYPTO_EccPublicSignKey *ns,
346 * 347 *
347 * @param uri the uri to get the namespace ID from 348 * @param uri the uri to get the namespace ID from
348 * @param pseudonym where to store the public key of the namespace 349 * @param pseudonym where to store the public key of the namespace
349 * @return GNUNET_OK on success 350 * @return #GNUNET_OK on success
350 */ 351 */
351int 352int
352GNUNET_FS_uri_sks_get_namespace (const struct GNUNET_FS_Uri *uri, 353GNUNET_FS_uri_sks_get_namespace (const struct GNUNET_FS_Uri *uri,
@@ -367,7 +368,7 @@ GNUNET_FS_uri_sks_get_content_id (const struct GNUNET_FS_Uri *uri);
367 * Is this a keyword URI? 368 * Is this a keyword URI?
368 * 369 *
369 * @param uri the uri 370 * @param uri the uri
370 * @return GNUNET_YES if this is a KSK uri 371 * @return #GNUNET_YES if this is a KSK uri
371 */ 372 */
372int 373int
373GNUNET_FS_uri_test_ksk (const struct GNUNET_FS_Uri *uri); 374GNUNET_FS_uri_test_ksk (const struct GNUNET_FS_Uri *uri);
@@ -377,7 +378,7 @@ GNUNET_FS_uri_test_ksk (const struct GNUNET_FS_Uri *uri);
377 * Is this a file (or directory) URI? 378 * Is this a file (or directory) URI?
378 * 379 *
379 * @param uri the uri to check 380 * @param uri the uri to check
380 * @return GNUNET_YES if this is a CHK uri 381 * @return #GNUNET_YES if this is a CHK uri
381 */ 382 */
382int 383int
383GNUNET_FS_uri_test_chk (const struct GNUNET_FS_Uri *uri); 384GNUNET_FS_uri_test_chk (const struct GNUNET_FS_Uri *uri);
@@ -398,7 +399,7 @@ GNUNET_FS_uri_chk_get_file_size (const struct GNUNET_FS_Uri *uri);
398 * Is this a location URI? 399 * Is this a location URI?
399 * 400 *
400 * @param uri the uri to check 401 * @param uri the uri to check
401 * @return GNUNET_YES if this is a LOC uri 402 * @return #GNUNET_YES if this is a LOC uri
402 */ 403 */
403int 404int
404GNUNET_FS_uri_test_loc (const struct GNUNET_FS_Uri *uri); 405GNUNET_FS_uri_test_loc (const struct GNUNET_FS_Uri *uri);
@@ -429,7 +430,7 @@ GNUNET_FS_uri_ksk_create_from_meta_data (const struct GNUNET_CONTAINER_MetaData
429 * @param scls must be of type "struct GNUNET_FS_Uri **" 430 * @param scls must be of type "struct GNUNET_FS_Uri **"
430 * @param option name of the option (typically 'k') 431 * @param option name of the option (typically 'k')
431 * @param value command line argument given 432 * @param value command line argument given
432 * @return GNUNET_OK on success 433 * @return #GNUNET_OK on success
433 */ 434 */
434int 435int
435GNUNET_FS_getopt_set_keywords (struct GNUNET_GETOPT_CommandLineProcessorContext 436GNUNET_FS_getopt_set_keywords (struct GNUNET_GETOPT_CommandLineProcessorContext
@@ -444,10 +445,10 @@ GNUNET_FS_getopt_set_keywords (struct GNUNET_GETOPT_CommandLineProcessorContext
444 * the metadata must be passed as the "scls" argument. 445 * the metadata must be passed as the "scls" argument.
445 * 446 *
446 * @param ctx command line processor context 447 * @param ctx command line processor context
447 * @param scls must be of type "struct GNUNET_CONTAINER_MetaData **" 448 * @param scls must be of type `struct GNUNET_CONTAINER_MetaData **`
448 * @param option name of the option (typically 'k') 449 * @param option name of the option (typically 'k')
449 * @param value command line argument given 450 * @param value command line argument given
450 * @return GNUNET_OK on success 451 * @return #GNUNET_OK on success
451 */ 452 */
452int 453int
453GNUNET_FS_getopt_set_metadata (struct GNUNET_GETOPT_CommandLineProcessorContext 454GNUNET_FS_getopt_set_metadata (struct GNUNET_GETOPT_CommandLineProcessorContext
@@ -1664,7 +1665,7 @@ GNUNET_FS_stop (struct GNUNET_FS_Handle *h);
1664 1665
1665 1666
1666/** 1667/**
1667 * Function called on entries in a GNUNET_FS_FileInformation publish-structure. 1668 * Function called on entries in a `struct GNUNET_FS_FileInformation` iteration.
1668 * 1669 *
1669 * @param cls closure 1670 * @param cls closure
1670 * @param fi the entry in the publish-structure 1671 * @param fi the entry in the publish-structure
@@ -1674,8 +1675,8 @@ GNUNET_FS_stop (struct GNUNET_FS_Handle *h);
1674 * @param bo block options (can be modified) 1675 * @param bo block options (can be modified)
1675 * @param do_index should we index (can be modified) 1676 * @param do_index should we index (can be modified)
1676 * @param client_info pointer to client context set upon creation (can be modified) 1677 * @param client_info pointer to client context set upon creation (can be modified)
1677 * @return GNUNET_OK to continue, GNUNET_NO to remove 1678 * @return #GNUNET_OK to continue, #GNUNET_NO to remove
1678 * this entry from the directory, GNUNET_SYSERR 1679 * this entry from the directory, #GNUNET_SYSERR
1679 * to abort the iteration 1680 * to abort the iteration
1680 */ 1681 */
1681typedef int (*GNUNET_FS_FileInformationProcessor) (void *cls, 1682typedef int (*GNUNET_FS_FileInformationProcessor) (void *cls,
@@ -1697,8 +1698,7 @@ typedef int (*GNUNET_FS_FileInformationProcessor) (void *cls,
1697 * file information structures. 1698 * file information structures.
1698 * 1699 *
1699 * @param s structure to get the filename for 1700 * @param s structure to get the filename for
1700 * @return NULL on error, otherwise filename that 1701 * @return NULL on error, otherwise filename that can be used
1701 * can be passed to "GNUNET_FS_file_information_recover"
1702 * to read this fi-struct from disk. 1702 * to read this fi-struct from disk.
1703 */ 1703 */
1704const char * 1704const char *
@@ -1737,8 +1737,8 @@ GNUNET_FS_file_information_set_filename (struct GNUNET_FS_FileInformation *s,
1737 * @param keywords under which keywords should this file be available 1737 * @param keywords under which keywords should this file be available
1738 * directly; can be NULL 1738 * directly; can be NULL
1739 * @param meta metadata for the file 1739 * @param meta metadata for the file
1740 * @param do_index GNUNET_YES for index, GNUNET_NO for insertion, 1740 * @param do_index #GNUNET_YES for index, #GNUNET_NO for insertion,
1741 * GNUNET_SYSERR for simulation 1741 * #GNUNET_SYSERR for simulation
1742 * @param bo block options 1742 * @param bo block options
1743 * @return publish structure entry for the file 1743 * @return publish structure entry for the file
1744 */ 1744 */
@@ -1766,8 +1766,8 @@ GNUNET_FS_file_information_create_from_file (struct GNUNET_FS_Handle *h,
1766 * @param keywords under which keywords should this file be available 1766 * @param keywords under which keywords should this file be available
1767 * directly; can be NULL 1767 * directly; can be NULL
1768 * @param meta metadata for the file 1768 * @param meta metadata for the file
1769 * @param do_index GNUNET_YES for index, GNUNET_NO for insertion, 1769 * @param do_index #GNUNET_YES for index, #GNUNET_NO for insertion,
1770 * GNUNET_SYSERR for simulation 1770 * #GNUNET_SYSERR for simulation
1771 * @param bo block options 1771 * @param bo block options
1772 * @return publish structure entry for the file 1772 * @return publish structure entry for the file
1773 */ 1773 */
@@ -1802,7 +1802,7 @@ GNUNET_FS_file_information_create_from_data (struct GNUNET_FS_Handle *h,
1802 * the reader to clean up its internal state 1802 * the reader to clean up its internal state
1803 * @param buf where the reader should write the data 1803 * @param buf where the reader should write the data
1804 * @param emsg location for the reader to store an error message 1804 * @param emsg location for the reader to store an error message
1805 * @return number of bytes written, usually "max", 0 on error 1805 * @return number of bytes written, usually @a max, 0 on error
1806 */ 1806 */
1807typedef size_t (*GNUNET_FS_DataReader) (void *cls, uint64_t offset, size_t max, 1807typedef size_t (*GNUNET_FS_DataReader) (void *cls, uint64_t offset, size_t max,
1808 void *buf, char **emsg); 1808 void *buf, char **emsg);
@@ -1815,12 +1815,12 @@ typedef size_t (*GNUNET_FS_DataReader) (void *cls, uint64_t offset, size_t max,
1815 * @param client_info initial client-info value for this entry 1815 * @param client_info initial client-info value for this entry
1816 * @param length length of the file 1816 * @param length length of the file
1817 * @param reader function that can be used to obtain the data for the file 1817 * @param reader function that can be used to obtain the data for the file
1818 * @param reader_cls closure for "reader" 1818 * @param reader_cls closure for @a reader
1819 * @param keywords under which keywords should this file be available 1819 * @param keywords under which keywords should this file be available
1820 * directly; can be NULL 1820 * directly; can be NULL
1821 * @param meta metadata for the file 1821 * @param meta metadata for the file
1822 * @param do_index GNUNET_YES for index, GNUNET_NO for insertion, 1822 * @param do_index #GNUNET_YES for index, #GNUNET_NO for insertion,
1823 * GNUNET_SYSERR for simulation 1823 * #GNUNET_SYSERR for simulation
1824 * @param bo block options 1824 * @param bo block options
1825 * @return publish structure entry for the file 1825 * @return publish structure entry for the file
1826 */ 1826 */
@@ -1842,7 +1842,7 @@ GNUNET_FS_file_information_create_from_reader (struct GNUNET_FS_Handle *h,
1842/** 1842/**
1843 * Create an entry for an empty directory in a publish-structure. 1843 * Create an entry for an empty directory in a publish-structure.
1844 * This function should be used by applications for which the 1844 * This function should be used by applications for which the
1845 * use of "GNUNET_FS_file_information_create_from_directory" 1845 * use of #GNUNET_FS_file_information_create_from_directory
1846 * is not appropriate. 1846 * is not appropriate.
1847 * 1847 *
1848 * @param h handle to the file sharing subsystem 1848 * @param h handle to the file sharing subsystem
@@ -2100,7 +2100,7 @@ struct GNUNET_FS_GetIndexedContext;
2100 * @param h handle to the file sharing subsystem 2100 * @param h handle to the file sharing subsystem
2101 * @param iterator function to call on each indexed file 2101 * @param iterator function to call on each indexed file
2102 * @param iterator_cls closure for @a iterator 2102 * @param iterator_cls closure for @a iterator
2103 * @return NULL on error ('iter' is not called) 2103 * @return NULL on error (@a iterator is not called)
2104 */ 2104 */
2105struct GNUNET_FS_GetIndexedContext * 2105struct GNUNET_FS_GetIndexedContext *
2106GNUNET_FS_get_indexed_files (struct GNUNET_FS_Handle *h, 2106GNUNET_FS_get_indexed_files (struct GNUNET_FS_Handle *h,
@@ -2145,8 +2145,8 @@ GNUNET_FS_unindex_stop (struct GNUNET_FS_UnindexContext *uc);
2145 * 2145 *
2146 * @param cls closure 2146 * @param cls closure
2147 * @param last_id last identifier 2147 * @param last_id last identifier
2148 * @param last_uri uri used for the content published under the last_id 2148 * @param last_uri uri used for the content published under the @a last_id
2149 * @param last_meta metadata associated with last_uri 2149 * @param last_meta metadata associated with @a last_uri
2150 * @param next_id identifier that should be used for updates 2150 * @param next_id identifier that should be used for updates
2151 */ 2151 */
2152typedef void (*GNUNET_FS_IdentifierProcessor) (void *cls, 2152typedef void (*GNUNET_FS_IdentifierProcessor) (void *cls,
@@ -2282,35 +2282,35 @@ GNUNET_FS_probe_stop (struct GNUNET_FS_SearchResult *sr);
2282 */ 2282 */
2283enum GNUNET_FS_DownloadOptions 2283enum GNUNET_FS_DownloadOptions
2284{ 2284{
2285 /** 2285 /**
2286 * No options (use defaults for everything). 2286 * No options (use defaults for everything).
2287 */ 2287 */
2288 GNUNET_FS_DOWNLOAD_OPTION_NONE = 0, 2288 GNUNET_FS_DOWNLOAD_OPTION_NONE = 0,
2289 2289
2290 /** 2290 /**
2291 * Only download from the local host, do not access remote systems (no P2P) 2291 * Only download from the local host, do not access remote systems (no P2P)
2292 */ 2292 */
2293 GNUNET_FS_DOWNLOAD_OPTION_LOOPBACK_ONLY = 1, 2293 GNUNET_FS_DOWNLOAD_OPTION_LOOPBACK_ONLY = 1,
2294 2294
2295 /** 2295 /**
2296 * Do a recursive download (that is, automatically trigger the 2296 * Do a recursive download (that is, automatically trigger the
2297 * download of files in directories). 2297 * download of files in directories).
2298 */ 2298 */
2299 GNUNET_FS_DOWNLOAD_OPTION_RECURSIVE = 2, 2299 GNUNET_FS_DOWNLOAD_OPTION_RECURSIVE = 2,
2300 2300
2301 /** 2301 /**
2302 * Do not append temporary data to 2302 * Do not append temporary data to
2303 * the target file (for the IBlocks). 2303 * the target file (for the IBlocks).
2304 */ 2304 */
2305 GNUNET_FS_DOWNLOAD_NO_TEMPORARIES = 4, 2305 GNUNET_FS_DOWNLOAD_NO_TEMPORARIES = 4,
2306 2306
2307 /** 2307 /**
2308 * Internal option used to flag this download as a 'probe' for a 2308 * Internal option used to flag this download as a 'probe' for a
2309 * search result. Impacts the priority with which the download is 2309 * search result. Impacts the priority with which the download is
2310 * run and causes signalling callbacks to be done differently. 2310 * run and causes signalling callbacks to be done differently.
2311 * Also, probe downloads are not serialized on suspension. Normal 2311 * Also, probe downloads are not serialized on suspension. Normal
2312 * clients should not use this! 2312 * clients should not use this!
2313 */ 2313 */
2314 GNUNET_FS_DOWNLOAD_IS_PROBE = (1 << 31) 2314 GNUNET_FS_DOWNLOAD_IS_PROBE = (1 << 31)
2315}; 2315};
2316 2316