aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorSchanzenbach, Martin <mschanzenbach@posteo.de>2020-02-04 23:34:10 +0100
committerSchanzenbach, Martin <mschanzenbach@posteo.de>2020-02-09 20:38:10 +0100
commit5fb277e8d012d687f4d2d032571cd4b57946bbfb (patch)
tree2387ee8a40ef9d308e6d34ebd0f8af0dc90feb5f /src/include
parent065ecd9a0f92ecafd6c552494a6310b92cc08597 (diff)
downloadgnunet-5fb277e8d012d687f4d2d032571cd4b57946bbfb.tar.gz
gnunet-5fb277e8d012d687f4d2d032571cd4b57946bbfb.zip
towards better API
Diffstat (limited to 'src/include')
-rw-r--r--src/include/gnunet_reclaim_attribute_lib.h9
-rw-r--r--src/include/gnunet_reclaim_plugin.h18
-rw-r--r--src/include/gnunet_reclaim_service.h6
3 files changed, 31 insertions, 2 deletions
diff --git a/src/include/gnunet_reclaim_attribute_lib.h b/src/include/gnunet_reclaim_attribute_lib.h
index 937a4d8f4..6d3503950 100644
--- a/src/include/gnunet_reclaim_attribute_lib.h
+++ b/src/include/gnunet_reclaim_attribute_lib.h
@@ -586,6 +586,15 @@ GNUNET_RECLAIM_attestation_number_to_typename (uint32_t type);
586uint32_t 586uint32_t
587GNUNET_RECLAIM_attestation_typename_to_number (const char *typename); 587GNUNET_RECLAIM_attestation_typename_to_number (const char *typename);
588 588
589/**
590 * Convert an attestation type name to the corresponding number
591 *
592 * @param typename name to convert
593 * @return corresponding number, UINT32_MAX on error
594 */
595struct GNUNET_RECLAIM_AttributeList*
596GNUNET_RECLAIM_attestation_get_attributes (const struct GNUNET_RECLAIM_Attestation *attest);
597
589 598
590#if 0 /* keep Emacsens' auto-indent happy */ 599#if 0 /* keep Emacsens' auto-indent happy */
591{ 600{
diff --git a/src/include/gnunet_reclaim_plugin.h b/src/include/gnunet_reclaim_plugin.h
index 4dd5252d2..ed62adf6c 100644
--- a/src/include/gnunet_reclaim_plugin.h
+++ b/src/include/gnunet_reclaim_plugin.h
@@ -165,6 +165,18 @@ typedef const char *(*GNUNET_RECLAIM_AttestationNumberToTypenameFunction) (
165 void *cls, 165 void *cls,
166 uint32_t type); 166 uint32_t type);
167 167
168/**
169 * Function called to convert a type number (i.e. 1) to the
170 * corresponding type string
171 *
172 * @param cls closure
173 * @param type number of a type to convert
174 * @return corresponding typestring, NULL on error
175 */
176typedef struct GNUNET_RECLAIM_AttributeList *(*GNUNET_RECLAIM_AttestationGetAttributesFunction) (
177 void *cls,
178 const struct GNUNET_RECLAIM_Attestation *attest);
179
168 180
169 181
170/** 182/**
@@ -231,6 +243,12 @@ struct GNUNET_RECLAIM_AttestationPluginFunctions
231 */ 243 */
232 GNUNET_RECLAIM_AttestationNumberToTypenameFunction number_to_typename; 244 GNUNET_RECLAIM_AttestationNumberToTypenameFunction number_to_typename;
233 245
246 /**
247 * Attesation attributes.
248 */
249 GNUNET_RECLAIM_AttestationGetAttributesFunction get_attributes;
250
251
234}; 252};
235 253
236 254
diff --git a/src/include/gnunet_reclaim_service.h b/src/include/gnunet_reclaim_service.h
index c9c4fa5d1..ef9899dde 100644
--- a/src/include/gnunet_reclaim_service.h
+++ b/src/include/gnunet_reclaim_service.h
@@ -138,11 +138,13 @@ typedef void (*GNUNET_RECLAIM_AttributeTicketResult) (
138 * 138 *
139 * @param cls The callback closure 139 * @param cls The callback closure
140 * @param identity The identity authoritative over the attributes 140 * @param identity The identity authoritative over the attributes
141 * @param attr The attribute 141 * @param attestation The attestation
142 * @param attributes the parsed attributes
142 */ 143 */
143typedef void (*GNUNET_RECLAIM_AttestationResult) ( 144typedef void (*GNUNET_RECLAIM_AttestationResult) (
144 void *cls, const struct GNUNET_CRYPTO_EcdsaPublicKey *identity, 145 void *cls, const struct GNUNET_CRYPTO_EcdsaPublicKey *identity,
145 const struct GNUNET_RECLAIM_Attestation *attestation); 146 const struct GNUNET_RECLAIM_Attestation *attestation,
147 const struct GNUNET_RECLAIM_AttributeList *attributes);
146 148
147 149
148/** 150/**