diff options
author | Schanzenbach, Martin <mschanzenbach@posteo.de> | 2019-04-12 18:16:00 +0200 |
---|---|---|
committer | Schanzenbach, Martin <mschanzenbach@posteo.de> | 2019-04-14 10:01:24 +0200 |
commit | 7a923f1b2d38d55ca921abb57980ccfd1340f634 (patch) | |
tree | eee6c6ee633d6343cf8ac5f7394344f29c64c4ce /src/reclaim/gnunet-service-reclaim_tickets.h | |
parent | dfe11b6b541b47c85cdf56e55ebb816d6793db31 (diff) | |
download | gnunet-7a923f1b2d38d55ca921abb57980ccfd1340f634.tar.gz gnunet-7a923f1b2d38d55ca921abb57980ccfd1340f634.zip |
RECLAIM: Refactoring
Diffstat (limited to 'src/reclaim/gnunet-service-reclaim_tickets.h')
-rw-r--r-- | src/reclaim/gnunet-service-reclaim_tickets.h | 38 |
1 files changed, 30 insertions, 8 deletions
diff --git a/src/reclaim/gnunet-service-reclaim_tickets.h b/src/reclaim/gnunet-service-reclaim_tickets.h index 81455fe53..43bb902fd 100644 --- a/src/reclaim/gnunet-service-reclaim_tickets.h +++ b/src/reclaim/gnunet-service-reclaim_tickets.h | |||
@@ -17,6 +17,17 @@ | |||
17 | 17 | ||
18 | SPDX-License-Identifier: AGPL3.0-or-later | 18 | SPDX-License-Identifier: AGPL3.0-or-later |
19 | */ | 19 | */ |
20 | |||
21 | /** | ||
22 | * @author Martin Schanzenbach | ||
23 | * @file src/reclaim/gnunet-service-reclaim_tickets.h | ||
24 | * @brief reclaim tickets | ||
25 | * | ||
26 | */ | ||
27 | |||
28 | #ifndef GNUNET_SERVICE_RECLAIM_TICKETS_H | ||
29 | #define GNUNET_SERVICE_RECLAIM_TICKETS_H | ||
30 | |||
20 | #include "platform.h" | 31 | #include "platform.h" |
21 | #include "gnunet_util_lib.h" | 32 | #include "gnunet_util_lib.h" |
22 | #include "gnunet_constants.h" | 33 | #include "gnunet_constants.h" |
@@ -31,6 +42,7 @@ | |||
31 | #include "reclaim.h" | 42 | #include "reclaim.h" |
32 | 43 | ||
33 | struct RECLAIM_TICKETS_Iterator; | 44 | struct RECLAIM_TICKETS_Iterator; |
45 | struct RECLAIM_TICKETS_ConsumeHandle; | ||
34 | 46 | ||
35 | /** | 47 | /** |
36 | * Continuation called with ticket. | 48 | * Continuation called with ticket. |
@@ -59,14 +71,24 @@ typedef void | |||
59 | const char *emsg); | 71 | const char *emsg); |
60 | 72 | ||
61 | 73 | ||
62 | /** | 74 | typedef void |
63 | * @author Martin Schanzenbach | 75 | (*RECLAIM_TICKETS_ConsumeCallback) (void *cls, |
64 | * @file src/reclaim/gnunet-service-reclaim_tickets.h | 76 | const struct GNUNET_CRYPTO_EcdsaPublicKey *identity, |
65 | * @brief reclaim tickets | 77 | const struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList *l, |
66 | * | 78 | uint32_t success, |
67 | */ | 79 | const char *emsg); |
80 | |||
81 | struct RECLAIM_TICKETS_ConsumeHandle* | ||
82 | RECLAIM_TICKETS_consume (const struct GNUNET_CRYPTO_EcdsaPrivateKey *id, | ||
83 | const struct GNUNET_RECLAIM_Ticket *ticket, | ||
84 | RECLAIM_TICKETS_ConsumeCallback cb, | ||
85 | void* cb_cls); | ||
86 | |||
68 | void | 87 | void |
69 | RECLAIM_TICKETS_issue_ticket (const struct GNUNET_CRYPTO_EcdsaPrivateKey *identity, | 88 | RECLAIM_TICKETS_consume_cancel (struct RECLAIM_TICKETS_ConsumeHandle *cth); |
89 | |||
90 | void | ||
91 | RECLAIM_TICKETS_issue (const struct GNUNET_CRYPTO_EcdsaPrivateKey *identity, | ||
70 | const struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList *attrs, | 92 | const struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList *attrs, |
71 | const struct GNUNET_CRYPTO_EcdsaPublicKey *audience, | 93 | const struct GNUNET_CRYPTO_EcdsaPublicKey *audience, |
72 | RECLAIM_TICKETS_TicketResult cb, | 94 | RECLAIM_TICKETS_TicketResult cb, |
@@ -91,4 +113,4 @@ RECLAIM_TICKETS_init (const struct GNUNET_CONFIGURATION_Handle *c); | |||
91 | 113 | ||
92 | void | 114 | void |
93 | RECLAIM_TICKETS_deinit (void); | 115 | RECLAIM_TICKETS_deinit (void); |
94 | 116 | #endif | |