diff options
Diffstat (limited to 'src/include/gnunet_datastore_plugin.h')
-rw-r--r-- | src/include/gnunet_datastore_plugin.h | 56 |
1 files changed, 31 insertions, 25 deletions
diff --git a/src/include/gnunet_datastore_plugin.h b/src/include/gnunet_datastore_plugin.h index 08093d55e..7e5344ebf 100644 --- a/src/include/gnunet_datastore_plugin.h +++ b/src/include/gnunet_datastore_plugin.h | |||
@@ -19,9 +19,14 @@ | |||
19 | */ | 19 | */ |
20 | 20 | ||
21 | /** | 21 | /** |
22 | * @file include/gnunet_datastore_plugin.h | ||
23 | * @brief API for the database backend plugins. | ||
24 | * @author Christian Grothoff | 22 | * @author Christian Grothoff |
23 | * | ||
24 | * @file | ||
25 | * API for the database backend plugins. | ||
26 | * | ||
27 | * @defgroup datastore-plugin Datastore service plugin API | ||
28 | * API for the database backend plugins. | ||
29 | * @{ | ||
25 | */ | 30 | */ |
26 | #ifndef PLUGIN_DATASTORE_H | 31 | #ifndef PLUGIN_DATASTORE_H |
27 | #define PLUGIN_DATASTORE_H | 32 | #define PLUGIN_DATASTORE_H |
@@ -48,8 +53,8 @@ | |||
48 | * @param delta change in disk utilization, | 53 | * @param delta change in disk utilization, |
49 | * 0 for "reset to empty" | 54 | * 0 for "reset to empty" |
50 | */ | 55 | */ |
51 | typedef void | 56 | typedef void |
52 | (*GNUNET_DATASTORE_DiskUtilizationChange) (void *cls, | 57 | (*GNUNET_DATASTORE_DiskUtilizationChange) (void *cls, |
53 | int delta); | 58 | int delta); |
54 | 59 | ||
55 | 60 | ||
@@ -93,13 +98,13 @@ struct GNUNET_DATASTORE_PluginEnvironment | |||
93 | * @return #GNUNET_OK to keep the item | 98 | * @return #GNUNET_OK to keep the item |
94 | * #GNUNET_NO to delete the item | 99 | * #GNUNET_NO to delete the item |
95 | */ | 100 | */ |
96 | typedef int | 101 | typedef int |
97 | (*PluginDatumProcessor) (void *cls, | 102 | (*PluginDatumProcessor) (void *cls, |
98 | const struct GNUNET_HashCode *key, | 103 | const struct GNUNET_HashCode *key, |
99 | uint32_t size, | 104 | uint32_t size, |
100 | const void *data, | 105 | const void *data, |
101 | enum GNUNET_BLOCK_Type type, | 106 | enum GNUNET_BLOCK_Type type, |
102 | uint32_t priority, | 107 | uint32_t priority, |
103 | uint32_t anonymity, | 108 | uint32_t anonymity, |
104 | struct GNUNET_TIME_Absolute expiration, | 109 | struct GNUNET_TIME_Absolute expiration, |
105 | uint64_t uid); | 110 | uint64_t uid); |
@@ -130,11 +135,11 @@ typedef void | |||
130 | * @param status #GNUNET_OK or #GNUNET_SYSERROR | 135 | * @param status #GNUNET_OK or #GNUNET_SYSERROR |
131 | * @param msg error message on error | 136 | * @param msg error message on error |
132 | */ | 137 | */ |
133 | typedef void | 138 | typedef void |
134 | (*PluginPutCont) (void *cls, | 139 | (*PluginPutCont) (void *cls, |
135 | const struct GNUNET_HashCode *key, | 140 | const struct GNUNET_HashCode *key, |
136 | uint32_t size, | 141 | uint32_t size, |
137 | int status, | 142 | int status, |
138 | const char *msg); | 143 | const char *msg); |
139 | 144 | ||
140 | 145 | ||
@@ -155,16 +160,16 @@ typedef void | |||
155 | * @param cont continuation called with success or failure status | 160 | * @param cont continuation called with success or failure status |
156 | * @param cont_cls continuation closure for @a cont | 161 | * @param cont_cls continuation closure for @a cont |
157 | */ | 162 | */ |
158 | typedef void | 163 | typedef void |
159 | (*PluginPut) (void *cls, const struct GNUNET_HashCode *key, | 164 | (*PluginPut) (void *cls, const struct GNUNET_HashCode *key, |
160 | uint32_t size, | 165 | uint32_t size, |
161 | const void *data, | 166 | const void *data, |
162 | enum GNUNET_BLOCK_Type type, | 167 | enum GNUNET_BLOCK_Type type, |
163 | uint32_t priority, | 168 | uint32_t priority, |
164 | uint32_t anonymity, | 169 | uint32_t anonymity, |
165 | uint32_t replication, | 170 | uint32_t replication, |
166 | struct GNUNET_TIME_Absolute expiration, | 171 | struct GNUNET_TIME_Absolute expiration, |
167 | PluginPutCont cont, | 172 | PluginPutCont cont, |
168 | void *cont_cls); | 173 | void *cont_cls); |
169 | 174 | ||
170 | 175 | ||
@@ -175,7 +180,7 @@ typedef void | |||
175 | * @param key key in the data store, if NULL iteration is finished | 180 | * @param key key in the data store, if NULL iteration is finished |
176 | * @param count how many values are stored under this key in the datastore | 181 | * @param count how many values are stored under this key in the datastore |
177 | */ | 182 | */ |
178 | typedef void | 183 | typedef void |
179 | (*PluginKeyProcessor) (void *cls, | 184 | (*PluginKeyProcessor) (void *cls, |
180 | const struct GNUNET_HashCode *key, | 185 | const struct GNUNET_HashCode *key, |
181 | unsigned int count); | 186 | unsigned int count); |
@@ -211,8 +216,8 @@ typedef void | |||
211 | * proc should be called with NULL if there is no result | 216 | * proc should be called with NULL if there is no result |
212 | * @param proc_cls closure for @a proc | 217 | * @param proc_cls closure for @a proc |
213 | */ | 218 | */ |
214 | typedef void | 219 | typedef void |
215 | (*PluginGetKey) (void *cls, | 220 | (*PluginGetKey) (void *cls, |
216 | uint64_t offset, | 221 | uint64_t offset, |
217 | const struct GNUNET_HashCode *key, | 222 | const struct GNUNET_HashCode *key, |
218 | const struct GNUNET_HashCode *vhash, | 223 | const struct GNUNET_HashCode *vhash, |
@@ -231,8 +236,8 @@ typedef void | |||
231 | * @param proc function to call the value (once only). | 236 | * @param proc function to call the value (once only). |
232 | * @param proc_cls closure for @a proc | 237 | * @param proc_cls closure for @a proc |
233 | */ | 238 | */ |
234 | typedef void | 239 | typedef void |
235 | (*PluginGetRandom) (void *cls, | 240 | (*PluginGetRandom) (void *cls, |
236 | PluginDatumProcessor proc, | 241 | PluginDatumProcessor proc, |
237 | void *proc_cls); | 242 | void *proc_cls); |
238 | 243 | ||
@@ -244,8 +249,8 @@ typedef void | |||
244 | * @param status #GNUNET_OK or #GNUNET_SYSERROR | 249 | * @param status #GNUNET_OK or #GNUNET_SYSERROR |
245 | * @param msg error message on error | 250 | * @param msg error message on error |
246 | */ | 251 | */ |
247 | typedef void | 252 | typedef void |
248 | (*PluginUpdateCont) (void *cls, | 253 | (*PluginUpdateCont) (void *cls, |
249 | int status, | 254 | int status, |
250 | const char *msg); | 255 | const char *msg); |
251 | 256 | ||
@@ -270,12 +275,12 @@ typedef void | |||
270 | * @param cont continuation called with success or failure status | 275 | * @param cont continuation called with success or failure status |
271 | * @param cons_cls continuation closure | 276 | * @param cons_cls continuation closure |
272 | */ | 277 | */ |
273 | typedef void | 278 | typedef void |
274 | (*PluginUpdate) (void *cls, | 279 | (*PluginUpdate) (void *cls, |
275 | uint64_t uid, | 280 | uint64_t uid, |
276 | int delta, | 281 | int delta, |
277 | struct GNUNET_TIME_Absolute expire, | 282 | struct GNUNET_TIME_Absolute expire, |
278 | PluginUpdateCont cont, | 283 | PluginUpdateCont cont, |
279 | void *cont_cls); | 284 | void *cont_cls); |
280 | 285 | ||
281 | 286 | ||
@@ -291,7 +296,7 @@ typedef void | |||
291 | * @param proc function to call on the matching value | 296 | * @param proc function to call on the matching value |
292 | * @param proc_cls closure for @a proc | 297 | * @param proc_cls closure for @a proc |
293 | */ | 298 | */ |
294 | typedef void | 299 | typedef void |
295 | (*PluginGetType) (void *cls, | 300 | (*PluginGetType) (void *cls, |
296 | uint64_t offset, | 301 | uint64_t offset, |
297 | enum GNUNET_BLOCK_Type type, | 302 | enum GNUNET_BLOCK_Type type, |
@@ -304,7 +309,7 @@ typedef void | |||
304 | * | 309 | * |
305 | * @param cls closure | 310 | * @param cls closure |
306 | */ | 311 | */ |
307 | typedef void | 312 | typedef void |
308 | (*PluginDrop) (void *cls); | 313 | (*PluginDrop) (void *cls); |
309 | 314 | ||
310 | 315 | ||
@@ -384,5 +389,6 @@ struct GNUNET_DATASTORE_PluginFunctions | |||
384 | 389 | ||
385 | }; | 390 | }; |
386 | 391 | ||
392 | /** @} */ /* end of group */ | ||
387 | 393 | ||
388 | #endif | 394 | #endif |