diff options
Diffstat (limited to 'src/include/gnunet_json_lib.h')
-rw-r--r-- | src/include/gnunet_json_lib.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/include/gnunet_json_lib.h b/src/include/gnunet_json_lib.h index 4855f21b4..781d5698b 100644 --- a/src/include/gnunet_json_lib.h +++ b/src/include/gnunet_json_lib.h | |||
@@ -26,6 +26,7 @@ | |||
26 | #define GNUNET_JSON_LIB_H | 26 | #define GNUNET_JSON_LIB_H |
27 | 27 | ||
28 | #include "gnunet_util_lib.h" | 28 | #include "gnunet_util_lib.h" |
29 | #include "gnunet_gnsrecord_lib.h" | ||
29 | #include <jansson.h> | 30 | #include <jansson.h> |
30 | 31 | ||
31 | 32 | ||
@@ -318,6 +319,17 @@ GNUNET_JSON_spec_rsa_signature (const char *name, | |||
318 | struct GNUNET_CRYPTO_RsaSignature **sig); | 319 | struct GNUNET_CRYPTO_RsaSignature **sig); |
319 | 320 | ||
320 | 321 | ||
322 | |||
323 | /** | ||
324 | * JSON Specification for GNS Records. | ||
325 | * | ||
326 | * @param gnsrecord_object struct of GNUNET_GNSRECORD_Data to fill | ||
327 | * @return JSON Specification | ||
328 | */ | ||
329 | struct GNUNET_JSON_Specification | ||
330 | GNUNET_JSON_spec_gnsrecord_data (struct GNUNET_GNSRECORD_Data **gnsrecord_object); | ||
331 | |||
332 | |||
321 | /* ****************** Generic generator interface ******************* */ | 333 | /* ****************** Generic generator interface ******************* */ |
322 | 334 | ||
323 | 335 | ||
@@ -393,6 +405,16 @@ GNUNET_JSON_from_rsa_public_key (const struct GNUNET_CRYPTO_RsaPublicKey *pk); | |||
393 | json_t * | 405 | json_t * |
394 | GNUNET_JSON_from_rsa_signature (const struct GNUNET_CRYPTO_RsaSignature *sig); | 406 | GNUNET_JSON_from_rsa_signature (const struct GNUNET_CRYPTO_RsaSignature *sig); |
395 | 407 | ||
408 | /** | ||
409 | * Convert Gns record to JSON. | ||
410 | * | ||
411 | * @param rname name of record | ||
412 | * @param rd record data | ||
413 | * @return corresponding JSON encoding | ||
414 | */ | ||
415 | json_t * | ||
416 | GNUNET_JSON_from_gns_record (const char* rname, | ||
417 | const struct GNUNET_GNSRECORD_Data *rd); | ||
396 | 418 | ||
397 | /* ******************* Helpers for MHD upload handling ******************* */ | 419 | /* ******************* Helpers for MHD upload handling ******************* */ |
398 | 420 | ||