diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-12-15 14:55:51 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-12-15 14:55:51 +0000 |
commit | f04c8750cca2dcfd35aceae3379b83637b8aadfc (patch) | |
tree | 2721f97b3b2dc947aec26c8f46a7dca334ec4ff8 /src/include/gnunet_datastore_plugin.h | |
parent | d767c4cb4f08364e3dd7a4d58acedfe24098429c (diff) | |
download | gnunet-f04c8750cca2dcfd35aceae3379b83637b8aadfc.tar.gz gnunet-f04c8750cca2dcfd35aceae3379b83637b8aadfc.zip |
adding support for detection quota changes / missing bloomfilter files and reconstruction/recovery code
Diffstat (limited to 'src/include/gnunet_datastore_plugin.h')
-rw-r--r-- | src/include/gnunet_datastore_plugin.h | 33 |
1 files changed, 32 insertions, 1 deletions
diff --git a/src/include/gnunet_datastore_plugin.h b/src/include/gnunet_datastore_plugin.h index fb1dff51d..bbf0ce2aa 100644 --- a/src/include/gnunet_datastore_plugin.h +++ b/src/include/gnunet_datastore_plugin.h | |||
@@ -135,6 +135,29 @@ typedef int (*PluginPut) (void *cls, const GNUNET_HashCode * key, uint32_t size, | |||
135 | 135 | ||
136 | 136 | ||
137 | /** | 137 | /** |
138 | * An processor over a set of keys stored in the datastore. | ||
139 | * | ||
140 | * @param cls closure | ||
141 | * @param key key in the data store | ||
142 | * @param count how many values are stored under this key in the datastore | ||
143 | */ | ||
144 | typedef void (*PluginKeyProcessor) (void *cls, | ||
145 | const GNUNET_HashCode *key, | ||
146 | unsigned int count); | ||
147 | |||
148 | |||
149 | /** | ||
150 | * Get all of the keys in the datastore. | ||
151 | * | ||
152 | * @param cls closure | ||
153 | * @param proc function to call on each key | ||
154 | * @param proc_cls closure for proc | ||
155 | */ | ||
156 | typedef void (*PluginGetKeys) (void *cls, | ||
157 | PluginKeyProcessor proc, void *proc_cls); | ||
158 | |||
159 | |||
160 | /** | ||
138 | * Get one of the results for a particular key in the datastore. | 161 | * Get one of the results for a particular key in the datastore. |
139 | * | 162 | * |
140 | * @param cls closure | 163 | * @param cls closure |
@@ -148,6 +171,8 @@ typedef int (*PluginPut) (void *cls, const GNUNET_HashCode * key, uint32_t size, | |||
148 | * there may be! | 171 | * there may be! |
149 | * @param type entries of which type are relevant? | 172 | * @param type entries of which type are relevant? |
150 | * Use 0 for any type. | 173 | * Use 0 for any type. |
174 | * @param min find the smallest key that is larger than the given min, | ||
175 | * NULL for no minimum (return smallest key) | ||
151 | * @param proc function to call on the matching value; | 176 | * @param proc function to call on the matching value; |
152 | * proc should be called with NULL if there is no result | 177 | * proc should be called with NULL if there is no result |
153 | * @param proc_cls closure for proc | 178 | * @param proc_cls closure for proc |
@@ -159,7 +184,6 @@ typedef void (*PluginGetKey) (void *cls, uint64_t offset, | |||
159 | PluginDatumProcessor proc, void *proc_cls); | 184 | PluginDatumProcessor proc, void *proc_cls); |
160 | 185 | ||
161 | 186 | ||
162 | |||
163 | /** | 187 | /** |
164 | * Get a random item (additional constraints may apply depending on | 188 | * Get a random item (additional constraints may apply depending on |
165 | * the specific implementation). Calls 'proc' with all values ZERO or | 189 | * the specific implementation). Calls 'proc' with all values ZERO or |
@@ -174,6 +198,8 @@ typedef void (*PluginGetRandom) (void *cls, PluginDatumProcessor proc, | |||
174 | void *proc_cls); | 198 | void *proc_cls); |
175 | 199 | ||
176 | 200 | ||
201 | |||
202 | |||
177 | /** | 203 | /** |
178 | * Update the priority for a particular key in the datastore. If | 204 | * Update the priority for a particular key in the datastore. If |
179 | * the expiration time in value is different than the time found in | 205 | * the expiration time in value is different than the time found in |
@@ -296,6 +322,11 @@ struct GNUNET_DATASTORE_PluginFunctions | |||
296 | */ | 322 | */ |
297 | PluginDrop drop; | 323 | PluginDrop drop; |
298 | 324 | ||
325 | /** | ||
326 | * Iterate over all keys in the database. | ||
327 | */ | ||
328 | PluginGetKeys get_keys; | ||
329 | |||
299 | }; | 330 | }; |
300 | 331 | ||
301 | 332 | ||