aboutsummaryrefslogtreecommitdiff
path: root/src/reclaim/gnunet-service-reclaim_tickets.h
diff options
context:
space:
mode:
authorSchanzenbach, Martin <mschanzenbach@posteo.de>2019-04-13 11:33:41 +0200
committerSchanzenbach, Martin <mschanzenbach@posteo.de>2019-04-14 10:01:24 +0200
commit41d086c02574e08a820612faf2cfb6e68049b316 (patch)
tree2f80bb52d05d3824451fa02b64b19467324cbdfe /src/reclaim/gnunet-service-reclaim_tickets.h
parent0a6ac045814213ff33e9317a40daf7250528249a (diff)
downloadgnunet-41d086c02574e08a820612faf2cfb6e68049b316.tar.gz
gnunet-41d086c02574e08a820612faf2cfb6e68049b316.zip
RECLAIM: less unneccessary crypto; syntax and build fixes
Diffstat (limited to 'src/reclaim/gnunet-service-reclaim_tickets.h')
-rw-r--r--src/reclaim/gnunet-service-reclaim_tickets.h77
1 files changed, 33 insertions, 44 deletions
diff --git a/src/reclaim/gnunet-service-reclaim_tickets.h b/src/reclaim/gnunet-service-reclaim_tickets.h
index 43bb902fd..ab0947865 100644
--- a/src/reclaim/gnunet-service-reclaim_tickets.h
+++ b/src/reclaim/gnunet-service-reclaim_tickets.h
@@ -29,16 +29,18 @@
29#define GNUNET_SERVICE_RECLAIM_TICKETS_H 29#define GNUNET_SERVICE_RECLAIM_TICKETS_H
30 30
31#include "platform.h" 31#include "platform.h"
32
32#include "gnunet_util_lib.h" 33#include "gnunet_util_lib.h"
34
33#include "gnunet_constants.h" 35#include "gnunet_constants.h"
34#include "gnunet_protocols.h"
35#include "gnunet_gnsrecord_lib.h"
36#include "gnunet_gns_service.h" 36#include "gnunet_gns_service.h"
37#include "gnunet_gnsrecord_lib.h"
37#include "gnunet_namestore_service.h" 38#include "gnunet_namestore_service.h"
38#include "gnunet_statistics_service.h" 39#include "gnunet_protocols.h"
39#include "gnunet_reclaim_plugin.h"
40#include "gnunet_reclaim_attribute_lib.h" 40#include "gnunet_reclaim_attribute_lib.h"
41#include "gnunet_reclaim_plugin.h"
41#include "gnunet_signatures.h" 42#include "gnunet_signatures.h"
43#include "gnunet_statistics_service.h"
42#include "reclaim.h" 44#include "reclaim.h"
43 45
44struct RECLAIM_TICKETS_Iterator; 46struct RECLAIM_TICKETS_Iterator;
@@ -50,9 +52,8 @@ struct RECLAIM_TICKETS_ConsumeHandle;
50 * @param cls closure 52 * @param cls closure
51 * @param ticket the ticket 53 * @param ticket the ticket
52 */ 54 */
53typedef void 55typedef void (*RECLAIM_TICKETS_TicketIter) (
54(*RECLAIM_TICKETS_TicketIter) (void *cls, 56 void *cls, struct GNUNET_RECLAIM_Ticket *ticket);
55 struct GNUNET_RECLAIM_Ticket *ticket);
56 57
57 58
58/** 59/**
@@ -60,57 +61,45 @@ typedef void
60 * 61 *
61 * @param cls closure 62 * @param cls closure
62 * @param ticket the ticket 63 * @param ticket the ticket
63 * @param success #GNUNET_SYSERR on failure (including timeout/queue drop/failure to validate) 64 * @param success #GNUNET_SYSERR on failure (including timeout/queue
64 * #GNUNET_OK on success 65 * drop/failure to validate) #GNUNET_OK on success
65 * @param emsg NULL on success, otherwise an error message 66 * @param emsg NULL on success, otherwise an error message
66 */ 67 */
67typedef void 68typedef void (*RECLAIM_TICKETS_TicketResult) (
68(*RECLAIM_TICKETS_TicketResult) (void *cls, 69 void *cls, struct GNUNET_RECLAIM_Ticket *ticket, uint32_t success,
69 struct GNUNET_RECLAIM_Ticket *ticket, 70 const char *emsg);
70 uint32_t success,
71 const char *emsg);
72 71
73 72
74typedef void 73typedef void (*RECLAIM_TICKETS_ConsumeCallback) (
75(*RECLAIM_TICKETS_ConsumeCallback) (void *cls, 74 void *cls, const struct GNUNET_CRYPTO_EcdsaPublicKey *identity,
76 const struct GNUNET_CRYPTO_EcdsaPublicKey *identity, 75 const struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList *l, uint32_t success,
77 const struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList *l, 76 const char *emsg);
78 uint32_t success,
79 const char *emsg);
80 77
81struct RECLAIM_TICKETS_ConsumeHandle* 78struct RECLAIM_TICKETS_ConsumeHandle *
82RECLAIM_TICKETS_consume (const struct GNUNET_CRYPTO_EcdsaPrivateKey *id, 79RECLAIM_TICKETS_consume (const struct GNUNET_CRYPTO_EcdsaPrivateKey *id,
83 const struct GNUNET_RECLAIM_Ticket *ticket, 80 const struct GNUNET_RECLAIM_Ticket *ticket,
84 RECLAIM_TICKETS_ConsumeCallback cb, 81 RECLAIM_TICKETS_ConsumeCallback cb, void *cb_cls);
85 void* cb_cls);
86 82
87void 83void RECLAIM_TICKETS_consume_cancel (struct RECLAIM_TICKETS_ConsumeHandle *cth);
88RECLAIM_TICKETS_consume_cancel (struct RECLAIM_TICKETS_ConsumeHandle *cth);
89 84
90void 85void RECLAIM_TICKETS_issue (
91RECLAIM_TICKETS_issue (const struct GNUNET_CRYPTO_EcdsaPrivateKey *identity, 86 const struct GNUNET_CRYPTO_EcdsaPrivateKey *identity,
92 const struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList *attrs, 87 const struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList *attrs,
93 const struct GNUNET_CRYPTO_EcdsaPublicKey *audience, 88 const struct GNUNET_CRYPTO_EcdsaPublicKey *audience,
94 RECLAIM_TICKETS_TicketResult cb, 89 RECLAIM_TICKETS_TicketResult cb, void *cb_cls);
95 void* cb_cls);
96 90
97void 91void RECLAIM_TICKETS_iteration_next (struct RECLAIM_TICKETS_Iterator *iter);
98RECLAIM_TICKETS_iteration_next (struct RECLAIM_TICKETS_Iterator *iter);
99 92
100 93
101void 94void RECLAIM_TICKETS_iteration_stop (struct RECLAIM_TICKETS_Iterator *iter);
102RECLAIM_TICKETS_iteration_stop (struct RECLAIM_TICKETS_Iterator *iter);
103 95
104 96
105struct RECLAIM_TICKETS_Iterator* 97struct RECLAIM_TICKETS_Iterator *RECLAIM_TICKETS_iteration_start (
106RECLAIM_TICKETS_iteration_start (const struct GNUNET_CRYPTO_EcdsaPrivateKey *identity, 98 const struct GNUNET_CRYPTO_EcdsaPrivateKey *identity,
107 RECLAIM_TICKETS_TicketIter cb, 99 RECLAIM_TICKETS_TicketIter cb, void *cb_cls);
108 void* cb_cls);
109 100
110 101
111int 102int RECLAIM_TICKETS_init (const struct GNUNET_CONFIGURATION_Handle *c);
112RECLAIM_TICKETS_init (const struct GNUNET_CONFIGURATION_Handle *c);
113 103
114void 104void RECLAIM_TICKETS_deinit (void);
115RECLAIM_TICKETS_deinit (void);
116#endif 105#endif