aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_json_lib.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/gnunet_json_lib.h')
-rw-r--r--src/include/gnunet_json_lib.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/include/gnunet_json_lib.h b/src/include/gnunet_json_lib.h
index 32de2208a..72d2c4ebe 100644
--- a/src/include/gnunet_json_lib.h
+++ b/src/include/gnunet_json_lib.h
@@ -104,6 +104,11 @@ struct GNUNET_JSON_Specification
104 * Where should we store the final size of @e ptr. 104 * Where should we store the final size of @e ptr.
105 */ 105 */
106 size_t *size_ptr; 106 size_t *size_ptr;
107
108 /**
109 * Set to #GNUNET_YES if this component is optional.
110 */
111 int is_optional;
107}; 112};
108 113
109 114
@@ -148,6 +153,16 @@ GNUNET_JSON_spec_end (void);
148 153
149 154
150/** 155/**
156 * Set the "optional" flag for a parser specification entry.
157 *
158 * @param spec specification to modify
159 * @return spec copy of @a spec with optional bit set
160 */
161struct GNUNET_JSON_Specification
162GNUNET_JSON_spec_mark_optional (struct GNUNET_JSON_Specification spec);
163
164
165/**
151 * Variable size object (in network byte order, encoded using Crockford 166 * Variable size object (in network byte order, encoded using Crockford
152 * Base32hex encoding). 167 * Base32hex encoding).
153 * 168 *