aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_set_service.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2013-05-29 08:18:40 +0000
committerChristian Grothoff <christian@grothoff.org>2013-05-29 08:18:40 +0000
commitb62eb443ee3af84f87030fad9fd11a948b1a2503 (patch)
treefc0bc7bd21a3e7be24358172238445e05df681a3 /src/include/gnunet_set_service.h
parentf06d0beb1ea96498ddec2a42354ddfdabef54b6f (diff)
downloadgnunet-b62eb443ee3af84f87030fad9fd11a948b1a2503.tar.gz
gnunet-b62eb443ee3af84f87030fad9fd11a948b1a2503.zip
-towards desired set API
Diffstat (limited to 'src/include/gnunet_set_service.h')
-rw-r--r--src/include/gnunet_set_service.h36
1 files changed, 29 insertions, 7 deletions
diff --git a/src/include/gnunet_set_service.h b/src/include/gnunet_set_service.h
index 7415e75f3..ce413c0de 100644
--- a/src/include/gnunet_set_service.h
+++ b/src/include/gnunet_set_service.h
@@ -4,7 +4,7 @@
4 4
5 GNUnet is free software; you can redistribute it and/or modify 5 GNUnet is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published 6 it under the terms of the GNU General Public License as published
7 by the Free Software Foundation; either version 2, or (at your 7 by the Free Software Foundation; either version 3, or (at your
8 option) any later version. 8 option) any later version.
9 9
10 GNUnet is distributed in the hope that it will be useful, but 10 GNUnet is distributed in the hope that it will be useful, but
@@ -22,6 +22,7 @@
22 * @file include/gnunet_set_service.h 22 * @file include/gnunet_set_service.h
23 * @brief two-peer set operations 23 * @brief two-peer set operations
24 * @author Florian Dold 24 * @author Florian Dold
25 * @author Christian Grothoff
25 */ 26 */
26 27
27#ifndef GNUNET_SET_SERVICE_H 28#ifndef GNUNET_SET_SERVICE_H
@@ -177,6 +178,7 @@ typedef void (*GNUNET_SET_ResultIterator) (void *cls,
177 * Called when another peer wants to do a set operation with the 178 * Called when another peer wants to do a set operation with the
178 * local peer. 179 * local peer.
179 * 180 *
181 * @param cls closure
180 * @param other_peer the other peer 182 * @param other_peer the other peer
181 * @param context_msg message with application specific information from 183 * @param context_msg message with application specific information from
182 * the other peer 184 * the other peer
@@ -257,7 +259,8 @@ GNUNET_SET_destroy (struct GNUNET_SET_Handle *set);
257/** 259/**
258 * Evaluate a set operation with our set and the set of another peer. 260 * Evaluate a set operation with our set and the set of another peer.
259 * 261 *
260 * @param set set to use 262 * @param set set to use -- FIXME: remove
263 * this argument, use GNUNET_SET_conclude instead!
261 * @param salt salt for HKDF (explain more here) 264 * @param salt salt for HKDF (explain more here)
262 * @param other_peer peer with the other set 265 * @param other_peer peer with the other set
263 * @param app_id hash for the application using the set 266 * @param app_id hash for the application using the set
@@ -302,7 +305,6 @@ GNUNET_SET_listen (const struct GNUNET_CONFIGURATION_Handle *cfg,
302 void *listen_cls); 305 void *listen_cls);
303 306
304 307
305
306/** 308/**
307 * Cancel the given listen operation. 309 * Cancel the given listen operation.
308 * 310 *
@@ -312,12 +314,14 @@ void
312GNUNET_SET_listen_cancel (struct GNUNET_SET_ListenHandle *lh); 314GNUNET_SET_listen_cancel (struct GNUNET_SET_ListenHandle *lh);
313 315
314 316
315
316/** 317/**
317 * Accept a request we got via GNUNET_SET_listen. 318 * Accept a request we got via GNUNET_SET_listen. Must be called
319 * during GNUNET_SET_listen, as the 'struct GNUNET_SET_Request'
320 * becomes invalid afterwards.
318 * 321 *
319 * @param request request to accept 322 * @param request request to accept
320 * @param set set used for the requested operation 323 * @param set set used for the requested operation -- FIXME: remove
324 * this argument, use GNUNET_SET_conclude instead!
321 * @param result_mode specified how results will be returned, 325 * @param result_mode specified how results will be returned,
322 * see 'GNUNET_SET_ResultMode'. 326 * see 'GNUNET_SET_ResultMode'.
323 * @param result_cb callback for the results 327 * @param result_cb callback for the results
@@ -333,7 +337,25 @@ GNUNET_SET_accept (struct GNUNET_SET_Request *request,
333 337
334 338
335/** 339/**
336 * Cancel the given set operation. 340 * Conclude the given set operation using the given set.
341 * This function is called once we have fully constructed
342 * the set that we want to use for the operation. At this
343 * time, the P2P protocol can then begin to exchange the
344 * set information and call the result callback with the
345 * result information.
346 *
347 * @param oh handle to the set operation
348 * @param set the set to use for the operation
349 */
350void
351GNUNET_SET_conclude (struct GNUNET_SET_OperationHandle *oh,
352 struct GNUNET_SET_Handle *set);
353
354
355/**
356 * Cancel the given set operation. FIXME: do clients have
357 * to cancel the operatino if the GNUNET_SET_ResultIterator
358 * has been called with timeout/error/done?
337 * 359 *
338 * @param oh set operation to cancel 360 * @param oh set operation to cancel
339 */ 361 */