diff options
author | Schanzenbach, Martin <mschanzenbach@posteo.de> | 2019-04-12 16:34:16 +0200 |
---|---|---|
committer | Schanzenbach, Martin <mschanzenbach@posteo.de> | 2019-04-14 10:01:23 +0200 |
commit | dfe11b6b541b47c85cdf56e55ebb816d6793db31 (patch) | |
tree | b1c05be186902b4e510ab803e489094402b8149a /src/reclaim/reclaim_api.c | |
parent | a12b8c2c4cbf952c8c305cde193bb25c13a0912b (diff) | |
download | gnunet-dfe11b6b541b47c85cdf56e55ebb816d6793db31.tar.gz gnunet-dfe11b6b541b47c85cdf56e55ebb816d6793db31.zip |
RECLAIM: Towards -sql
Diffstat (limited to 'src/reclaim/reclaim_api.c')
-rw-r--r-- | src/reclaim/reclaim_api.c | 66 |
1 files changed, 1 insertions, 65 deletions
diff --git a/src/reclaim/reclaim_api.c b/src/reclaim/reclaim_api.c index c8fde121b..dd6a249b5 100644 --- a/src/reclaim/reclaim_api.c +++ b/src/reclaim/reclaim_api.c | |||
@@ -1192,69 +1192,6 @@ GNUNET_RECLAIM_ticket_iteration_start (struct GNUNET_RECLAIM_Handle *h, | |||
1192 | void *finish_cb_cls) | 1192 | void *finish_cb_cls) |
1193 | { | 1193 | { |
1194 | struct GNUNET_RECLAIM_TicketIterator *it; | 1194 | struct GNUNET_RECLAIM_TicketIterator *it; |
1195 | struct GNUNET_CRYPTO_EcdsaPublicKey identity_pub; | ||
1196 | struct GNUNET_MQ_Envelope *env; | ||
1197 | struct TicketIterationStartMessage *msg; | ||
1198 | uint32_t rid; | ||
1199 | |||
1200 | GNUNET_CRYPTO_ecdsa_key_get_public (identity, | ||
1201 | &identity_pub); | ||
1202 | rid = h->r_id_gen++; | ||
1203 | it = GNUNET_new (struct GNUNET_RECLAIM_TicketIterator); | ||
1204 | it->h = h; | ||
1205 | it->error_cb = error_cb; | ||
1206 | it->error_cb_cls = error_cb_cls; | ||
1207 | it->finish_cb = finish_cb; | ||
1208 | it->finish_cb_cls = finish_cb_cls; | ||
1209 | it->tr_cb = proc; | ||
1210 | it->cls = proc_cls; | ||
1211 | it->r_id = rid; | ||
1212 | GNUNET_CONTAINER_DLL_insert_tail (h->ticket_it_head, | ||
1213 | h->ticket_it_tail, | ||
1214 | it); | ||
1215 | env = GNUNET_MQ_msg (msg, | ||
1216 | GNUNET_MESSAGE_TYPE_RECLAIM_TICKET_ITERATION_START); | ||
1217 | msg->id = htonl (rid); | ||
1218 | msg->identity = identity_pub; | ||
1219 | msg->is_audience = htonl (GNUNET_NO); | ||
1220 | if (NULL == h->mq) | ||
1221 | it->env = env; | ||
1222 | else | ||
1223 | GNUNET_MQ_send (h->mq, | ||
1224 | env); | ||
1225 | return it; | ||
1226 | |||
1227 | } | ||
1228 | |||
1229 | |||
1230 | /** | ||
1231 | * Lists all tickets that have been issued to remote | ||
1232 | * identites (relying parties) | ||
1233 | * | ||
1234 | * @param h the reclaim to use | ||
1235 | * @param identity the issuing identity | ||
1236 | * @param error_cb function to call on error (i.e. disconnect), | ||
1237 | * the handle is afterwards invalid | ||
1238 | * @param error_cb_cls closure for @a error_cb | ||
1239 | * @param proc function to call on each ticket; it | ||
1240 | * will be called repeatedly with a value (if available) | ||
1241 | * @param proc_cls closure for @a proc | ||
1242 | * @param finish_cb function to call on completion | ||
1243 | * the handle is afterwards invalid | ||
1244 | * @param finish_cb_cls closure for @a finish_cb | ||
1245 | * @return an iterator handle to use for iteration | ||
1246 | */ | ||
1247 | struct GNUNET_RECLAIM_TicketIterator * | ||
1248 | GNUNET_RECLAIM_ticket_iteration_start_rp (struct GNUNET_RECLAIM_Handle *h, | ||
1249 | const struct GNUNET_CRYPTO_EcdsaPublicKey *identity, | ||
1250 | GNUNET_SCHEDULER_TaskCallback error_cb, | ||
1251 | void *error_cb_cls, | ||
1252 | GNUNET_RECLAIM_TicketCallback proc, | ||
1253 | void *proc_cls, | ||
1254 | GNUNET_SCHEDULER_TaskCallback finish_cb, | ||
1255 | void *finish_cb_cls) | ||
1256 | { | ||
1257 | struct GNUNET_RECLAIM_TicketIterator *it; | ||
1258 | struct GNUNET_MQ_Envelope *env; | 1195 | struct GNUNET_MQ_Envelope *env; |
1259 | struct TicketIterationStartMessage *msg; | 1196 | struct TicketIterationStartMessage *msg; |
1260 | uint32_t rid; | 1197 | uint32_t rid; |
@@ -1276,7 +1213,6 @@ GNUNET_RECLAIM_ticket_iteration_start_rp (struct GNUNET_RECLAIM_Handle *h, | |||
1276 | GNUNET_MESSAGE_TYPE_RECLAIM_TICKET_ITERATION_START); | 1213 | GNUNET_MESSAGE_TYPE_RECLAIM_TICKET_ITERATION_START); |
1277 | msg->id = htonl (rid); | 1214 | msg->id = htonl (rid); |
1278 | msg->identity = *identity; | 1215 | msg->identity = *identity; |
1279 | msg->is_audience = htonl (GNUNET_YES); | ||
1280 | if (NULL == h->mq) | 1216 | if (NULL == h->mq) |
1281 | it->env = env; | 1217 | it->env = env; |
1282 | else | 1218 | else |
@@ -1284,9 +1220,9 @@ GNUNET_RECLAIM_ticket_iteration_start_rp (struct GNUNET_RECLAIM_Handle *h, | |||
1284 | env); | 1220 | env); |
1285 | return it; | 1221 | return it; |
1286 | 1222 | ||
1287 | |||
1288 | } | 1223 | } |
1289 | 1224 | ||
1225 | |||
1290 | /** | 1226 | /** |
1291 | * Calls the record processor specified in #GNUNET_RECLAIM_ticket_iteration_start | 1227 | * Calls the record processor specified in #GNUNET_RECLAIM_ticket_iteration_start |
1292 | * for the next record. | 1228 | * for the next record. |