HKDF (does not work yet)
[oweals/gnunet.git] / src / include / gnunet_fs_service.h
index 90fde35f5e5dba4aa4f3feb9b543456f82a9ac9d..9495731ea0ea0eea55f2960864e06cbdbcbf68ba 100644 (file)
@@ -749,9 +749,8 @@ struct GNUNET_FS_ProgressInfo
 
       /**
        * Context for controlling the upload.
-       * FIXME: rename to 'pc'.
        */
-      struct GNUNET_FS_PublishContext *sc;
+      struct GNUNET_FS_PublishContext *pc;
 
       /**
        * Information about the file that is being publishd.
@@ -961,6 +960,11 @@ struct GNUNET_FS_ProgressInfo
        */
       uint32_t anonymity;
 
+      /**
+       * Is the download currently active.
+       */
+      int is_active;
+
       /**
        * Additional values for specific events.
        */
@@ -1600,6 +1604,7 @@ GNUNET_FS_meta_data_extract_from_file (struct
  * @param uri pointer to the keywords that will be used for this entry (can be modified)
  * @param anonymity pointer to selected anonymity level (can be modified)
  * @param priority pointer to selected priority (can be modified)
+ * @param do_index should we index (can be modified)
  * @param expirationTime pointer to selected expiration time (can be modified)
  * @param client_info pointer to client context set upon creation (can be modified)
  * @return GNUNET_OK to continue, GNUNET_NO to remove
@@ -1613,6 +1618,7 @@ typedef int (*GNUNET_FS_FileInformationProcessor)(void *cls,
                                                  struct GNUNET_FS_Uri **uri,
                                                  uint32_t *anonymity,
                                                  uint32_t *priority,
+                                                 int *do_index,
                                                  struct GNUNET_TIME_Absolute *expirationTime,
                                                  void **client_info);
 
@@ -1896,6 +1902,16 @@ GNUNET_FS_file_information_create_empty_directory (struct GNUNET_FS_Handle *h,
                                                   struct GNUNET_TIME_Absolute expirationTime);
 
 
+/**
+ * Test if a given entry represents a directory.
+ *
+ * @param ent check if this FI represents a directory
+ * @return GNUNET_YES if so, GNUNET_NO if not
+ */
+int
+GNUNET_FS_file_information_is_directory (struct GNUNET_FS_FileInformation *ent);
+
+
 /**
  * Add an entry to a directory in a publish-structure.  Clients
  * should never modify publish structures that were passed to
@@ -2586,8 +2602,11 @@ typedef void (*GNUNET_FS_DirectoryEntryProcessor)(void *cls,
  * @param offset offset of data in the directory
  * @param dep function to call on each entry
  * @param dep_cls closure for dep
+ * @return GNUNET_OK if this could be a block in a directory,
+ *         GNUNET_NO if this could be part of a directory (but not 100% OK)
+ *         GNUNET_SYSERR if 'data' does not represent a directory
  */
-void 
+int 
 GNUNET_FS_directory_list_contents (size_t size,
                                   const void *data,
                                   uint64_t offset,