aboutsummaryrefslogtreecommitdiff
path: root/src/mint/taler-mint-httpd_parsing.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mint/taler-mint-httpd_parsing.h')
-rw-r--r--src/mint/taler-mint-httpd_parsing.h80
1 files changed, 42 insertions, 38 deletions
diff --git a/src/mint/taler-mint-httpd_parsing.h b/src/mint/taler-mint-httpd_parsing.h
index c725187c5..a03f2b62d 100644
--- a/src/mint/taler-mint-httpd_parsing.h
+++ b/src/mint/taler-mint-httpd_parsing.h
@@ -31,43 +31,6 @@
31 31
32 32
33/** 33/**
34 * Constants for JSON navigation description.
35 */
36enum
37{
38 /**
39 * Access a field.
40 * Param: const char *
41 */
42 JNAV_FIELD,
43 /**
44 * Access an array index.
45 * Param: int
46 */
47 JNAV_INDEX,
48 /**
49 * Return base32crockford encoded data of
50 * constant size.
51 * Params: (void *, size_t)
52 */
53 JNAV_RET_DATA,
54 /**
55 * Return base32crockford encoded data of
56 * variable size.
57 * Params: (void **, size_t *)
58 */
59 JNAV_RET_DATA_VAR,
60 /**
61 * Return a json object, which must be
62 * of the given type (JSON_* type constants,
63 * or -1 for any type).
64 * Params: (int, json_t **)
65 */
66 JNAV_RET_TYPED_JSON
67};
68
69
70/**
71 * Process a POST request containing a JSON object. This 34 * Process a POST request containing a JSON object. This
72 * function realizes an MHD POST processor that will 35 * function realizes an MHD POST processor that will
73 * (incrementally) process JSON data uploaded to the HTTP 36 * (incrementally) process JSON data uploaded to the HTTP
@@ -111,6 +74,47 @@ TALER_MINT_parse_post_cleanup_callback (void *con_cls);
111 74
112 75
113/** 76/**
77 * Constants for JSON navigation description.
78 */
79enum TALER_MINT_JsonNavigationCommand
80{
81 /**
82 * Access a field.
83 * Param: const char *
84 */
85 JNAV_FIELD,
86
87 /**
88 * Access an array index.
89 * Param: int
90 */
91 JNAV_INDEX,
92
93 /**
94 * Return base32crockford encoded data of
95 * constant size.
96 * Params: (void *, size_t)
97 */
98 JNAV_RET_DATA,
99
100 /**
101 * Return base32crockford encoded data of
102 * variable size.
103 * Params: (void **, size_t *)
104 */
105 JNAV_RET_DATA_VAR,
106
107 /**
108 * Return a json object, which must be
109 * of the given type (JSON_* type constants,
110 * or -1 for any type).
111 * Params: (int, json_t **)
112 */
113 JNAV_RET_TYPED_JSON
114};
115
116
117/**
114 * Navigate through a JSON tree. 118 * Navigate through a JSON tree.
115 * 119 *
116 * Sends an error response if navigation is impossible (i.e. 120 * Sends an error response if navigation is impossible (i.e.
@@ -124,7 +128,7 @@ TALER_MINT_parse_post_cleanup_callback (void *con_cls);
124 * GNUNET_SYSERR on internal error 128 * GNUNET_SYSERR on internal error
125 */ 129 */
126int 130int
127request_json_require_nav (struct MHD_Connection *connection, 131GNUNET_MINT_parse_navigate_json (struct MHD_Connection *connection,
128 const json_t *root, ...); 132 const json_t *root, ...);
129 133
130 134