aboutsummaryrefslogtreecommitdiff
path: root/brandt.h
diff options
context:
space:
mode:
authorMarkus Teich <markus.teich@stusta.mhn.de>2016-06-12 01:13:03 +0200
committerMarkus Teich <markus.teich@stusta.mhn.de>2016-06-12 01:14:22 +0200
commit1d3b927c3743f626f0ffb3f49c8167c4efb34a67 (patch)
treef259651699325e94e17b81067090b0d8a64419fd /brandt.h
parente0f63621dd45a9da0fa06bee3e4d3cde6ca550cf (diff)
downloadlibbrandt-1d3b927c3743f626f0ffb3f49c8167c4efb34a67.tar.gz
libbrandt-1d3b927c3743f626f0ffb3f49c8167c4efb34a67.zip
uncrustify brandt.h
Diffstat (limited to 'brandt.h')
-rw-r--r--brandt.h80
1 files changed, 40 insertions, 40 deletions
diff --git a/brandt.h b/brandt.h
index 4791729..1f95d40 100644
--- a/brandt.h
+++ b/brandt.h
@@ -41,9 +41,9 @@ struct BRANDT_Auction;
41 * @return 0 on success, -1 on failure. 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,
45 const void *msg, 45 const void *msg,
46 size_t msg_len); 46 size_t msg_len);
47 47
48 48
49/** 49/**
@@ -59,9 +59,9 @@ typedef int
59 * @return 0 on success, -1 on failure. 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,
63 const void *msg, 63 const void *msg,
64 size_t msg_len); 64 size_t msg_len);
65 65
66 66
67/** 67/**
@@ -80,10 +80,10 @@ typedef int
80 * is private and the user did not win. 80 * is private and the user did not win.
81 */ 81 */
82typedef void 82typedef void
83(*BRANDT_ReportResultCallback) (void *auction_closure, 83(*BRANDT_ReportResultCallback)(void * auction_closure,
84 unsigned int bidder_id, 84 unsigned int bidder_id,
85 int status, 85 int status,
86 uint16_t price); 86 uint16_t price);
87 87
88 88
89/** 89/**
@@ -103,24 +103,24 @@ typedef void
103 * black-box pointer, do NOT access/change it or the data it points to! 103 * black-box pointer, do NOT access/change it or the data it points to!
104 */ 104 */
105struct BRANDT_Auction * 105struct BRANDT_Auction *
106BRANDT_join (BRANDT_BroadcastCallback broadcast, 106BRANDT_join (BRANDT_BroadcastCallback broadcast,
107 BRANDT_UnicastSellerCallback unicast, 107 BRANDT_UnicastSellerCallback unicast,
108 BRANDT_ReportResultCallback report, 108 BRANDT_ReportResultCallback report,
109 const void *auction_closure, 109 const void * auction_closure,
110 const void *auction_data, 110 const void * auction_data,
111 size_t auction_data_len); 111 size_t auction_data_len);
112// FIXME: where do I specify my bid? 112/* FIXME: where do I specify my bid? */
113 113
114 114
115// FIXME: Distinguish handles for seller/buyers 115/* FIXME: Distinguish handles for seller/buyers */
116// FIXME: have cancellation (BRANDT_join_cancel()) 116/* FIXME: have cancellation (BRANDT_join_cancel()) */
117// FIXME: provide means to extract a hash from auction data to 117/* FIXME: provide means to extract a hash from auction data to */
118// tie cryptographic operations to application-readable proposal 118/* tie cryptographic operations to application-readable proposal */
119// FIXME: have separate function to export 'out' variables 119/* FIXME: have separate function to export 'out' variables */
120// FIXME: might want to specify timeout? How do we deal with time? 120/* FIXME: might want to specify timeout? How do we deal with time? */
121// FIXME: separate creating an auction from starting it; initial 121/* FIXME: separate creating an auction from starting it; initial */
122// setup needs more auction proposal details (hash, timeout, 122/* setup needs more auction proposal details (hash, timeout, */
123// bid structure), later we need to know # participants 123/* bid structure), later we need to know # participants */
124/** 124/**
125 * Create a new auction described by the @a auction_data parameter. 125 * Create a new auction described by the @a auction_data parameter.
126 * 126 *
@@ -148,14 +148,14 @@ BRANDT_join (BRANDT_BroadcastCallback broadcast,
148 * black-box pointer, do NOT access/change it or the data it points to! 148 * black-box pointer, do NOT access/change it or the data it points to!
149 */ 149 */
150struct BRANDT_Auction * 150struct BRANDT_Auction *
151BRANDT_new (BRANDT_BroadcastCallback broadcast, 151BRANDT_new (BRANDT_BroadcastCallback broadcast,
152 BRANDT_ReportResultCallback report, 152 BRANDT_ReportResultCallback report,
153 const void *auction_closure, 153 const void * auction_closure,
154 const void **auction_data, 154 const void ** auction_data,
155 size_t *auction_data_len, 155 size_t * auction_data_len,
156 uint16_t num_prices, 156 uint16_t num_prices,
157 enum BRANDT_AuctionMode m, 157 enum BRANDT_AuctionMode m,
158 int outcome_public); 158 int outcome_public);
159 159
160 160
161/** 161/**
@@ -168,8 +168,8 @@ BRANDT_new (BRANDT_BroadcastCallback broadcast,
168 */ 168 */
169void 169void
170BRANDT_got_broadcast (struct BRANDT_Auction *auction, 170BRANDT_got_broadcast (struct BRANDT_Auction *auction,
171 void *msg, 171 void * msg,
172 size_t msg_len); 172 size_t msg_len);
173 173
174 174
175/** 175/**
@@ -185,10 +185,10 @@ BRANDT_got_broadcast (struct BRANDT_Auction *auction,
185 */ 185 */
186void 186void
187BRANDT_got_unicast (struct BRANDT_Auction *auction, 187BRANDT_got_unicast (struct BRANDT_Auction *auction,
188 void *msg, 188 void * msg,
189 size_t msg_len); 189 size_t msg_len);
190 190
191 191
192///TODO: Error handling functions? 192/**TODO: Error handling functions? */
193 193
194#endif 194#endif /* ifndef _BRANDT_BRANDT_H */