struct returned by the initialization function of the plugin More...
#include <gnunet_peerstore_plugin.h>
Data Fields | |
void * | cls |
Closure to pass to all plugin functions. More... | |
int(* | store_record )(void *cls, const char *sub_system, const struct GNUNET_PeerIdentity *peer, const char *key, const void *value, size_t size, struct GNUNET_TIME_Absolute expiry, enum GNUNET_PEERSTORE_StoreOption options, GNUNET_PEERSTORE_Continuation cont, void *cont_cls) |
Store a record in the peerstore. More... | |
int(* | iterate_records )(void *cls, const char *sub_system, const struct GNUNET_PeerIdentity *peer, const char *key, GNUNET_PEERSTORE_Processor iter, void *iter_cls) |
Iterate over the records given an optional peer id and/or key. More... | |
int(* | expire_records )(void *cls, struct GNUNET_TIME_Absolute now, GNUNET_PEERSTORE_Continuation cont, void *cont_cls) |
Delete expired records (expiry < now) More... | |
struct returned by the initialization function of the plugin
Definition at line 53 of file gnunet_peerstore_plugin.h.
void* GNUNET_PEERSTORE_PluginFunctions::cls |
Closure to pass to all plugin functions.
Definition at line 58 of file gnunet_peerstore_plugin.h.
Referenced by cleanup_expired_records(), handle_iterate(), handle_store(), libgnunet_plugin_peerstore_flat_done(), libgnunet_plugin_peerstore_flat_init(), libgnunet_plugin_peerstore_sqlite_done(), and libgnunet_plugin_peerstore_sqlite_init().
int(* GNUNET_PEERSTORE_PluginFunctions::store_record) (void *cls, const char *sub_system, const struct GNUNET_PeerIdentity *peer, const char *key, const void *value, size_t size, struct GNUNET_TIME_Absolute expiry, enum GNUNET_PEERSTORE_StoreOption options, GNUNET_PEERSTORE_Continuation cont, void *cont_cls) |
Store a record in the peerstore.
Key is the combination of sub system and peer identity. One key can store multiple values.
cls | closure (internal context for the plugin) |
sub_system | name of the GNUnet sub system responsible |
peer | peer identity |
value | value to be stored |
size | size of value to be stored |
expiry | absolute time after which the record is (possibly) deleted |
options | options related to the store operation |
cont | continuation called when record is stored |
cont_cls | continuation closure |
Definition at line 76 of file gnunet_peerstore_plugin.h.
Referenced by handle_store(), libgnunet_plugin_peerstore_flat_init(), and libgnunet_plugin_peerstore_sqlite_init().
int(* GNUNET_PEERSTORE_PluginFunctions::iterate_records) (void *cls, const char *sub_system, const struct GNUNET_PeerIdentity *peer, const char *key, GNUNET_PEERSTORE_Processor iter, void *iter_cls) |
Iterate over the records given an optional peer id and/or key.
cls | closure (internal context for the plugin) |
sub_system | name of sub system |
peer | Peer identity (can be NULL) |
key | entry key string (can be NULL) |
iter | function to call asynchronously with the results, terminated by a NULL result |
iter_cls | closure for iter |
Definition at line 102 of file gnunet_peerstore_plugin.h.
Referenced by handle_iterate(), libgnunet_plugin_peerstore_flat_init(), and libgnunet_plugin_peerstore_sqlite_init().
int(* GNUNET_PEERSTORE_PluginFunctions::expire_records) (void *cls, struct GNUNET_TIME_Absolute now, GNUNET_PEERSTORE_Continuation cont, void *cont_cls) |
Delete expired records (expiry < now)
cls | closure (internal context for the plugin) |
now | time to use as reference |
cont | continuation called with the number of records expired |
cont_cls | continuation closure |
Definition at line 120 of file gnunet_peerstore_plugin.h.
Referenced by cleanup_expired_records(), libgnunet_plugin_peerstore_flat_init(), and libgnunet_plugin_peerstore_sqlite_init().