aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_jsonapi_lib.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/gnunet_jsonapi_lib.h')
-rw-r--r--src/include/gnunet_jsonapi_lib.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/src/include/gnunet_jsonapi_lib.h b/src/include/gnunet_jsonapi_lib.h
index 1e540f6b6..d4556c174 100644
--- a/src/include/gnunet_jsonapi_lib.h
+++ b/src/include/gnunet_jsonapi_lib.h
@@ -22,6 +22,7 @@
22#define GNUNET_JSONAPI_LIB_H 22#define GNUNET_JSONAPI_LIB_H
23 23
24#include "gnunet_util_lib.h" 24#include "gnunet_util_lib.h"
25#include "gnunet_rest_lib.h"
25#include "gnunet_json_lib.h" 26#include "gnunet_json_lib.h"
26 27
27 28
@@ -200,5 +201,41 @@ GNUNET_JSONAPI_data_serialize (const struct GNUNET_JSONAPI_Object *resp,
200 */ 201 */
201json_t* 202json_t*
202GNUNET_JSONAPI_resource_get_id (const struct GNUNET_JSONAPI_Resource *resource); 203GNUNET_JSONAPI_resource_get_id (const struct GNUNET_JSONAPI_Resource *resource);
204
205
203/* end of gnunet_jsonapi_lib.h */ 206/* end of gnunet_jsonapi_lib.h */
207
208/**
209 * Check rest request for validity
210 *
211 * @param req handle to the request
212 * @return GNUNET_OK if valid
213 */
214int
215GNUNET_JSONAPI_check_request_acceptable (struct GNUNET_REST_RequestHandle *req);
216
217/**
218 * Check rest request for validity
219 *
220 * @param req handle to the request
221 * @return GNUNET_OK if valid
222 */
223int
224GNUNET_JSONAPI_check_request_supported (struct GNUNET_REST_RequestHandle *req);
225
226
227/**
228 * Handle jsonapi rest request. Checks request headers for jsonapi compliance
229 *
230 * @param req rest request handle
231 * @param handler rest request handlers
232 * @param cls closure
233 * @return GNUNET_OK if successful
234 */
235int
236GNUNET_JSONAPI_handle_request (struct GNUNET_REST_RequestHandle *req,
237 const struct GNUNET_REST_RequestHandler *handlers,
238 struct GNUNET_REST_RequestHandlerError *err,
239 void *cls);
240
204#endif 241#endif