GNUnet  0.10.x
gnunet-service-reclaim_tickets.h
Go to the documentation of this file.
1 /*
2  This file is part of GNUnet.
3  Copyright (C) 2012-2015 GNUnet e.V.
4 
5  GNUnet is free software: you can redistribute it and/or modify it
6  under the terms of the GNU Affero General Public License as published
7  by the Free Software Foundation, either version 3 of the License,
8  or (at your option) any later version.
9 
10  GNUnet is distributed in the hope that it will be useful, but
11  WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  Affero General Public License for more details.
14 
15  You should have received a copy of the GNU Affero General Public License
16  along with this program. If not, see <http://www.gnu.org/licenses/>.
17 
18  SPDX-License-Identifier: AGPL3.0-or-later
19  */
20 
28 #ifndef GNUNET_SERVICE_RECLAIM_TICKETS_H
29 #define GNUNET_SERVICE_RECLAIM_TICKETS_H
30 
31 #include "platform.h"
32 
33 #include "gnunet_util_lib.h"
34 
35 #include "gnunet_constants.h"
36 #include "gnunet_gns_service.h"
37 #include "gnunet_gnsrecord_lib.h"
38 #include "gnunet_protocols.h"
40 #include "gnunet_reclaim_service.h"
41 #include "gnunet_signatures.h"
43 #include "reclaim.h"
44 
48 
49 
51 {
56 
61 
65  unsigned int rd_count;
66 
70  char *data;
71 
75  size_t data_size;
76 
80  char *label;
81 };
82 
83 
90 typedef void (*RECLAIM_TICKETS_TicketIter) (
91  void *cls, struct GNUNET_RECLAIM_Ticket *ticket);
92 
93 
104  void *cls, struct GNUNET_RECLAIM_Ticket *ticket, int32_t success,
105  const char *emsg);
106 
107 
109  void *cls, const struct GNUNET_CRYPTO_EcdsaPublicKey *identity,
110  const struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList *l, int32_t success,
111  const char *emsg);
112 
113 
114 typedef void (*RECLAIM_TICKETS_RevokeCallback) (void *cls, int32_t success);
115 
117 RECLAIM_TICKETS_revoke (const struct GNUNET_RECLAIM_Ticket *ticket,
118  const struct GNUNET_CRYPTO_EcdsaPrivateKey *identity,
120 
121 
122 void
124 
125 
128  const struct GNUNET_RECLAIM_Ticket *ticket,
130 
131 void
133 
134 void
137  const struct GNUNET_CRYPTO_EcdsaPublicKey *audience,
139 
140 void
142 
143 
144 void
146 
147 
150  const struct GNUNET_CRYPTO_EcdsaPrivateKey *identity,
152 
153 
154 int
156 
157 void
159 #endif
void RECLAIM_TICKETS_consume_cancel(struct RECLAIM_TICKETS_ConsumeHandle *cth)
void RECLAIM_TICKETS_iteration_stop(struct RECLAIM_TICKETS_Iterator *iter)
The authorization ticket.
Ticket revocation request handle.
void RECLAIM_TICKETS_revoke_cancel(struct RECLAIM_TICKETS_RevokeHandle *rh)
struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList * attrs
Attributes.
struct RECLAIM_TICKETS_Iterator * RECLAIM_TICKETS_iteration_start(const struct GNUNET_CRYPTO_EcdsaPrivateKey *identity, RECLAIM_TICKETS_TicketIter cb, void *cb_cls)
Private ECC key encoded for transmission.
void(* RECLAIM_TICKETS_TicketIter)(void *cls, struct GNUNET_RECLAIM_Ticket *ticket)
Continuation called with ticket.
Common type definitions for the identity provider service and API.
void RECLAIM_TICKETS_deinit(void)
static struct GNUNET_RECLAIM_Ticket ticket
Ticket to consume.
static struct LoggingHandle * l
RECLAIM_TICKETS_TicketIter cb
Iter callback.
struct TicketRecordsEntry * next
DLL.
void RECLAIM_TICKETS_iteration_next(struct RECLAIM_TICKETS_Iterator *iter)
unsigned int rd_count
Record count.
void(* RECLAIM_TICKETS_ConsumeCallback)(void *cls, const struct GNUNET_CRYPTO_EcdsaPublicKey *identity, const struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList *l, int32_t success, const char *emsg)
int RECLAIM_TICKETS_init(const struct GNUNET_CONFIGURATION_Handle *c)
RECLAIM_TICKETS_RevokeCallback cb
Callback.
static struct GNUNET_IDENTITY_Handle * identity
Which namespace do we publish to? NULL if we do not publish to a namespace.
struct RECLAIM_TICKETS_ConsumeHandle * RECLAIM_TICKETS_consume(const struct GNUNET_CRYPTO_EcdsaPrivateKey *id, const struct GNUNET_RECLAIM_Ticket *ticket, RECLAIM_TICKETS_ConsumeCallback cb, void *cb_cls)
void(* RECLAIM_TICKETS_TicketResult)(void *cls, struct GNUNET_RECLAIM_Ticket *ticket, int32_t success, const char *emsg)
Continuation called with ticket.
struct RECLAIM_TICKETS_RevokeHandle * RECLAIM_TICKETS_revoke(const struct GNUNET_RECLAIM_Ticket *ticket, const struct GNUNET_CRYPTO_EcdsaPrivateKey *identity, RECLAIM_TICKETS_RevokeCallback cb, void *cb_cls)
configuration data
Definition: configuration.c:85
RECLAIM_TICKETS_ConsumeCallback cb
Callback.
Public ECC key (always for Curve25519) encoded in a format suitable for network transmission and ECDS...
A list of GNUNET_RECLAIM_ATTRIBUTE_Claim structures.
struct TicketRecordsEntry * prev
DLL.
void RECLAIM_TICKETS_issue(const struct GNUNET_CRYPTO_EcdsaPrivateKey *identity, const struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList *attrs, const struct GNUNET_CRYPTO_EcdsaPublicKey *audience, RECLAIM_TICKETS_TicketResult cb, void *cb_cls)
void(* RECLAIM_TICKETS_RevokeCallback)(void *cls, int32_t success)