GNUnet  0.17.6
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 
33 #ifndef GNUNET_RECLAIM_PLUGIN_H
34 #define GNUNET_RECLAIM_PLUGIN_H
35 
36 #include "gnunet_util_lib.h"
37 #include "gnunet_reclaim_lib.h"
38 
39 #ifdef __cplusplus
40 extern "C" {
41 #if 0 /* keep Emacsens' auto-indent happy */
42 }
43 #endif
44 #endif
45 
46 
57 typedef char *(*GNUNET_RECLAIM_AttributeValueToStringFunction) (
58  void *cls,
59  uint32_t type,
60  const void *data,
61  size_t data_size);
62 
63 
77  void *cls,
78  uint32_t type,
79  const char *s,
80  void **data,
81  size_t *data_size);
82 
83 
93  void *cls,
94  const char *typename);
95 
96 
105 typedef const char *(*GNUNET_RECLAIM_AttributeNumberToTypenameFunction) (
106  void *cls,
107  uint32_t type);
108 
119 typedef char *(*GNUNET_RECLAIM_CredentialValueToStringFunction) (
120  void *cls,
121  uint32_t type,
122  const void *data,
123  size_t data_size);
124 
125 
139  void *cls,
140  uint32_t type,
141  const char *s,
142  void **data,
143  size_t *data_size);
144 
145 
155  void *cls,
156  const char *typename);
157 
158 
167 typedef const char *(*GNUNET_RECLAIM_CredentialNumberToTypenameFunction) (
168  void *cls,
169  uint32_t type);
170 
178 typedef struct
181  void *cls,
182  const struct GNUNET_RECLAIM_Credential *cred);
183 
191 typedef char *(*GNUNET_RECLAIM_CredentialGetIssuerFunction) (
192  void *cls,
193  const struct GNUNET_RECLAIM_Credential *cred);
194 
204  void *cls,
205  const struct GNUNET_RECLAIM_Credential *cred,
207 
218 typedef char *(*GNUNET_RECLAIM_PresentationValueToStringFunction) (
219  void *cls,
220  uint32_t type,
221  const void *data,
222  size_t data_size);
223 
224 
238  void *cls,
239  uint32_t type,
240  const char *s,
241  void **data,
242  size_t *data_size);
243 
244 
254  void *cls,
255  const char *typename);
256 
257 
266 typedef const char *(*GNUNET_RECLAIM_PresentationNumberToTypenameFunction) (
267  void *cls,
268  uint32_t type);
269 
277 typedef struct
280  void *cls,
281  const struct GNUNET_RECLAIM_Presentation *cred);
282 
290 typedef char *(*GNUNET_RECLAIM_PresentationGetIssuerFunction) (
291  void *cls,
292  const struct GNUNET_RECLAIM_Presentation *cred);
293 
303  void *cls,
304  const struct GNUNET_RECLAIM_Presentation *cred,
306 
308  void *cls,
309  const struct GNUNET_RECLAIM_Credential *cred,
310  const struct GNUNET_RECLAIM_AttributeList *attrs,
311  struct GNUNET_RECLAIM_Presentation **presentation);
312 
318 {
322  void *cls;
323 
328 
333 
338 
343 
344 };
345 
351 {
355  void *cls;
356 
361 
366 
371 
376 
381 
386 
391 
396 
401 
406 
411 
416 
421 
426 
431 
432 };
433 
434 
435 #if 0 /* keep Emacsens' auto-indent happy */
436 {
437 #endif
438 #ifdef __cplusplus
439 }
440 #endif
441 
442 #endif
443  /* end of group */
445  /* end of group addition */
static char * expiration
Credential TTL.
Definition: gnunet-abd.c:96
static size_t data_size
Number of bytes in data.
Definition: gnunet-abd.c:187
uint32_t data
The data value.
Identity attribute definitions.
struct GNUNET_RECLAIM_AttributeList *(* GNUNET_RECLAIM_PresentationGetAttributesFunction)(void *cls, const struct GNUNET_RECLAIM_Presentation *cred)
Function called to extract attributes from a credential.
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...
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_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...
uint32_t(* GNUNET_RECLAIM_PresentationTypenameToNumberFunction)(void *cls, const char *typename)
Function called to convert a type name to the corresponding number.
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.
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 ...
const char *(* GNUNET_RECLAIM_CredentialNumberToTypenameFunction)(void *cls, uint32_t type)
Function called to convert a type number to the corresponding type string (e.g.
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...
uint32_t(* GNUNET_RECLAIM_CredentialTypenameToNumberFunction)(void *cls, const char *typename)
Function called to convert a type name to the corresponding number.
uint32_t(* GNUNET_RECLAIM_AttributeTypenameToNumberFunction)(void *cls, const char *typename)
Function called to convert a type name to the corresponding number.
int(* GNUNET_RECLAIM_CredentialToPresentation)(void *cls, const struct GNUNET_RECLAIM_Credential *cred, const struct GNUNET_RECLAIM_AttributeList *attrs, struct GNUNET_RECLAIM_Presentation **presentation)
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 ...
const char *(* GNUNET_RECLAIM_PresentationNumberToTypenameFunction)(void *cls, uint32_t type)
Function called to convert a type number to the corresponding type string (e.g.
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 ...
struct GNUNET_RECLAIM_AttributeList *(* GNUNET_RECLAIM_CredentialGetAttributesFunction)(void *cls, const struct GNUNET_RECLAIM_Credential *cred)
Function called to extract attributes from a credential.
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.
char *(* GNUNET_RECLAIM_PresentationGetIssuerFunction)(void *cls, const struct GNUNET_RECLAIM_Presentation *cred)
Function called to get the issuer of the credential (as string)
char *(* GNUNET_RECLAIM_CredentialGetIssuerFunction)(void *cls, const struct GNUNET_RECLAIM_Credential *cred)
Function called to get the issuer of the credential (as string)
A list of GNUNET_RECLAIM_Attribute structures.
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.
GNUNET_RECLAIM_AttributeTypenameToNumberFunction typename_to_number
Typename to number.
void * cls
Closure for all of the callbacks.
GNUNET_RECLAIM_AttributeStringToValueFunction string_to_value
Conversion to binary.
GNUNET_RECLAIM_AttributeNumberToTypenameFunction number_to_typename
Number to typename.
Each plugin is required to return a pointer to a struct of this type as the return value from its ent...
GNUNET_RECLAIM_CredentialValueToStringFunction value_to_string
Conversion to string.
GNUNET_RECLAIM_CredentialTypenameToNumberFunction typename_to_number
Typename to number.
GNUNET_RECLAIM_PresentationGetIssuerFunction get_issuer_p
Attesation issuer.
GNUNET_RECLAIM_CredentialNumberToTypenameFunction number_to_typename
Number to typename.
GNUNET_RECLAIM_CredentialGetIssuerFunction get_issuer
Attesation issuer.
GNUNET_RECLAIM_PresentationGetExpirationFunction get_expiration_p
Expiration.
GNUNET_RECLAIM_PresentationValueToStringFunction value_to_string_p
Conversion to string.
GNUNET_RECLAIM_CredentialStringToValueFunction string_to_value
Conversion to binary.
GNUNET_RECLAIM_CredentialGetExpirationFunction get_expiration
Expiration.
void * cls
Closure for all of the callbacks.
GNUNET_RECLAIM_CredentialGetAttributesFunction get_attributes
Attesation attributes.
GNUNET_RECLAIM_PresentationStringToValueFunction string_to_value_p
Conversion to binary.
GNUNET_RECLAIM_PresentationTypenameToNumberFunction typename_to_number_p
Typename to number.
GNUNET_RECLAIM_PresentationNumberToTypenameFunction number_to_typename_p
Number to typename.
GNUNET_RECLAIM_CredentialToPresentation create_presentation
Get presentation.
GNUNET_RECLAIM_PresentationGetAttributesFunction get_attributes_p
Attesation attributes.
A credential presentation.
Time for absolute times used by GNUnet, in microseconds.
enum GNUNET_TESTBED_UnderlayLinkModelType type
the type of this model