aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_json_lib.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2017-03-15 10:36:51 +0100
committerChristian Grothoff <christian@grothoff.org>2017-03-15 11:14:59 +0100
commit7b51d9f06fd6b18f54a4c7f2cbbacfd6e85ba85e (patch)
tree407c73aebdc2dffcfe0f341493dc7a75a2c442a1 /src/include/gnunet_json_lib.h
parent85b043ef34186a24d960cb32417da2a610eae526 (diff)
add json command line option parser
Diffstat (limited to 'src/include/gnunet_json_lib.h')
-rw-r--r--src/include/gnunet_json_lib.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/include/gnunet_json_lib.h b/src/include/gnunet_json_lib.h
index 9e5f9e2848..ce721d8d81 100644
--- a/src/include/gnunet_json_lib.h
+++ b/src/include/gnunet_json_lib.h
@@ -427,6 +427,26 @@ void
GNUNET_JSON_post_parser_cleanup (void *con_cls);
+/* ****************** GETOPT JSON helper ******************* */
+
+
+/**
+ * Allow user to specify a JSON input value.
+ *
+ * @param shortName short name of the option
+ * @param name long name of the option
+ * @param argumentHelp help text for the option argument
+ * @param description long help text for the option
+ * @param[out] val set to the JSON specified at the command line
+ */
+struct GNUNET_GETOPT_CommandLineOption
+GNUNET_JSON_getopt (char shortName,
+ const char *name,
+ const char *argumentHelp,
+ const char *description,
+ json_t **json);
+
+
#endif
/* end of gnunet_json_lib.h */