diff options
Diffstat (limited to 'src/reclaim/gnunet-service-reclaim_tickets.h')
-rw-r--r-- | src/reclaim/gnunet-service-reclaim_tickets.h | 46 |
1 files changed, 33 insertions, 13 deletions
diff --git a/src/reclaim/gnunet-service-reclaim_tickets.h b/src/reclaim/gnunet-service-reclaim_tickets.h index ab0947865..d2b614c46 100644 --- a/src/reclaim/gnunet-service-reclaim_tickets.h +++ b/src/reclaim/gnunet-service-reclaim_tickets.h | |||
@@ -45,6 +45,7 @@ | |||
45 | 45 | ||
46 | struct RECLAIM_TICKETS_Iterator; | 46 | struct RECLAIM_TICKETS_Iterator; |
47 | struct RECLAIM_TICKETS_ConsumeHandle; | 47 | struct RECLAIM_TICKETS_ConsumeHandle; |
48 | struct RECLAIM_TICKETS_RevokeHandle; | ||
48 | 49 | ||
49 | /** | 50 | /** |
50 | * Continuation called with ticket. | 51 | * Continuation called with ticket. |
@@ -66,40 +67,59 @@ typedef void (*RECLAIM_TICKETS_TicketIter) ( | |||
66 | * @param emsg NULL on success, otherwise an error message | 67 | * @param emsg NULL on success, otherwise an error message |
67 | */ | 68 | */ |
68 | typedef void (*RECLAIM_TICKETS_TicketResult) ( | 69 | typedef void (*RECLAIM_TICKETS_TicketResult) ( |
69 | void *cls, struct GNUNET_RECLAIM_Ticket *ticket, uint32_t success, | 70 | void *cls, struct GNUNET_RECLAIM_Ticket *ticket, int32_t success, |
70 | const char *emsg); | 71 | const char *emsg); |
71 | 72 | ||
72 | 73 | ||
73 | typedef void (*RECLAIM_TICKETS_ConsumeCallback) ( | 74 | typedef void (*RECLAIM_TICKETS_ConsumeCallback) ( |
74 | void *cls, const struct GNUNET_CRYPTO_EcdsaPublicKey *identity, | 75 | void *cls, const struct GNUNET_CRYPTO_EcdsaPublicKey *identity, |
75 | const struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList *l, uint32_t success, | 76 | const struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList *l, int32_t success, |
76 | const char *emsg); | 77 | const char *emsg); |
77 | 78 | ||
79 | |||
80 | typedef void (*RECLAIM_TICKETS_RevokeCallback) (void *cls, int32_t success); | ||
81 | |||
82 | struct RECLAIM_TICKETS_RevokeHandle * | ||
83 | RECLAIM_TICKETS_revoke (const struct GNUNET_RECLAIM_Ticket *ticket, | ||
84 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *identity, | ||
85 | RECLAIM_TICKETS_RevokeCallback cb, void *cb_cls); | ||
86 | |||
87 | |||
88 | void | ||
89 | RECLAIM_TICKETS_revoke_cancel (struct RECLAIM_TICKETS_RevokeHandle *rh); | ||
90 | |||
91 | |||
78 | struct RECLAIM_TICKETS_ConsumeHandle * | 92 | struct RECLAIM_TICKETS_ConsumeHandle * |
79 | RECLAIM_TICKETS_consume (const struct GNUNET_CRYPTO_EcdsaPrivateKey *id, | 93 | RECLAIM_TICKETS_consume (const struct GNUNET_CRYPTO_EcdsaPrivateKey *id, |
80 | const struct GNUNET_RECLAIM_Ticket *ticket, | 94 | const struct GNUNET_RECLAIM_Ticket *ticket, |
81 | RECLAIM_TICKETS_ConsumeCallback cb, void *cb_cls); | 95 | RECLAIM_TICKETS_ConsumeCallback cb, void *cb_cls); |
82 | 96 | ||
83 | void RECLAIM_TICKETS_consume_cancel (struct RECLAIM_TICKETS_ConsumeHandle *cth); | 97 | void |
98 | RECLAIM_TICKETS_consume_cancel (struct RECLAIM_TICKETS_ConsumeHandle *cth); | ||
84 | 99 | ||
85 | void RECLAIM_TICKETS_issue ( | 100 | void |
86 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *identity, | 101 | RECLAIM_TICKETS_issue (const struct GNUNET_CRYPTO_EcdsaPrivateKey *identity, |
87 | const struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList *attrs, | 102 | const struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList *attrs, |
88 | const struct GNUNET_CRYPTO_EcdsaPublicKey *audience, | 103 | const struct GNUNET_CRYPTO_EcdsaPublicKey *audience, |
89 | RECLAIM_TICKETS_TicketResult cb, void *cb_cls); | 104 | RECLAIM_TICKETS_TicketResult cb, void *cb_cls); |
90 | 105 | ||
91 | void RECLAIM_TICKETS_iteration_next (struct RECLAIM_TICKETS_Iterator *iter); | 106 | void |
107 | RECLAIM_TICKETS_iteration_next (struct RECLAIM_TICKETS_Iterator *iter); | ||
92 | 108 | ||
93 | 109 | ||
94 | void RECLAIM_TICKETS_iteration_stop (struct RECLAIM_TICKETS_Iterator *iter); | 110 | void |
111 | RECLAIM_TICKETS_iteration_stop (struct RECLAIM_TICKETS_Iterator *iter); | ||
95 | 112 | ||
96 | 113 | ||
97 | struct RECLAIM_TICKETS_Iterator *RECLAIM_TICKETS_iteration_start ( | 114 | struct RECLAIM_TICKETS_Iterator * |
115 | RECLAIM_TICKETS_iteration_start ( | ||
98 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *identity, | 116 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *identity, |
99 | RECLAIM_TICKETS_TicketIter cb, void *cb_cls); | 117 | RECLAIM_TICKETS_TicketIter cb, void *cb_cls); |
100 | 118 | ||
101 | 119 | ||
102 | int RECLAIM_TICKETS_init (const struct GNUNET_CONFIGURATION_Handle *c); | 120 | int |
121 | RECLAIM_TICKETS_init (const struct GNUNET_CONFIGURATION_Handle *c); | ||
103 | 122 | ||
104 | void RECLAIM_TICKETS_deinit (void); | 123 | void |
124 | RECLAIM_TICKETS_deinit (void); | ||
105 | #endif | 125 | #endif |