diff options
author | Markus Teich <markus.teich@stusta.mhn.de> | 2016-08-12 14:38:10 +0200 |
---|---|---|
committer | Markus Teich <markus.teich@stusta.mhn.de> | 2016-08-12 15:22:57 +0200 |
commit | 6483328c4805b92390032ac45f55c50be7b6f103 (patch) | |
tree | 2a9fb3d125a0f850046973af0c061e5f3a7e2acb /internals.h | |
parent | 155d0a2370721f1ba50759c25daa27b37c2234c7 (diff) |
fill descr struct on new()
Diffstat (limited to 'internals.h')
-rw-r--r-- | internals.h | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/internals.h b/internals.h index acb4845..fa2ea87 100644 --- a/internals.h +++ b/internals.h @@ -55,12 +55,20 @@ enum outcome_type { GNUNET_NETWORK_STRUCT_BEGIN /** - * This struct describes an auction and has to be followed by #description_len - * bytes of arbitrary data where the description of the item to be sold is - * stored. All fields are stored in network byte order. + * 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 + * to be sold is stored. This buffer should also contain information linking the + * auction to the payment system (which exact prices do the k possibilities + * refer to, payment system seller identity, …). All fields are stored in + * network byte order. * - * \todo: align to a multiple of 64bit */ + * \todo: align to a multiple of 64bit + * \todo: versionsnummer */ struct BRANDT_DescrP { + /** Hash code over the remaining elements of this struct followed by the + * description buffer of #description_len bytes */ + struct GNUNET_HashCode hash GNUNET_PACKED; + /** Starting time of the auction. Bidders have to join the auction via * BRANDT_join until this time */ struct GNUNET_TIME_AbsoluteNBO time_start; @@ -68,9 +76,12 @@ struct BRANDT_DescrP { /** The maximum duration the participants have to complete each round. */ struct GNUNET_TIME_RelativeNBO time_round; - /** The length of the description in bytes directly following this struct */ + /** The length of the description in bytes */ uint32_t description_len GNUNET_PACKED; + /** reserved for future use */ + uint32_t reserved1 GNUNET_PACKED; + /** The amount of possible prices */ uint16_t k GNUNET_PACKED; @@ -81,6 +92,9 @@ struct BRANDT_DescrP { /** Outcome type. 0 means private outcome, everything else means public * outcome. */ uint16_t outcome_public GNUNET_PACKED; + + /** reserved for future use */ + uint16_t reserved2 GNUNET_PACKED; }; GNUNET_NETWORK_STRUCT_END @@ -102,6 +116,9 @@ struct BRANDT_Auction { * outcome. */ uint16_t outcome_public; + /** Link to the next delayed task (auction start trigger, round trigger) */ + struct GNUNET_SCHEDULER_Task *task; + void *closure; /** auction closure given by the user */ BRANDT_CbBroadcast bcast; /** broadcast callback */ |