diff options
Diffstat (limited to 'src/include/gnunet_rest_lib.h')
-rw-r--r-- | src/include/gnunet_rest_lib.h | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/src/include/gnunet_rest_lib.h b/src/include/gnunet_rest_lib.h index e70759590..7e74bee76 100644 --- a/src/include/gnunet_rest_lib.h +++ b/src/include/gnunet_rest_lib.h | |||
@@ -36,7 +36,8 @@ | |||
36 | 36 | ||
37 | #define GNUNET_REST_HANDLER_END { NULL, NULL, NULL } | 37 | #define GNUNET_REST_HANDLER_END { NULL, NULL, NULL } |
38 | 38 | ||
39 | struct GNUNET_REST_RequestHandle { | 39 | struct GNUNET_REST_RequestHandle |
40 | { | ||
40 | /** | 41 | /** |
41 | * Map of url parameters | 42 | * Map of url parameters |
42 | */ | 43 | */ |
@@ -68,12 +69,14 @@ struct GNUNET_REST_RequestHandle { | |||
68 | size_t data_size; | 69 | size_t data_size; |
69 | }; | 70 | }; |
70 | 71 | ||
71 | struct GNUNET_REST_RequestHandlerError { | 72 | struct GNUNET_REST_RequestHandlerError |
73 | { | ||
72 | int error_code; | 74 | int error_code; |
73 | char* error_text; | 75 | char*error_text; |
74 | }; | 76 | }; |
75 | 77 | ||
76 | struct GNUNET_REST_RequestHandler { | 78 | struct GNUNET_REST_RequestHandler |
79 | { | ||
77 | /** | 80 | /** |
78 | * Http method to handle | 81 | * Http method to handle |
79 | */ | 82 | */ |
@@ -112,7 +115,7 @@ typedef void (*GNUNET_REST_ResultProcessor) (void *cls, | |||
112 | * @return GNUNET_YES if namespace matches | 115 | * @return GNUNET_YES if namespace matches |
113 | */ | 116 | */ |
114 | int | 117 | int |
115 | GNUNET_REST_namespace_match(const char *url, const char *namespace); | 118 | GNUNET_REST_namespace_match (const char *url, const char *namespace); |
116 | 119 | ||
117 | /** | 120 | /** |
118 | * Create REST MHD response | 121 | * Create REST MHD response |
@@ -121,14 +124,14 @@ GNUNET_REST_namespace_match(const char *url, const char *namespace); | |||
121 | * @return MHD response | 124 | * @return MHD response |
122 | */ | 125 | */ |
123 | struct MHD_Response* | 126 | struct MHD_Response* |
124 | GNUNET_REST_create_response(const char *data); | 127 | GNUNET_REST_create_response (const char *data); |
125 | 128 | ||
126 | 129 | ||
127 | int | 130 | int |
128 | GNUNET_REST_handle_request(struct GNUNET_REST_RequestHandle *conn, | 131 | GNUNET_REST_handle_request (struct GNUNET_REST_RequestHandle *conn, |
129 | const struct GNUNET_REST_RequestHandler *handlers, | 132 | const struct GNUNET_REST_RequestHandler *handlers, |
130 | struct GNUNET_REST_RequestHandlerError *err, | 133 | struct GNUNET_REST_RequestHandlerError *err, |
131 | void *cls); | 134 | void *cls); |
132 | 135 | ||
133 | 136 | ||
134 | #endif | 137 | #endif |