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.h68
1 files changed, 34 insertions, 34 deletions
diff --git a/src/include/gnunet_fs_service.h b/src/include/gnunet_fs_service.h
index e8026a66f..7bfb15ac0 100644
--- a/src/include/gnunet_fs_service.h
+++ b/src/include/gnunet_fs_service.h
@@ -19,7 +19,7 @@
19*/ 19*/
20/** 20/**
21 * @file include/gnunet_fs_service.h 21 * @file include/gnunet_fs_service.h
22 * @brief API for file-sharing via GNUnet 22 * @brief API for file-sharing via GNUnet
23 * @author Christian Grothoff 23 * @author Christian Grothoff
24 */ 24 */
25#ifndef GNUNET_FS_LIB_H 25#ifndef GNUNET_FS_LIB_H
@@ -105,7 +105,7 @@ GNUNET_FS_uri_to_string (const struct GNUNET_FS_Uri *uri);
105 * Convert keyword URI to a human readable format 105 * Convert keyword URI to a human readable format
106 * (i.e. the search query that was used in the first place) 106 * (i.e. the search query that was used in the first place)
107 * 107 *
108 * @param uri ksk uri to convert to a string 108 * @param uri ksk uri to convert to a string
109 * @return string with the keywords 109 * @return string with the keywords
110 */ 110 */
111char * 111char *
@@ -232,7 +232,7 @@ GNUNET_FS_uri_loc_create (const struct GNUNET_FS_Uri *baseUri,
232 * as decapitalization and removal of certain characters. 232 * as decapitalization and removal of certain characters.
233 * (useful for search). 233 * (useful for search).
234 * 234 *
235 * @param uri the URI to canonicalize 235 * @param uri the URI to canonicalize
236 * @return canonicalized version of the URI, NULL on error 236 * @return canonicalized version of the URI, NULL on error
237 */ 237 */
238struct GNUNET_FS_Uri * 238struct GNUNET_FS_Uri *
@@ -490,13 +490,13 @@ GNUNET_FS_getopt_set_metadata (struct GNUNET_GETOPT_CommandLineProcessorContext
490 490
491 491
492/** 492/**
493 * Possible status codes used in the callback for the 493 * Possible status codes used in the callback for the
494 * various file-sharing operations. On each file (or search), 494 * various file-sharing operations. On each file (or search),
495 * the callback is guaranteed to be called once with "START" 495 * the callback is guaranteed to be called once with "START"
496 * and once with STOPPED; calls with PROGRESS, ERROR or COMPLETED 496 * and once with STOPPED; calls with PROGRESS, ERROR or COMPLETED
497 * are optional and depend on the circumstances; parent operations 497 * are optional and depend on the circumstances; parent operations
498 * will be STARTED before child-operations and STOPPED after 498 * will be STARTED before child-operations and STOPPED after
499 * their respective child-operations. START and STOP signals 499 * their respective child-operations. START and STOP signals
500 * are typically generated either due to explicit client requests 500 * are typically generated either due to explicit client requests
501 * or because of suspend/resume operations. 501 * or because of suspend/resume operations.
502 */ 502 */
@@ -602,7 +602,7 @@ enum GNUNET_FS_Status
602 GNUNET_FS_STATUS_DOWNLOAD_LOST_PARENT, 602 GNUNET_FS_STATUS_DOWNLOAD_LOST_PARENT,
603 603
604 /** 604 /**
605 * First event generated when a client requests 605 * First event generated when a client requests
606 * a search to begin or when a namespace result 606 * a search to begin or when a namespace result
607 * automatically triggers the search for updates. 607 * automatically triggers the search for updates.
608 */ 608 */
@@ -807,7 +807,7 @@ struct GNUNET_FS_ProgressInfo
807 /** 807 /**
808 * How large is the file overall? For directories, 808 * How large is the file overall? For directories,
809 * this is only the size of the directory itself, 809 * this is only the size of the directory itself,
810 * not of the other files contained within the 810 * not of the other files contained within the
811 * directory. 811 * directory.
812 */ 812 */
813 uint64_t size; 813 uint64_t size;
@@ -864,7 +864,7 @@ struct GNUNET_FS_ProgressInfo
864 uint64_t data_len; 864 uint64_t data_len;
865 865
866 /** 866 /**
867 * Depth of the given block in the tree; 867 * Depth of the given block in the tree;
868 * 0 would be the lowest level (DBLOCKs). 868 * 0 would be the lowest level (DBLOCKs).
869 */ 869 */
870 unsigned int depth; 870 unsigned int depth;
@@ -950,7 +950,7 @@ struct GNUNET_FS_ProgressInfo
950 /** 950 /**
951 * Client context pointer for the associated search operation 951 * Client context pointer for the associated search operation
952 * (specifically, context pointer for the specific search 952 * (specifically, context pointer for the specific search
953 * result, not the overall search); only set if this 953 * result, not the overall search); only set if this
954 * download was started from a search result. 954 * download was started from a search result.
955 */ 955 */
956 void *sctx; 956 void *sctx;
@@ -1031,7 +1031,7 @@ struct GNUNET_FS_ProgressInfo
1031 uint64_t data_len; 1031 uint64_t data_len;
1032 1032
1033 /** 1033 /**
1034 * Depth of the given block in the tree; 1034 * Depth of the given block in the tree;
1035 * 0 would be the lowest level (DBLOCKS). 1035 * 0 would be the lowest level (DBLOCKS).
1036 */ 1036 */
1037 unsigned int depth; 1037 unsigned int depth;
@@ -1266,7 +1266,7 @@ struct GNUNET_FS_ProgressInfo
1266 * These values are only valid for 1266 * These values are only valid for
1267 * GNUNET_FS_STATUS_SEARCH_RESULT_SUSPEND events. 1267 * GNUNET_FS_STATUS_SEARCH_RESULT_SUSPEND events.
1268 * These events are automatically triggered for 1268 * These events are automatically triggered for
1269 * each search result before the 1269 * each search result before the
1270 * GNUNET_FS_STATUS_SEARCH_SUSPEND event. This 1270 * GNUNET_FS_STATUS_SEARCH_SUSPEND event. This
1271 * happens primarily to give the client a chance 1271 * happens primarily to give the client a chance
1272 * to clean up the "cctx" (if needed). 1272 * to clean up the "cctx" (if needed).
@@ -1296,7 +1296,7 @@ struct GNUNET_FS_ProgressInfo
1296 * These values are only valid for 1296 * These values are only valid for
1297 * GNUNET_FS_STATUS_SEARCH_RESULT_STOPPED events. 1297 * GNUNET_FS_STATUS_SEARCH_RESULT_STOPPED events.
1298 * These events are automatically triggered for 1298 * These events are automatically triggered for
1299 * each search result before the 1299 * each search result before the
1300 * GNUNET_FS_STATUS_SEARCH_STOPPED event. This 1300 * GNUNET_FS_STATUS_SEARCH_STOPPED event. This
1301 * happens primarily to give the client a chance 1301 * happens primarily to give the client a chance
1302 * to clean up the "cctx" (if needed). 1302 * to clean up the "cctx" (if needed).
@@ -1468,7 +1468,7 @@ struct GNUNET_FS_ProgressInfo
1468 uint64_t data_len; 1468 uint64_t data_len;
1469 1469
1470 /** 1470 /**
1471 * Depth of the given block in the tree; 1471 * Depth of the given block in the tree;
1472 * 0 would be the lowest level (DBLOCKS). 1472 * 0 would be the lowest level (DBLOCKS).
1473 */ 1473 */
1474 unsigned int depth; 1474 unsigned int depth;
@@ -1518,9 +1518,9 @@ struct GNUNET_FS_ProgressInfo
1518 1518
1519 1519
1520/** 1520/**
1521 * Notification of FS to a client about the progress of an 1521 * Notification of FS to a client about the progress of an
1522 * operation. Callbacks of this type will be used for uploads, 1522 * operation. Callbacks of this type will be used for uploads,
1523 * downloads and searches. Some of the arguments depend a bit 1523 * downloads and searches. Some of the arguments depend a bit
1524 * in their meaning on the context in which the callback is used. 1524 * in their meaning on the context in which the callback is used.
1525 * 1525 *
1526 * @param cls closure 1526 * @param cls closure
@@ -1661,7 +1661,7 @@ struct GNUNET_FS_Handle;
1661 * Setup a connection to the file-sharing service. 1661 * Setup a connection to the file-sharing service.
1662 * 1662 *
1663 * @param cfg configuration to use 1663 * @param cfg configuration to use
1664 * @param client_name unique identifier for this client 1664 * @param client_name unique identifier for this client
1665 * @param upcb function to call to notify about FS actions 1665 * @param upcb function to call to notify about FS actions
1666 * @param upcb_cls closure for upcb 1666 * @param upcb_cls closure for upcb
1667 * @param flags specific attributes for fs-operations 1667 * @param flags specific attributes for fs-operations
@@ -1806,7 +1806,7 @@ GNUNET_FS_file_information_create_from_data (struct GNUNET_FS_Handle *h,
1806 * @param offset offset to read from; it is possible 1806 * @param offset offset to read from; it is possible
1807 * that the caller might need to go backwards 1807 * that the caller might need to go backwards
1808 * a bit at times 1808 * a bit at times
1809 * @param max maximum number of bytes that should be 1809 * @param max maximum number of bytes that should be
1810 * copied to buf; readers are not allowed 1810 * copied to buf; readers are not allowed
1811 * to provide less data unless there is an error; 1811 * to provide less data unless there is an error;
1812 * a value of "0" will be used at the end to allow 1812 * a value of "0" will be used at the end to allow
@@ -1825,7 +1825,7 @@ typedef size_t (*GNUNET_FS_DataReader) (void *cls, uint64_t offset, size_t max,
1825 * @param h handle to the file sharing subsystem 1825 * @param h handle to the file sharing subsystem
1826 * @param client_info initial client-info value for this entry 1826 * @param client_info initial client-info value for this entry
1827 * @param length length of the file 1827 * @param length length of the file
1828 * @param reader function that can be used to obtain the data for the file 1828 * @param reader function that can be used to obtain the data for the file
1829 * @param reader_cls closure for "reader" 1829 * @param reader_cls closure for "reader"
1830 * @param keywords under which keywords should this file be available 1830 * @param keywords under which keywords should this file be available
1831 * directly; can be NULL 1831 * directly; can be NULL
@@ -1855,7 +1855,7 @@ GNUNET_FS_file_information_create_from_reader (struct GNUNET_FS_Handle *h,
1855 * for each entry in the directory. 1855 * for each entry in the directory.
1856 * 1856 *
1857 * @param cls closure 1857 * @param cls closure
1858 * @param filename name of the file (including path); must end 1858 * @param filename name of the file (including path); must end
1859 * in a "/" (even on W32) if this is a directory 1859 * in a "/" (even on W32) if this is a directory
1860 * @param fi information about the file (should not be 1860 * @param fi information about the file (should not be
1861 * used henceforth by the caller) 1861 * used henceforth by the caller)
@@ -1866,7 +1866,7 @@ typedef void (*GNUNET_FS_FileProcessor) (void *cls, const char *filename,
1866 1866
1867/** 1867/**
1868 * Type of a function that will be used to scan a directory. 1868 * Type of a function that will be used to scan a directory.
1869 * 1869 *
1870 * @param cls closure 1870 * @param cls closure
1871 * @param h handle to the file sharing subsystem 1871 * @param h handle to the file sharing subsystem
1872 * @param dirname name of the directory to scan 1872 * @param dirname name of the directory to scan
@@ -1991,7 +1991,7 @@ GNUNET_FS_file_information_is_directory (const struct GNUNET_FS_FileInformation
1991 * 1991 *
1992 * @param dir the directory 1992 * @param dir the directory
1993 * @param ent the entry to add; the entry must not have been 1993 * @param ent the entry to add; the entry must not have been
1994 * added to any other directory at this point and 1994 * added to any other directory at this point and
1995 * must not include "dir" in its structure 1995 * must not include "dir" in its structure
1996 * @return GNUNET_OK on success, GNUNET_SYSERR on error 1996 * @return GNUNET_OK on success, GNUNET_SYSERR on error
1997 */ 1997 */
@@ -2062,9 +2062,9 @@ enum GNUNET_FS_PublishOptions
2062 * @param namespace namespace to publish the file in, NULL for no namespace 2062 * @param namespace namespace to publish the file in, NULL for no namespace
2063 * @param nid identifier to use for the publishd content in the namespace 2063 * @param nid identifier to use for the publishd content in the namespace
2064 * (can be NULL, must be NULL if namespace is NULL) 2064 * (can be NULL, must be NULL if namespace is NULL)
2065 * @param nuid update-identifier that will be used for future updates 2065 * @param nuid update-identifier that will be used for future updates
2066 * (can be NULL, must be NULL if namespace or nid is NULL) 2066 * (can be NULL, must be NULL if namespace or nid is NULL)
2067 * @param options options for the publication 2067 * @param options options for the publication
2068 * @return context that can be used to control the publish operation 2068 * @return context that can be used to control the publish operation
2069 */ 2069 */
2070struct GNUNET_FS_PublishContext * 2070struct GNUNET_FS_PublishContext *
@@ -2076,7 +2076,7 @@ GNUNET_FS_publish_start (struct GNUNET_FS_Handle *h,
2076 2076
2077 2077
2078/** 2078/**
2079 * Stop a publication. Will abort incomplete publications (but 2079 * Stop a publication. Will abort incomplete publications (but
2080 * not remove blocks that have already been published) or 2080 * not remove blocks that have already been published) or
2081 * simply clean up the state for completed publications. 2081 * simply clean up the state for completed publications.
2082 * Must NOT be called from within the event callback! 2082 * Must NOT be called from within the event callback!
@@ -2183,7 +2183,7 @@ GNUNET_FS_get_indexed_files (struct GNUNET_FS_Handle *h,
2183 * @param h handle to the file sharing subsystem 2183 * @param h handle to the file sharing subsystem
2184 * @param filename file to unindex 2184 * @param filename file to unindex
2185 * @param cctx initial value for the client context 2185 * @param cctx initial value for the client context
2186 * @return NULL on error, otherwise handle 2186 * @return NULL on error, otherwise handle
2187 */ 2187 */
2188struct GNUNET_FS_UnindexContext * 2188struct GNUNET_FS_UnindexContext *
2189GNUNET_FS_unindex_start (struct GNUNET_FS_Handle *h, const char *filename, 2189GNUNET_FS_unindex_start (struct GNUNET_FS_Handle *h, const char *filename,
@@ -2200,7 +2200,7 @@ GNUNET_FS_unindex_stop (struct GNUNET_FS_UnindexContext *uc);
2200 2200
2201 2201
2202/** 2202/**
2203 * Publish an advertismement for a namespace. 2203 * Publish an advertismement for a namespace.
2204 * 2204 *
2205 * @param h handle to the file sharing subsystem 2205 * @param h handle to the file sharing subsystem
2206 * @param ksk_uri keywords to use for advertisment 2206 * @param ksk_uri keywords to use for advertisment
@@ -2280,7 +2280,7 @@ GNUNET_FS_namespace_list (struct GNUNET_FS_Handle *h,
2280 * Function called on updateable identifiers. 2280 * Function called on updateable identifiers.
2281 * 2281 *
2282 * @param cls closure 2282 * @param cls closure
2283 * @param last_id last identifier 2283 * @param last_id last identifier
2284 * @param last_uri uri used for the content published under the last_id 2284 * @param last_uri uri used for the content published under the last_id
2285 * @param last_meta metadata associated with last_uri 2285 * @param last_meta metadata associated with last_uri
2286 * @param next_id identifier that should be used for updates 2286 * @param next_id identifier that should be used for updates
@@ -2298,12 +2298,12 @@ typedef void (*GNUNET_FS_IdentifierProcessor) (void *cls, const char *last_id,
2298 * produce an update. Namespace updates form a graph where each node 2298 * produce an update. Namespace updates form a graph where each node
2299 * has a name. Each node can have any number of URI/meta-data entries 2299 * has a name. Each node can have any number of URI/meta-data entries
2300 * which can each be linked to other nodes. Cycles are possible. 2300 * which can each be linked to other nodes. Cycles are possible.
2301 * 2301 *
2302 * Calling this function with "next_id" NULL will cause the library to 2302 * Calling this function with "next_id" NULL will cause the library to
2303 * call "ip" with a root for each strongly connected component of the 2303 * call "ip" with a root for each strongly connected component of the
2304 * graph (a root being a node from which all other nodes in the Scc 2304 * graph (a root being a node from which all other nodes in the Scc
2305 * are reachable). 2305 * are reachable).
2306 * 2306 *
2307 * Calling this function with "next_id" being the name of a node will 2307 * Calling this function with "next_id" being the name of a node will
2308 * cause the library to call "ip" with all children of the node. Note 2308 * cause the library to call "ip" with all children of the node. Note
2309 * that cycles within an SCC are possible (including self-loops). 2309 * that cycles within an SCC are possible (including self-loops).
@@ -2356,7 +2356,7 @@ GNUNET_FS_search_start (struct GNUNET_FS_Handle *h,
2356 2356
2357 2357
2358/** 2358/**
2359 * Pause search. 2359 * Pause search.
2360 * 2360 *
2361 * @param sc context for the search that should be paused 2361 * @param sc context for the search that should be paused
2362 */ 2362 */
@@ -2541,7 +2541,7 @@ GNUNET_FS_meta_data_test_for_directory (const struct GNUNET_CONTAINER_MetaData
2541/** 2541/**
2542 * Set the MIMETYPE information for the given 2542 * Set the MIMETYPE information for the given
2543 * metadata to "application/gnunet-directory". 2543 * metadata to "application/gnunet-directory".
2544 * 2544 *
2545 * @param md metadata to add mimetype to 2545 * @param md metadata to add mimetype to
2546 */ 2546 */
2547void 2547void
@@ -2550,7 +2550,7 @@ GNUNET_FS_meta_data_make_directory (struct GNUNET_CONTAINER_MetaData *md);
2550 2550
2551/** 2551/**
2552 * Suggest a filename based on given metadata. 2552 * Suggest a filename based on given metadata.
2553 * 2553 *
2554 * @param md given meta data 2554 * @param md given meta data
2555 * @return NULL if meta data is useless for suggesting a filename 2555 * @return NULL if meta data is useless for suggesting a filename
2556 */ 2556 */
@@ -2617,7 +2617,7 @@ struct GNUNET_FS_DirectoryBuilder;
2617 2617
2618/** 2618/**
2619 * Create a directory builder. 2619 * Create a directory builder.
2620 * 2620 *
2621 * @param mdir metadata for the directory 2621 * @param mdir metadata for the directory
2622 */ 2622 */
2623struct GNUNET_FS_DirectoryBuilder * 2623struct GNUNET_FS_DirectoryBuilder *
@@ -2627,7 +2627,7 @@ GNUNET_FS_directory_builder_create (const struct GNUNET_CONTAINER_MetaData
2627 2627
2628/** 2628/**
2629 * Add an entry to a directory. 2629 * Add an entry to a directory.
2630 * 2630 *
2631 * @param bld directory to extend 2631 * @param bld directory to extend
2632 * @param uri uri of the entry (must not be a KSK) 2632 * @param uri uri of the entry (must not be a KSK)
2633 * @param md metadata of the entry 2633 * @param md metadata of the entry