aboutsummaryrefslogtreecommitdiff
path: root/include/libwebsockets/lws-struct.h
diff options
context:
space:
mode:
authorAndy Green <andy@warmcat.com>2020-03-02 14:54:33 +0000
committerAndy Green <andy@warmcat.com>2020-03-04 12:17:48 +0000
commit55ea791a77e61502f37ab9927f7087a9e8faa151 (patch)
tree3645901e3c6964003d0aef08e0b03a43129cbe3b /include/libwebsockets/lws-struct.h
parent30fc8e9cafc3c0b05eead408343b5f3ba165cafb (diff)
downloadlibwebsockets-55ea791a77e61502f37ab9927f7087a9e8faa151.tar.gz
lws_struct: store which toplevel schema matched
We can give the lws_struct parser a table of toplevel schemas, record which one we chose so the caller can know how to interpret the result
Diffstat (limited to 'include/libwebsockets/lws-struct.h')
-rw-r--r--include/libwebsockets/lws-struct.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/libwebsockets/lws-struct.h b/include/libwebsockets/lws-struct.h
index 37d9a5ce..4468fdfc 100644
--- a/include/libwebsockets/lws-struct.h
+++ b/include/libwebsockets/lws-struct.h
@@ -70,6 +70,8 @@ typedef struct lws_struct_args {
size_t ac_block_size;
int subtype;
+ int top_schema_index;
+
/*
* temp ac used to collate unknown possibly huge strings before final
* allocation and copy
@@ -230,7 +232,8 @@ lws_struct_default_lejp_cb(struct lejp_ctx *ctx, char reason);
LWS_VISIBLE LWS_EXTERN lws_struct_serialize_t *
lws_struct_json_serialize_create(const lws_struct_map_t *map,
- size_t map_entries, int flags, void *ptoplevel);
+ size_t map_entries, int flags,
+ const void *ptoplevel);
LWS_VISIBLE LWS_EXTERN void
lws_struct_json_serialize_destroy(lws_struct_serialize_t **pjs);