diff options
author | Markus Teich <markus.teich@stusta.mhn.de> | 2016-08-17 17:37:56 +0200 |
---|---|---|
committer | Markus Teich <markus.teich@stusta.mhn.de> | 2016-08-17 17:37:56 +0200 |
commit | ec43082b1adfa394184900d49f5fe816dba749ec (patch) | |
tree | 2c542044512484a9a29e15d1cfb9c3fef7129cb6 /internals.h | |
parent | 6eb35ae72f4e579bd094f630b6b9d3d042432ae3 (diff) |
add start callback and further basic tests
Diffstat (limited to 'internals.h')
-rw-r--r-- | internals.h | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/internals.h b/internals.h index 23dab78..a1c939a 100644 --- a/internals.h +++ b/internals.h @@ -29,7 +29,6 @@ enum rounds { - msg_join, msg_init, msg_bid, msg_outcome, @@ -39,21 +38,27 @@ enum rounds { enum auction_type { - auction_firstPrice, - auction_mPlusFirstPrice, - auction_last + auction_firstPrice = 0, + auction_mPlusFirstPrice = 1, + auction_last = 2 }; enum outcome_type { - outcome_private, - outcome_public, - outcome_last + outcome_private = 0, + outcome_public = 1, + outcome_last = 2 }; GNUNET_NETWORK_STRUCT_BEGIN +struct msg_head { + uint32_t prot_version GNUNET_PACKED; + uint32_t msg_type GNUNET_PACKED; +}; + + /** * This struct describes an auction and is always linked to a description buffer * of #description_len bytes of arbitrary data where the description of the item @@ -121,9 +126,10 @@ struct BRANDT_Auction { void *closure; /** auction closure given by the user */ + BRANDT_CbResult result; /** result reporting callback */ BRANDT_CbBroadcast bcast; /** broadcast callback */ BRANDT_CbUnicast ucast; /** unicast callback */ - BRANDT_CbResult result; /** result reporting callback */ + BRANDT_CbStart start; /** start callback */ int seller_mode; /** If 0 we are bidding, selling otherwise */ enum rounds cur_round; /** The round we expect messages from */ |