diff options
author | Schanzenbach, Martin <mschanzenbach@posteo.de> | 2019-05-02 11:27:09 +0200 |
---|---|---|
committer | Schanzenbach, Martin <mschanzenbach@posteo.de> | 2019-05-02 11:27:09 +0200 |
commit | 70824dc0035428da3ec00ef7e6aca48eb1302527 (patch) | |
tree | e3f59870cdfa2c5491da625ee5c6938c64281e52 /src/include/gnunet_reclaim_attribute_plugin.h | |
parent | 8dde46a0133e95c9fa2ba0b525b5d1ebbc75ccec (diff) | |
download | gnunet-70824dc0035428da3ec00ef7e6aca48eb1302527.tar.gz gnunet-70824dc0035428da3ec00ef7e6aca48eb1302527.zip |
RECLAIM: cleanup, comments
Diffstat (limited to 'src/include/gnunet_reclaim_attribute_plugin.h')
-rw-r--r-- | src/include/gnunet_reclaim_attribute_plugin.h | 47 |
1 files changed, 24 insertions, 23 deletions
diff --git a/src/include/gnunet_reclaim_attribute_plugin.h b/src/include/gnunet_reclaim_attribute_plugin.h index 0dfd69b82..c05c80b07 100644 --- a/src/include/gnunet_reclaim_attribute_plugin.h +++ b/src/include/gnunet_reclaim_attribute_plugin.h | |||
@@ -11,7 +11,7 @@ | |||
11 | WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 | Affero General Public License for more details. | 13 | Affero General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU Affero General Public License | 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/>. | 16 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
17 | 17 | ||
@@ -22,10 +22,9 @@ | |||
22 | * @author Martin Schanzenbach | 22 | * @author Martin Schanzenbach |
23 | * | 23 | * |
24 | * @file | 24 | * @file |
25 | * Plugin API for the idp database backend | 25 | * Plugin API for reclaim attribute types |
26 | * | 26 | * |
27 | * @defgroup identity-provider-plugin IdP service plugin API | 27 | * @defgroup reclaim-attribute-plugin reclaim plugin API for attributes/claims |
28 | * Plugin API for the idp database backend | ||
29 | * @{ | 28 | * @{ |
30 | */ | 29 | */ |
31 | #ifndef GNUNET_RECLAIM_ATTRIBUTE_PLUGIN_H | 30 | #ifndef GNUNET_RECLAIM_ATTRIBUTE_PLUGIN_H |
@@ -35,9 +34,8 @@ | |||
35 | #include "gnunet_reclaim_attribute_lib.h" | 34 | #include "gnunet_reclaim_attribute_lib.h" |
36 | 35 | ||
37 | #ifdef __cplusplus | 36 | #ifdef __cplusplus |
38 | extern "C" | 37 | extern "C" { |
39 | { | 38 | #if 0 /* keep Emacsens' auto-indent happy */ |
40 | #if 0 /* keep Emacsens' auto-indent happy */ | ||
41 | } | 39 | } |
42 | #endif | 40 | #endif |
43 | #endif | 41 | #endif |
@@ -53,10 +51,11 @@ extern "C" | |||
53 | * @param data_size number of bytes in @a data | 51 | * @param data_size number of bytes in @a data |
54 | * @return NULL on error, otherwise human-readable representation of the value | 52 | * @return NULL on error, otherwise human-readable representation of the value |
55 | */ | 53 | */ |
56 | typedef char * (*GNUNET_RECLAIM_ATTRIBUTE_ValueToStringFunction) (void *cls, | 54 | typedef char *(*GNUNET_RECLAIM_ATTRIBUTE_ValueToStringFunction) ( |
57 | uint32_t type, | 55 | void *cls, |
58 | const void *data, | 56 | uint32_t type, |
59 | size_t data_size); | 57 | const void *data, |
58 | size_t data_size); | ||
60 | 59 | ||
61 | 60 | ||
62 | /** | 61 | /** |
@@ -71,11 +70,12 @@ typedef char * (*GNUNET_RECLAIM_ATTRIBUTE_ValueToStringFunction) (void *cls, | |||
71 | * @param data_size set to number of bytes in @a data | 70 | * @param data_size set to number of bytes in @a data |
72 | * @return #GNUNET_OK on success | 71 | * @return #GNUNET_OK on success |
73 | */ | 72 | */ |
74 | typedef int (*GNUNET_RECLAIM_ATTRIBUTE_StringToValueFunction) (void *cls, | 73 | typedef int (*GNUNET_RECLAIM_ATTRIBUTE_StringToValueFunction) ( |
75 | uint32_t type, | 74 | void *cls, |
76 | const char *s, | 75 | uint32_t type, |
77 | void **data, | 76 | const char *s, |
78 | size_t *data_size); | 77 | void **data, |
78 | size_t *data_size); | ||
79 | 79 | ||
80 | 80 | ||
81 | /** | 81 | /** |
@@ -86,8 +86,9 @@ typedef int (*GNUNET_RECLAIM_ATTRIBUTE_StringToValueFunction) (void *cls, | |||
86 | * @param typename name to convert | 86 | * @param typename name to convert |
87 | * @return corresponding number, UINT32_MAX on error | 87 | * @return corresponding number, UINT32_MAX on error |
88 | */ | 88 | */ |
89 | typedef uint32_t (*GNUNET_RECLAIM_ATTRIBUTE_TypenameToNumberFunction) (void *cls, | 89 | typedef uint32_t (*GNUNET_RECLAIM_ATTRIBUTE_TypenameToNumberFunction) ( |
90 | const char *typename); | 90 | void *cls, |
91 | const char *typename); | ||
91 | 92 | ||
92 | 93 | ||
93 | /** | 94 | /** |
@@ -98,8 +99,9 @@ typedef uint32_t (*GNUNET_RECLAIM_ATTRIBUTE_TypenameToNumberFunction) (void *cls | |||
98 | * @param type number of a type to convert | 99 | * @param type number of a type to convert |
99 | * @return corresponding typestring, NULL on error | 100 | * @return corresponding typestring, NULL on error |
100 | */ | 101 | */ |
101 | typedef const char * (*GNUNET_RECLAIM_ATTRIBUTE_NumberToTypenameFunction) (void *cls, | 102 | typedef const char *(*GNUNET_RECLAIM_ATTRIBUTE_NumberToTypenameFunction) ( |
102 | uint32_t type); | 103 | void *cls, |
104 | uint32_t type); | ||
103 | 105 | ||
104 | 106 | ||
105 | /** | 107 | /** |
@@ -133,11 +135,10 @@ struct GNUNET_RECLAIM_ATTRIBUTE_PluginFunctions | |||
133 | * Number to typename. | 135 | * Number to typename. |
134 | */ | 136 | */ |
135 | GNUNET_RECLAIM_ATTRIBUTE_NumberToTypenameFunction number_to_typename; | 137 | GNUNET_RECLAIM_ATTRIBUTE_NumberToTypenameFunction number_to_typename; |
136 | |||
137 | }; | 138 | }; |
138 | 139 | ||
139 | 140 | ||
140 | #if 0 /* keep Emacsens' auto-indent happy */ | 141 | #if 0 /* keep Emacsens' auto-indent happy */ |
141 | { | 142 | { |
142 | #endif | 143 | #endif |
143 | #ifdef __cplusplus | 144 | #ifdef __cplusplus |
@@ -146,4 +147,4 @@ struct GNUNET_RECLAIM_ATTRIBUTE_PluginFunctions | |||
146 | 147 | ||
147 | #endif | 148 | #endif |
148 | 149 | ||
149 | /** @} */ /* end of group */ | 150 | /** @} */ /* end of group */ |