summaryrefslogtreecommitdiff
path: root/brandt.h
diff options
context:
space:
mode:
authorMarkus Teich <markus.teich@stusta.mhn.de>2016-12-02 12:53:54 +0100
committerMarkus Teich <markus.teich@stusta.mhn.de>2016-12-02 12:53:54 +0100
commite66cbbe44f3708e6d6a30b216035bcccfc8e7207 (patch)
tree5329f963c2eee3af18976862cdfdf9e344dfd109 /brandt.h
parent64689a9083fd11a1e482cc86c0417183cdc76ece (diff)
move ecdlogctx passing to _join()/_new() functions
Diffstat (limited to 'brandt.h')
-rw-r--r--brandt.h44
1 files changed, 25 insertions, 19 deletions
diff --git a/brandt.h b/brandt.h
index ceee3d1..b967656 100644
--- a/brandt.h
+++ b/brandt.h
@@ -108,7 +108,7 @@ typedef void
void
-BRANDT_init (struct GNUNET_CRYPTO_EccDlogContext *dlogctx);
+BRANDT_init ();
/**
@@ -149,18 +149,21 @@ BRANDT_parse_desc (const void *auction_desc,
* @param[in] auction_desc_len The length in byte of the @a auction_desc
* structure.
* @param[in] bid How much to bid on this auction.
+ * @param[in] dlogctx The discrete log context obtained from
+ * GNUNET_CRYPTO_ecc_dlog_prepare(). Only needed for M+1st price auctions.
* @return A pointer, which should only be remembered and passed to
* libbrandt functions when the client needs to refer to this auction. This is a
* black-box pointer, do NOT dereference/change it or the data it points to!
*/
struct BRANDT_Auction *
-BRANDT_join (BRANDT_CbResult result,
- BRANDT_CbDeliver broadcast,
- BRANDT_CbDeliver unicast,
- void *auction_closure,
- const void *auction_desc,
- size_t auction_desc_len,
- uint16_t bid);
+BRANDT_join (BRANDT_CbResult result,
+ BRANDT_CbDeliver broadcast,
+ BRANDT_CbDeliver unicast,
+ void *auction_closure,
+ const void *auction_desc,
+ size_t auction_desc_len,
+ uint16_t bid,
+ struct GNUNET_CRYPTO_EccDlogContext *dlogctx);
/* \todo: have cancellation (BRANDT_join_cancel()) */
@@ -190,23 +193,26 @@ BRANDT_join (BRANDT_CbResult result,
* @param[in] outcome_public If 1, the auction winner and price will be public
* to all participants, if 0, this information will only be revealed to the
* winner and the seller.
+ * @param[in] dlogctx The discrete log context obtained from
+ * GNUNET_CRYPTO_ecc_dlog_prepare(). Only needed for M+1st price auctions.
* @return If invalid parameters are passed, NULL is returned. Else the return
* value is a pointer, which should only be remembered and passed to
* libbrandt functions when the client needs to refer to this auction. This is a
* black-box pointer, do NOT dereference/change it or the data it points to!
*/
struct BRANDT_Auction *
-BRANDT_new (BRANDT_CbResult result,
- BRANDT_CbDeliver broadcast,
- BRANDT_CbStart start,
- void *auction_closure,
- void **auction_desc,
- size_t *auction_desc_len,
- struct GNUNET_TIME_Absolute time_start,
- struct GNUNET_TIME_Relative time_round,
- uint16_t num_prices,
- uint16_t m,
- int outcome_public);
+BRANDT_new (BRANDT_CbResult result,
+ BRANDT_CbDeliver broadcast,
+ BRANDT_CbStart start,
+ void *auction_closure,
+ void **auction_desc,
+ size_t *auction_desc_len,
+ struct GNUNET_TIME_Absolute time_start,
+ struct GNUNET_TIME_Relative time_round,
+ uint16_t num_prices,
+ uint16_t m,
+ int outcome_public,
+ struct GNUNET_CRYPTO_EccDlogContext *dlogctx);
/**