aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--AUTHORS2
-rw-r--r--brandt.h23
2 files changed, 14 insertions, 11 deletions
diff --git a/AUTHORS b/AUTHORS
new file mode 100644
index 0000000..f79c2ed
--- /dev/null
+++ b/AUTHORS
@@ -0,0 +1,2 @@
1Christian Grothoff <christian@grothoff.org>
2Markus Teich <teichm@net.in.tum.de>
diff --git a/brandt.h b/brandt.h
index 39c77ee..4791729 100644
--- a/brandt.h
+++ b/brandt.h
@@ -1,5 +1,5 @@
1/* This file is part of libbrandt. 1/* This file is part of libbrandt.
2 * (C) 2016 Markus Teich 2 * Copyright (C) 2016 GNUnet e.V.
3 * 3 *
4 * libbrandt is free software: you can redistribute it and/or modify it under 4 * libbrandt is free software: you can redistribute it and/or modify it under
5 * the terms of the GNU General Public License as published by the Free Software 5 * the terms of the GNU General Public License as published by the Free Software
@@ -38,7 +38,7 @@ struct BRANDT_Auction;
38 * @param[in] msg The message to be broadcast to all participants of 38 * @param[in] msg The message to be broadcast to all participants of
39 * @a auction_closure. 39 * @a auction_closure.
40 * @param[in] msg_len The length of the message @a msg in bytes. 40 * @param[in] msg_len The length of the message @a msg in bytes.
41 * @return 1 on success, 0 on failure. FIXME: unusual definition 41 * @return 0 on success, -1 on failure.
42 */ 42 */
43typedef int 43typedef int
44(*BRANDT_BroadcastCallback) (void *auction_closure, 44(*BRANDT_BroadcastCallback) (void *auction_closure,
@@ -56,7 +56,7 @@ typedef int
56 * auction. This is the Pointer given to BRANDT_join(). 56 * auction. This is the Pointer given to BRANDT_join().
57 * @param[in] msg The message to be sent to the seller of @a auction_closure. 57 * @param[in] msg The message to be sent to the seller of @a auction_closure.
58 * @param[in] msg_len The length of the message @a msg in bytes. 58 * @param[in] msg_len The length of the message @a msg in bytes.
59 * @return 1 on success, 0 on failure. FIXME: unusual definition 59 * @return 0 on success, -1 on failure.
60 */ 60 */
61typedef int 61typedef int
62(*BRANDT_UnicastSellerCallback) (void *auction_closure, 62(*BRANDT_UnicastSellerCallback) (void *auction_closure,
@@ -66,23 +66,24 @@ typedef int
66 66
67/** 67/**
68 * Functions of this type are called by libbrandt to report the auction outcome 68 * Functions of this type are called by libbrandt to report the auction outcome
69 * to the user. 69 * or malicious/erroneous participants.
70 * 70 *
71 * TODO: update price type. Don't do this notification as a callback? 71 * TODO: update price type.
72 * TODO: export proof of erroneous behaviour.
72 * 73 *
73 * @param[in] auction_closure Closure pointer representing the respective 74 * @param[in] auction_closure Closure pointer representing the respective
74 * auction. This is the Pointer given to BRANDT_join(). 75 * auction. This is the Pointer given to BRANDT_join() / BRANDT_new().
75 * @param[in] won 1 if the user has won the auction, 0 otherwise. 76 * @param[in] bidder_id The numeric Id of the bidder this report refers to.
77 * @param[in] status 1 if the user @a bidder_id has won the auction, 0 if he has
78 * lost, -1 if erroneous behaviour was detected.
76 * @param[in] price The price, the winner has to pay or 0 if the auction result 79 * @param[in] price The price, the winner has to pay or 0 if the auction result
77 * is private and the user did not win. 80 * is private and the user did not win.
78 */ 81 */
79typedef void 82typedef void
80(*BRANDT_ReportResultCallback) (void *auction_closure, 83(*BRANDT_ReportResultCallback) (void *auction_closure,
81 int won, 84 unsigned int bidder_id,
85 int status,
82 uint16_t price); 86 uint16_t price);
83// FIXME: the above callback does not work for the seller,
84// but seems to be used for the seller right now.
85// FIXME: also need way to be told about malicious/erroneous participants
86 87
87 88
88/** 89/**