aboutsummaryrefslogtreecommitdiffstats
path: root/tools/libxl/idl.txt
diff options
context:
space:
mode:
authorIan Campbell <ian.campbell@citrix.com>2011-10-07 11:05:45 +0100
committerIan Campbell <ian.campbell@citrix.com>2011-10-07 11:05:45 +0100
commit93e240f0966324dee6b02d249f3e3a9e5ecf9d19 (patch)
treeec76c5e9da6c2cfc58233be168aa9c83934e34a2 /tools/libxl/idl.txt
parentee3665984b795ee3a4f56cf3d93ca697ce857f6f (diff)
downloadxen-93e240f0966324dee6b02d249f3e3a9e5ecf9d19.tar.gz
xen-93e240f0966324dee6b02d249f3e3a9e5ecf9d19.tar.bz2
xen-93e240f0966324dee6b02d249f3e3a9e5ecf9d19.zip
libxl: IDL: autogenerate functions to produce JSON from libxl data structures.
Two functions are provided. TYPE_gen_json exposes an interface which is compatible with the YAGL generator infrastructure. TYPE_to_string uses this to produce a pretty printed string. The TYPE_gen_json functions are defined in a new header libxl_json.h which is not exposed via libxl.h due to the use of YAGL datatypes to avoid poluting the namespace us libxl users which don't use the library themselves. If a libxl user is interested in integrating at the YAGL level then it should #include this file itself. Also update testidl to generate a random version of each IDL datastructure and convert it to JSON. Unfortunately this requires a libxl_ctx and therefore the test must be run on a Xen system now. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
Diffstat (limited to 'tools/libxl/idl.txt')
-rw-r--r--tools/libxl/idl.txt9
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/libxl/idl.txt b/tools/libxl/idl.txt
index 271a2a8900..8c9a32364d 100644
--- a/tools/libxl/idl.txt
+++ b/tools/libxl/idl.txt
@@ -49,6 +49,15 @@ Type.autogenerate_destructor: (default: True)
Indicates if the above named Type.destructor_fn should be
autogenerated.
+Type.json_fn: (default: typename + "_gen_json" or None if type == None)
+
+ The name of the C function which will generate a YAJL data structure
+ representing this type.
+
+Type.autogenerate_json: (default: True)
+
+ Indicates if the above named Type.json_fn should be autogenerated.
+
Other simple type-Classes
-------------------------