GNUnet  0.11.x
gnunet_reclaim_plugin.h
Go to the documentation of this file.
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 
30 #ifndef GNUNET_RECLAIM_AttributePLUGIN_H
31 #define GNUNET_RECLAIM_AttributePLUGIN_H
32 
33 #include "gnunet_util_lib.h"
34 #include "gnunet_reclaim_lib.h"
35 
36 #ifdef __cplusplus
37 extern "C" {
38 #if 0 /* keep Emacsens' auto-indent happy */
39 }
40 #endif
41 #endif
42 
43 
54 typedef char *(*GNUNET_RECLAIM_AttributeValueToStringFunction) (
55  void *cls,
56  uint32_t type,
57  const void *data,
58  size_t data_size);
59 
60 
74  void *cls,
75  uint32_t type,
76  const char *s,
77  void **data,
78  size_t *data_size);
79 
80 
90  void *cls,
91  const char *typename);
92 
93 
102 typedef const char *(*GNUNET_RECLAIM_AttributeNumberToTypenameFunction) (
103  void *cls,
104  uint32_t type);
105 
116 typedef char *(*GNUNET_RECLAIM_AttestationValueToStringFunction) (
117  void *cls,
118  uint32_t type,
119  const void *data,
120  size_t data_size);
121 
122 
136  void *cls,
137  uint32_t type,
138  const char *s,
139  void **data,
140  size_t *data_size);
141 
142 
152  void *cls,
153  const char *typename);
154 
155 
164 typedef const char *(*GNUNET_RECLAIM_AttestationNumberToTypenameFunction) (
165  void *cls,
166  uint32_t type);
167 
175 typedef struct GNUNET_RECLAIM_AttributeList *(*GNUNET_RECLAIM_AttestationGetAttributesFunction) (
176  void *cls,
177  const struct GNUNET_RECLAIM_Attestation *attest);
178 
186 typedef char *(*GNUNET_RECLAIM_AttestationGetIssuerFunction) (
187  void *cls,
188  const struct GNUNET_RECLAIM_Attestation *attest);
189 
199  void *cls,
200  const struct GNUNET_RECLAIM_Attestation *attest,
202 
203 
204 
210 {
214  void *cls;
215 
220 
225 
230 
235 
236 };
237 
243 {
247  void *cls;
248 
253 
258 
263 
268 
273 
278 
283 };
284 
285 
286 
287 #if 0 /* keep Emacsens' auto-indent happy */
288 {
289 #endif
290 #ifdef __cplusplus
291 }
292 #endif
293 
294 #endif
295  /* end of group */
void * cls
Closure for all of the callbacks.
char *(* GNUNET_RECLAIM_AttestationGetIssuerFunction)(void *cls, const struct GNUNET_RECLAIM_Attestation *attest)
Function called to get the issuer of the attestation (as string)
static size_t data_size
Number of bytes in data.
Definition: gnunet-abd.c:187
A list of GNUNET_RECLAIM_Attribute structures.
int(* GNUNET_RECLAIM_AttestationGetExpirationFunction)(void *cls, const struct GNUNET_RECLAIM_Attestation *attest, struct GNUNET_TIME_Absolute *expiration)
Function called to get the expiration of the attestation.
GNUNET_RECLAIM_AttestationTypenameToNumberFunction typename_to_number
Typename to number.
uint32_t(* GNUNET_RECLAIM_AttributeTypenameToNumberFunction)(void *cls, const char *typename)
Function called to convert a type name to the corresponding number.
char *(* GNUNET_RECLAIM_AttributeValueToStringFunction)(void *cls, uint32_t type, const void *data, size_t data_size)
Function called to convert the binary value data of an attribute of type type to a human-readable str...
struct GNUNET_RECLAIM_AttributeList *(* GNUNET_RECLAIM_AttestationGetAttributesFunction)(void *cls, const struct GNUNET_RECLAIM_Attestation *attest)
Function called to extract attributes from an attestation.
Each plugin is required to return a pointer to a struct of this type as the return value from its ent...
GNUNET_RECLAIM_AttestationGetIssuerFunction get_issuer
Attesation issuer.
GNUNET_RECLAIM_AttestationStringToValueFunction string_to_value
Conversion to binary.
uint32_t(* GNUNET_RECLAIM_AttestationTypenameToNumberFunction)(void *cls, const char *typename)
Function called to convert a type name to the corresponding number.
GNUNET_RECLAIM_AttestationGetAttributesFunction get_attributes
Attesation attributes.
static char * expiration
Credential TTL.
Definition: gnunet-abd.c:96
const char *(* GNUNET_RECLAIM_AttributeNumberToTypenameFunction)(void *cls, uint32_t type)
Function called to convert a type number (i.e.
GNUNET_RECLAIM_AttestationNumberToTypenameFunction number_to_typename
Number to typename.
GNUNET_RECLAIM_AttestationGetExpirationFunction get_expiration
Expiration.
GNUNET_RECLAIM_AttributeTypenameToNumberFunction typename_to_number
Typename to number.
int(* GNUNET_RECLAIM_AttributeStringToValueFunction)(void *cls, uint32_t type, const char *s, void **data, size_t *data_size)
Function called to convert human-readable version of the value s of an attribute of type type to the ...
enum GNUNET_TESTBED_UnderlayLinkModelType type
the type of this model
Time for absolute times used by GNUnet, in microseconds.
GNUNET_RECLAIM_AttributeNumberToTypenameFunction number_to_typename
Number to typename.
int(* GNUNET_RECLAIM_AttestationStringToValueFunction)(void *cls, uint32_t type, const char *s, void **data, size_t *data_size)
Function called to convert human-readable version of the value s of an attribute of type type to the ...
GNUNET_RECLAIM_AttestationValueToStringFunction value_to_string
Conversion to string.
char *(* GNUNET_RECLAIM_AttestationValueToStringFunction)(void *cls, uint32_t type, const void *data, size_t data_size)
Function called to convert the binary value data of an attribute of type type to a human-readable str...
uint32_t data
The data value.
const char *(* GNUNET_RECLAIM_AttestationNumberToTypenameFunction)(void *cls, uint32_t type)
Function called to convert a type number (i.e.
GNUNET_RECLAIM_AttributeStringToValueFunction string_to_value
Conversion to binary.
void * cls
Closure for all of the callbacks.
Each plugin is required to return a pointer to a struct of this type as the return value from its ent...
GNUNET_RECLAIM_AttributeValueToStringFunction value_to_string
Conversion to string.