GNUnet 0.22.2
gnunet_datastore_service.h File Reference

datastore service More...

#include "gnunet_util_lib.h"
#include "gnunet_block_lib.h"
Include dependency graph for gnunet_datastore_service.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define GNUNET_DATASTORE_MAX_VALUE_SIZE   65536
 Maximum size of a value that can be stored in the datastore. More...
 

Typedefs

typedef void(* GNUNET_DATASTORE_ContinuationWithStatus) (void *cls, int32_t success, struct GNUNET_TIME_Absolute min_expiration, const char *msg)
 Continuation called to notify client about result of the operation. More...
 
typedef void(* GNUNET_DATASTORE_DatumProcessor) (void *cls, const struct GNUNET_HashCode *key, size_t size, const void *data, enum GNUNET_BLOCK_Type type, uint32_t priority, uint32_t anonymity, uint32_t replication, struct GNUNET_TIME_Absolute expiration, uint64_t uid)
 Process a datum that was stored in the datastore. More...
 

Functions

struct GNUNET_DATASTORE_HandleGNUNET_DATASTORE_connect (const struct GNUNET_CONFIGURATION_Handle *cfg)
 Connect to the datastore service. More...
 
void GNUNET_DATASTORE_disconnect (struct GNUNET_DATASTORE_Handle *h, int drop)
 Disconnect from the datastore service (and free associated resources). More...
 
struct GNUNET_DATASTORE_QueueEntryGNUNET_DATASTORE_reserve (struct GNUNET_DATASTORE_Handle *h, uint64_t amount, uint32_t entries, GNUNET_DATASTORE_ContinuationWithStatus cont, void *cont_cls)
 Reserve space in the datastore. More...
 
struct GNUNET_DATASTORE_QueueEntryGNUNET_DATASTORE_put (struct GNUNET_DATASTORE_Handle *h, uint32_t rid, const struct GNUNET_HashCode *key, size_t size, const void *data, enum GNUNET_BLOCK_Type type, uint32_t priority, uint32_t anonymity, uint32_t replication, struct GNUNET_TIME_Absolute expiration, unsigned int queue_priority, unsigned int max_queue_size, GNUNET_DATASTORE_ContinuationWithStatus cont, void *cont_cls)
 Store an item in the datastore. More...
 
struct GNUNET_DATASTORE_QueueEntryGNUNET_DATASTORE_release_reserve (struct GNUNET_DATASTORE_Handle *h, uint32_t rid, unsigned int queue_priority, unsigned int max_queue_size, GNUNET_DATASTORE_ContinuationWithStatus cont, void *cont_cls)
 Signal that all of the data for which a reservation was made has been stored and that whatever excess space might have been reserved can now be released. More...
 
struct GNUNET_DATASTORE_QueueEntryGNUNET_DATASTORE_remove (struct GNUNET_DATASTORE_Handle *h, const struct GNUNET_HashCode *key, size_t size, const void *data, unsigned int queue_priority, unsigned int max_queue_size, GNUNET_DATASTORE_ContinuationWithStatus cont, void *cont_cls)
 Explicitly remove some content from the database. More...
 
struct GNUNET_DATASTORE_QueueEntryGNUNET_DATASTORE_get_key (struct GNUNET_DATASTORE_Handle *h, uint64_t next_uid, bool random, const struct GNUNET_HashCode *key, enum GNUNET_BLOCK_Type type, unsigned int queue_priority, unsigned int max_queue_size, GNUNET_DATASTORE_DatumProcessor proc, void *proc_cls)
 Get a result for a particular key from the datastore. More...
 
struct GNUNET_DATASTORE_QueueEntryGNUNET_DATASTORE_get_zero_anonymity (struct GNUNET_DATASTORE_Handle *h, uint64_t next_uid, unsigned int queue_priority, unsigned int max_queue_size, enum GNUNET_BLOCK_Type type, GNUNET_DATASTORE_DatumProcessor proc, void *proc_cls)
 Get a single zero-anonymity value from the datastore. More...
 
struct GNUNET_DATASTORE_QueueEntryGNUNET_DATASTORE_get_for_replication (struct GNUNET_DATASTORE_Handle *h, unsigned int queue_priority, unsigned int max_queue_size, GNUNET_DATASTORE_DatumProcessor proc, void *proc_cls)
 Get a random value from the datastore for content replication. More...
 
void GNUNET_DATASTORE_cancel (struct GNUNET_DATASTORE_QueueEntry *qe)
 Cancel a datastore operation. More...
 

Detailed Description

datastore service

Definition in file gnunet_datastore_service.h.