diff options
Diffstat (limited to 'src/namestore/plugin_rest_namestore.c')
-rw-r--r-- | src/namestore/plugin_rest_namestore.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/src/namestore/plugin_rest_namestore.c b/src/namestore/plugin_rest_namestore.c index 9354b9896..edcbeb874 100644 --- a/src/namestore/plugin_rest_namestore.c +++ b/src/namestore/plugin_rest_namestore.c | |||
@@ -30,7 +30,7 @@ | |||
30 | #include "gnunet_namestore_service.h" | 30 | #include "gnunet_namestore_service.h" |
31 | #include "gnunet_identity_service.h" | 31 | #include "gnunet_identity_service.h" |
32 | #include "gnunet_rest_lib.h" | 32 | #include "gnunet_rest_lib.h" |
33 | #include "gnunet_json_lib.h" | 33 | #include "gnunet_gnsrecord_json_lib.h" |
34 | #include "microhttpd.h" | 34 | #include "microhttpd.h" |
35 | #include <jansson.h> | 35 | #include <jansson.h> |
36 | 36 | ||
@@ -214,7 +214,7 @@ struct RequestHandle | |||
214 | /** | 214 | /** |
215 | * Private key for the zone | 215 | * Private key for the zone |
216 | */ | 216 | */ |
217 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone_pkey; | 217 | const struct GNUNET_IDENTITY_PrivateKey *zone_pkey; |
218 | 218 | ||
219 | /** | 219 | /** |
220 | * IDENTITY Operation | 220 | * IDENTITY Operation |
@@ -510,7 +510,7 @@ namestore_list_finished (void *cls) | |||
510 | */ | 510 | */ |
511 | static void | 511 | static void |
512 | namestore_list_iteration (void *cls, | 512 | namestore_list_iteration (void *cls, |
513 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone_key, | 513 | const struct GNUNET_IDENTITY_PrivateKey *zone_key, |
514 | const char *rname, | 514 | const char *rname, |
515 | unsigned int rd_len, | 515 | unsigned int rd_len, |
516 | const struct GNUNET_GNSRECORD_Data *rd) | 516 | const struct GNUNET_GNSRECORD_Data *rd) |
@@ -535,9 +535,9 @@ namestore_list_iteration (void *cls, | |||
535 | /** Only add if not empty **/ | 535 | /** Only add if not empty **/ |
536 | if (j > 0) | 536 | if (j > 0) |
537 | { | 537 | { |
538 | record_obj = GNUNET_JSON_from_gnsrecord (rname, | 538 | record_obj = GNUNET_GNSRECORD_JSON_from_gnsrecord (rname, |
539 | rd_filtered, | 539 | rd_filtered, |
540 | j); | 540 | j); |
541 | json_array_append_new (handle->resp_object, record_obj); | 541 | json_array_append_new (handle->resp_object, record_obj); |
542 | } | 542 | } |
543 | GNUNET_NAMESTORE_zone_iterator_next (handle->list_it, 1); | 543 | GNUNET_NAMESTORE_zone_iterator_next (handle->list_it, 1); |
@@ -561,7 +561,7 @@ ns_lookup_error_cb (void *cls) | |||
561 | 561 | ||
562 | static void | 562 | static void |
563 | ns_get_lookup_cb (void *cls, | 563 | ns_get_lookup_cb (void *cls, |
564 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone, | 564 | const struct GNUNET_IDENTITY_PrivateKey *zone, |
565 | const char *label, | 565 | const char *label, |
566 | unsigned int rd_len, | 566 | unsigned int rd_len, |
567 | const struct GNUNET_GNSRECORD_Data *rd) | 567 | const struct GNUNET_GNSRECORD_Data *rd) |
@@ -587,9 +587,9 @@ ns_get_lookup_cb (void *cls, | |||
587 | /** Only add if not empty **/ | 587 | /** Only add if not empty **/ |
588 | if (j > 0) | 588 | if (j > 0) |
589 | { | 589 | { |
590 | record_obj = GNUNET_JSON_from_gnsrecord (label, | 590 | record_obj = GNUNET_GNSRECORD_JSON_from_gnsrecord (label, |
591 | rd_filtered, | 591 | rd_filtered, |
592 | j); | 592 | j); |
593 | json_array_append_new (handle->resp_object, record_obj); | 593 | json_array_append_new (handle->resp_object, record_obj); |
594 | } | 594 | } |
595 | GNUNET_SCHEDULER_add_now (&namestore_list_finished, handle); | 595 | GNUNET_SCHEDULER_add_now (&namestore_list_finished, handle); |
@@ -689,7 +689,7 @@ namestore_get (struct GNUNET_REST_RequestHandle *con_handle, | |||
689 | 689 | ||
690 | static void | 690 | static void |
691 | ns_lookup_cb (void *cls, | 691 | ns_lookup_cb (void *cls, |
692 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone, | 692 | const struct GNUNET_IDENTITY_PrivateKey *zone, |
693 | const char *label, | 693 | const char *label, |
694 | unsigned int rd_count, | 694 | unsigned int rd_count, |
695 | const struct GNUNET_GNSRECORD_Data *rd) | 695 | const struct GNUNET_GNSRECORD_Data *rd) |
@@ -755,7 +755,7 @@ namestore_add_or_update (struct GNUNET_REST_RequestHandle *con_handle, | |||
755 | handle->rest_handle->data_size); | 755 | handle->rest_handle->data_size); |
756 | data_js = json_loads (term_data, JSON_DECODE_ANY, &err); | 756 | data_js = json_loads (term_data, JSON_DECODE_ANY, &err); |
757 | struct GNUNET_JSON_Specification gnsspec[] = | 757 | struct GNUNET_JSON_Specification gnsspec[] = |
758 | { GNUNET_JSON_spec_gnsrecord (&handle->rd, &handle->rd_count, | 758 | { GNUNET_GNSRECORD_JSON_spec_gnsrecord (&handle->rd, &handle->rd_count, |
759 | &handle->record_name), | 759 | &handle->record_name), |
760 | GNUNET_JSON_spec_end () }; | 760 | GNUNET_JSON_spec_end () }; |
761 | if (GNUNET_OK != GNUNET_JSON_parse (data_js, gnsspec, NULL, NULL)) | 761 | if (GNUNET_OK != GNUNET_JSON_parse (data_js, gnsspec, NULL, NULL)) |
@@ -946,7 +946,7 @@ list_ego (void *cls, | |||
946 | const char *identifier) | 946 | const char *identifier) |
947 | { | 947 | { |
948 | struct EgoEntry *ego_entry; | 948 | struct EgoEntry *ego_entry; |
949 | struct GNUNET_CRYPTO_EcdsaPublicKey pk; | 949 | struct GNUNET_IDENTITY_PublicKey pk; |
950 | 950 | ||
951 | if ((NULL == ego) && (ID_REST_STATE_INIT == state)) | 951 | if ((NULL == ego) && (ID_REST_STATE_INIT == state)) |
952 | { | 952 | { |
@@ -957,7 +957,7 @@ list_ego (void *cls, | |||
957 | { | 957 | { |
958 | ego_entry = GNUNET_new (struct EgoEntry); | 958 | ego_entry = GNUNET_new (struct EgoEntry); |
959 | GNUNET_IDENTITY_ego_get_public_key (ego, &pk); | 959 | GNUNET_IDENTITY_ego_get_public_key (ego, &pk); |
960 | ego_entry->keystring = GNUNET_CRYPTO_ecdsa_public_key_to_string (&pk); | 960 | ego_entry->keystring = GNUNET_IDENTITY_public_key_to_string (&pk); |
961 | ego_entry->ego = ego; | 961 | ego_entry->ego = ego; |
962 | ego_entry->identifier = GNUNET_strdup (identifier); | 962 | ego_entry->identifier = GNUNET_strdup (identifier); |
963 | GNUNET_CONTAINER_DLL_insert_tail (ego_head, | 963 | GNUNET_CONTAINER_DLL_insert_tail (ego_head, |
@@ -983,7 +983,7 @@ list_ego (void *cls, | |||
983 | /* Add */ | 983 | /* Add */ |
984 | ego_entry = GNUNET_new (struct EgoEntry); | 984 | ego_entry = GNUNET_new (struct EgoEntry); |
985 | GNUNET_IDENTITY_ego_get_public_key (ego, &pk); | 985 | GNUNET_IDENTITY_ego_get_public_key (ego, &pk); |
986 | ego_entry->keystring = GNUNET_CRYPTO_ecdsa_public_key_to_string (&pk); | 986 | ego_entry->keystring = GNUNET_IDENTITY_public_key_to_string (&pk); |
987 | ego_entry->ego = ego; | 987 | ego_entry->ego = ego; |
988 | ego_entry->identifier = GNUNET_strdup (identifier); | 988 | ego_entry->identifier = GNUNET_strdup (identifier); |
989 | GNUNET_CONTAINER_DLL_insert_tail (ego_head, | 989 | GNUNET_CONTAINER_DLL_insert_tail (ego_head, |