aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_datastore_plugin.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/gnunet_datastore_plugin.h')
-rw-r--r--src/include/gnunet_datastore_plugin.h63
1 files changed, 29 insertions, 34 deletions
diff --git a/src/include/gnunet_datastore_plugin.h b/src/include/gnunet_datastore_plugin.h
index fe4cefb0a..f33588bce 100644
--- a/src/include/gnunet_datastore_plugin.h
+++ b/src/include/gnunet_datastore_plugin.h
@@ -48,8 +48,7 @@
48 * @param delta change in disk utilization, 48 * @param delta change in disk utilization,
49 * 0 for "reset to empty" 49 * 0 for "reset to empty"
50 */ 50 */
51typedef void (*DiskUtilizationChange)(void *cls, 51typedef void (*DiskUtilizationChange) (void *cls, int delta);
52 int delta);
53 52
54 53
55/** 54/**
@@ -94,15 +93,14 @@ struct GNUNET_DATASTORE_PluginEnvironment
94 * GNUNET_NO to delete the item 93 * GNUNET_NO to delete the item
95 */ 94 */
96typedef int (*PluginDatumProcessor) (void *cls, 95typedef int (*PluginDatumProcessor) (void *cls,
97 const GNUNET_HashCode * key, 96 const GNUNET_HashCode * key,
98 uint32_t size, 97 uint32_t size,
99 const void *data, 98 const void *data,
100 enum GNUNET_BLOCK_Type type, 99 enum GNUNET_BLOCK_Type type,
101 uint32_t priority, 100 uint32_t priority,
102 uint32_t anonymity, 101 uint32_t anonymity,
103 struct GNUNET_TIME_Absolute 102 struct GNUNET_TIME_Absolute
104 expiration, 103 expiration, uint64_t uid);
105 uint64_t uid);
106 104
107/** 105/**
108 * Get an estimate of how much space the database is 106 * Get an estimate of how much space the database is
@@ -133,15 +131,14 @@ typedef unsigned long long (*PluginEstimateSize) (void *cls);
133 * GNUNET_SYSERR on failure 131 * GNUNET_SYSERR on failure
134 */ 132 */
135typedef int (*PluginPut) (void *cls, 133typedef int (*PluginPut) (void *cls,
136 const GNUNET_HashCode * key, 134 const GNUNET_HashCode * key,
137 uint32_t size, 135 uint32_t size,
138 const void *data, 136 const void *data,
139 enum GNUNET_BLOCK_Type type, 137 enum GNUNET_BLOCK_Type type,
140 uint32_t priority, 138 uint32_t priority,
141 uint32_t anonymity, 139 uint32_t anonymity,
142 uint32_t replication, 140 uint32_t replication,
143 struct GNUNET_TIME_Absolute expiration, 141 struct GNUNET_TIME_Absolute expiration, char **msg);
144 char **msg);
145 142
146 143
147/** 144/**
@@ -163,11 +160,11 @@ typedef int (*PluginPut) (void *cls,
163 * @param proc_cls closure for proc 160 * @param proc_cls closure for proc
164 */ 161 */
165typedef void (*PluginGetKey) (void *cls, 162typedef void (*PluginGetKey) (void *cls,
166 uint64_t offset, 163 uint64_t offset,
167 const GNUNET_HashCode *key, 164 const GNUNET_HashCode * key,
168 const GNUNET_HashCode *vhash, 165 const GNUNET_HashCode * vhash,
169 enum GNUNET_BLOCK_Type type, 166 enum GNUNET_BLOCK_Type type,
170 PluginDatumProcessor proc, void *proc_cls); 167 PluginDatumProcessor proc, void *proc_cls);
171 168
172 169
173 170
@@ -182,7 +179,7 @@ typedef void (*PluginGetKey) (void *cls,
182 * @param proc_cls closure for proc 179 * @param proc_cls closure for proc
183 */ 180 */
184typedef void (*PluginGetRandom) (void *cls, 181typedef void (*PluginGetRandom) (void *cls,
185 PluginDatumProcessor proc, void *proc_cls); 182 PluginDatumProcessor proc, void *proc_cls);
186 183
187 184
188/** 185/**
@@ -209,10 +206,9 @@ typedef void (*PluginGetRandom) (void *cls,
209 * @return GNUNET_OK on success 206 * @return GNUNET_OK on success
210 */ 207 */
211typedef int (*PluginUpdate) (void *cls, 208typedef int (*PluginUpdate) (void *cls,
212 uint64_t uid, 209 uint64_t uid,
213 int delta, 210 int delta,
214 struct GNUNET_TIME_Absolute expire, 211 struct GNUNET_TIME_Absolute expire, char **msg);
215 char **msg);
216 212
217 213
218/** 214/**
@@ -228,10 +224,9 @@ typedef int (*PluginUpdate) (void *cls,
228 * @param proc_cls closure for proc 224 * @param proc_cls closure for proc
229 */ 225 */
230typedef void (*PluginGetType) (void *cls, 226typedef void (*PluginGetType) (void *cls,
231 uint64_t offset, 227 uint64_t offset,
232 enum GNUNET_BLOCK_Type type, 228 enum GNUNET_BLOCK_Type type,
233 PluginDatumProcessor proc, 229 PluginDatumProcessor proc, void *proc_cls);
234 void *proc_cls);
235 230
236 231
237/** 232/**