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_PLUGIN_H
31 #define GNUNET_RECLAIM_PLUGIN_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_CredentialValueToStringFunction) (
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_CredentialNumberToTypenameFunction) (
165  void *cls,
166  uint32_t type);
167 
175 typedef struct
178  void *cls,
179  const struct GNUNET_RECLAIM_Credential *cred);
180 
188 typedef char *(*GNUNET_RECLAIM_CredentialGetIssuerFunction) (
189  void *cls,
190  const struct GNUNET_RECLAIM_Credential *cred);
191 
201  void *cls,
202  const struct GNUNET_RECLAIM_Credential *cred,
204 
215 typedef char *(*GNUNET_RECLAIM_PresentationValueToStringFunction) (
216  void *cls,
217  uint32_t type,
218  const void *data,
219  size_t data_size);
220 
221 
235  void *cls,
236  uint32_t type,
237  const char *s,
238  void **data,
239  size_t *data_size);
240 
241 
251  void *cls,
252  const char *typename);
253 
254 
263 typedef const char *(*GNUNET_RECLAIM_PresentationNumberToTypenameFunction) (
264  void *cls,
265  uint32_t type);
266 
274 typedef struct
277  void *cls,
278  const struct GNUNET_RECLAIM_Presentation *cred);
279 
287 typedef char *(*GNUNET_RECLAIM_PresentationGetIssuerFunction) (
288  void *cls,
289  const struct GNUNET_RECLAIM_Presentation *cred);
290 
300  void *cls,
301  const struct GNUNET_RECLAIM_Presentation *cred,
303 
305  void *cls,
306  const struct GNUNET_RECLAIM_Credential *cred,
307  const struct GNUNET_RECLAIM_AttributeList *attrs,
308  struct GNUNET_RECLAIM_Presentation **presentation);
309 
315 {
319  void *cls;
320 
325 
330 
335 
340 
341 };
342 
348 {
352  void *cls;
353 
358 
363 
368 
373 
378 
383 
388 
393 
398 
403 
408 
413 
418 
423 
428 
429 };
430 
431 
432 #if 0 /* keep Emacsens' auto-indent happy */
433 {
434 #endif
435 #ifdef __cplusplus
436 }
437 #endif
438 
439 #endif
440  /* end of group */
GNUNET_RECLAIM_PresentationTypenameToNumberFunction typename_to_number_p
Typename to number.
int(* GNUNET_RECLAIM_CredentialToPresentation)(void *cls, const struct GNUNET_RECLAIM_Credential *cred, const struct GNUNET_RECLAIM_AttributeList *attrs, struct GNUNET_RECLAIM_Presentation **presentation)
static size_t data_size
Number of bytes in data.
Definition: gnunet-abd.c:187
GNUNET_RECLAIM_PresentationNumberToTypenameFunction number_to_typename_p
Number to typename.
char *(* GNUNET_RECLAIM_CredentialValueToStringFunction)(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...
GNUNET_RECLAIM_PresentationGetIssuerFunction get_issuer_p
Attesation issuer.
GNUNET_RECLAIM_CredentialValueToStringFunction value_to_string
Conversion to string.
struct GNUNET_RECLAIM_AttributeList *(* GNUNET_RECLAIM_CredentialGetAttributesFunction)(void *cls, const struct GNUNET_RECLAIM_Credential *cred)
Function called to extract attributes from a credential.
GNUNET_RECLAIM_CredentialGetExpirationFunction get_expiration
Expiration.
A list of GNUNET_RECLAIM_Attribute structures.
uint32_t(* GNUNET_RECLAIM_AttributeTypenameToNumberFunction)(void *cls, const char *typename)
Function called to convert a type name to the corresponding number.
uint32_t(* GNUNET_RECLAIM_PresentationTypenameToNumberFunction)(void *cls, const char *typename)
Function called to convert a type name to the corresponding number.
struct GNUNET_RECLAIM_AttributeList *(* GNUNET_RECLAIM_PresentationGetAttributesFunction)(void *cls, const struct GNUNET_RECLAIM_Presentation *cred)
Function called to extract attributes from a credential.
GNUNET_RECLAIM_PresentationValueToStringFunction value_to_string_p
Conversion to string.
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...
int(* GNUNET_RECLAIM_PresentationStringToValueFunction)(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_CredentialGetIssuerFunction get_issuer
Attesation issuer.
int(* GNUNET_RECLAIM_CredentialStringToValueFunction)(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_CredentialToPresentation create_presentation
Get presentation.
static char * expiration
Credential TTL.
Definition: gnunet-abd.c:96
void * cls
Closure for all of the callbacks.
GNUNET_RECLAIM_PresentationGetAttributesFunction get_attributes_p
Attesation attributes.
GNUNET_RECLAIM_PresentationGetExpirationFunction get_expiration_p
Expiration.
A credential presentation.
uint32_t(* GNUNET_RECLAIM_CredentialTypenameToNumberFunction)(void *cls, const char *typename)
Function called to convert a type name to the corresponding number.
const char *(* GNUNET_RECLAIM_AttributeNumberToTypenameFunction)(void *cls, uint32_t type)
Function called to convert a type number to the corresponding type string (e.g.
char *(* GNUNET_RECLAIM_PresentationGetIssuerFunction)(void *cls, const struct GNUNET_RECLAIM_Presentation *cred)
Function called to get the issuer of the credential (as string)
Each plugin is required to return a pointer to a struct of this type as the return value from its ent...
char *(* GNUNET_RECLAIM_PresentationValueToStringFunction)(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...
const char *(* GNUNET_RECLAIM_PresentationNumberToTypenameFunction)(void *cls, uint32_t type)
Function called to convert a type number to the corresponding type string (e.g.
GNUNET_RECLAIM_CredentialTypenameToNumberFunction typename_to_number
Typename to number.
GNUNET_RECLAIM_AttributeTypenameToNumberFunction typename_to_number
Typename to number.
GNUNET_RECLAIM_CredentialNumberToTypenameFunction number_to_typename
Number to typename.
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 ...
GNUNET_RECLAIM_CredentialStringToValueFunction string_to_value
Conversion to binary.
GNUNET_RECLAIM_PresentationStringToValueFunction string_to_value_p
Conversion to binary.
int(* GNUNET_RECLAIM_PresentationGetExpirationFunction)(void *cls, const struct GNUNET_RECLAIM_Presentation *cred, struct GNUNET_TIME_Absolute *expiration)
Function called to get the expiration of the credential.
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.
uint32_t data
The data value.
int(* GNUNET_RECLAIM_CredentialGetExpirationFunction)(void *cls, const struct GNUNET_RECLAIM_Credential *cred, struct GNUNET_TIME_Absolute *expiration)
Function called to get the expiration of the credential.
GNUNET_RECLAIM_AttributeStringToValueFunction string_to_value
Conversion to binary.
char *(* GNUNET_RECLAIM_CredentialGetIssuerFunction)(void *cls, const struct GNUNET_RECLAIM_Credential *cred)
Function called to get the issuer of the credential (as string)
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...
const char *(* GNUNET_RECLAIM_CredentialNumberToTypenameFunction)(void *cls, uint32_t type)
Function called to convert a type number to the corresponding type string (e.g.
GNUNET_RECLAIM_CredentialGetAttributesFunction get_attributes
Attesation attributes.
GNUNET_RECLAIM_AttributeValueToStringFunction value_to_string
Conversion to string.