summaryrefslogtreecommitdiffstats
path: root/ipc/ipdl/test/cxx/PTestJSON.ipdl
diff options
context:
space:
mode:
Diffstat (limited to 'ipc/ipdl/test/cxx/PTestJSON.ipdl')
-rw-r--r--ipc/ipdl/test/cxx/PTestJSON.ipdl54
1 files changed, 54 insertions, 0 deletions
diff --git a/ipc/ipdl/test/cxx/PTestJSON.ipdl b/ipc/ipdl/test/cxx/PTestJSON.ipdl
new file mode 100644
index 000000000..6e8f3c1de
--- /dev/null
+++ b/ipc/ipdl/test/cxx/PTestJSON.ipdl
@@ -0,0 +1,54 @@
+include protocol PTestHandle;
+
+using struct mozilla::void_t from "ipc/IPCMessageUtils.h";
+using struct mozilla::null_t from "ipc/IPCMessageUtils.h";
+
+namespace mozilla {
+namespace _ipdltest {
+
+union Key {
+// int;
+// double;
+ nsString;
+};
+
+struct KeyValue {
+ Key key;
+ JSONVariant value;
+};
+
+union JSONVariant {
+ void_t;
+ null_t;
+ bool;
+ int;
+ double;
+ nsString;
+ PTestHandle;
+ KeyValue[];
+ JSONVariant[];
+};
+
+sync protocol PTestJSON {
+ manages PTestHandle;
+
+child:
+ async Start();
+
+parent:
+ async PTestHandle();
+ sync Test(JSONVariant i)
+ returns (JSONVariant o);
+ async __delete__();
+
+state START:
+ send Start goto TEST;
+
+state TEST:
+ recv PTestHandle goto TEST;
+ recv Test goto TEST;
+ recv __delete__;
+};
+
+} // namespace mozilla
+} // namespace _ipdltest