uncrustify brandt.h
This commit is contained in:
parent
e0f63621dd
commit
1d3b927c37
15
.astylerc
15
.astylerc
@ -1,15 +0,0 @@
|
|||||||
--mode=c
|
|
||||||
|
|
||||||
--style=bsd # brackets on their own line
|
|
||||||
|
|
||||||
--indent=tab # tabs for indentation, spaces for alignment
|
|
||||||
|
|
||||||
--min-conditional-indent=0 # align continuation lines to the opening bracket
|
|
||||||
|
|
||||||
--max-instatement-indent=80 # allow to use a lot of spaces for alignment
|
|
||||||
|
|
||||||
--pad-oper # operators + have - spaces
|
|
||||||
|
|
||||||
--pad-first-paren-out # space before (
|
|
||||||
|
|
||||||
--align-pointer=name # char *name
|
|
76
brandt.h
76
brandt.h
@ -41,9 +41,9 @@ struct BRANDT_Auction;
|
|||||||
* @return 0 on success, -1 on failure.
|
* @return 0 on success, -1 on failure.
|
||||||
*/
|
*/
|
||||||
typedef int
|
typedef int
|
||||||
(*BRANDT_BroadcastCallback) (void *auction_closure,
|
(*BRANDT_BroadcastCallback)(void * auction_closure,
|
||||||
const void *msg,
|
const void *msg,
|
||||||
size_t msg_len);
|
size_t msg_len);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -59,9 +59,9 @@ typedef int
|
|||||||
* @return 0 on success, -1 on failure.
|
* @return 0 on success, -1 on failure.
|
||||||
*/
|
*/
|
||||||
typedef int
|
typedef int
|
||||||
(*BRANDT_UnicastSellerCallback) (void *auction_closure,
|
(*BRANDT_UnicastSellerCallback)(void * auction_closure,
|
||||||
const void *msg,
|
const void *msg,
|
||||||
size_t msg_len);
|
size_t msg_len);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -80,10 +80,10 @@ typedef int
|
|||||||
* is private and the user did not win.
|
* is private and the user did not win.
|
||||||
*/
|
*/
|
||||||
typedef void
|
typedef void
|
||||||
(*BRANDT_ReportResultCallback) (void *auction_closure,
|
(*BRANDT_ReportResultCallback)(void * auction_closure,
|
||||||
unsigned int bidder_id,
|
unsigned int bidder_id,
|
||||||
int status,
|
int status,
|
||||||
uint16_t price);
|
uint16_t price);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -103,24 +103,24 @@ typedef void
|
|||||||
* black-box pointer, do NOT access/change it or the data it points to!
|
* black-box pointer, do NOT access/change it or the data it points to!
|
||||||
*/
|
*/
|
||||||
struct BRANDT_Auction *
|
struct BRANDT_Auction *
|
||||||
BRANDT_join (BRANDT_BroadcastCallback broadcast,
|
BRANDT_join (BRANDT_BroadcastCallback broadcast,
|
||||||
BRANDT_UnicastSellerCallback unicast,
|
BRANDT_UnicastSellerCallback unicast,
|
||||||
BRANDT_ReportResultCallback report,
|
BRANDT_ReportResultCallback report,
|
||||||
const void *auction_closure,
|
const void * auction_closure,
|
||||||
const void *auction_data,
|
const void * auction_data,
|
||||||
size_t auction_data_len);
|
size_t auction_data_len);
|
||||||
// FIXME: where do I specify my bid?
|
/* FIXME: where do I specify my bid? */
|
||||||
|
|
||||||
|
|
||||||
// FIXME: Distinguish handles for seller/buyers
|
/* FIXME: Distinguish handles for seller/buyers */
|
||||||
// FIXME: have cancellation (BRANDT_join_cancel())
|
/* FIXME: have cancellation (BRANDT_join_cancel()) */
|
||||||
// FIXME: provide means to extract a hash from auction data to
|
/* FIXME: provide means to extract a hash from auction data to */
|
||||||
// tie cryptographic operations to application-readable proposal
|
/* tie cryptographic operations to application-readable proposal */
|
||||||
// FIXME: have separate function to export 'out' variables
|
/* FIXME: have separate function to export 'out' variables */
|
||||||
// FIXME: might want to specify timeout? How do we deal with time?
|
/* FIXME: might want to specify timeout? How do we deal with time? */
|
||||||
// FIXME: separate creating an auction from starting it; initial
|
/* FIXME: separate creating an auction from starting it; initial */
|
||||||
// setup needs more auction proposal details (hash, timeout,
|
/* setup needs more auction proposal details (hash, timeout, */
|
||||||
// bid structure), later we need to know # participants
|
/* bid structure), later we need to know # participants */
|
||||||
/**
|
/**
|
||||||
* Create a new auction described by the @a auction_data parameter.
|
* Create a new auction described by the @a auction_data parameter.
|
||||||
*
|
*
|
||||||
@ -148,14 +148,14 @@ BRANDT_join (BRANDT_BroadcastCallback broadcast,
|
|||||||
* black-box pointer, do NOT access/change it or the data it points to!
|
* black-box pointer, do NOT access/change it or the data it points to!
|
||||||
*/
|
*/
|
||||||
struct BRANDT_Auction *
|
struct BRANDT_Auction *
|
||||||
BRANDT_new (BRANDT_BroadcastCallback broadcast,
|
BRANDT_new (BRANDT_BroadcastCallback broadcast,
|
||||||
BRANDT_ReportResultCallback report,
|
BRANDT_ReportResultCallback report,
|
||||||
const void *auction_closure,
|
const void * auction_closure,
|
||||||
const void **auction_data,
|
const void ** auction_data,
|
||||||
size_t *auction_data_len,
|
size_t * auction_data_len,
|
||||||
uint16_t num_prices,
|
uint16_t num_prices,
|
||||||
enum BRANDT_AuctionMode m,
|
enum BRANDT_AuctionMode m,
|
||||||
int outcome_public);
|
int outcome_public);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -168,8 +168,8 @@ BRANDT_new (BRANDT_BroadcastCallback broadcast,
|
|||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
BRANDT_got_broadcast (struct BRANDT_Auction *auction,
|
BRANDT_got_broadcast (struct BRANDT_Auction *auction,
|
||||||
void *msg,
|
void * msg,
|
||||||
size_t msg_len);
|
size_t msg_len);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -185,10 +185,10 @@ BRANDT_got_broadcast (struct BRANDT_Auction *auction,
|
|||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
BRANDT_got_unicast (struct BRANDT_Auction *auction,
|
BRANDT_got_unicast (struct BRANDT_Auction *auction,
|
||||||
void *msg,
|
void * msg,
|
||||||
size_t msg_len);
|
size_t msg_len);
|
||||||
|
|
||||||
|
|
||||||
///TODO: Error handling functions?
|
/**TODO: Error handling functions? */
|
||||||
|
|
||||||
#endif
|
#endif /* ifndef _BRANDT_BRANDT_H */
|
||||||
|
1434
uncrustify/conf
Normal file
1434
uncrustify/conf
Normal file
File diff suppressed because it is too large
Load Diff
20
uncrustify/file_header
Normal file
20
uncrustify/file_header
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
/* This file is part of libbrandt.
|
||||||
|
* 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
|
||||||
|
* Foundation, either version 3 of the License, or (at your option) any later
|
||||||
|
* version.
|
||||||
|
*
|
||||||
|
* libbrandt is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||||
|
* A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along with
|
||||||
|
* libbrandt. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @file $(filename)
|
||||||
|
* @brief TODO
|
||||||
|
*/
|
5
uncrustify/func_header
Normal file
5
uncrustify/func_header
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
/**
|
||||||
|
* $(function)
|
||||||
|
*
|
||||||
|
* $(javaparam)
|
||||||
|
*/
|
Loading…
Reference in New Issue
Block a user