GNUNET_State_ServiceAPI Struct Reference

API to the stats service. More...

#include <gnunet_state_service.h>


Data Fields

int(* read )(struct GNUNET_GE_Context *ectx, const char *name, void **result)
int(* append )(struct GNUNET_GE_Context *ectx, const char *name, int len, const void *block)
int(* write )(struct GNUNET_GE_Context *ectx, const char *name, int len, const void *block)
int(* unlink )(struct GNUNET_GE_Context *ectx, const char *name)


Detailed Description

API to the stats service.

Definition at line 42 of file gnunet_state_service.h.


Field Documentation

int(* GNUNET_State_ServiceAPI::read)(struct GNUNET_GE_Context *ectx, const char *name, void **result)

Read the contents of a bucket to a buffer.

Parameters:
fn the hashcode representing the entry
result the buffer to write the result to (*result should be NULL, sufficient space is allocated)
Returns:
the number of bytes read on success, -1 on failure

Referenced by needBootstrap(), provide_module_sqstore_mysql(), provide_module_state(), publish_unavailable_mark(), and update_module_datastore().

int(* GNUNET_State_ServiceAPI::append)(struct GNUNET_GE_Context *ectx, const char *name, int len, const void *block)

Append content to file.

Parameters:
fn the key for the entry
len the number of bytes in block
block the data to store
Returns:
GNUNET_SYSERR on error, GNUNET_OK if ok.

Referenced by provide_module_state().

int(* GNUNET_State_ServiceAPI::write)(struct GNUNET_GE_Context *ectx, const char *name, int len, const void *block)

Write content to a file.

Parameters:
fn the key for the entry
len the number of bytes in block
block the data to store
Returns:
GNUNET_SYSERR on error, GNUNET_OK if ok.

Referenced by needBootstrap(), provide_module_state(), publish_unavailable_mark(), release_module_sqstore_mysql(), and update_module_datastore().

int(* GNUNET_State_ServiceAPI::unlink)(struct GNUNET_GE_Context *ectx, const char *name)

Free space in the database by removing one file

Parameters:
name the hashcode representing the name of the file (without directory)

Referenced by provide_module_sqstore_mysql(), provide_module_state(), publish_unavailable_mark(), and remove_unavailable_mark().


The documentation for this struct was generated from the following file:
Generated on Wed Jan 7 02:18:13 2009 for GNUnet by  doxygen 1.5.1