aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_peerstore_service.h
diff options
context:
space:
mode:
authorOmar Tarabai <tarabai@devegypt.com>2014-05-19 10:26:08 +0000
committerOmar Tarabai <tarabai@devegypt.com>2014-05-19 10:26:08 +0000
commit26c076220f09adcbb79ba296985b78deeb53dd9a (patch)
treec77851c3ab2fa4651eac7d8bd39b2a9c1a022da8 /src/include/gnunet_peerstore_service.h
parent7fadb2c764dfdcd6e4e357e8b0d9373642c33235 (diff)
downloadgnunet-26c076220f09adcbb79ba296985b78deeb53dd9a.tar.gz
gnunet-26c076220f09adcbb79ba296985b78deeb53dd9a.zip
peerstore: completed iterate functionality
Diffstat (limited to 'src/include/gnunet_peerstore_service.h')
-rw-r--r--src/include/gnunet_peerstore_service.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/include/gnunet_peerstore_service.h b/src/include/gnunet_peerstore_service.h
index a3e28e6f0..4ede69d93 100644
--- a/src/include/gnunet_peerstore_service.h
+++ b/src/include/gnunet_peerstore_service.h
@@ -153,6 +153,34 @@ GNUNET_PEERSTORE_store (struct GNUNET_PEERSTORE_Handle *h,
153void 153void
154GNUNET_PEERSTORE_store_cancel (struct GNUNET_PEERSTORE_StoreContext *sc); 154GNUNET_PEERSTORE_store_cancel (struct GNUNET_PEERSTORE_StoreContext *sc);
155 155
156/**
157 * Iterate over records matching supplied key information
158 *
159 * @param h handle to the PEERSTORE service
160 * @param sub_system name of sub system
161 * @param peer Peer identity (can be NULL)
162 * @param key entry key string (can be NULL)
163 * @param timeout time after which the iterate request is canceled
164 * @param callback function called with each matching record, all NULL's on end
165 * @param callback_cls closure for @a callback
166 */
167struct GNUNET_PEERSTORE_IterateContext *
168GNUNET_PEERSTORE_iterate (struct GNUNET_PEERSTORE_Handle *h,
169 char *sub_system,
170 const struct GNUNET_PeerIdentity *peer,
171 const char *key,
172 struct GNUNET_TIME_Relative timeout,
173 GNUNET_PEERSTORE_Processor callback, void *callback_cls);
174
175/**
176 * Cancel an iterate request
177 * Please do not call after the iterate request is done
178 *
179 * @param ic Iterate request context as returned by GNUNET_PEERSTORE_iterate()
180 */
181void
182GNUNET_PEERSTORE_iterate_cancel (struct GNUNET_PEERSTORE_IterateContext *ic);
183
156#if 0 /* keep Emacsens' auto-indent happy */ 184#if 0 /* keep Emacsens' auto-indent happy */
157{ 185{
158#endif 186#endif