aboutsummaryrefslogtreecommitdiff
path: root/brandt.h
diff options
context:
space:
mode:
Diffstat (limited to 'brandt.h')
-rw-r--r--brandt.h38
1 files changed, 16 insertions, 22 deletions
diff --git a/brandt.h b/brandt.h
index 6d68f0a..fab8ebf 100644
--- a/brandt.h
+++ b/brandt.h
@@ -126,13 +126,11 @@ BRANDT_init (struct GNUNET_CRYPTO_EccDlogContext *dlogctx);
126 126
127 127
128/** 128/**
129 * Verify an auction description blob and parse it's fields. See BRANDT_new() 129 * Parse an auction description data block. See BRANDT_new()
130 * for an explanation of the different auction description fields. 130 * for an explanation of the different auction description fields.
131 * 131 *
132 * @param[in] auction_desc The auction description blob published by the seller. 132 * @param[in] auction_desc The auction description blob published by the seller.
133 * @param[in] auction_desc_len Length of @a auction_desc in bytes. 133 * @param[in] auction_desc_len Length of @a auction_desc in bytes.
134 * @param[in] description The description text in application choosen format.
135 * @param[in] description_len Length of @a description in bytes.
136 * @param[out] time_start Starting time of the auction. May be NULL. 134 * @param[out] time_start Starting time of the auction. May be NULL.
137 * @param[out] time_round Maximum round time of the auction. May be NULL. 135 * @param[out] time_round Maximum round time of the auction. May be NULL.
138 * @param[out] num_prices Amount of possible prices. May be NULL. 136 * @param[out] num_prices Amount of possible prices. May be NULL.
@@ -140,15 +138,13 @@ BRANDT_init (struct GNUNET_CRYPTO_EccDlogContext *dlogctx);
140 * @param[out] outcome_public Outcome setting. May be NULL. 138 * @param[out] outcome_public Outcome setting. May be NULL.
141 */ 139 */
142int 140int
143BRANDT_verify_desc (const void *auction_desc, 141BRANDT_parse_desc (const void *auction_desc,
144 size_t auction_desc_len, 142 size_t auction_desc_len,
145 const void *description, 143 struct GNUNET_TIME_Absolute *time_start,
146 uint32_t description_len, 144 struct GNUNET_TIME_Relative *time_round,
147 struct GNUNET_TIME_Absolute *time_start, 145 uint16_t *num_prices,
148 struct GNUNET_TIME_Relative *time_round, 146 uint16_t *m,
149 uint16_t *num_prices, 147 uint16_t *outcome_public);
150 uint16_t *m,
151 uint16_t *outcome_public);
152 148
153 149
154/** 150/**
@@ -160,9 +156,10 @@ BRANDT_verify_desc (const void *auction_desc,
160 * @param[in] auction_closure Closure pointer representing the auction. This 156 * @param[in] auction_closure Closure pointer representing the auction. This
161 * will not be touched by libbrandt itself. It is only passed to the callbacks. 157 * will not be touched by libbrandt itself. It is only passed to the callbacks.
162 * @param[in] auction_desc The auction information data published by the seller. 158 * @param[in] auction_desc The auction information data published by the seller.
163 * This is an opaque data structure. It will be parsed and checked by 159 * This is opaque to the application. Its content will be parsed. The
164 * BRANDT_join(). 160 * application MUST check the signature on this data block before passing it to
165 * @param[in] auction_desc_len The length in bytes of the @a auction_desc 161 * libbrandt!
162 * @param[in] auction_desc_len The length in byte of the @a auction_desc
166 * structure. 163 * structure.
167 * @return A pointer, which should only be remembered and passed to 164 * @return A pointer, which should only be remembered and passed to
168 * libbrandt functions when the client needs to refer to this auction. This is a 165 * libbrandt functions when the client needs to refer to this auction. This is a
@@ -175,8 +172,6 @@ BRANDT_join (BRANDT_CbResult result,
175 void *auction_closure, 172 void *auction_closure,
176 const void *auction_desc, 173 const void *auction_desc,
177 size_t auction_desc_len, 174 size_t auction_desc_len,
178 const void *description,
179 uint32_t description_len,
180 uint16_t bid); 175 uint16_t bid);
181 176
182 177
@@ -196,9 +191,10 @@ BRANDT_join (BRANDT_CbResult result,
196 * @param[in] result Pointer to the result callback function 191 * @param[in] result Pointer to the result callback function
197 * @param[in] auction_closure Closure pointer representing the auction. This 192 * @param[in] auction_closure Closure pointer representing the auction. This
198 * will not be touched by libbrandt. It is only passed to the callbacks. 193 * will not be touched by libbrandt. It is only passed to the callbacks.
199 * @param[out] auction_desc The auction information data a an opaque data 194 * @param[out] auction_desc The auction information data as an opaque data
200 * structure. It will be generated by BRANDT_new() and should be distributed to 195 * structure. It is generated by this function and should be distributed to
201 * all possibly interested bidders. 196 * all possibly interested bidders. The seller MUST sign this data block before
197 * publishing it!
202 * @param[out] auction_desc_len The length in bytes of the @a auction_desc 198 * @param[out] auction_desc_len The length in bytes of the @a auction_desc
203 * structure. Will be filled by BRANDT_new(). 199 * structure. Will be filled by BRANDT_new().
204 * @param[in] num_prices The amount of possible valuations for the sold item(s). 200 * @param[in] num_prices The amount of possible valuations for the sold item(s).
@@ -223,8 +219,6 @@ BRANDT_new (BRANDT_CbResult result,
223 void *auction_closure, 219 void *auction_closure,
224 void **auction_desc, 220 void **auction_desc,
225 size_t *auction_desc_len, 221 size_t *auction_desc_len,
226 const void *description,
227 uint32_t description_len,
228 struct GNUNET_TIME_Absolute time_start, 222 struct GNUNET_TIME_Absolute time_start,
229 struct GNUNET_TIME_Relative time_round, 223 struct GNUNET_TIME_Relative time_round,
230 uint16_t num_prices, 224 uint16_t num_prices,