summaryrefslogtreecommitdiff
path: root/brandt.h
diff options
context:
space:
mode:
authorMarkus Teich <markus.teich@stusta.mhn.de>2016-05-27 13:56:03 +0200
committerMarkus Teich <markus.teich@stusta.mhn.de>2016-05-27 13:56:03 +0200
commit7d259108852146df0623999e749b73dd9e33fc48 (patch)
tree9c36250bf685d062511e6250667acc195ff74c62 /brandt.h
parent7db11d76da117e63822ebc02b2dd9c0d95186fa5 (diff)
some fixmes
Diffstat (limited to 'brandt.h')
-rw-r--r--brandt.h23
1 files changed, 12 insertions, 11 deletions
diff --git a/brandt.h b/brandt.h
index 39c77ee..4791729 100644
--- a/brandt.h
+++ b/brandt.h
@@ -1,5 +1,5 @@
/* This file is part of libbrandt.
- * (C) 2016 Markus Teich
+ * Copyright (C) 2016 GNUnet e.V.
*
* libbrandt is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
@@ -38,7 +38,7 @@ struct BRANDT_Auction;
* @param[in] msg The message to be broadcast to all participants of
* @a auction_closure.
* @param[in] msg_len The length of the message @a msg in bytes.
- * @return 1 on success, 0 on failure. FIXME: unusual definition
+ * @return 0 on success, -1 on failure.
*/
typedef int
(*BRANDT_BroadcastCallback) (void *auction_closure,
@@ -56,7 +56,7 @@ typedef int
* auction. This is the Pointer given to BRANDT_join().
* @param[in] msg The message to be sent to the seller of @a auction_closure.
* @param[in] msg_len The length of the message @a msg in bytes.
- * @return 1 on success, 0 on failure. FIXME: unusual definition
+ * @return 0 on success, -1 on failure.
*/
typedef int
(*BRANDT_UnicastSellerCallback) (void *auction_closure,
@@ -66,23 +66,24 @@ typedef int
/**
* Functions of this type are called by libbrandt to report the auction outcome
- * to the user.
+ * or malicious/erroneous participants.
*
- * TODO: update price type. Don't do this notification as a callback?
+ * TODO: update price type.
+ * TODO: export proof of erroneous behaviour.
*
* @param[in] auction_closure Closure pointer representing the respective
- * auction. This is the Pointer given to BRANDT_join().
- * @param[in] won 1 if the user has won the auction, 0 otherwise.
+ * auction. This is the Pointer given to BRANDT_join() / BRANDT_new().
+ * @param[in] bidder_id The numeric Id of the bidder this report refers to.
+ * @param[in] status 1 if the user @a bidder_id has won the auction, 0 if he has
+ * lost, -1 if erroneous behaviour was detected.
* @param[in] price The price, the winner has to pay or 0 if the auction result
* is private and the user did not win.
*/
typedef void
(*BRANDT_ReportResultCallback) (void *auction_closure,
- int won,
+ unsigned int bidder_id,
+ int status,
uint16_t price);
-// FIXME: the above callback does not work for the seller,
-// but seems to be used for the seller right now.
-// FIXME: also need way to be told about malicious/erroneous participants
/**