58 unsigned int seen_results_count);
87 size_t *raw_data_size);
108 struct GNUENT_BLOCK_Context *
ctx;
159(*GNUNET_BLOCK_GroupCreateFunction)(
void *cls,
161 const void *raw_data,
162 size_t raw_data_size,
223 const void *reply_block,
224 size_t reply_block_size);
struct GNUNET_HashCode key
The key used in the DHT.
static uint32_t type
Type string converted to DNS type value.
Library for data block manipulation.
enum GNUNET_BLOCK_ReplyEvaluationResult(* GNUNET_BLOCK_ReplyEvaluationFunction)(void *cls, 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)
Function called to validate a reply to a request.
enum GNUNET_GenericReturnValue(* GNUNET_BLOCK_QueryEvaluationFunction)(void *cls, enum GNUNET_BLOCK_Type type, const struct GNUNET_HashCode *query, const void *xquery, size_t xquery_size)
Function called to validate a query.
enum GNUNET_GenericReturnValue(* GNUNET_BLOCK_BlockEvaluationFunction)(void *cls, enum GNUNET_BLOCK_Type type, const void *block, size_t block_size)
Function called to validate a block for storage.
struct GNUNET_BLOCK_Group *(* GNUNET_BLOCK_GroupCreateFunction)(void *cls, enum GNUNET_BLOCK_Type type, const void *raw_data, size_t raw_data_size, va_list va)
Create a new block group.
void(* GNUNET_BLOCK_GroupMarkSeenFunction)(struct GNUNET_BLOCK_Group *bg, const struct GNUNET_HashCode *seen_results, unsigned int seen_results_count)
Mark elements as "seen" using a hash of the element.
enum GNUNET_GenericReturnValue(* GNUNET_BLOCK_GroupSerializeFunction)(struct GNUNET_BLOCK_Group *bg, void **raw_data, size_t *raw_data_size)
Serialize state of a block group.
enum GNUNET_GenericReturnValue(* GNUNET_BLOCK_GetKeyFunction)(void *cls, enum GNUNET_BLOCK_Type type, const void *block, size_t block_size, struct GNUNET_HashCode *key)
Function called to obtain the key for a block.
void(* GNUNET_BLOCK_GroupDestroyFunction)(struct GNUNET_BLOCK_Group *bg)
Destroy resources used by a block group.
enum GNUNET_GenericReturnValue(* GNUNET_BLOCK_GroupMergeFunction)(struct GNUNET_BLOCK_Group *bg1, const struct GNUNET_BLOCK_Group *bg2)
Merge two groups, if possible.
GNUNET_BLOCK_ReplyEvaluationResult
Possible ways for how a block may relate to a query.
GNUNET_GenericReturnValue
Named constants for return values.
GNUNET_BLOCK_Type
WARNING: This header is generated! In order to add DHT block types, you must register them in GANA,...
GNUNET_BLOCK_GroupMergeFunction merge_cb
Function to call to merge two groups.
GNUNET_BLOCK_GroupDestroyFunction destroy_cb
Function to call to destroy the block group.
GNUNET_BLOCK_GroupMarkSeenFunction mark_seen_cb
Function to call to mark elements as seen in the group.
struct GNUENT_BLOCK_Context * ctx
Context owning the block group.
void * internal_cls
Internal data structure of the plugin.
GNUNET_BLOCK_GroupSerializeFunction serialize_cb
Serialize the block group data, can be NULL if not supported.
enum GNUNET_BLOCK_Type type
Type for the block group.
Each plugin is required to return a pointer to a struct of this type as the return value from its ent...
enum GNUNET_BLOCK_Type * types
0-terminated array of block types supported by this plugin.
GNUNET_BLOCK_QueryEvaluationFunction check_query
Check that a query is well-formed.
GNUNET_BLOCK_BlockEvaluationFunction check_block
Check that a block is well-formed.
GNUNET_BLOCK_GetKeyFunction get_key
Obtain the key for a given block (if possible).
GNUNET_BLOCK_ReplyEvaluationFunction check_reply
Check that a reply block matches a query.
GNUNET_BLOCK_GroupCreateFunction create_group
Create a block group to process a bunch of blocks in a shared context (i.e.
void * cls
Closure for all of the callbacks.