diff options
author | Özgür Kesim <oec-taler@kesim.org> | 2024-01-14 21:42:10 +0100 |
---|---|---|
committer | Özgür Kesim <oec-taler@kesim.org> | 2024-01-14 21:42:10 +0100 |
commit | e095416bc2e299afc1bde1f33382845b7baf4c01 (patch) | |
tree | 1229ab1f64b524a105dae63262f151e8cf1074f0 /brandt.h | |
parent | 09af66c165035dcabde8f5c529877dbd6c296e91 (diff) |
lift code to recent GNUNET version; uncrustify
Diffstat (limited to 'brandt.h')
-rw-r--r-- | brandt.h | 62 |
1 files changed, 32 insertions, 30 deletions
@@ -32,24 +32,26 @@ struct BRANDT_Auction; /** Enumeration of all possible status reports for a single bidder */ -enum BRANDT_BidderStatus { - BRANDT_bidder_won, +enum BRANDT_BidderStatus +{ + BRANDT_bidder_won, }; /** * An array of this struct is given to the application by the BRANDT_CbResult() * callback. One instance represents the status of a single bidder. */ -struct BRANDT_Result { - /** Id of the bidder this instance refers to */ - uint16_t bidder; +struct BRANDT_Result +{ + /** Id of the bidder this instance refers to */ + uint16_t bidder; - /** The price the bidder has to pay. This value is only set if the #status - * indicates the bidder has won. */ - uint16_t price; + /** The price the bidder has to pay. This value is only set if the #status + * indicates the bidder has won. */ + uint16_t price; - /** Status of the bidder */ - enum BRANDT_BidderStatus status; + /** Status of the bidder */ + enum BRANDT_BidderStatus status; }; /** @@ -85,7 +87,7 @@ typedef uint16_t typedef int (*BRANDT_CbDeliver)(void *auction_closure, const void *msg, - size_t msg_len); + size_t msg_len); /** @@ -104,7 +106,7 @@ typedef int typedef void (*BRANDT_CbResult)(void *auction_closure, struct BRANDT_Result results[], - uint16_t results_len); + uint16_t results_len); void @@ -126,7 +128,7 @@ BRANDT_init (); */ int BRANDT_parse_desc (const void *auction_desc, - size_t auction_desc_len, + size_t auction_desc_len, struct GNUNET_TIME_Absolute *time_start, struct GNUNET_TIME_Relative *time_round, uint16_t *num_prices, @@ -156,13 +158,13 @@ BRANDT_parse_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_CbResult result, - BRANDT_CbDeliver broadcast, - BRANDT_CbDeliver unicast, +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, + size_t auction_desc_len, + uint16_t bid, struct GNUNET_CRYPTO_EccDlogContext *dlogctx); @@ -201,17 +203,17 @@ BRANDT_join (BRANDT_CbResult result, * 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, +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_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); @@ -226,8 +228,8 @@ BRANDT_new (BRANDT_CbResult result, */ void BRANDT_bidder_start (struct BRANDT_Auction *auction, - uint16_t i, - uint16_t n); + uint16_t i, + uint16_t n); /** @@ -253,9 +255,9 @@ BRANDT_destroy (struct BRANDT_Auction *auction); */ void BRANDT_got_message (struct BRANDT_Auction *auction, - uint16_t sender, + uint16_t sender, const unsigned char *msg, - size_t msg_len); + size_t msg_len); /**\todo: Error handling functions? */ |