diff options
author | Markus Teich <markus.teich@stusta.mhn.de> | 2016-12-02 12:53:54 +0100 |
---|---|---|
committer | Markus Teich <markus.teich@stusta.mhn.de> | 2016-12-02 12:53:54 +0100 |
commit | e66cbbe44f3708e6d6a30b216035bcccfc8e7207 (patch) | |
tree | 5329f963c2eee3af18976862cdfdf9e344dfd109 /brandt.h | |
parent | 64689a9083fd11a1e482cc86c0417183cdc76ece (diff) | |
download | libbrandt-e66cbbe44f3708e6d6a30b216035bcccfc8e7207.tar.gz libbrandt-e66cbbe44f3708e6d6a30b216035bcccfc8e7207.zip |
move ecdlogctx passing to _join()/_new() functions
Diffstat (limited to 'brandt.h')
-rw-r--r-- | brandt.h | 44 |
1 files changed, 25 insertions, 19 deletions
@@ -108,7 +108,7 @@ typedef void | |||
108 | 108 | ||
109 | 109 | ||
110 | void | 110 | void |
111 | BRANDT_init (struct GNUNET_CRYPTO_EccDlogContext *dlogctx); | 111 | BRANDT_init (); |
112 | 112 | ||
113 | 113 | ||
114 | /** | 114 | /** |
@@ -149,18 +149,21 @@ BRANDT_parse_desc (const void *auction_desc, | |||
149 | * @param[in] auction_desc_len The length in byte of the @a auction_desc | 149 | * @param[in] auction_desc_len The length in byte of the @a auction_desc |
150 | * structure. | 150 | * structure. |
151 | * @param[in] bid How much to bid on this auction. | 151 | * @param[in] bid How much to bid on this auction. |
152 | * @param[in] dlogctx The discrete log context obtained from | ||
153 | * GNUNET_CRYPTO_ecc_dlog_prepare(). Only needed for M+1st price auctions. | ||
152 | * @return A pointer, which should only be remembered and passed to | 154 | * @return A pointer, which should only be remembered and passed to |
153 | * libbrandt functions when the client needs to refer to this auction. This is a | 155 | * libbrandt functions when the client needs to refer to this auction. This is a |
154 | * black-box pointer, do NOT dereference/change it or the data it points to! | 156 | * black-box pointer, do NOT dereference/change it or the data it points to! |
155 | */ | 157 | */ |
156 | struct BRANDT_Auction * | 158 | struct BRANDT_Auction * |
157 | BRANDT_join (BRANDT_CbResult result, | 159 | BRANDT_join (BRANDT_CbResult result, |
158 | BRANDT_CbDeliver broadcast, | 160 | BRANDT_CbDeliver broadcast, |
159 | BRANDT_CbDeliver unicast, | 161 | BRANDT_CbDeliver unicast, |
160 | void *auction_closure, | 162 | void *auction_closure, |
161 | const void *auction_desc, | 163 | const void *auction_desc, |
162 | size_t auction_desc_len, | 164 | size_t auction_desc_len, |
163 | uint16_t bid); | 165 | uint16_t bid, |
166 | struct GNUNET_CRYPTO_EccDlogContext *dlogctx); | ||
164 | 167 | ||
165 | 168 | ||
166 | /* \todo: have cancellation (BRANDT_join_cancel()) */ | 169 | /* \todo: have cancellation (BRANDT_join_cancel()) */ |
@@ -190,23 +193,26 @@ BRANDT_join (BRANDT_CbResult result, | |||
190 | * @param[in] outcome_public If 1, the auction winner and price will be public | 193 | * @param[in] outcome_public If 1, the auction winner and price will be public |
191 | * to all participants, if 0, this information will only be revealed to the | 194 | * to all participants, if 0, this information will only be revealed to the |
192 | * winner and the seller. | 195 | * winner and the seller. |
196 | * @param[in] dlogctx The discrete log context obtained from | ||
197 | * GNUNET_CRYPTO_ecc_dlog_prepare(). Only needed for M+1st price auctions. | ||
193 | * @return If invalid parameters are passed, NULL is returned. Else the return | 198 | * @return If invalid parameters are passed, NULL is returned. Else the return |
194 | * value is a pointer, which should only be remembered and passed to | 199 | * value is a pointer, which should only be remembered and passed to |
195 | * libbrandt functions when the client needs to refer to this auction. This is a | 200 | * libbrandt functions when the client needs to refer to this auction. This is a |
196 | * black-box pointer, do NOT dereference/change it or the data it points to! | 201 | * black-box pointer, do NOT dereference/change it or the data it points to! |
197 | */ | 202 | */ |
198 | struct BRANDT_Auction * | 203 | struct BRANDT_Auction * |
199 | BRANDT_new (BRANDT_CbResult result, | 204 | BRANDT_new (BRANDT_CbResult result, |
200 | BRANDT_CbDeliver broadcast, | 205 | BRANDT_CbDeliver broadcast, |
201 | BRANDT_CbStart start, | 206 | BRANDT_CbStart start, |
202 | void *auction_closure, | 207 | void *auction_closure, |
203 | void **auction_desc, | 208 | void **auction_desc, |
204 | size_t *auction_desc_len, | 209 | size_t *auction_desc_len, |
205 | struct GNUNET_TIME_Absolute time_start, | 210 | struct GNUNET_TIME_Absolute time_start, |
206 | struct GNUNET_TIME_Relative time_round, | 211 | struct GNUNET_TIME_Relative time_round, |
207 | uint16_t num_prices, | 212 | uint16_t num_prices, |
208 | uint16_t m, | 213 | uint16_t m, |
209 | int outcome_public); | 214 | int outcome_public, |
215 | struct GNUNET_CRYPTO_EccDlogContext *dlogctx); | ||
210 | 216 | ||
211 | 217 | ||
212 | /** | 218 | /** |