summaryrefslogtreecommitdiff
path: root/src/include/gnunet_peerstore_service.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/gnunet_peerstore_service.h')
-rw-r--r--src/include/gnunet_peerstore_service.h60
1 files changed, 31 insertions, 29 deletions
diff --git a/src/include/gnunet_peerstore_service.h b/src/include/gnunet_peerstore_service.h
index ac390ada2..cd68dad66 100644
--- a/src/include/gnunet_peerstore_service.h
+++ b/src/include/gnunet_peerstore_service.h
@@ -71,7 +71,8 @@ extern "C" {
71/** 71/**
72 * Options for storing values in PEERSTORE 72 * Options for storing values in PEERSTORE
73 */ 73 */
74enum GNUNET_PEERSTORE_StoreOption { 74enum GNUNET_PEERSTORE_StoreOption
75{
75 /** 76 /**
76 * Possibly store multiple values under given key. 77 * Possibly store multiple values under given key.
77 */ 78 */
@@ -97,7 +98,8 @@ struct GNUNET_PEERSTORE_StoreContext;
97/** 98/**
98 * Single PEERSTORE record 99 * Single PEERSTORE record
99 */ 100 */
100struct GNUNET_PEERSTORE_Record { 101struct GNUNET_PEERSTORE_Record
102{
101 /** 103 /**
102 * Responsible sub system string 104 * Responsible sub system string
103 */ 105 */
@@ -164,7 +166,7 @@ typedef void (*GNUNET_PEERSTORE_Processor) (
164 * @return NULL on error 166 * @return NULL on error
165 */ 167 */
166struct GNUNET_PEERSTORE_Handle * 168struct GNUNET_PEERSTORE_Handle *
167GNUNET_PEERSTORE_connect(const struct GNUNET_CONFIGURATION_Handle *cfg); 169GNUNET_PEERSTORE_connect (const struct GNUNET_CONFIGURATION_Handle *cfg);
168 170
169 171
170/** 172/**
@@ -176,7 +178,7 @@ GNUNET_PEERSTORE_connect(const struct GNUNET_CONFIGURATION_Handle *cfg);
176 * @param sync_first send any pending STORE requests before disconnecting 178 * @param sync_first send any pending STORE requests before disconnecting
177 */ 179 */
178void 180void
179GNUNET_PEERSTORE_disconnect(struct GNUNET_PEERSTORE_Handle *h, int sync_first); 181GNUNET_PEERSTORE_disconnect (struct GNUNET_PEERSTORE_Handle *h, int sync_first);
180 182
181 183
182/** 184/**
@@ -196,16 +198,16 @@ GNUNET_PEERSTORE_disconnect(struct GNUNET_PEERSTORE_Handle *h, int sync_first);
196 * @param cont_cls Closure for @a cont 198 * @param cont_cls Closure for @a cont
197 */ 199 */
198struct GNUNET_PEERSTORE_StoreContext * 200struct GNUNET_PEERSTORE_StoreContext *
199GNUNET_PEERSTORE_store(struct GNUNET_PEERSTORE_Handle *h, 201GNUNET_PEERSTORE_store (struct GNUNET_PEERSTORE_Handle *h,
200 const char *sub_system, 202 const char *sub_system,
201 const struct GNUNET_PeerIdentity *peer, 203 const struct GNUNET_PeerIdentity *peer,
202 const char *key, 204 const char *key,
203 const void *value, 205 const void *value,
204 size_t size, 206 size_t size,
205 struct GNUNET_TIME_Absolute expiry, 207 struct GNUNET_TIME_Absolute expiry,
206 enum GNUNET_PEERSTORE_StoreOption options, 208 enum GNUNET_PEERSTORE_StoreOption options,
207 GNUNET_PEERSTORE_Continuation cont, 209 GNUNET_PEERSTORE_Continuation cont,
208 void *cont_cls); 210 void *cont_cls);
209 211
210 212
211/** 213/**
@@ -214,7 +216,7 @@ GNUNET_PEERSTORE_store(struct GNUNET_PEERSTORE_Handle *h,
214 * @param sc Store request context 216 * @param sc Store request context
215 */ 217 */
216void 218void
217GNUNET_PEERSTORE_store_cancel(struct GNUNET_PEERSTORE_StoreContext *sc); 219GNUNET_PEERSTORE_store_cancel (struct GNUNET_PEERSTORE_StoreContext *sc);
218 220
219 221
220/** 222/**
@@ -228,12 +230,12 @@ GNUNET_PEERSTORE_store_cancel(struct GNUNET_PEERSTORE_StoreContext *sc);
228 * @param callback_cls closure for @a callback 230 * @param callback_cls closure for @a callback
229 */ 231 */
230struct GNUNET_PEERSTORE_IterateContext * 232struct GNUNET_PEERSTORE_IterateContext *
231GNUNET_PEERSTORE_iterate(struct GNUNET_PEERSTORE_Handle *h, 233GNUNET_PEERSTORE_iterate (struct GNUNET_PEERSTORE_Handle *h,
232 const char *sub_system, 234 const char *sub_system,
233 const struct GNUNET_PeerIdentity *peer, 235 const struct GNUNET_PeerIdentity *peer,
234 const char *key, 236 const char *key,
235 GNUNET_PEERSTORE_Processor callback, 237 GNUNET_PEERSTORE_Processor callback,
236 void *callback_cls); 238 void *callback_cls);
237 239
238 240
239/** 241/**
@@ -243,7 +245,7 @@ GNUNET_PEERSTORE_iterate(struct GNUNET_PEERSTORE_Handle *h,
243 * @param ic Iterate request context as returned by GNUNET_PEERSTORE_iterate() 245 * @param ic Iterate request context as returned by GNUNET_PEERSTORE_iterate()
244 */ 246 */
245void 247void
246GNUNET_PEERSTORE_iterate_cancel(struct GNUNET_PEERSTORE_IterateContext *ic); 248GNUNET_PEERSTORE_iterate_cancel (struct GNUNET_PEERSTORE_IterateContext *ic);
247 249
248 250
249/** 251/**
@@ -259,12 +261,12 @@ GNUNET_PEERSTORE_iterate_cancel(struct GNUNET_PEERSTORE_IterateContext *ic);
259 * @return Handle to watch request 261 * @return Handle to watch request
260 */ 262 */
261struct GNUNET_PEERSTORE_WatchContext * 263struct GNUNET_PEERSTORE_WatchContext *
262GNUNET_PEERSTORE_watch(struct GNUNET_PEERSTORE_Handle *h, 264GNUNET_PEERSTORE_watch (struct GNUNET_PEERSTORE_Handle *h,
263 const char *sub_system, 265 const char *sub_system,
264 const struct GNUNET_PeerIdentity *peer, 266 const struct GNUNET_PeerIdentity *peer,
265 const char *key, 267 const char *key,
266 GNUNET_PEERSTORE_Processor callback, 268 GNUNET_PEERSTORE_Processor callback,
267 void *callback_cls); 269 void *callback_cls);
268 270
269 271
270/** 272/**
@@ -273,7 +275,7 @@ GNUNET_PEERSTORE_watch(struct GNUNET_PEERSTORE_Handle *h,
273 * @param wc handle to the watch request 275 * @param wc handle to the watch request
274 */ 276 */
275void 277void
276GNUNET_PEERSTORE_watch_cancel(struct GNUNET_PEERSTORE_WatchContext *wc); 278GNUNET_PEERSTORE_watch_cancel (struct GNUNET_PEERSTORE_WatchContext *wc);
277 279
278 280
279#if 0 /* keep Emacsens' auto-indent happy */ 281#if 0 /* keep Emacsens' auto-indent happy */