GNUnet  0.10.x
Data Structures | Typedefs
reclaim plugin API for attributes/claims

Data Structures

struct  GNUNET_RECLAIM_ATTRIBUTE_PluginFunctions
 Each plugin is required to return a pointer to a struct of this type as the return value from its entry point. More...
 

Typedefs

typedef char *(* GNUNET_RECLAIM_ATTRIBUTE_ValueToStringFunction) (void *cls, uint32_t type, const void *data, size_t data_size)
 Function called to convert the binary value data of an attribute of type type to a human-readable string. More...
 
typedef int(* GNUNET_RECLAIM_ATTRIBUTE_StringToValueFunction) (void *cls, uint32_t type, const char *s, void **data, size_t *data_size)
 Function called to convert human-readable version of the value s of an attribute of type type to the respective binary representation. More...
 
typedef uint32_t(* GNUNET_RECLAIM_ATTRIBUTE_TypenameToNumberFunction) (void *cls, const char *typename)
 Function called to convert a type name to the corresponding number. More...
 
typedef const char *(* GNUNET_RECLAIM_ATTRIBUTE_NumberToTypenameFunction) (void *cls, uint32_t type)
 Function called to convert a type number (i.e. More...
 

Detailed Description

Typedef Documentation

◆ GNUNET_RECLAIM_ATTRIBUTE_ValueToStringFunction

typedef char*(* GNUNET_RECLAIM_ATTRIBUTE_ValueToStringFunction) (void *cls, uint32_t type, const void *data, size_t data_size)

Function called to convert the binary value data of an attribute of type type to a human-readable string.

Parameters
clsclosure
typetype of the attribute
datavalue in binary encoding
data_sizenumber of bytes in data
Returns
NULL on error, otherwise human-readable representation of the value

Definition at line 54 of file gnunet_reclaim_attribute_plugin.h.

◆ GNUNET_RECLAIM_ATTRIBUTE_StringToValueFunction

typedef int(* GNUNET_RECLAIM_ATTRIBUTE_StringToValueFunction) (void *cls, uint32_t type, const char *s, void **data, size_t *data_size)

Function called to convert human-readable version of the value s of an attribute of type type to the respective binary representation.

Parameters
clsclosure
typetype of the attribute
shuman-readable string
dataset to value in binary encoding (will be allocated)
data_sizeset to number of bytes in data
Returns
GNUNET_OK on success

Definition at line 73 of file gnunet_reclaim_attribute_plugin.h.

◆ GNUNET_RECLAIM_ATTRIBUTE_TypenameToNumberFunction

typedef uint32_t(* GNUNET_RECLAIM_ATTRIBUTE_TypenameToNumberFunction) (void *cls, const char *typename)

Function called to convert a type name to the corresponding number.

Parameters
clsclosure
typenamename to convert
Returns
corresponding number, UINT32_MAX on error

Definition at line 89 of file gnunet_reclaim_attribute_plugin.h.

◆ GNUNET_RECLAIM_ATTRIBUTE_NumberToTypenameFunction

typedef const char*(* GNUNET_RECLAIM_ATTRIBUTE_NumberToTypenameFunction) (void *cls, uint32_t type)

Function called to convert a type number (i.e.

1) to the corresponding type string

Parameters
clsclosure
typenumber of a type to convert
Returns
corresponding typestring, NULL on error

Definition at line 102 of file gnunet_reclaim_attribute_plugin.h.