This file is part of GNUnet
Copyright (C) 2004--2013 GNUnet e.V.
- GNUnet is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published
- by the Free Software Foundation; either version 3, or (at your
- option) any later version.
+ GNUnet is free software: you can redistribute it and/or modify it
+ under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License,
+ or (at your option) any later version.
GNUnet is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
+ Affero General Public License for more details.
- You should have received a copy of the GNU General Public License
- along with GNUnet; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA.
-*/
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+ SPDX-License-Identifier: AGPL3.0-or-later
+ */
/**
* @author Christian Grothoff
*
* How often do we signal applications that a probe for a particular
* search result is running? (used to visualize probes).
*/
-#define GNUNET_FS_PROBE_UPDATE_FREQUENCY GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MILLISECONDS, 250)
+#define GNUNET_FS_PROBE_UPDATE_FREQUENCY GNUNET_TIME_relative_multiply ( \
+ GNUNET_TIME_UNIT_MILLISECONDS, 250)
/**
* A Universal Resource Identifier (URI), opaque.
int is_mandatory);
-
/**
* Get a unique key from a URI. This is for putting URIs
* into HashMaps. The key may change between FS implementations.
*/
int
GNUNET_FS_uri_to_key (const struct GNUNET_FS_Uri *uri,
- struct GNUNET_HashCode *key);
+ struct GNUNET_HashCode *key);
/**
*/
void
GNUNET_FS_uri_ksk_add_keyword (struct GNUNET_FS_Uri *uri,
- const char *keyword,
+ const char *keyword,
int is_mandatory);
*/
struct GNUNET_FS_Uri *
GNUNET_FS_uri_ksk_create_from_args (unsigned int argc,
- const char **argv);
+ const char **argv);
/**
*/
struct GNUNET_FS_Uri *
GNUNET_FS_uri_sks_create (const struct GNUNET_CRYPTO_EcdsaPublicKey *ns,
- const char *id);
+ const char *id);
/**
* @return #GNUNET_OK on success
*/
int
-GNUNET_FS_getopt_set_metadata (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx,
+GNUNET_FS_getopt_set_metadata (struct
+ GNUNET_GETOPT_CommandLineProcessorContext *ctx,
void *scls,
const char *option,
const char *value);
-
/* ************************* sharing API ***************** */
* Notification that we are making progress sharing a directory.
*/
GNUNET_FS_STATUS_PUBLISH_PROGRESS_DIRECTORY = 37
-
};
*/
struct GNUNET_FS_ProgressInfo
{
-
/**
* Values that depend on the event type.
*/
union
{
-
/**
* Values for all "GNUNET_FS_STATUS_PUBLISH_*" events.
*/
struct
{
-
/**
* Context for controlling the upload.
*/
*/
union
{
-
/**
- * These values are only valid for
- * #GNUNET_FS_STATUS_PUBLISH_PROGRESS events.
- */
+ * These values are only valid for
+ * #GNUNET_FS_STATUS_PUBLISH_PROGRESS events.
+ */
struct
{
-
/**
- * Data block we just published.
- */
+ * Data block we just published.
+ */
const void *data;
/**
- * At what offset in the file is "data"?
- */
+ * At what offset in the file is "data"?
+ */
uint64_t offset;
/**
- * Length of the data block.
- */
+ * Length of the data block.
+ */
uint64_t data_len;
/**
- * Depth of the given block in the tree;
- * 0 would be the lowest level (DBLOCKs).
- */
+ * Depth of the given block in the tree;
+ * 0 would be the lowest level (DBLOCKs).
+ */
unsigned int depth;
-
} progress;
/**
- * These values are only valid for
- * #GNUNET_FS_STATUS_PUBLISH_PROGRESS_DIRECTORY events.
- */
+ * These values are only valid for
+ * #GNUNET_FS_STATUS_PUBLISH_PROGRESS_DIRECTORY events.
+ */
struct
{
-
/**
- * How far are we along in the overall directory?
- */
+ * How far are we along in the overall directory?
+ */
uint64_t completed;
/**
- * How big do we estimate the entire directory to be?
- */
+ * How big do we estimate the entire directory to be?
+ */
uint64_t total;
/**
* "publish"-level of this struct.)
*/
struct GNUNET_TIME_Relative eta;
-
} progress_directory;
/**
- * These values are only valid for
- * #GNUNET_FS_STATUS_PUBLISH_RESUME events.
- */
+ * These values are only valid for
+ * #GNUNET_FS_STATUS_PUBLISH_RESUME events.
+ */
struct
{
-
/**
- * Error message, NULL if no error was encountered so far.
- */
+ * Error message, NULL if no error was encountered so far.
+ */
const char *message;
/**
- * URI of the file (if the download had been completed)
- */
+ * URI of the file (if the download had been completed)
+ */
const struct GNUNET_FS_Uri *chk_uri;
/**
- * SKS URI of the file (if the download had been completed)
- */
+ * SKS URI of the file (if the download had been completed)
+ */
const struct GNUNET_FS_Uri *sks_uri;
-
} resume;
/**
- * These values are only valid for
- * #GNUNET_FS_STATUS_PUBLISH_COMPLETED events.
- */
+ * These values are only valid for
+ * #GNUNET_FS_STATUS_PUBLISH_COMPLETED events.
+ */
struct
{
-
/**
- * CHK URI of the file.
- */
+ * CHK URI of the file.
+ */
const struct GNUNET_FS_Uri *chk_uri;
/**
- * SKS URI of the file (if the download had been completed)
- */
+ * SKS URI of the file (if the download had been completed)
+ */
const struct GNUNET_FS_Uri *sks_uri;
-
} completed;
/**
- * These values are only valid for
- * #GNUNET_FS_STATUS_PUBLISH_ERROR events.
- */
+ * These values are only valid for
+ * #GNUNET_FS_STATUS_PUBLISH_ERROR events.
+ */
struct
{
-
/**
- * Error message, never NULL.
- */
+ * Error message, never NULL.
+ */
const char *message;
-
} error;
-
} specifics;
-
} publish;
*/
struct
{
-
/**
* Context for controlling the download.
*/
*/
union
{
-
/**
- * These values are only valid for
- * #GNUNET_FS_STATUS_DOWNLOAD_PROGRESS events.
- */
+ * These values are only valid for
+ * #GNUNET_FS_STATUS_DOWNLOAD_PROGRESS events.
+ */
struct
{
-
/**
- * Data block we just obtained, can be NULL (even if
- * data_len > 0) if we found the entire block 'intact' on
- * disk. In this case, it is also possible for 'data_len'
- * to be larger than an individual (32k) block.
- */
+ * Data block we just obtained, can be NULL (even if
+ * data_len > 0) if we found the entire block 'intact' on
+ * disk. In this case, it is also possible for 'data_len'
+ * to be larger than an individual (32k) block.
+ */
const void *data;
/**
- * At what offset in the file is "data"?
- */
+ * At what offset in the file is "data"?
+ */
uint64_t offset;
/**
- * Length of the data block.
- */
+ * Length of the data block.
+ */
uint64_t data_len;
/**
- * How much time passed between us asking for this block and
+ * How much time passed between us asking for this block and
* actually getting it? #GNUNET_TIME_UNIT_FOREVER_REL if unknown.
- */
+ */
struct GNUNET_TIME_Relative block_download_duration;
/**
- * Depth of the given block in the tree;
- * 0 would be the lowest level (DBLOCKS).
- */
+ * Depth of the given block in the tree;
+ * 0 would be the lowest level (DBLOCKS).
+ */
unsigned int depth;
/**
- * How much respect did we offer for downloading this block? (estimate,
- * because we might have the same request pending for multiple clients,
- * and of course because a transmission may have failed at a lower
- * layer).
- */
+ * How much respect did we offer for downloading this block? (estimate,
+ * because we might have the same request pending for multiple clients,
+ * and of course because a transmission may have failed at a lower
+ * layer).
+ */
uint32_t respect_offered;
/**
- * How often did we transmit the request? (estimate,
- * because we might have the same request pending for multiple clients,
- * and of course because a transmission may have failed at a lower
- * layer).
- */
+ * How often did we transmit the request? (estimate,
+ * because we might have the same request pending for multiple clients,
+ * and of course because a transmission may have failed at a lower
+ * layer).
+ */
uint32_t num_transmissions;
-
} progress;
/**
- * These values are only valid for
- * #GNUNET_FS_STATUS_DOWNLOAD_START events.
- */
+ * These values are only valid for
+ * #GNUNET_FS_STATUS_DOWNLOAD_START events.
+ */
struct
{
-
/**
- * Known metadata for the download.
- */
+ * Known metadata for the download.
+ */
const struct GNUNET_CONTAINER_MetaData *meta;
-
} start;
/**
- * These values are only valid for
- * #GNUNET_FS_STATUS_DOWNLOAD_RESUME events.
- */
+ * These values are only valid for
+ * #GNUNET_FS_STATUS_DOWNLOAD_RESUME events.
+ */
struct
{
-
/**
- * Known metadata for the download.
- */
+ * Known metadata for the download.
+ */
const struct GNUNET_CONTAINER_MetaData *meta;
/**
- * Error message, NULL if we have not encountered any error yet.
- */
+ * Error message, NULL if we have not encountered any error yet.
+ */
const char *message;
-
} resume;
/**
- * These values are only valid for
- * #GNUNET_FS_STATUS_DOWNLOAD_ERROR events.
- */
+ * These values are only valid for
+ * #GNUNET_FS_STATUS_DOWNLOAD_ERROR events.
+ */
struct
{
-
/**
- * Error message.
- */
+ * Error message.
+ */
const char *message;
-
} error;
-
} specifics;
-
} download;
/**
*/
struct
{
-
/**
* Context for controlling the search, NULL for
* searches that were not explicitly triggered
*/
union
{
-
/**
- * These values are only valid for
- * #GNUNET_FS_STATUS_SEARCH_RESULT events.
- */
+ * These values are only valid for
+ * #GNUNET_FS_STATUS_SEARCH_RESULT events.
+ */
struct
{
-
/**
- * Metadata for the search result.
- */
+ * Metadata for the search result.
+ */
const struct GNUNET_CONTAINER_MetaData *meta;
/**
- * URI for the search result.
- */
+ * URI for the search result.
+ */
const struct GNUNET_FS_Uri *uri;
/**
- * Handle to the result (for starting downloads).
- */
+ * Handle to the result (for starting downloads).
+ */
struct GNUNET_FS_SearchResult *result;
/**
- * Applicability rank (the larger, the better the result
- * fits the search criteria).
- */
+ * Applicability rank (the larger, the better the result
+ * fits the search criteria).
+ */
uint32_t applicability_rank;
-
} result;
/**
- * These values are only valid for
- * #GNUNET_FS_STATUS_SEARCH_RESUME_RESULT events.
- */
+ * These values are only valid for
+ * #GNUNET_FS_STATUS_SEARCH_RESUME_RESULT events.
+ */
struct
{
-
/**
- * Metadata for the search result.
- */
+ * Metadata for the search result.
+ */
const struct GNUNET_CONTAINER_MetaData *meta;
/**
- * URI for the search result.
- */
+ * URI for the search result.
+ */
const struct GNUNET_FS_Uri *uri;
/**
- * Handle to the result (for starting downloads).
- */
+ * Handle to the result (for starting downloads).
+ */
struct GNUNET_FS_SearchResult *result;
/**
- * Current availability rank (negative:
- * unavailable, positive: available)
- */
+ * Current availability rank (negative:
+ * unavailable, positive: available)
+ */
int32_t availability_rank;
/**
- * On how many total queries is the given
- * availability_rank based?
- */
+ * On how many total queries is the given
+ * availability_rank based?
+ */
uint32_t availability_certainty;
/**
- * Updated applicability rank (the larger,
- * the better the result fits the search
- * criteria).
- */
+ * Updated applicability rank (the larger,
+ * the better the result fits the search
+ * criteria).
+ */
uint32_t applicability_rank;
-
} resume_result;
/**
- * These values are only valid for
- * #GNUNET_FS_STATUS_SEARCH_UPDATE events.
- */
+ * These values are only valid for
+ * #GNUNET_FS_STATUS_SEARCH_UPDATE events.
+ */
struct
{
-
/**
- * Private context set for for this result
- * during the "RESULT" event.
- */
+ * Private context set for for this result
+ * during the "RESULT" event.
+ */
void *cctx;
/**
- * Metadata for the search result.
- */
+ * Metadata for the search result.
+ */
const struct GNUNET_CONTAINER_MetaData *meta;
/**
- * URI for the search result.
- */
+ * URI for the search result.
+ */
const struct GNUNET_FS_Uri *uri;
/**
- * Current availability rank (negative:
- * unavailable, positive: available)
- */
+ * Current availability rank (negative:
+ * unavailable, positive: available)
+ */
int32_t availability_rank;
/**
- * On how many total queries is the given
- * availability_rank based?
- */
+ * On how many total queries is the given
+ * availability_rank based?
+ */
uint32_t availability_certainty;
/**
- * Updated applicability rank (the larger,
- * the better the result fits the search
- * criteria).
- */
+ * Updated applicability rank (the larger,
+ * the better the result fits the search
+ * criteria).
+ */
uint32_t applicability_rank;
- /**
- * How long has the current probe been active?
- */
- struct GNUNET_TIME_Relative current_probe_time;
-
+ /**
+ * How long has the current probe been active?
+ */
+ struct GNUNET_TIME_Relative current_probe_time;
} update;
/**
- * These values are only valid for
- * #GNUNET_FS_STATUS_SEARCH_RESULT_SUSPEND events.
- * These events are automatically triggered for
- * each search result before the
- * #GNUNET_FS_STATUS_SEARCH_SUSPEND event. This
- * happens primarily to give the client a chance
- * to clean up the "cctx" (if needed).
- */
+ * These values are only valid for
+ * #GNUNET_FS_STATUS_SEARCH_RESULT_SUSPEND events.
+ * These events are automatically triggered for
+ * each search result before the
+ * #GNUNET_FS_STATUS_SEARCH_SUSPEND event. This
+ * happens primarily to give the client a chance
+ * to clean up the "cctx" (if needed).
+ */
struct
{
-
/**
- * Private context set for for this result
- * during the "RESULT" event.
- */
+ * Private context set for for this result
+ * during the "RESULT" event.
+ */
void *cctx;
/**
- * Metadata for the search result.
- */
+ * Metadata for the search result.
+ */
const struct GNUNET_CONTAINER_MetaData *meta;
/**
- * URI for the search result.
- */
+ * URI for the search result.
+ */
const struct GNUNET_FS_Uri *uri;
-
} result_suspend;
/**
- * These values are only valid for
- * #GNUNET_FS_STATUS_SEARCH_RESULT_STOPPED events.
- * These events are automatically triggered for
- * each search result before the
- * #GNUNET_FS_STATUS_SEARCH_STOPPED event. This
- * happens primarily to give the client a chance
- * to clean up the "cctx" (if needed).
- */
+ * These values are only valid for
+ * #GNUNET_FS_STATUS_SEARCH_RESULT_STOPPED events.
+ * These events are automatically triggered for
+ * each search result before the
+ * #GNUNET_FS_STATUS_SEARCH_STOPPED event. This
+ * happens primarily to give the client a chance
+ * to clean up the "cctx" (if needed).
+ */
struct
{
-
/**
- * Private context set for for this result
- * during the "RESULT" event.
- */
+ * Private context set for for this result
+ * during the "RESULT" event.
+ */
void *cctx;
/**
- * Metadata for the search result.
- */
+ * Metadata for the search result.
+ */
const struct GNUNET_CONTAINER_MetaData *meta;
/**
- * URI for the search result.
- */
+ * URI for the search result.
+ */
const struct GNUNET_FS_Uri *uri;
-
} result_stopped;
/**
- * These values are only valid for
- * #GNUNET_FS_STATUS_SEARCH_RESUME events.
- */
+ * These values are only valid for
+ * #GNUNET_FS_STATUS_SEARCH_RESUME events.
+ */
struct
{
-
/**
- * Error message, NULL if we have not encountered any error yet.
- */
+ * Error message, NULL if we have not encountered any error yet.
+ */
const char *message;
/**
- * Is this search currently paused?
- */
+ * Is this search currently paused?
+ */
int is_paused;
-
} resume;
/**
- * These values are only valid for
- * #GNUNET_FS_STATUS_SEARCH_ERROR events.
- */
+ * These values are only valid for
+ * #GNUNET_FS_STATUS_SEARCH_ERROR events.
+ */
struct
{
-
/**
- * Error message.
- */
+ * Error message.
+ */
const char *message;
-
} error;
/**
- * Values for #GNUNET_FS_STATUS_SEARCH_RESULT_NAMESPACE events.
- */
+ * Values for #GNUNET_FS_STATUS_SEARCH_RESULT_NAMESPACE events.
+ */
struct
{
-
/**
- * Short, human-readable name of the namespace.
- */
+ * Short, human-readable name of the namespace.
+ */
const char *name;
/**
- * Root identifier for the namespace, can be NULL.
- */
+ * Root identifier for the namespace, can be NULL.
+ */
const char *root;
/**
- * Metadata for the namespace.
- */
+ * Metadata for the namespace.
+ */
const struct GNUNET_CONTAINER_MetaData *meta;
/**
- * Public key of the namespace.
- */
+ * Public key of the namespace.
+ */
struct GNUNET_CRYPTO_EcdsaPublicKey pseudonym;
-
} ns;
-
} specifics;
-
} search;
/**
*/
struct
{
-
/**
* Context for controlling the unindexing.
*/
*/
union
{
-
/**
- * These values are only valid for
- * #GNUNET_FS_STATUS_UNINDEX_PROGRESS events.
- */
+ * These values are only valid for
+ * #GNUNET_FS_STATUS_UNINDEX_PROGRESS events.
+ */
struct
{
-
/**
- * Data block we just unindexed.
- */
+ * Data block we just unindexed.
+ */
const void *data;
/**
- * At what offset in the file is "data"?
- */
+ * At what offset in the file is "data"?
+ */
uint64_t offset;
/**
- * Length of the data block.
- */
+ * Length of the data block.
+ */
uint64_t data_len;
/**
- * Depth of the given block in the tree;
- * 0 would be the lowest level (DBLOCKS).
- */
+ * Depth of the given block in the tree;
+ * 0 would be the lowest level (DBLOCKS).
+ */
unsigned int depth;
-
} progress;
/**
- * These values are only valid for
- * #GNUNET_FS_STATUS_UNINDEX_RESUME events.
- */
+ * These values are only valid for
+ * #GNUNET_FS_STATUS_UNINDEX_RESUME events.
+ */
struct
{
-
/**
- * Error message, NULL if we have not encountered any error yet.
- */
+ * Error message, NULL if we have not encountered any error yet.
+ */
const char *message;
-
} resume;
/**
- * These values are only valid for
- * #GNUNET_FS_STATUS_UNINDEX_ERROR events.
- */
+ * These values are only valid for
+ * #GNUNET_FS_STATUS_UNINDEX_ERROR events.
+ */
struct
{
-
/**
- * Error message.
- */
+ * Error message.
+ */
const char *message;
-
} error;
-
} specifics;
-
} unindex;
-
} value;
/**
*/
enum GNUNET_FS_OPTIONS
{
-
/**
* Last option in the VARARG list.
*/
*/
struct GNUNET_FS_BlockOptions
{
-
/**
* At what time should the block expire? Data blocks (DBLOCKS and
* IBLOCKS) may still be used even if they are expired (however,
* first place).
*/
uint32_t replication_level;
-
};
struct GNUNET_FS_Handle *
GNUNET_FS_start (const struct GNUNET_CONFIGURATION_Handle *cfg,
const char *client_name,
- GNUNET_FS_ProgressCallback upcb,
+ GNUNET_FS_ProgressCallback upcb,
void *upcb_cls,
- enum GNUNET_FS_Flags flags,
- ...);
+ enum GNUNET_FS_Flags flags,
+ ...);
/**
struct GNUNET_FS_FileInformation *fi,
uint64_t length,
struct GNUNET_CONTAINER_MetaData *meta,
- struct GNUNET_FS_Uri ** uri,
+ struct GNUNET_FS_Uri **uri,
struct GNUNET_FS_BlockOptions *bo,
int *do_index,
void **client_info);
GNUNET_FS_file_information_create_from_file (struct GNUNET_FS_Handle *h,
void *client_info,
const char *filename,
- const struct GNUNET_FS_Uri *keywords,
- const struct GNUNET_CONTAINER_MetaData *meta,
+ const struct
+ GNUNET_FS_Uri *keywords,
+ const struct
+ GNUNET_CONTAINER_MetaData *meta,
int do_index,
- const struct GNUNET_FS_BlockOptions *bo);
+ const struct
+ GNUNET_FS_BlockOptions *bo);
/**
void *client_info,
uint64_t length,
void *data,
- const struct GNUNET_FS_Uri *keywords,
- const struct GNUNET_CONTAINER_MetaData *meta,
+ const struct
+ GNUNET_FS_Uri *keywords,
+ const struct
+ GNUNET_CONTAINER_MetaData *meta,
int do_index,
- const struct GNUNET_FS_BlockOptions *bo);
+ const struct
+ GNUNET_FS_BlockOptions *bo);
/**
GNUNET_FS_publish_start (struct GNUNET_FS_Handle *h,
struct GNUNET_FS_FileInformation *fi,
const struct GNUNET_CRYPTO_EcdsaPrivateKey *ns,
- const char *nid,
+ const char *nid,
const char *nuid,
enum GNUNET_FS_PublishOptions options);
GNUNET_FS_publish_sks (struct GNUNET_FS_Handle *h,
const struct GNUNET_CRYPTO_EcdsaPrivateKey *ns,
const char *identifier,
- const char *update,
+ const char *update,
const struct GNUNET_CONTAINER_MetaData *meta,
const struct GNUNET_FS_Uri *uri,
const struct GNUNET_FS_BlockOptions *bo,
*/
struct GNUNET_FS_UnindexContext *
GNUNET_FS_unindex_start (struct GNUNET_FS_Handle *h,
- const char *filename,
+ const char *filename,
void *cctx);
* @param next_id identifier that should be used for updates
*/
typedef void (*GNUNET_FS_IdentifierProcessor) (void *cls,
- const char *last_id,
- const struct GNUNET_FS_Uri *last_uri,
- const struct GNUNET_CONTAINER_MetaData *last_meta,
- const char *next_id);
+ const char *last_id,
+ const struct
+ GNUNET_FS_Uri *last_uri,
+ const struct
+ GNUNET_CONTAINER_MetaData *
+ last_meta,
+ const char *next_id);
/**
*/
void
GNUNET_FS_namespace_list_updateable (struct GNUNET_FS_Handle *h,
- const struct GNUNET_CRYPTO_EcdsaPrivateKey *ns,
+ const struct
+ GNUNET_CRYPTO_EcdsaPrivateKey *ns,
const char *next_id,
GNUNET_FS_IdentifierProcessor ip,
void *ip_cls);
*/
enum GNUNET_FS_SearchOptions
{
- /**
- * No options (use defaults for everything).
- */
+ /**
+ * No options (use defaults for everything).
+ */
GNUNET_FS_SEARCH_OPTION_NONE = 0,
- /**
- * Only search the local host, do not search remote systems (no P2P)
- */
+ /**
+ * Only search the local host, do not search remote systems (no P2P)
+ */
GNUNET_FS_SEARCH_OPTION_LOOPBACK_ONLY = 1
};
*/
struct GNUNET_FS_SearchResult *
GNUNET_FS_probe (struct GNUNET_FS_Handle *h,
- const struct GNUNET_FS_Uri *uri,
- const struct GNUNET_CONTAINER_MetaData *meta,
- void *client_info,
- uint32_t anonymity);
+ const struct GNUNET_FS_Uri *uri,
+ const struct GNUNET_CONTAINER_MetaData *meta,
+ void *client_info,
+ uint32_t anonymity);
/**
};
-
/**
* Download parts of a file. Note that this will store
* the blocks at the respective offset in the given file. Also, the
GNUNET_FS_download_resume (struct GNUNET_FS_DownloadContext *dc);
-
/* ******************** Directory API *********************** */
* @return NULL if meta data is useless for suggesting a filename
*/
char *
-GNUNET_FS_meta_data_suggest_filename (const struct GNUNET_CONTAINER_MetaData *md);
+GNUNET_FS_meta_data_suggest_filename (const struct
+ GNUNET_CONTAINER_MetaData *md);
/**
*/
int
GNUNET_FS_directory_builder_finish (struct GNUNET_FS_DirectoryBuilder *bld,
- size_t * rsize, void **rdata);
+ size_t *rsize, void **rdata);
/* ******************** DirScanner API *********************** */
*/
enum GNUNET_FS_DirScannerProgressUpdateReason
{
-
/**
* We've started processing a file or directory.
*/
* There was an internal error. Application should abort the scan.
*/
GNUNET_FS_DIRSCANNER_INTERNAL_ERROR
-
};
* @param reason kind of progress we are making
*/
typedef void (*GNUNET_FS_DirScannerProgressCallback) (void *cls,
- const char *filename,
- int is_directory,
- enum GNUNET_FS_DirScannerProgressUpdateReason reason);
+ const char *filename,
+ int is_directory,
+ enum
+ GNUNET_FS_DirScannerProgressUpdateReason
+ reason);
/**
* #GNUNET_YES if this is a directory
*/
int is_directory;
-
};
*/
struct GNUNET_FS_DirScanner *
GNUNET_FS_directory_scan_start (const char *filename,
- int disable_extractor,
- const char *ex,
- GNUNET_FS_DirScannerProgressCallback cb,
- void *cb_cls);
+ int disable_extractor,
+ const char *ex,
+ GNUNET_FS_DirScannerProgressCallback cb,
+ void *cb_cls);
/**