GNUnet  0.10.x
gnunet_reclaim_attribute_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_ATTRIBUTE_PLUGIN_H
31 #define GNUNET_RECLAIM_ATTRIBUTE_PLUGIN_H
32 
33 #include "gnunet_util_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_ATTRIBUTE_ValueToStringFunction) (
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_ATTRIBUTE_NumberToTypenameFunction) (
103  void *cls,
104  uint32_t type);
105 
106 
112 {
113 
117  void *cls;
118 
123 
128 
133 
138 };
139 
140 
141 #if 0 /* keep Emacsens' auto-indent happy */
142 {
143 #endif
144 #ifdef __cplusplus
145 }
146 #endif
147 
148 #endif
149  /* end of group */
int(* GNUNET_RECLAIM_ATTRIBUTE_StringToValueFunction)(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_ATTRIBUTE_ValueToStringFunction value_to_string
Conversion to string.
GNUNET_RECLAIM_ATTRIBUTE_TypenameToNumberFunction typename_to_number
Typename to number.
char *(* GNUNET_RECLAIM_ATTRIBUTE_ValueToStringFunction)(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...
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_ATTRIBUTE_NumberToTypenameFunction)(void *cls, uint32_t type)
Function called to convert a type number (i.e.
uint32_t(* GNUNET_RECLAIM_ATTRIBUTE_TypenameToNumberFunction)(void *cls, const char *typename)
Function called to convert a type name to the corresponding number.
void * cls
Closure for all of the callbacks.
enum GNUNET_TESTBED_UnderlayLinkModelType type
the type of this model
uint32_t data
The data value.
static size_t data_size
Number of bytes in data.
GNUNET_RECLAIM_ATTRIBUTE_NumberToTypenameFunction number_to_typename
Number to typename.
GNUNET_RECLAIM_ATTRIBUTE_StringToValueFunction string_to_value
Conversion to binary.