From ec43082b1adfa394184900d49f5fe816dba749ec Mon Sep 17 00:00:00 2001 From: Markus Teich Date: Wed, 17 Aug 2016 17:37:56 +0200 Subject: add start callback and further basic tests --- internals.h | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) (limited to 'internals.h') 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 */ -- cgit v1.2.3