diff options
Diffstat (limited to 'brandt.h')
-rw-r--r-- | brandt.h | 27 |
1 files changed, 22 insertions, 5 deletions
@@ -31,6 +31,22 @@ /** defined in internals.h */ struct BRANDT_Auction; + +/** + * Functions of this type are called by libbrandt when the auction should be + * started. The application has to announce the ordered list of all bidders to + * them and must return the amount of bidders. After this function is called no + * more new bidders may be accepted by the application. This callback is only + * used if the auction is in seller mode. + * + * @param[in] auction_closure Closure pointer representing the respective + * auction. This is the Pointer given to BRANDT_new(). + * @return The amount of bidders participating in the auction. + */ +typedef uint16_t +(*BRANDT_CbStart)(void *auction_closure); + + /** * Functions of this type are called by libbrandt to broadcast messages to the * blackboard of a specific auction. They have to be sent using authenticated @@ -70,7 +86,7 @@ typedef int * Functions of this type are called by libbrandt to report the auction outcome * or malicious/erroneous participants. * - * \todo: export proof of erroneous behaviour. + * \todo: export proof of erroneous behaviour / outcome. * * @param[in] auction_closure Closure pointer representing the respective * auction. This is the Pointer given to BRANDT_join() / BRANDT_new(). @@ -135,9 +151,9 @@ BRANDT_verify_desc (const void *auction_desc, * black-box pointer, do NOT dereference/change it or the data it points to! */ struct BRANDT_Auction * -BRANDT_join (BRANDT_CbBroadcast broadcast, +BRANDT_join (BRANDT_CbResult result, + BRANDT_CbBroadcast broadcast, BRANDT_CbUnicast unicast, - BRANDT_CbResult result, void *auction_closure, const void *auction_desc, size_t auction_desc_len, @@ -182,8 +198,9 @@ BRANDT_join (BRANDT_CbBroadcast broadcast, * black-box pointer, do NOT dereference/change it or the data it points to! */ struct BRANDT_Auction * -BRANDT_new (BRANDT_CbBroadcast broadcast, - BRANDT_CbResult result, +BRANDT_new (BRANDT_CbResult result, + BRANDT_CbBroadcast broadcast, + BRANDT_CbStart start, void *auction_closure, void **auction_desc, size_t *auction_desc_len, |