#include "platform.h"#include "gnunet_util_lib.h"#include "gnunet_reclaim_plugin.h"#include "reclaim_attribute.h"Go to the source code of this file.
Data Structures | |
| struct | Plugin |
| Handle for a plugin. More... | |
Functions | |
| static void | add_plugin (void *cls, const char *library_name, void *lib_ret) |
| Add a plugin. | |
| static void | init () |
| Load plugins. | |
| void | RECLAIM_ATTRIBUTE_fini (void) |
| void | __attribute__ ((destructor)) |
| Dual function to init(). | |
| uint32_t | GNUNET_RECLAIM_attribute_typename_to_number (const char *typename) |
| Convert a type name to the corresponding number. | |
| const char * | GNUNET_RECLAIM_attribute_number_to_typename (uint32_t type) |
| Convert a type number to the corresponding type string. | |
| int | GNUNET_RECLAIM_attribute_string_to_value (uint32_t type, const char *s, void **data, size_t *data_size) |
| Convert human-readable version of a 'claim' of an attribute to the binary representation. | |
| char * | GNUNET_RECLAIM_attribute_value_to_string (uint32_t type, const void *data, size_t data_size) |
| Convert the 'claim' of an attribute to a string. | |
| struct GNUNET_RECLAIM_Attribute * | GNUNET_RECLAIM_attribute_new (const char *attr_name, const struct GNUNET_RECLAIM_Identifier *credential, uint32_t type, const void *data, size_t data_size) |
| Create a new attribute claim. | |
| void | GNUNET_RECLAIM_attribute_list_add (struct GNUNET_RECLAIM_AttributeList *al, const char *attr_name, const struct GNUNET_RECLAIM_Identifier *credential, uint32_t type, const void *data, size_t data_size) |
| Add a new attribute to a claim list. | |
| size_t | GNUNET_RECLAIM_attribute_list_serialize_get_size (const struct GNUNET_RECLAIM_AttributeList *al) |
| Get required size for serialization buffer. | |
| size_t | GNUNET_RECLAIM_attribute_list_serialize (const struct GNUNET_RECLAIM_AttributeList *attrs, char *result) |
| Serialize an attribute list. | |
| struct GNUNET_RECLAIM_AttributeList * | GNUNET_RECLAIM_attribute_list_deserialize (const char *data, size_t data_size) |
| Deserialize an attribute list. | |
| struct GNUNET_RECLAIM_AttributeList * | GNUNET_RECLAIM_attribute_list_dup (const struct GNUNET_RECLAIM_AttributeList *attrs) |
| Make a (deep) copy of a claim list. | |
| void | GNUNET_RECLAIM_attribute_list_destroy (struct GNUNET_RECLAIM_AttributeList *al) |
| Destroy claim list. | |
| size_t | GNUNET_RECLAIM_attribute_serialize_get_size (const struct GNUNET_RECLAIM_Attribute *attr) |
| Get required size for serialization buffer. | |
| size_t | GNUNET_RECLAIM_attribute_serialize (const struct GNUNET_RECLAIM_Attribute *attr, char *result) |
| Serialize an attribute. | |
| ssize_t | GNUNET_RECLAIM_attribute_deserialize (const char *data, size_t data_size, struct GNUNET_RECLAIM_Attribute **attr) |
| Deserialize an attribute. | |
Variables | |
| static struct Plugin ** | attr_plugins |
| Plugins. | |
| static unsigned int | num_plugins |
| Number of plugins. | |
| static int | initialized |
| Init canary. | |
|
static |
Add a plugin.
| cls | closure |
| library_name | name of the API library |
| lib_ret | the plugin API pointer |
Definition at line 75 of file reclaim_attribute.c.
References Plugin::api, attr_plugins, GNUNET_array_append, GNUNET_ERROR_TYPE_DEBUG, GNUNET_log, GNUNET_new, GNUNET_strdup, Plugin::library_name, num_plugins, and plugin.
Referenced by init().
|
static |
Load plugins.
Definition at line 94 of file reclaim_attribute.c.
References add_plugin(), GNUNET_OS_project_data_gnunet(), GNUNET_PLUGIN_load_all(), GNUNET_YES, and initialized.
Referenced by GNUNET_RECLAIM_attribute_number_to_typename(), GNUNET_RECLAIM_attribute_string_to_value(), GNUNET_RECLAIM_attribute_typename_to_number(), and GNUNET_RECLAIM_attribute_value_to_string().
| void RECLAIM_ATTRIBUTE_fini | ( | void | ) |
| void __attribute__ | ( | (destructor) | ) |
Dual function to init().
Definition at line 112 of file reclaim_attribute.c.
References attr_plugins, GNUNET_break, GNUNET_free, GNUNET_PLUGIN_unload(), num_plugins, and plugin.
|
static |
Plugins.
Definition at line 52 of file reclaim_attribute.c.
Referenced by __attribute__(), add_plugin(), GNUNET_RECLAIM_attribute_number_to_typename(), GNUNET_RECLAIM_attribute_string_to_value(), GNUNET_RECLAIM_attribute_typename_to_number(), and GNUNET_RECLAIM_attribute_value_to_string().
|
static |
Number of plugins.
Definition at line 58 of file reclaim_attribute.c.
Referenced by __attribute__(), add_plugin(), GNUNET_RECLAIM_attribute_number_to_typename(), GNUNET_RECLAIM_attribute_string_to_value(), GNUNET_RECLAIM_attribute_typename_to_number(), and GNUNET_RECLAIM_attribute_value_to_string().
|
static |