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.h63
1 files changed, 29 insertions, 34 deletions
diff --git a/src/include/gnunet_peerstore_service.h b/src/include/gnunet_peerstore_service.h
index ad80a3fa3..ac390ada2 100644
--- a/src/include/gnunet_peerstore_service.h
+++ b/src/include/gnunet_peerstore_service.h
@@ -71,9 +71,7 @@ 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{
76
77 /** 75 /**
78 * Possibly store multiple values under given key. 76 * Possibly store multiple values under given key.
79 */ 77 */
@@ -84,7 +82,6 @@ enum GNUNET_PEERSTORE_StoreOption
84 * storing the given value. 82 * storing the given value.
85 */ 83 */
86 GNUNET_PEERSTORE_STOREOPTION_REPLACE = 1 84 GNUNET_PEERSTORE_STOREOPTION_REPLACE = 1
87
88}; 85};
89 86
90/** 87/**
@@ -100,9 +97,7 @@ struct GNUNET_PEERSTORE_StoreContext;
100/** 97/**
101 * Single PEERSTORE record 98 * Single PEERSTORE record
102 */ 99 */
103struct GNUNET_PEERSTORE_Record 100struct GNUNET_PEERSTORE_Record {
104{
105
106 /** 101 /**
107 * Responsible sub system string 102 * Responsible sub system string
108 */ 103 */
@@ -169,7 +164,7 @@ typedef void (*GNUNET_PEERSTORE_Processor) (
169 * @return NULL on error 164 * @return NULL on error
170 */ 165 */
171struct GNUNET_PEERSTORE_Handle * 166struct GNUNET_PEERSTORE_Handle *
172GNUNET_PEERSTORE_connect (const struct GNUNET_CONFIGURATION_Handle *cfg); 167GNUNET_PEERSTORE_connect(const struct GNUNET_CONFIGURATION_Handle *cfg);
173 168
174 169
175/** 170/**
@@ -181,7 +176,7 @@ GNUNET_PEERSTORE_connect (const struct GNUNET_CONFIGURATION_Handle *cfg);
181 * @param sync_first send any pending STORE requests before disconnecting 176 * @param sync_first send any pending STORE requests before disconnecting
182 */ 177 */
183void 178void
184GNUNET_PEERSTORE_disconnect (struct GNUNET_PEERSTORE_Handle *h, int sync_first); 179GNUNET_PEERSTORE_disconnect(struct GNUNET_PEERSTORE_Handle *h, int sync_first);
185 180
186 181
187/** 182/**
@@ -201,16 +196,16 @@ GNUNET_PEERSTORE_disconnect (struct GNUNET_PEERSTORE_Handle *h, int sync_first);
201 * @param cont_cls Closure for @a cont 196 * @param cont_cls Closure for @a cont
202 */ 197 */
203struct GNUNET_PEERSTORE_StoreContext * 198struct GNUNET_PEERSTORE_StoreContext *
204GNUNET_PEERSTORE_store (struct GNUNET_PEERSTORE_Handle *h, 199GNUNET_PEERSTORE_store(struct GNUNET_PEERSTORE_Handle *h,
205 const char *sub_system, 200 const char *sub_system,
206 const struct GNUNET_PeerIdentity *peer, 201 const struct GNUNET_PeerIdentity *peer,
207 const char *key, 202 const char *key,
208 const void *value, 203 const void *value,
209 size_t size, 204 size_t size,
210 struct GNUNET_TIME_Absolute expiry, 205 struct GNUNET_TIME_Absolute expiry,
211 enum GNUNET_PEERSTORE_StoreOption options, 206 enum GNUNET_PEERSTORE_StoreOption options,
212 GNUNET_PEERSTORE_Continuation cont, 207 GNUNET_PEERSTORE_Continuation cont,
213 void *cont_cls); 208 void *cont_cls);
214 209
215 210
216/** 211/**
@@ -219,7 +214,7 @@ GNUNET_PEERSTORE_store (struct GNUNET_PEERSTORE_Handle *h,
219 * @param sc Store request context 214 * @param sc Store request context
220 */ 215 */
221void 216void
222GNUNET_PEERSTORE_store_cancel (struct GNUNET_PEERSTORE_StoreContext *sc); 217GNUNET_PEERSTORE_store_cancel(struct GNUNET_PEERSTORE_StoreContext *sc);
223 218
224 219
225/** 220/**
@@ -233,12 +228,12 @@ GNUNET_PEERSTORE_store_cancel (struct GNUNET_PEERSTORE_StoreContext *sc);
233 * @param callback_cls closure for @a callback 228 * @param callback_cls closure for @a callback
234 */ 229 */
235struct GNUNET_PEERSTORE_IterateContext * 230struct GNUNET_PEERSTORE_IterateContext *
236GNUNET_PEERSTORE_iterate (struct GNUNET_PEERSTORE_Handle *h, 231GNUNET_PEERSTORE_iterate(struct GNUNET_PEERSTORE_Handle *h,
237 const char *sub_system, 232 const char *sub_system,
238 const struct GNUNET_PeerIdentity *peer, 233 const struct GNUNET_PeerIdentity *peer,
239 const char *key, 234 const char *key,
240 GNUNET_PEERSTORE_Processor callback, 235 GNUNET_PEERSTORE_Processor callback,
241 void *callback_cls); 236 void *callback_cls);
242 237
243 238
244/** 239/**
@@ -248,7 +243,7 @@ GNUNET_PEERSTORE_iterate (struct GNUNET_PEERSTORE_Handle *h,
248 * @param ic Iterate request context as returned by GNUNET_PEERSTORE_iterate() 243 * @param ic Iterate request context as returned by GNUNET_PEERSTORE_iterate()
249 */ 244 */
250void 245void
251GNUNET_PEERSTORE_iterate_cancel (struct GNUNET_PEERSTORE_IterateContext *ic); 246GNUNET_PEERSTORE_iterate_cancel(struct GNUNET_PEERSTORE_IterateContext *ic);
252 247
253 248
254/** 249/**
@@ -264,12 +259,12 @@ GNUNET_PEERSTORE_iterate_cancel (struct GNUNET_PEERSTORE_IterateContext *ic);
264 * @return Handle to watch request 259 * @return Handle to watch request
265 */ 260 */
266struct GNUNET_PEERSTORE_WatchContext * 261struct GNUNET_PEERSTORE_WatchContext *
267GNUNET_PEERSTORE_watch (struct GNUNET_PEERSTORE_Handle *h, 262GNUNET_PEERSTORE_watch(struct GNUNET_PEERSTORE_Handle *h,
268 const char *sub_system, 263 const char *sub_system,
269 const struct GNUNET_PeerIdentity *peer, 264 const struct GNUNET_PeerIdentity *peer,
270 const char *key, 265 const char *key,
271 GNUNET_PEERSTORE_Processor callback, 266 GNUNET_PEERSTORE_Processor callback,
272 void *callback_cls); 267 void *callback_cls);
273 268
274 269
275/** 270/**
@@ -278,7 +273,7 @@ GNUNET_PEERSTORE_watch (struct GNUNET_PEERSTORE_Handle *h,
278 * @param wc handle to the watch request 273 * @param wc handle to the watch request
279 */ 274 */
280void 275void
281GNUNET_PEERSTORE_watch_cancel (struct GNUNET_PEERSTORE_WatchContext *wc); 276GNUNET_PEERSTORE_watch_cancel(struct GNUNET_PEERSTORE_WatchContext *wc);
282 277
283 278
284#if 0 /* keep Emacsens' auto-indent happy */ 279#if 0 /* keep Emacsens' auto-indent happy */