GNUnet  0.11.x
Functions
023.c File Reference

Go to the source code of this file.

Functions

void * libgnunet_plugin_block_SERVICE_init (void *cls)
 

Function Documentation

◆ libgnunet_plugin_block_SERVICE_init()

void* libgnunet_plugin_block_SERVICE_init ( void *  cls)

Definition at line 2 of file 023.c.

References block_plugin_SERVICE_get_key(), GNUNET_BLOCK_PluginFunctions::evaluate, GNUNET_BLOCK_PluginFunctions::get_key, GNUNET_BLOCK_TYPE_ANY, GNUNET_new, and GNUNET_BLOCK_PluginFunctions::types.

3 {
4  static enum GNUNET_BLOCK_Type types[] =
5  {
6  GNUNET_BLOCK_TYPE_SERVICE_BLOCKYPE,
8  };
10 
12  api->evaluate = &block_plugin_SERICE_evaluate;
14  api->types = types;
15  return api;
16 }
enum GNUNET_BLOCK_Type * types
0-terminated array of block types supported by this plugin.
Any type of block, used as a wildcard when searching.
GNUNET_BLOCK_EvaluationFunction evaluate
Main function of a block plugin.
GNUNET_BLOCK_Type
Blocks in the datastore and the datacache must have a unique type.
Each plugin is required to return a pointer to a struct of this type as the return value from its ent...
#define GNUNET_new(type)
Allocate a struct or union of the given type.
static int block_plugin_SERVICE_get_key(void *cls, enum GNUNET_BLOCK_Type type, const void *block, size_t block_size, struct GNUNET_HashCode *key)
Definition: 022.c:2
GNUNET_BLOCK_GetKeyFunction get_key
Obtain the key for a given block (if possible).
Here is the call graph for this function: