GNUnet 0.22.2
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
37#include "gnunet_util_lib.h"
38#include "gnunet_reclaim_lib.h"
39
40#ifdef __cplusplus
41extern "C" {
42#if 0 /* keep Emacsens' auto-indent happy */
43}
44#endif
45#endif
46
47
58typedef char *(*GNUNET_RECLAIM_AttributeValueToStringFunction) (
59 void *cls,
60 uint32_t type,
61 const void *data,
62 size_t data_size);
63
64
78 void *cls,
79 uint32_t type,
80 const char *s,
81 void **data,
82 size_t *data_size);
83
84
94 void *cls,
95 const char *typename);
96
97
106typedef const char *(*GNUNET_RECLAIM_AttributeNumberToTypenameFunction) (
107 void *cls,
108 uint32_t type);
109
120typedef char *(*GNUNET_RECLAIM_CredentialValueToStringFunction) (
121 void *cls,
122 uint32_t type,
123 const void *data,
124 size_t data_size);
125
126
140 void *cls,
141 uint32_t type,
142 const char *s,
143 void **data,
144 size_t *data_size);
145
146
156 void *cls,
157 const char *typename);
158
159
168typedef const char *(*GNUNET_RECLAIM_CredentialNumberToTypenameFunction) (
169 void *cls,
170 uint32_t type);
171
179typedef struct
182 void *cls,
183 const struct GNUNET_RECLAIM_Credential *cred);
184
192typedef char *(*GNUNET_RECLAIM_CredentialGetIssuerFunction) (
193 void *cls,
194 const struct GNUNET_RECLAIM_Credential *cred);
195
205 void *cls,
206 const struct GNUNET_RECLAIM_Credential *cred,
208
219typedef char *(*GNUNET_RECLAIM_PresentationValueToStringFunction) (
220 void *cls,
221 uint32_t type,
222 const void *data,
223 size_t data_size);
224
225
239 void *cls,
240 uint32_t type,
241 const char *s,
242 void **data,
243 size_t *data_size);
244
245
255 void *cls,
256 const char *typename);
257
258
267typedef const char *(*GNUNET_RECLAIM_PresentationNumberToTypenameFunction) (
268 void *cls,
269 uint32_t type);
270
278typedef struct
281 void *cls,
282 const struct GNUNET_RECLAIM_Presentation *cred);
283
291typedef char *(*GNUNET_RECLAIM_PresentationGetIssuerFunction) (
292 void *cls,
293 const struct GNUNET_RECLAIM_Presentation *cred);
294
304 void *cls,
305 const struct GNUNET_RECLAIM_Presentation *cred,
307
309 void *cls,
310 const struct GNUNET_RECLAIM_Credential *cred,
311 const struct GNUNET_RECLAIM_AttributeList *attrs,
312 struct GNUNET_RECLAIM_Presentation **presentation);
313
319{
323 void *cls;
324
329
334
339
344
345};
346
352{
356 void *cls;
357
362
367
372
377
382
387
392
397
402
407
412
417
422
427
432
433};
434
435
436#if 0 /* keep Emacsens' auto-indent happy */
437{
438#endif
439#ifdef __cplusplus
440}
441#endif
442
443#endif
444 /* end of group */
446 /* end of group addition */
static gnutls_certificate_credentials_t cred
The credential.
static char * data
The data to insert into the dht.
static struct GNUNET_TIME_Relative expiration
User supplied expiration value.
static uint32_t type
Type string converted to DNS type value.
static size_t data_size
Number of bytes in data.
Identity attribute definitions.
const char *(* GNUNET_RECLAIM_PresentationNumberToTypenameFunction)(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...
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_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.
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_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 ...
const char *(* GNUNET_RECLAIM_CredentialNumberToTypenameFunction)(void *cls, uint32_t type)
Function called to convert a type number to the corresponding type string (e.g.
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)
const char *(* GNUNET_RECLAIM_AttributeNumberToTypenameFunction)(void *cls, uint32_t type)
Function called to convert a type number to the corresponding type string (e.g.
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 ...
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_CredentialGetIssuerFunction)(void *cls, const struct GNUNET_RECLAIM_Credential *cred)
Function called to get the issuer of the credential (as string)
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.
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.