michael@0: include protocol PTestHandle; michael@0: michael@0: using struct mozilla::void_t from "ipc/IPCMessageUtils.h"; michael@0: using struct mozilla::null_t from "ipc/IPCMessageUtils.h"; michael@0: michael@0: namespace mozilla { michael@0: namespace _ipdltest { michael@0: michael@0: union Key { michael@0: // int; michael@0: // double; michael@0: nsString; michael@0: }; michael@0: michael@0: struct KeyValue { michael@0: Key key; michael@0: JSONVariant value; michael@0: }; michael@0: michael@0: union JSONVariant { michael@0: void_t; michael@0: null_t; michael@0: bool; michael@0: int; michael@0: double; michael@0: nsString; michael@0: PTestHandle; michael@0: KeyValue[]; michael@0: JSONVariant[]; michael@0: }; michael@0: michael@0: sync protocol PTestJSON { michael@0: manages PTestHandle; michael@0: michael@0: child: michael@0: async Start(); michael@0: michael@0: parent: michael@0: async PTestHandle(); michael@0: sync Test(JSONVariant i) michael@0: returns (JSONVariant o); michael@0: async __delete__(); michael@0: michael@0: state START: michael@0: send Start goto TEST; michael@0: michael@0: state TEST: michael@0: recv PTestHandle goto TEST; michael@0: recv Test goto TEST; michael@0: recv __delete__; michael@0: }; michael@0: michael@0: } // namespace mozilla michael@0: } // namespace _ipdltest