diff options
Diffstat (limited to 'src/include/gnunet_reclaim_service.h')
-rw-r--r-- | src/include/gnunet_reclaim_service.h | 82 |
1 files changed, 81 insertions, 1 deletions
diff --git a/src/include/gnunet_reclaim_service.h b/src/include/gnunet_reclaim_service.h index 237d791d9..214cdba69 100644 --- a/src/include/gnunet_reclaim_service.h +++ b/src/include/gnunet_reclaim_service.h | |||
@@ -117,7 +117,9 @@ typedef void (*GNUNET_RECLAIM_ContinuationWithStatus) (void *cls, | |||
117 | */ | 117 | */ |
118 | typedef void (*GNUNET_RECLAIM_AttributeResult) ( | 118 | typedef void (*GNUNET_RECLAIM_AttributeResult) ( |
119 | void *cls, const struct GNUNET_CRYPTO_EcdsaPublicKey *identity, | 119 | void *cls, const struct GNUNET_CRYPTO_EcdsaPublicKey *identity, |
120 | const struct GNUNET_RECLAIM_ATTRIBUTE_Claim *attr); | 120 | const struct GNUNET_RECLAIM_ATTRIBUTE_Claim *attr, |
121 | const struct GNUNET_RECLAIM_ATTESTATION_Claim *attest, | ||
122 | const struct GNUNET_RECLAIM_ATTESTATION_REFERENCE *reference); | ||
121 | 123 | ||
122 | 124 | ||
123 | /** | 125 | /** |
@@ -152,6 +154,28 @@ GNUNET_RECLAIM_attribute_store ( | |||
152 | 154 | ||
153 | 155 | ||
154 | /** | 156 | /** |
157 | * Store an attestation. If the attestation is already present, | ||
158 | * it is replaced with the new attestation. | ||
159 | * | ||
160 | * @param h handle to the re:claimID service | ||
161 | * @param pkey private key of the identity | ||
162 | * @param attr the attestation value | ||
163 | * @param exp_interval the relative expiration interval for the attestation | ||
164 | * @param cont continuation to call when done | ||
165 | * @param cont_cls closure for @a cont | ||
166 | * @return handle to abort the request | ||
167 | */ | ||
168 | struct GNUNET_RECLAIM_Operation * | ||
169 | GNUNET_RECLAIM_attestation_store ( | ||
170 | struct GNUNET_RECLAIM_Handle *h, | ||
171 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *pkey, | ||
172 | const struct GNUNET_RECLAIM_ATTESTATION_Claim *attr, | ||
173 | const struct GNUNET_TIME_Relative *exp_interval, | ||
174 | GNUNET_RECLAIM_ContinuationWithStatus cont, | ||
175 | void *cont_cls); | ||
176 | |||
177 | |||
178 | /** | ||
155 | * Delete an attribute. Tickets used to share this attribute are updated | 179 | * Delete an attribute. Tickets used to share this attribute are updated |
156 | * accordingly. | 180 | * accordingly. |
157 | * | 181 | * |
@@ -169,8 +193,44 @@ GNUNET_RECLAIM_attribute_delete ( | |||
169 | const struct GNUNET_RECLAIM_ATTRIBUTE_Claim *attr, | 193 | const struct GNUNET_RECLAIM_ATTRIBUTE_Claim *attr, |
170 | GNUNET_RECLAIM_ContinuationWithStatus cont, void *cont_cls); | 194 | GNUNET_RECLAIM_ContinuationWithStatus cont, void *cont_cls); |
171 | 195 | ||
196 | /** | ||
197 | * Delete an attestation. Tickets used to share this attestation are updated | ||
198 | * accordingly. | ||
199 | * | ||
200 | * @param h handle to the re:claimID service | ||
201 | * @param pkey Private key of the identity to add an attribute to | ||
202 | * @param attr The attestation | ||
203 | * @param cont Continuation to call when done | ||
204 | * @param cont_cls Closure for @a cont | ||
205 | * @return handle Used to to abort the request | ||
206 | */ | ||
207 | struct GNUNET_RECLAIM_Operation * | ||
208 | GNUNET_RECLAIM_attestation_delete ( | ||
209 | struct GNUNET_RECLAIM_Handle *h, | ||
210 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *pkey, | ||
211 | const struct GNUNET_RECLAIM_ATTESTATION_Claim *attr, | ||
212 | GNUNET_RECLAIM_ContinuationWithStatus cont, | ||
213 | void *cont_cls); | ||
172 | 214 | ||
173 | /** | 215 | /** |
216 | * Delete an attestation reference. Tickets used to share this reference are updated | ||
217 | * accordingly. | ||
218 | * | ||
219 | * @param h handle to the re:claimID service | ||
220 | * @param pkey Private key of the identity to delete the reference from | ||
221 | * @param attr The reference | ||
222 | * @param cont Continuation to call when done | ||
223 | * @param cont_cls Closure for @a cont | ||
224 | * @return handle Used to to abort the request | ||
225 | */ | ||
226 | struct GNUNET_RECLAIM_Operation * | ||
227 | GNUNET_RECLAIM_attestation_reference_delete ( | ||
228 | struct GNUNET_RECLAIM_Handle *h, | ||
229 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *pkey, | ||
230 | const struct GNUNET_RECLAIM_ATTESTATION_REFERENCE *attr, | ||
231 | GNUNET_RECLAIM_ContinuationWithStatus cont, | ||
232 | void *cont_cls); | ||
233 | /** | ||
174 | * List all attributes for a local identity. | 234 | * List all attributes for a local identity. |
175 | * This MUST lock the `struct GNUNET_RECLAIM_Handle` | 235 | * This MUST lock the `struct GNUNET_RECLAIM_Handle` |
176 | * for any other calls than #GNUNET_RECLAIM_get_attributes_next() and | 236 | * for any other calls than #GNUNET_RECLAIM_get_attributes_next() and |
@@ -202,6 +262,26 @@ GNUNET_RECLAIM_get_attributes_start ( | |||
202 | GNUNET_RECLAIM_AttributeResult proc, void *proc_cls, | 262 | GNUNET_RECLAIM_AttributeResult proc, void *proc_cls, |
203 | GNUNET_SCHEDULER_TaskCallback finish_cb, void *finish_cb_cls); | 263 | GNUNET_SCHEDULER_TaskCallback finish_cb, void *finish_cb_cls); |
204 | 264 | ||
265 | /** | ||
266 | * Store an attestation reference. If the reference is already present, | ||
267 | * it is replaced with the new reference. | ||
268 | * | ||
269 | * @param h handle to the re:claimID service | ||
270 | * @param pkey private key of the identity | ||
271 | * @param attr the reference value | ||
272 | * @param exp_interval the relative expiration interval for the reference | ||
273 | * @param cont continuation to call when done | ||
274 | * @param cont_cls closure for @a cont | ||
275 | * @return handle to abort the request | ||
276 | */ | ||
277 | struct GNUNET_RECLAIM_Operation * | ||
278 | GNUNET_RECLAIM_attestation_reference_store ( | ||
279 | struct GNUNET_RECLAIM_Handle *h, | ||
280 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *pkey, | ||
281 | const struct GNUNET_RECLAIM_ATTESTATION_REFERENCE *attr, | ||
282 | const struct GNUNET_TIME_Relative *exp_interval, | ||
283 | GNUNET_RECLAIM_ContinuationWithStatus cont, | ||
284 | void *cont_cls); | ||
205 | 285 | ||
206 | /** | 286 | /** |
207 | * Calls the record processor specified in #GNUNET_RECLAIM_get_attributes_start | 287 | * Calls the record processor specified in #GNUNET_RECLAIM_get_attributes_start |