diff options
author | Markus Voggenreiter <Markus.Voggenreiter@tum.de> | 2019-10-09 19:51:40 +0200 |
---|---|---|
committer | Schanzenbach, Martin <mschanzenbach@posteo.de> | 2020-01-13 13:31:00 +0100 |
commit | 60d2660de243053bc0f41657ad9d67537723276c (patch) | |
tree | da6949c22fbb947b81c484534857b55cccfd7ee5 /src/reclaim/plugin_rest_reclaim.c | |
parent | c0a6838a1b8a3ca2c73af04b8829d6736521cba1 (diff) | |
download | gnunet-60d2660de243053bc0f41657ad9d67537723276c.tar.gz gnunet-60d2660de243053bc0f41657ad9d67537723276c.zip |
Adapted Namestore and reclaim REST
Diffstat (limited to 'src/reclaim/plugin_rest_reclaim.c')
-rw-r--r-- | src/reclaim/plugin_rest_reclaim.c | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/src/reclaim/plugin_rest_reclaim.c b/src/reclaim/plugin_rest_reclaim.c index 9a75b2d16..c58b1560b 100644 --- a/src/reclaim/plugin_rest_reclaim.c +++ b/src/reclaim/plugin_rest_reclaim.c | |||
@@ -49,6 +49,11 @@ | |||
49 | #define GNUNET_REST_API_NS_RECLAIM_ATTRIBUTES "/reclaim/attributes" | 49 | #define GNUNET_REST_API_NS_RECLAIM_ATTRIBUTES "/reclaim/attributes" |
50 | 50 | ||
51 | /** | 51 | /** |
52 | * Attestation namespace | ||
53 | */ | ||
54 | #define GNUNET_REST_API_NS_RECLAIM_ATTESTATION_REFERENCE "/reclaim/attestation" | ||
55 | |||
56 | /** | ||
52 | * Ticket namespace | 57 | * Ticket namespace |
53 | */ | 58 | */ |
54 | #define GNUNET_REST_API_NS_IDENTITY_TICKETS "/reclaim/tickets" | 59 | #define GNUNET_REST_API_NS_IDENTITY_TICKETS "/reclaim/tickets" |
@@ -432,7 +437,36 @@ ticket_collect (void *cls, const struct GNUNET_RECLAIM_Ticket *ticket) | |||
432 | GNUNET_free (tmp); | 437 | GNUNET_free (tmp); |
433 | GNUNET_RECLAIM_ticket_iteration_next (handle->ticket_it); | 438 | GNUNET_RECLAIM_ticket_iteration_next (handle->ticket_it); |
434 | } | 439 | } |
440 | static void | ||
441 | add_attestation_cont (struct GNUNET_REST_RequestHandle *con_handle, | ||
442 | const char *url, | ||
443 | void *cls) | ||
444 | { | ||
445 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Adding Attestations not supported\n"); | ||
446 | GNUNET_SCHEDULER_add_now (&do_error, handle); | ||
447 | return; | ||
448 | } | ||
449 | /*Placeholder*/ | ||
450 | static void | ||
451 | list_attestation_cont (struct GNUNET_REST_RequestHandle *con_handle, | ||
452 | const char *url, | ||
453 | void *cls) | ||
454 | { | ||
455 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Listing Attestations not supported\n"); | ||
456 | GNUNET_SCHEDULER_add_now (&do_error, handle); | ||
457 | return; | ||
458 | } | ||
435 | 459 | ||
460 | /*Placeholder*/ | ||
461 | static void | ||
462 | delete_attestation_cont (struct GNUNET_REST_RequestHandle *con_handle, | ||
463 | const char *url, | ||
464 | void *cls) | ||
465 | { | ||
466 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Deleting Attestations not supported\n"); | ||
467 | GNUNET_SCHEDULER_add_now (&do_error, handle); | ||
468 | return; | ||
469 | } | ||
436 | 470 | ||
437 | /** | 471 | /** |
438 | * List tickets for identity request | 472 | * List tickets for identity request |
@@ -969,6 +1003,15 @@ init_cont (struct RequestHandle *handle) | |||
969 | GNUNET_REST_API_NS_RECLAIM_ATTRIBUTES, | 1003 | GNUNET_REST_API_NS_RECLAIM_ATTRIBUTES, |
970 | &delete_attribute_cont }, | 1004 | &delete_attribute_cont }, |
971 | { MHD_HTTP_METHOD_GET, | 1005 | { MHD_HTTP_METHOD_GET, |
1006 | GNUNET_REST_API_NS_RECLAIM_ATTESTATION_REFERENCE, | ||
1007 | &list_attestation_cont }, | ||
1008 | { MHD_HTTP_METHOD_POST, | ||
1009 | GNUNET_REST_API_NS_RECLAIM_ATTESTATION_REFERENCE, | ||
1010 | &add_attestation_cont }, | ||
1011 | { MHD_HTTP_METHOD_DELETE, | ||
1012 | GNUNET_REST_API_NS_RECLAIM_ATTESTATION_REFERENCE, | ||
1013 | &delete_attestation_cont }, | ||
1014 | { MHD_HTTP_METHOD_GET, | ||
972 | GNUNET_REST_API_NS_IDENTITY_TICKETS, | 1015 | GNUNET_REST_API_NS_IDENTITY_TICKETS, |
973 | &list_tickets_cont }, | 1016 | &list_tickets_cont }, |
974 | { MHD_HTTP_METHOD_POST, | 1017 | { MHD_HTTP_METHOD_POST, |