aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_datacache_plugin.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/gnunet_datacache_plugin.h')
-rw-r--r--src/include/gnunet_datacache_plugin.h21
1 files changed, 20 insertions, 1 deletions
diff --git a/src/include/gnunet_datacache_plugin.h b/src/include/gnunet_datacache_plugin.h
index 0810a41d9..bd915bdc0 100644
--- a/src/include/gnunet_datacache_plugin.h
+++ b/src/include/gnunet_datacache_plugin.h
@@ -133,7 +133,7 @@ struct GNUNET_DATACACHE_PluginFunctions
133 * @return the number of results found 133 * @return the number of results found
134 */ 134 */
135 unsigned int (*get) (void *cls, 135 unsigned int (*get) (void *cls,
136 const struct GNUNET_HashCode * key, 136 const struct GNUNET_HashCode *key,
137 enum GNUNET_BLOCK_Type type, 137 enum GNUNET_BLOCK_Type type,
138 GNUNET_DATACACHE_Iterator iter, 138 GNUNET_DATACACHE_Iterator iter,
139 void *iter_cls); 139 void *iter_cls);
@@ -160,6 +160,25 @@ struct GNUNET_DATACACHE_PluginFunctions
160 void *iter_cls); 160 void *iter_cls);
161 161
162 162
163 /**
164 * Iterate over the results that are "close" to a particular key in
165 * the datacache. "close" is defined as numerically larger than @a
166 * key (when interpreted as a circular address space), with small
167 * distance.
168 *
169 * @param cls closure (internal context for the plugin)
170 * @param key area of the keyspace to look into
171 * @param num_results number of results that should be returned to @a iter
172 * @param iter maybe NULL (to just count)
173 * @param iter_cls closure for @a iter
174 * @return the number of results found
175 */
176 unsigned int (*get_closest) (void *cls,
177 const struct GNUNET_HashCode *key,
178 unsigned int num_results,
179 GNUNET_DATACACHE_Iterator iter,
180 void *iter_cls);
181
163}; 182};
164 183
165 184