[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnunet] branch master updated: -minor adaptations to match up schanzen'
From: |
gnunet |
Subject: |
[gnunet] branch master updated: -minor adaptations to match up schanzen's block API and my block plugin API |
Date: |
Tue, 28 Dec 2021 23:57:36 +0100 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository gnunet.
The following commit(s) were added to refs/heads/master by this push:
new ae843638a -minor adaptations to match up schanzen's block API and my
block plugin API
ae843638a is described below
commit ae843638aa1bfd4b35f42549655ce1a5e6ce2c39
Author: Christian Grothoff <grothoff@gnunet.org>
AuthorDate: Tue Dec 28 23:57:33 2021 +0100
-minor adaptations to match up schanzen's block API and my block plugin API
---
src/include/gnunet_block_lib.h | 43 ++++++++++++++++++++++++------------------
1 file changed, 25 insertions(+), 18 deletions(-)
diff --git a/src/include/gnunet_block_lib.h b/src/include/gnunet_block_lib.h
index 50306b003..78ade8218 100644
--- a/src/include/gnunet_block_lib.h
+++ b/src/include/gnunet_block_lib.h
@@ -393,6 +393,8 @@ GNUNET_BLOCK_evaluate (struct GNUNET_BLOCK_Context *ctx,
* @param type block type
* @param group block group to use for evaluation
* @param query original query (hash)
+ * @param xquery extrended query data (can be NULL, depending on type)
+ * @param xquery_size number of bytes in @a xquery
* @param reply_block response to validate
* @param reply_block_size number of bytes in @a reply_block
* @return characterization of result
@@ -402,6 +404,8 @@ GNUNET_BLOCK_evaluate_reply (struct GNUNET_BLOCK_Context
*ctx,
enum GNUNET_BLOCK_Type type,
struct GNUNET_BLOCK_Group *group,
const struct GNUNET_HashCode *query,
+ const void *xquery,
+ size_t xquery_size,
const void *reply_block,
size_t reply_block_size);
@@ -412,35 +416,38 @@ GNUNET_BLOCK_evaluate_reply (struct GNUNET_BLOCK_Context
*ctx,
*
* @param ctx block contxt
* @param type block type
- * @param eo evaluation options to control evaluation
* @param query original query (hash)
* @param xquery extrended query data (can be NULL, depending on type)
* @param xquery_size number of bytes in @a xquery
- * @return characterization of result
+ * @return #GNUNET_OK if the block is fine, #GNUNET_NO if not,
+ * #GNUNET_SYSERR if @a type is not supported
*/
-enum GNUNET_BLOCK_RequestEvaluationResult
-GNUNET_BLOCK_evaluate_get_request (struct GNUNET_BLOCK_Context *ctx,
- enum GNUNET_BLOCK_Type type,
- const struct GNUNET_HashCode *query,
- const void *xquery,
- size_t xquery_size);
+enum GNUNET_GenericReturnValue
+GNUNET_BLOCK_evaluate_request (struct GNUNET_BLOCK_Context *ctx,
+ enum GNUNET_BLOCK_Type type,
+ const struct GNUNET_HashCode *query,
+ const void *xquery,
+ size_t xquery_size);
+
/**
- * Function called to validate a request.
+ * Function called to validate a block.
*
* @param ctx block contxt
* @param type block type
* @param query query key (hash)
* @param block payload to put
* @param block_size number of bytes in @a block
- * @return characterization of result
+ * @return #GNUNET_OK if the block is fine, #GNUNET_NO if not,
+ * #GNUNET_SYSERR if @a type is not supported
*/
enum GNUNET_BLOCK_RequestEvaluationResult
-GNUNET_BLOCK_evaluate_put_request (struct GNUNET_BLOCK_Context *ctx,
- enum GNUNET_BLOCK_Type type,
- const struct GNUNET_HashCode *query,
- const void *block,
- size_t block_size);
+GNUNET_BLOCK_evaluate_block (struct GNUNET_BLOCK_Context *ctx,
+ enum GNUNET_BLOCK_Type type,
+ const struct GNUNET_HashCode *query,
+ const void *block,
+ size_t block_size);
+
/**
* Function called to obtain the key for a block.
@@ -481,7 +488,7 @@ GNUNET_BLOCK_validate_key (struct GNUNET_BLOCK_Context *ctx,
* #GNUNET_SYSERR if type not supported
* (or if extracting a key from a block of this type does not work)
*/
-int
+enum GNUNET_GenericReturnValue
GNUNET_BLOCK_get_key (struct GNUNET_BLOCK_Context *ctx,
enum GNUNET_BLOCK_Type type,
const void *block,
@@ -500,7 +507,7 @@ GNUNET_BLOCK_get_key (struct GNUNET_BLOCK_Context *ctx,
* @param seen_results_count number of entries in @a seen_results
* @return #GNUNET_SYSERR if not supported, #GNUNET_OK on success
*/
-int
+enum GNUNET_GenericReturnValue
GNUNET_BLOCK_group_set_seen (struct GNUNET_BLOCK_Group *bg,
const struct GNUNET_HashCode *seen_results,
unsigned int seen_results_count);
@@ -518,7 +525,7 @@ GNUNET_BLOCK_group_set_seen (struct GNUNET_BLOCK_Group *bg,
* #GNUNET_NO if merge failed due to different nonce
* #GNUNET_SYSERR if merging is not supported
*/
-int
+enum GNUNET_GenericReturnValue
GNUNET_BLOCK_group_merge (struct GNUNET_BLOCK_Group *bg1,
struct GNUNET_BLOCK_Group *bg2);
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gnunet] branch master updated: -minor adaptations to match up schanzen's block API and my block plugin API,
gnunet <=