aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_reclaim_plugin.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/gnunet_reclaim_plugin.h')
-rw-r--r--src/include/gnunet_reclaim_plugin.h123
1 files changed, 0 insertions, 123 deletions
diff --git a/src/include/gnunet_reclaim_plugin.h b/src/include/gnunet_reclaim_plugin.h
deleted file mode 100644
index 72a4bc218..000000000
--- a/src/include/gnunet_reclaim_plugin.h
+++ /dev/null
@@ -1,123 +0,0 @@
1/*
2 This file is part of GNUnet
3 Copyright (C) 2012, 2013 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
21/**
22 * @author Martin Schanzenbach
23 *
24 * @file
25 * Plugin API for the idp database backend
26 *
27 * @defgroup reclaim-plugin IdP service plugin API
28 * Plugin API for the idp database backend
29 * @{
30 */
31#ifndef GNUNET_RECLAIM_PLUGIN_H
32#define GNUNET_RECLAIM_PLUGIN_H
33
34#include "gnunet_util_lib.h"
35#include "gnunet_reclaim_service.h"
36
37#ifdef __cplusplus
38extern "C"
39{
40#if 0 /* keep Emacsens' auto-indent happy */
41}
42#endif
43#endif
44
45
46/**
47 * Function called by for each matching ticket.
48 *
49 * @param cls closure
50 * @param ticket the ticket
51 */
52typedef void (*GNUNET_RECLAIM_TicketIterator) (void *cls,
53 const struct GNUNET_RECLAIM_Ticket *ticket,
54 const struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList *attrs);
55
56
57/**
58 * @brief struct returned by the initialization function of the plugin
59 */
60struct GNUNET_RECLAIM_PluginFunctions
61{
62
63 /**
64 * Closure to pass to all plugin functions.
65 */
66 void *cls;
67
68 /**
69 * Store a ticket in the database.
70 *
71 * @param cls closure (internal context for the plugin)
72 * @param ticket the ticket to store
73 * @return #GNUNET_OK on success, else #GNUNET_SYSERR
74 */
75 int (*store_ticket) (void *cls,
76 const struct GNUNET_RECLAIM_Ticket *ticket,
77 const struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList *attrs);
78
79 /**
80 * Delete a ticket from the database.
81 *
82 * @param cls closure (internal context for the plugin)
83 * @param ticket the ticket to store
84 * @return #GNUNET_OK on success, else #GNUNET_SYSERR
85 */
86 int (*delete_ticket) (void *cls,
87 const struct GNUNET_RECLAIM_Ticket *ticket);
88
89
90
91 /**
92 * Iterate over all tickets
93 *
94 * @param cls closure (internal context for the plugin)
95 * @param identity the identity
96 * @param audience GNUNET_YES if the identity is the audience of the ticket
97 * else it is considered the issuer
98 * @param iter function to call with the result
99 * @param iter_cls closure for @a iter
100 * @return #GNUNET_OK on success, #GNUNET_NO if there were no results, #GNUNET_SYSERR on error
101 */
102 int (*iterate_tickets) (void *cls,
103 const struct GNUNET_CRYPTO_EcdsaPublicKey *identity,
104 int audience,
105 uint64_t offset,
106 GNUNET_RECLAIM_TicketIterator iter, void *iter_cls);
107
108 int (*get_ticket_attributes) (void* cls,
109 const struct GNUNET_RECLAIM_Ticket *ticket,
110 GNUNET_RECLAIM_TicketIterator iter,
111 void *iter_cls);
112};
113
114#if 0 /* keep Emacsens' auto-indent happy */
115{
116#endif
117#ifdef __cplusplus
118}
119#endif
120
121#endif
122
123/** @} */ /* end of group */