[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r8932 - in gnunet/src: fs include
From: |
gnunet |
Subject: |
[GNUnet-SVN] r8932 - in gnunet/src: fs include |
Date: |
Wed, 2 Sep 2009 13:55:10 -0600 |
Author: grothoff
Date: 2009-09-02 13:55:10 -0600 (Wed, 02 Sep 2009)
New Revision: 8932
Modified:
gnunet/src/fs/fs_unindex.c
gnunet/src/include/gnunet_fs_service.h
Log:
finishing first run at unindex
Modified: gnunet/src/fs/fs_unindex.c
===================================================================
--- gnunet/src/fs/fs_unindex.c 2009-09-02 19:49:23 UTC (rev 8931)
+++ gnunet/src/fs/fs_unindex.c 2009-09-02 19:55:10 UTC (rev 8932)
@@ -144,31 +144,8 @@
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!
-}
-
-
/**
* Fill in all of the generic fields for
* an unindex event.
@@ -195,6 +172,38 @@
/**
+ * 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.
*
Modified: gnunet/src/include/gnunet_fs_service.h
===================================================================
--- gnunet/src/include/gnunet_fs_service.h 2009-09-02 19:49:23 UTC (rev
8931)
+++ gnunet/src/include/gnunet_fs_service.h 2009-09-02 19:55:10 UTC (rev
8932)
@@ -920,6 +920,14 @@
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.
*/
unsigned int trust_offered;
@@ -1327,6 +1335,14 @@
*/
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;
/**
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r8932 - in gnunet/src: fs include,
gnunet <=