uc,
GNUNET_CONSTANTS_SERVICE_TIMEOUT);
}
-
-
-/**
- * Function called with information about our
- * progress in computing the tree encoding.
- *
- * @param cls closure
- * @param offset where are we in the file
- * @param pt_block plaintext of the currently processed block
- * @param pt_size size of pt_block
- * @param depth depth of the block in the tree
- */
-static void
-unindex_progress (void *cls,
- uint64_t offset,
- const void *pt_block,
- size_t pt_size,
- unsigned int depth)
-{
- struct GNUNET_FS_UnindexContext *uc = cls;
- // FIXME: call callback!
-}
-
/**
}
+/**
+ * Function called with information about our
+ * progress in computing the tree encoding.
+ *
+ * @param cls closure
+ * @param offset where are we in the file
+ * @param pt_block plaintext of the currently processed block
+ * @param pt_size size of pt_block
+ * @param depth depth of the block in the tree
+ */
+static void
+unindex_progress (void *cls,
+ uint64_t offset,
+ const void *pt_block,
+ size_t pt_size,
+ unsigned int depth)
+{
+ struct GNUNET_FS_UnindexContext *uc = cls;
+ struct GNUNET_FS_ProgressInfo pi;
+
+ pi.status = GNUNET_FS_STATUS_UNINDEX_PROGRESS;
+ make_unindex_status (&pi, uc, offset);
+ pi.value.unindex.specifics.progress.data = pt_block;
+ pi.value.unindex.specifics.progress.offset = offset;
+ pi.value.unindex.specifics.progress.data_len = pt_size;
+ pi.value.unindex.specifics.progress.depth = depth;
+ uc->client_info
+ = uc->h->upcb (uc->h->upcb_cls,
+ &pi);
+}
+
+
/**
* We've encountered an error during
* unindexing. Signal the client.
*/
uint64_t data_len;
+ /**
+ * Depth of the given block in the tree;
+ * 0 would be the highest level (the first
+ * call is guaranteed to be for the lowest
+ * level).
+ */
+ unsigned int depth;
+
/**
* Amount of trust we offered to get the block.
*/
*/
uint64_t data_len;
+ /**
+ * Depth of the given block in the tree;
+ * 0 would be the highest level (the first
+ * call is guaranteed to be for the lowest
+ * level).
+ */
+ unsigned int depth;
+
} progress;
/**