Each plugin is required to return a pointer to a struct of this type as the return value from its entry point. More...
#include <gnunet_datastore_plugin.h>
Data Fields | |
| void * | cls |
| Closure to use for all of the following callbacks (except "next_request"). | |
| PluginEstimateSize | estimate_size |
| Calculate the current on-disk size of the SQ store. | |
| PluginPut | put |
| Function to store an item in the datastore. | |
| PluginGetKey | get_key |
| Get a particular datum matching a given hash from the datastore. | |
| PluginGetType | get_zero_anonymity |
| Get datum (of the specified type) with anonymity level zero. | |
| PluginGetRandom | get_replication |
| Function to get a random item with high replication score from the database, lowering the item's replication score. | |
| PluginGetRandom | get_expiration |
| Function to get a random expired item or, if none are expired, either the oldest entry or one with a low priority (depending on what was efficiently implementable). | |
| PluginDrop | drop |
| Delete the database. | |
| PluginGetKeys | get_keys |
| Iterate over all keys in the database. | |
| PluginRemoveKey | remove_key |
| Function to remove an item from the database. | |
Each plugin is required to return a pointer to a struct of this type as the return value from its entry point.
Definition at line 319 of file gnunet_datastore_plugin.h.
| void* GNUNET_DATASTORE_PluginFunctions::cls |
Closure to use for all of the following callbacks (except "next_request").
Definition at line 325 of file gnunet_datastore_plugin.h.
Referenced by cleaning_task(), delete_expired(), disk_utilization_change_cb(), handle_get(), handle_get_key(), handle_get_replication(), handle_get_zero_anonymity(), handle_put(), handle_remove(), libgnunet_plugin_datastore_heap_done(), libgnunet_plugin_datastore_postgres_done(), libgnunet_plugin_datastore_sqlite_done(), libgnunet_plugin_datastore_sqlite_init(), libgnunet_plugin_datastore_template_done(), manage_space(), and process_stat_done().
| PluginEstimateSize GNUNET_DATASTORE_PluginFunctions::estimate_size |
Calculate the current on-disk size of the SQ store.
Estimates are fine, if that's the only thing available.
Definition at line 331 of file gnunet_datastore_plugin.h.
Referenced by disk_utilization_change_cb(), libgnunet_plugin_datastore_sqlite_init(), and process_stat_done().
| PluginPut GNUNET_DATASTORE_PluginFunctions::put |
Function to store an item in the datastore.
Definition at line 336 of file gnunet_datastore_plugin.h.
Referenced by handle_put(), and libgnunet_plugin_datastore_sqlite_init().
| PluginGetKey GNUNET_DATASTORE_PluginFunctions::get_key |
Get a particular datum matching a given hash from the datastore.
Definition at line 341 of file gnunet_datastore_plugin.h.
Referenced by handle_get(), handle_get_key(), and libgnunet_plugin_datastore_sqlite_init().
| PluginGetType GNUNET_DATASTORE_PluginFunctions::get_zero_anonymity |
Get datum (of the specified type) with anonymity level zero.
Definition at line 346 of file gnunet_datastore_plugin.h.
Referenced by handle_get_zero_anonymity(), and libgnunet_plugin_datastore_sqlite_init().
| PluginGetRandom GNUNET_DATASTORE_PluginFunctions::get_replication |
Function to get a random item with high replication score from the database, lowering the item's replication score.
Returns a single random item from those with the highest replication counters. The item's replication counter is decremented by one IF it was positive before.
Definition at line 355 of file gnunet_datastore_plugin.h.
Referenced by handle_get_replication(), and libgnunet_plugin_datastore_sqlite_init().
| PluginGetRandom GNUNET_DATASTORE_PluginFunctions::get_expiration |
Function to get a random expired item or, if none are expired, either the oldest entry or one with a low priority (depending on what was efficiently implementable).
Definition at line 362 of file gnunet_datastore_plugin.h.
Referenced by delete_expired(), libgnunet_plugin_datastore_sqlite_init(), and manage_space().
| PluginDrop GNUNET_DATASTORE_PluginFunctions::drop |
Delete the database.
The next operation is guaranteed to be unloading of the module.
Definition at line 368 of file gnunet_datastore_plugin.h.
Referenced by cleaning_task(), and libgnunet_plugin_datastore_sqlite_init().
| PluginGetKeys GNUNET_DATASTORE_PluginFunctions::get_keys |
Iterate over all keys in the database.
Definition at line 373 of file gnunet_datastore_plugin.h.
Referenced by libgnunet_plugin_datastore_sqlite_init(), and process_stat_done().
| PluginRemoveKey GNUNET_DATASTORE_PluginFunctions::remove_key |
Function to remove an item from the database.
Definition at line 378 of file gnunet_datastore_plugin.h.
Referenced by handle_remove(), and libgnunet_plugin_datastore_sqlite_init().