aboutsummaryrefslogtreecommitdiff
path: root/src/datastore/plugin_datastore.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/datastore/plugin_datastore.h')
-rw-r--r--src/datastore/plugin_datastore.h28
1 files changed, 23 insertions, 5 deletions
diff --git a/src/datastore/plugin_datastore.h b/src/datastore/plugin_datastore.h
index e8f433671..fa08501cc 100644
--- a/src/datastore/plugin_datastore.h
+++ b/src/datastore/plugin_datastore.h
@@ -22,10 +22,6 @@
22 * @file datastore/plugin_datastore.h 22 * @file datastore/plugin_datastore.h
23 * @brief API for the database backend plugins. 23 * @brief API for the database backend plugins.
24 * @author Christian Grothoff 24 * @author Christian Grothoff
25 *
26 * TODO:
27 * - consider defining enumeration or at least typedef
28 * for the type of "type" (instead of using uint32_t)
29 */ 25 */
30#ifndef PLUGIN_DATASTORE_H 26#ifndef PLUGIN_DATASTORE_H
31#define PLUGIN_DATASTORE_H 27#define PLUGIN_DATASTORE_H
@@ -39,12 +35,24 @@
39 35
40/** 36/**
41 * How many bytes of overhead will we assume per entry 37 * How many bytes of overhead will we assume per entry
42 * in the SQlite DB? 38 * in any DB (for reservations)?
43 */ 39 */
44#define GNUNET_DATASTORE_ENTRY_OVERHEAD 256 40#define GNUNET_DATASTORE_ENTRY_OVERHEAD 256
45 41
46 42
47/** 43/**
44 * Function invoked to notify service of disk utilization
45 * changes.
46 *
47 * @param cls closure
48 * @param delta change in disk utilization,
49 * 0 for "reset to empty"
50 */
51typedef void (*DiskUtilizationChange)(void *cls,
52 int delta);
53
54
55/**
48 * The datastore service will pass a pointer to a struct 56 * The datastore service will pass a pointer to a struct
49 * of this type as the first and only argument to the 57 * of this type as the first and only argument to the
50 * entry point of each datastore plugin. 58 * entry point of each datastore plugin.
@@ -61,6 +69,16 @@ struct GNUNET_DATASTORE_PluginEnvironment
61 */ 69 */
62 struct GNUNET_SCHEDULER_Handle *sched; 70 struct GNUNET_SCHEDULER_Handle *sched;
63 71
72 /**
73 * Function to call on disk utilization change.
74 */
75 DiskUtilizationChange duc;
76
77 /**
78 * Closure.
79 */
80 void *cls;
81
64}; 82};
65 83
66 84