diff options
author | Markus Teich <markus.teich@stusta.mhn.de> | 2016-08-17 23:53:49 +0200 |
---|---|---|
committer | Markus Teich <markus.teich@stusta.mhn.de> | 2016-08-17 23:53:49 +0200 |
commit | 25321ed0f5fa06f7c25d9e571c27c8dbeb5ffb96 (patch) | |
tree | c9ba7f1466ba4fd1a5185452b1b606f7cb52f00c /brandt.h | |
parent | 8daaa565bd5cfa5806296ef25efc2f5ee41af5bf (diff) | |
download | libbrandt-25321ed0f5fa06f7c25d9e571c27c8dbeb5ffb96.tar.gz libbrandt-25321ed0f5fa06f7c25d9e571c27c8dbeb5ffb96.zip |
get auctions rolling
Diffstat (limited to 'brandt.h')
-rw-r--r-- | brandt.h | 22 |
1 files changed, 17 insertions, 5 deletions
@@ -92,15 +92,16 @@ typedef int | |||
92 | * auction. This is the Pointer given to BRANDT_join() / BRANDT_new(). | 92 | * auction. This is the Pointer given to BRANDT_join() / BRANDT_new(). |
93 | * @param[in] bidder_id The numeric Id of the bidder this report refers to. | 93 | * @param[in] bidder_id The numeric Id of the bidder this report refers to. |
94 | * @param[in] status 1 if the user @a bidder_id has won the auction, 0 if he has | 94 | * @param[in] status 1 if the user @a bidder_id has won the auction, 0 if he has |
95 | * lost, -1 if erroneous behaviour was detected. | 95 | * lost, negative if erroneous behaviour was detected. Check the result_code |
96 | * enum for more information. | ||
96 | * @param[in] price The price, the winner has to pay or 0 if the auction result | 97 | * @param[in] price The price, the winner has to pay or 0 if the auction result |
97 | * is private and the user did not win. | 98 | * is private and the user did not win. |
98 | */ | 99 | */ |
99 | typedef void | 100 | typedef void |
100 | (*BRANDT_CbResult)(void *auction_closure, | 101 | (*BRANDT_CbResult)(void *auction_closure, |
101 | unsigned int bidder_id, | 102 | int32_t bidder_id, |
102 | int status, | 103 | int status, |
103 | uint16_t price); | 104 | uint16_t price); |
104 | 105 | ||
105 | 106 | ||
106 | void | 107 | void |
@@ -214,6 +215,17 @@ BRANDT_new (BRANDT_CbResult result, | |||
214 | 215 | ||
215 | 216 | ||
216 | /** | 217 | /** |
218 | * This function must be called when bidding after receipt of the start | ||
219 | * notification. | ||
220 | * | ||
221 | * @param[in] auction The pointer returned by BRANDT_join(). | ||
222 | * @param[in] n The amount of bidders (from the start announcement message). | ||
223 | void | ||
224 | BRANDT_start (struct BRANDT_Auction *auction, | ||
225 | uint16_t n); | ||
226 | |||
227 | |||
228 | /** | ||
217 | * Clean up this auction on shutdown. | 229 | * Clean up this auction on shutdown. |
218 | * | 230 | * |
219 | * @param[in] auction The pointer returned by BRANDT_join() or BRANDT_new(). | 231 | * @param[in] auction The pointer returned by BRANDT_join() or BRANDT_new(). |