34#ifndef PLUGIN_DATACACHE_H
35#define PLUGIN_DATACACHE_H
118 uint32_t xor_distance,
171 unsigned int num_results,
struct GNUNET_HashCode key
The key used in the DHT.
static uint32_t type
Type string converted to DNS type value.
GNUNET_BLOCK_Type
WARNING: This header is generated! In order to add DHT block types, you must register them in GANA,...
void(* GNUNET_DATACACHE_DeleteNotifyCallback)(void *cls, const struct GNUNET_HashCode *key, size_t size)
Function called by plugins to notify the datacache about content deletions.
enum GNUNET_GenericReturnValue(* GNUNET_DATACACHE_Iterator)(void *cls, const struct GNUNET_DATACACHE_Block *block)
An iterator over a set of items stored in the datacache.
GNUNET_GenericReturnValue
Named constants for return values.
static unsigned int size
Size of the "table".
Information about a block stored in the datacache.
The datastore service will pass a pointer to a struct of this type as the first and only argument to ...
const char * section
Configuration section to use.
const struct GNUNET_CONFIGURATION_Handle * cfg
Configuration to use.
GNUNET_DATACACHE_DeleteNotifyCallback delete_notify
Function to call whenever the plugin needs to discard content that it was asked to store.
void * cls
Closure to use for callbacks.
unsigned long long quota
How much space are we allowed to use?
struct returned by the initialization function of the plugin
void * cls
Closure to pass to all plugin functions.
unsigned int(* get)(void *cls, const struct GNUNET_HashCode *key, enum GNUNET_BLOCK_Type type, GNUNET_DATACACHE_Iterator iter, void *iter_cls)
Iterate over the results for a particular key in the datastore.
unsigned int(* get_closest)(void *cls, const struct GNUNET_HashCode *key, enum GNUNET_BLOCK_Type type, unsigned int num_results, GNUNET_DATACACHE_Iterator iter, void *iter_cls)
Iterate over the results that are "close" to a particular key in the datacache.
enum GNUNET_GenericReturnValue(* del)(void *cls)
Delete the entry with the lowest expiration value from the datacache right now.
ssize_t(* put)(void *cls, uint32_t xor_distance, const struct GNUNET_DATACACHE_Block *block)
Store an item in the datastore.