aboutsummaryrefslogtreecommitdiff
path: root/src/json/json_helper.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/json/json_helper.c')
-rw-r--r--src/json/json_helper.c103
1 files changed, 0 insertions, 103 deletions
diff --git a/src/json/json_helper.c b/src/json/json_helper.c
index 3bf2c1299..32b262a87 100644
--- a/src/json/json_helper.c
+++ b/src/json/json_helper.c
@@ -28,9 +28,6 @@
28#include "gnunet_json_lib.h" 28#include "gnunet_json_lib.h"
29 29
30 30
31/**
32 * End of a parser specification.
33 */
34struct GNUNET_JSON_Specification 31struct GNUNET_JSON_Specification
35GNUNET_JSON_spec_end () 32GNUNET_JSON_spec_end ()
36{ 33{
@@ -84,14 +81,6 @@ parse_fixed_data (void *cls,
84} 81}
85 82
86 83
87/**
88 * Variable size object (in network byte order, encoded using Crockford
89 * Base32hex encoding).
90 *
91 * @param name name of the JSON field
92 * @param[out] obj pointer where to write the data, must have @a size bytes
93 * @param size number of bytes expected in @a obj
94 */
95struct GNUNET_JSON_Specification 84struct GNUNET_JSON_Specification
96GNUNET_JSON_spec_fixed (const char *name, 85GNUNET_JSON_spec_fixed (const char *name,
97 void *obj, 86 void *obj,
@@ -178,14 +167,6 @@ clean_variable_data (void *cls,
178} 167}
179 168
180 169
181/**
182 * Variable size object (in network byte order, encoded using
183 * Crockford Base32hex encoding).
184 *
185 * @param name name of the JSON field
186 * @param[out] obj pointer where to write the data, will be allocated
187 * @param[out] size where to store the number of bytes allocated for @a obj
188 */
189struct GNUNET_JSON_Specification 170struct GNUNET_JSON_Specification
190GNUNET_JSON_spec_varsize (const char *name, 171GNUNET_JSON_spec_varsize (const char *name,
191 void **obj, 172 void **obj,
@@ -234,12 +215,6 @@ parse_string (void *cls,
234} 215}
235 216
236 217
237/**
238 * The expected field stores a string.
239 *
240 * @param name name of the JSON field
241 * @param strptr where to store a pointer to the field
242 */
243struct GNUNET_JSON_Specification 218struct GNUNET_JSON_Specification
244GNUNET_JSON_spec_string (const char *name, 219GNUNET_JSON_spec_string (const char *name,
245 const char **strptr) 220 const char **strptr)
@@ -303,12 +278,6 @@ clean_object (void *cls,
303} 278}
304 279
305 280
306/**
307 * JSON object.
308 *
309 * @param name name of the JSON field
310 * @param[out] jsonp where to store the JSON found under @a name
311 */
312struct GNUNET_JSON_Specification 281struct GNUNET_JSON_Specification
313GNUNET_JSON_spec_json (const char *name, 282GNUNET_JSON_spec_json (const char *name,
314 json_t **jsonp) 283 json_t **jsonp)
@@ -358,12 +327,6 @@ parse_bool (void *cls,
358} 327}
359 328
360 329
361/**
362 * boolean.
363 *
364 * @param name name of the JSON field
365 * @param[out] b where to store the boolean found under @a name
366 */
367struct GNUNET_JSON_Specification 330struct GNUNET_JSON_Specification
368GNUNET_JSON_spec_bool (const char *name, 331GNUNET_JSON_spec_bool (const char *name,
369 bool *b) 332 bool *b)
@@ -414,12 +377,6 @@ parse_u8 (void *cls,
414} 377}
415 378
416 379
417/**
418 * 8-bit integer.
419 *
420 * @param name name of the JSON field
421 * @param[out] u8 where to store the integer found under @a name
422 */
423struct GNUNET_JSON_Specification 380struct GNUNET_JSON_Specification
424GNUNET_JSON_spec_uint8 (const char *name, 381GNUNET_JSON_spec_uint8 (const char *name,
425 uint8_t *u8) 382 uint8_t *u8)
@@ -470,12 +427,6 @@ parse_u16 (void *cls,
470} 427}
471 428
472 429
473/**
474 * 16-bit integer.
475 *
476 * @param name name of the JSON field
477 * @param[out] u16 where to store the integer found under @a name
478 */
479struct GNUNET_JSON_Specification 430struct GNUNET_JSON_Specification
480GNUNET_JSON_spec_uint16 (const char *name, 431GNUNET_JSON_spec_uint16 (const char *name,
481 uint16_t *u16) 432 uint16_t *u16)
@@ -526,12 +477,6 @@ parse_u32 (void *cls,
526} 477}
527 478
528 479
529/**
530 * 32-bit integer.
531 *
532 * @param name name of the JSON field
533 * @param[out] u32 where to store the integer found under @a name
534 */
535struct GNUNET_JSON_Specification 480struct GNUNET_JSON_Specification
536GNUNET_JSON_spec_uint32 (const char *name, 481GNUNET_JSON_spec_uint32 (const char *name,
537 uint32_t *u32) 482 uint32_t *u32)
@@ -577,12 +522,6 @@ parse_u64 (void *cls,
577} 522}
578 523
579 524
580/**
581 * 64-bit integer.
582 *
583 * @param name name of the JSON field
584 * @param[out] u64 where to store the integer found under @a name
585 */
586struct GNUNET_JSON_Specification 525struct GNUNET_JSON_Specification
587GNUNET_JSON_spec_uint64 (const char *name, 526GNUNET_JSON_spec_uint64 (const char *name,
588 uint64_t *u64) 527 uint64_t *u64)
@@ -628,12 +567,6 @@ parse_i64 (void *cls,
628} 567}
629 568
630 569
631/**
632 * 64-bit signed integer.
633 *
634 * @param name name of the JSON field
635 * @param[out] i64 where to store the integer found under @a name
636 */
637struct GNUNET_JSON_Specification 570struct GNUNET_JSON_Specification
638GNUNET_JSON_spec_int64 (const char *name, 571GNUNET_JSON_spec_int64 (const char *name,
639 int64_t *i64) 572 int64_t *i64)
@@ -707,12 +640,6 @@ parse_abs_time (void *cls,
707} 640}
708 641
709 642
710/**
711 * Absolute time.
712 *
713 * @param name name of the JSON field
714 * @param[out] at where to store the absolute time found under @a name
715 */
716struct GNUNET_JSON_Specification 643struct GNUNET_JSON_Specification
717GNUNET_JSON_spec_absolute_time (const char *name, 644GNUNET_JSON_spec_absolute_time (const char *name,
718 struct GNUNET_TIME_Absolute *at) 645 struct GNUNET_TIME_Absolute *at)
@@ -761,12 +688,6 @@ parse_abs_time_nbo (void *cls,
761} 688}
762 689
763 690
764/**
765 * Absolute time in network byte order.
766 *
767 * @param name name of the JSON field
768 * @param[out] at where to store the absolute time found under @a name
769 */
770struct GNUNET_JSON_Specification 691struct GNUNET_JSON_Specification
771GNUNET_JSON_spec_absolute_time_nbo (const char *name, 692GNUNET_JSON_spec_absolute_time_nbo (const char *name,
772 struct GNUNET_TIME_AbsoluteNBO *at) 693 struct GNUNET_TIME_AbsoluteNBO *at)
@@ -838,12 +759,6 @@ parse_rel_time (void *cls,
838} 759}
839 760
840 761
841/**
842 * Relative time.
843 *
844 * @param name name of the JSON field
845 * @param[out] rt where to store the relative time found under @a name
846 */
847struct GNUNET_JSON_Specification 762struct GNUNET_JSON_Specification
848GNUNET_JSON_spec_relative_time (const char *name, 763GNUNET_JSON_spec_relative_time (const char *name,
849 struct GNUNET_TIME_Relative *rt) 764 struct GNUNET_TIME_Relative *rt)
@@ -931,12 +846,6 @@ clean_rsa_public_key (void *cls,
931} 846}
932 847
933 848
934/**
935 * Specification for parsing an RSA public key.
936 *
937 * @param name name of the JSON field
938 * @param pk where to store the RSA key found under @a name
939 */
940struct GNUNET_JSON_Specification 849struct GNUNET_JSON_Specification
941GNUNET_JSON_spec_rsa_public_key (const char *name, 850GNUNET_JSON_spec_rsa_public_key (const char *name,
942 struct GNUNET_CRYPTO_RsaPublicKey **pk) 851 struct GNUNET_CRYPTO_RsaPublicKey **pk)
@@ -1025,12 +934,6 @@ clean_rsa_signature (void *cls,
1025} 934}
1026 935
1027 936
1028/**
1029 * Specification for parsing an RSA signature.
1030 *
1031 * @param name name of the JSON field
1032 * @param sig where to store the RSA signature found under @a name
1033 */
1034struct GNUNET_JSON_Specification 937struct GNUNET_JSON_Specification
1035GNUNET_JSON_spec_rsa_signature (const char *name, 938GNUNET_JSON_spec_rsa_signature (const char *name,
1036 struct GNUNET_CRYPTO_RsaSignature **sig) 939 struct GNUNET_CRYPTO_RsaSignature **sig)
@@ -1075,12 +978,6 @@ parse_boolean (void *cls,
1075} 978}
1076 979
1077 980
1078/**
1079 * Boolean (true mapped to GNUNET_YES, false mapped to GNUNET_NO).
1080 *
1081 * @param name name of the JSON field
1082 * @param[out] boolean where to store the boolean found under @a name
1083 */
1084struct GNUNET_JSON_Specification 981struct GNUNET_JSON_Specification
1085GNUNET_JSON_spec_boolean (const char *name, 982GNUNET_JSON_spec_boolean (const char *name,
1086 int *boolean) 983 int *boolean)