aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_reclaim_service.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/gnunet_reclaim_service.h')
-rw-r--r--src/include/gnunet_reclaim_service.h61
1 files changed, 30 insertions, 31 deletions
diff --git a/src/include/gnunet_reclaim_service.h b/src/include/gnunet_reclaim_service.h
index 139c44ae7..8387c79b0 100644
--- a/src/include/gnunet_reclaim_service.h
+++ b/src/include/gnunet_reclaim_service.h
@@ -113,7 +113,6 @@ typedef void (*GNUNET_RECLAIM_ContinuationWithStatus) (void *cls,
113 * @param cls The callback closure 113 * @param cls The callback closure
114 * @param identity The identity authoritative over the attributes 114 * @param identity The identity authoritative over the attributes
115 * @param attr The attribute 115 * @param attr The attribute
116 * @param attestation The attestation for the attribute (may be NULL)
117 */ 116 */
118typedef void (*GNUNET_RECLAIM_AttributeResult) ( 117typedef void (*GNUNET_RECLAIM_AttributeResult) (
119 void *cls, const struct GNUNET_CRYPTO_EcdsaPublicKey *identity, 118 void *cls, const struct GNUNET_CRYPTO_EcdsaPublicKey *identity,
@@ -125,25 +124,25 @@ typedef void (*GNUNET_RECLAIM_AttributeResult) (
125 * @param cls The callback closure 124 * @param cls The callback closure
126 * @param identity The identity authoritative over the attributes 125 * @param identity The identity authoritative over the attributes
127 * @param attr The attribute 126 * @param attr The attribute
128 * @param attestation The attestation for the attribute (may be NULL) 127 * @param presentation The presentation for the credential (may be NULL)
129 */ 128 */
130typedef void (*GNUNET_RECLAIM_AttributeTicketResult) ( 129typedef void (*GNUNET_RECLAIM_AttributeTicketResult) (
131 void *cls, const struct GNUNET_CRYPTO_EcdsaPublicKey *identity, 130 void *cls, const struct GNUNET_CRYPTO_EcdsaPublicKey *identity,
132 const struct GNUNET_RECLAIM_Attribute *attr, 131 const struct GNUNET_RECLAIM_Attribute *attr,
133 const struct GNUNET_RECLAIM_Attestation *attestation); 132 const struct GNUNET_RECLAIM_Presentation *presentation);
134 133
135 134
136/** 135/**
137 * Callback used to notify the client of attestation results. 136 * Callback used to notify the client of credential results.
138 * 137 *
139 * @param cls The callback closure 138 * @param cls The callback closure
140 * @param identity The identity authoritative over the attributes 139 * @param identity The identity authoritative over the attributes
141 * @param attestation The attestation 140 * @param credential The credential
142 * @param attributes the parsed attributes 141 * @param attributes the parsed attributes
143 */ 142 */
144typedef void (*GNUNET_RECLAIM_AttestationResult) ( 143typedef void (*GNUNET_RECLAIM_CredentialResult) (
145 void *cls, const struct GNUNET_CRYPTO_EcdsaPublicKey *identity, 144 void *cls, const struct GNUNET_CRYPTO_EcdsaPublicKey *identity,
146 const struct GNUNET_RECLAIM_Attestation *attestation); 145 const struct GNUNET_RECLAIM_Credential *credential);
147 146
148 147
149/** 148/**
@@ -178,22 +177,22 @@ GNUNET_RECLAIM_attribute_store (
178 177
179 178
180/** 179/**
181 * Store an attestation. If the attestation is already present, 180 * Store a credential. If the credential is already present,
182 * it is replaced with the new attestation. 181 * it is replaced with the new credential.
183 * 182 *
184 * @param h handle to the re:claimID service 183 * @param h handle to the re:claimID service
185 * @param pkey private key of the identity 184 * @param pkey private key of the identity
186 * @param attr the attestation value 185 * @param attr the credential value
187 * @param exp_interval the relative expiration interval for the attestation 186 * @param exp_interval the relative expiration interval for the credential
188 * @param cont continuation to call when done 187 * @param cont continuation to call when done
189 * @param cont_cls closure for @a cont 188 * @param cont_cls closure for @a cont
190 * @return handle to abort the request 189 * @return handle to abort the request
191 */ 190 */
192struct GNUNET_RECLAIM_Operation * 191struct GNUNET_RECLAIM_Operation *
193GNUNET_RECLAIM_attestation_store ( 192GNUNET_RECLAIM_credential_store (
194 struct GNUNET_RECLAIM_Handle *h, 193 struct GNUNET_RECLAIM_Handle *h,
195 const struct GNUNET_CRYPTO_EcdsaPrivateKey *pkey, 194 const struct GNUNET_CRYPTO_EcdsaPrivateKey *pkey,
196 const struct GNUNET_RECLAIM_Attestation *attestation, 195 const struct GNUNET_RECLAIM_Credential *credential,
197 const struct GNUNET_TIME_Relative *exp_interval, 196 const struct GNUNET_TIME_Relative *exp_interval,
198 GNUNET_RECLAIM_ContinuationWithStatus cont, 197 GNUNET_RECLAIM_ContinuationWithStatus cont,
199 void *cont_cls); 198 void *cont_cls);
@@ -218,21 +217,21 @@ GNUNET_RECLAIM_attribute_delete (
218 GNUNET_RECLAIM_ContinuationWithStatus cont, void *cont_cls); 217 GNUNET_RECLAIM_ContinuationWithStatus cont, void *cont_cls);
219 218
220/** 219/**
221 * Delete an attestation. Tickets used to share this attestation are updated 220 * Delete a credential. Tickets used to share use a presentation of this
222 * accordingly. 221 * credential are updated accordingly.
223 * 222 *
224 * @param h handle to the re:claimID service 223 * @param h handle to the re:claimID service
225 * @param pkey Private key of the identity to add an attribute to 224 * @param pkey Private key of the identity to add an attribute to
226 * @param attr The attestation 225 * @param cred The credential
227 * @param cont Continuation to call when done 226 * @param cont Continuation to call when done
228 * @param cont_cls Closure for @a cont 227 * @param cont_cls Closure for @a cont
229 * @return handle Used to to abort the request 228 * @return handle Used to to abort the request
230 */ 229 */
231struct GNUNET_RECLAIM_Operation * 230struct GNUNET_RECLAIM_Operation *
232GNUNET_RECLAIM_attestation_delete ( 231GNUNET_RECLAIM_credential_delete (
233 struct GNUNET_RECLAIM_Handle *h, 232 struct GNUNET_RECLAIM_Handle *h,
234 const struct GNUNET_CRYPTO_EcdsaPrivateKey *pkey, 233 const struct GNUNET_CRYPTO_EcdsaPrivateKey *pkey,
235 const struct GNUNET_RECLAIM_Attestation *attr, 234 const struct GNUNET_RECLAIM_Credential *cred,
236 GNUNET_RECLAIM_ContinuationWithStatus cont, 235 GNUNET_RECLAIM_ContinuationWithStatus cont,
237 void *cont_cls); 236 void *cont_cls);
238 237
@@ -293,12 +292,12 @@ GNUNET_RECLAIM_get_attributes_stop (
293 292
294 293
295/** 294/**
296 * List all attestations for a local identity. 295 * List all credentials for a local identity.
297 * This MUST lock the `struct GNUNET_RECLAIM_Handle` 296 * This MUST lock the `struct GNUNET_RECLAIM_Handle`
298 * for any other calls than #GNUNET_RECLAIM_get_attestations_next() and 297 * for any other calls than #GNUNET_RECLAIM_get_credentials_next() and
299 * #GNUNET_RECLAIM_get_attestations_stop. @a proc will be called once 298 * #GNUNET_RECLAIM_get_credentials_stop. @a proc will be called once
300 * immediately, and then again after 299 * immediately, and then again after
301 * #GNUNET_RECLAIM_get_attestations_next() is invoked. 300 * #GNUNET_RECLAIM_get_credentials_next() is invoked.
302 * 301 *
303 * On error (disconnect), @a error_cb will be invoked. 302 * On error (disconnect), @a error_cb will be invoked.
304 * On normal completion, @a finish_cb proc will be 303 * On normal completion, @a finish_cb proc will be
@@ -309,34 +308,34 @@ GNUNET_RECLAIM_get_attributes_stop (
309 * @param error_cb Function to call on error (i.e. disconnect), 308 * @param error_cb Function to call on error (i.e. disconnect),
310 * the handle is afterwards invalid 309 * the handle is afterwards invalid
311 * @param error_cb_cls Closure for @a error_cb 310 * @param error_cb_cls Closure for @a error_cb
312 * @param proc Function to call on each attestation 311 * @param proc Function to call on each credential
313 * @param proc_cls Closure for @a proc 312 * @param proc_cls Closure for @a proc
314 * @param finish_cb Function to call on completion 313 * @param finish_cb Function to call on completion
315 * the handle is afterwards invalid 314 * the handle is afterwards invalid
316 * @param finish_cb_cls Closure for @a finish_cb 315 * @param finish_cb_cls Closure for @a finish_cb
317 * @return an iterator Handle to use for iteration 316 * @return an iterator Handle to use for iteration
318 */ 317 */
319struct GNUNET_RECLAIM_AttestationIterator * 318struct GNUNET_RECLAIM_CredentialIterator *
320GNUNET_RECLAIM_get_attestations_start ( 319GNUNET_RECLAIM_get_credentials_start (
321 struct GNUNET_RECLAIM_Handle *h, 320 struct GNUNET_RECLAIM_Handle *h,
322 const struct GNUNET_CRYPTO_EcdsaPrivateKey *identity, 321 const struct GNUNET_CRYPTO_EcdsaPrivateKey *identity,
323 GNUNET_SCHEDULER_TaskCallback error_cb, 322 GNUNET_SCHEDULER_TaskCallback error_cb,
324 void *error_cb_cls, 323 void *error_cb_cls,
325 GNUNET_RECLAIM_AttestationResult proc, 324 GNUNET_RECLAIM_CredentialResult proc,
326 void *proc_cls, 325 void *proc_cls,
327 GNUNET_SCHEDULER_TaskCallback finish_cb, 326 GNUNET_SCHEDULER_TaskCallback finish_cb,
328 void *finish_cb_cls); 327 void *finish_cb_cls);
329 328
330 329
331/** 330/**
332 * Calls the record processor specified in #GNUNET_RECLAIM_get_attestation_start 331 * Calls the record processor specified in #GNUNET_RECLAIM_get_credentials_start
333 * for the next record. 332 * for the next record.
334 * 333 *
335 * @param it the iterator 334 * @param it the iterator
336 */ 335 */
337void 336void
338GNUNET_RECLAIM_get_attestations_next (struct 337GNUNET_RECLAIM_get_credentials_next (
339 GNUNET_RECLAIM_AttestationIterator *ait); 338 struct GNUNET_RECLAIM_CredentialIterator *ait);
340 339
341 340
342/** 341/**
@@ -347,8 +346,8 @@ GNUNET_RECLAIM_get_attestations_next (struct
347 * @param it the iterator 346 * @param it the iterator
348 */ 347 */
349void 348void
350GNUNET_RECLAIM_get_attestations_stop (struct 349GNUNET_RECLAIM_get_credentials_stop (
351 GNUNET_RECLAIM_AttestationIterator *ait); 350 struct GNUNET_RECLAIM_CredentialIterator *ait);
352 351
353 352
354/** 353/**