* @param key wherer to store the unique key
*/
void
-GNUNET_FS_uri_to_key (const struct GNUNET_FS_Uri *uri, GNUNET_HashCode * key);
+GNUNET_FS_uri_to_key (const struct GNUNET_FS_Uri *uri, struct GNUNET_HashCode * key);
/**
* Convert a URI to a UTF-8 String.
* @return an FS URI for the given namespace and identifier
*/
struct GNUNET_FS_Uri *
-GNUNET_FS_uri_sks_create_from_nsid (GNUNET_HashCode * nsid, const char *id);
+GNUNET_FS_uri_sks_create_from_nsid (struct GNUNET_HashCode * nsid, const char *id);
/**
*/
int
GNUNET_FS_uri_sks_get_namespace (const struct GNUNET_FS_Uri *uri,
- GNUNET_HashCode * nsid);
+ struct GNUNET_HashCode * nsid);
/**
*/
uint64_t data_len;
+ /**
+ * 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).
unsigned int depth;
/**
- * How much trust did we offer for downloading this block?
+ * 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).
*/
- unsigned int trust_offered;
+ uint32_t respect_offered;
/**
- * How much time passed between us asking for this block and
- * actually getting it? GNUNET_TIME_UNIT_FOREVER_REL if unknown.
+ * 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).
*/
- struct GNUNET_TIME_Relative block_download_duration;
+ uint32_t num_transmissions;
} progress;
/**
* Hash-identifier for the namespace.
*/
- GNUNET_HashCode id;
+ struct GNUNET_HashCode id;
} namespace;
* @param cls closure
* @param offset offset to read from; it is possible
* that the caller might need to go backwards
- * a bit at times
+ * a bit at times; set to UINT64_MAX to tell
+ * the reader that we won't be reading for a while
+ * (used to close the file descriptor but NOT fully
+ * clean up the reader's state); in this case,
+ * a value of '0' for max should be ignored
* @param max maximum number of bytes that should be
* copied to buf; readers are not allowed
* to provide less data unless there is an error;
* @return GNUNET_OK to continue iteration, GNUNET_SYSERR to abort
*/
typedef int (*GNUNET_FS_IndexedFileProcessor) (void *cls, const char *filename,
- const GNUNET_HashCode * file_id);
+ const struct GNUNET_HashCode * file_id);
/**
/**
* Abort the namespace advertisement operation.
*
- * @param pkc context of the operation to abort.
+ * @param ac context of the operation to abort.
*/
void
GNUNET_FS_namespace_advertise_cancel (struct GNUNET_FS_AdvertisementContext *ac);
*
* @param h handle to the file sharing subsystem
* @param name name to use for the namespace
- * @return handle to the namespace, NULL on error
+ * @return handle to the namespace, NULL on error (i.e. invalid filename)
*/
struct GNUNET_FS_Namespace *
GNUNET_FS_namespace_create (struct GNUNET_FS_Handle *h, const char *name);
* @param id hash identifier for the namespace
*/
typedef void (*GNUNET_FS_NamespaceInfoProcessor) (void *cls, const char *name,
- const GNUNET_HashCode * id);
+ const struct GNUNET_HashCode * id);
/**