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. | |
| 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. | |
| int(* | iterate_records )(void *cls, const char *sub_system, const struct GNUNET_PeerIdentity *peer, const char *key, uint64_t serial, uint64_t limit, GNUNET_PEERSTORE_PluginProcessor iter, void *iter_cls) |
| Iterate over the records given an optional peer id and/or key. | |
| int(* | expire_records )(void *cls, struct GNUNET_TIME_Absolute now, GNUNET_PEERSTORE_Continuation cont, void *cont_cls) |
| Delete expired records (expiry < now) | |
struct returned by the initialization function of the plugin
Definition at line 66 of file gnunet_peerstore_plugin.h.
| void* GNUNET_PEERSTORE_PluginFunctions::cls |
Closure to pass to all plugin functions.
Definition at line 71 of file gnunet_peerstore_plugin.h.
Referenced by cleanup_expired_records(), handle_store(), hosts_directory_scan_callback(), libgnunet_plugin_peerstore_sqlite_done(), libgnunet_plugin_peerstore_sqlite_init(), monitor_iteration_next(), and run_iteration_round().
| 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 89 of file gnunet_peerstore_plugin.h.
Referenced by handle_store(), hosts_directory_scan_callback(), 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, uint64_t serial, uint64_t limit, GNUNET_PEERSTORE_PluginProcessor 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) |
| limit | max number of results to give |
| iter | function to call asynchronously with the results, terminated by a NULL result |
| iter_cls | closure for iter |
Definition at line 116 of file gnunet_peerstore_plugin.h.
Referenced by libgnunet_plugin_peerstore_sqlite_init(), monitor_iteration_next(), and run_iteration_round().
| 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 136 of file gnunet_peerstore_plugin.h.
Referenced by cleanup_expired_records(), and libgnunet_plugin_peerstore_sqlite_init().