Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | include protocol PTestHandle; |
michael@0 | 2 | |
michael@0 | 3 | using struct mozilla::void_t from "ipc/IPCMessageUtils.h"; |
michael@0 | 4 | using struct mozilla::null_t from "ipc/IPCMessageUtils.h"; |
michael@0 | 5 | |
michael@0 | 6 | namespace mozilla { |
michael@0 | 7 | namespace _ipdltest { |
michael@0 | 8 | |
michael@0 | 9 | union Key { |
michael@0 | 10 | // int; |
michael@0 | 11 | // double; |
michael@0 | 12 | nsString; |
michael@0 | 13 | }; |
michael@0 | 14 | |
michael@0 | 15 | struct KeyValue { |
michael@0 | 16 | Key key; |
michael@0 | 17 | JSONVariant value; |
michael@0 | 18 | }; |
michael@0 | 19 | |
michael@0 | 20 | union JSONVariant { |
michael@0 | 21 | void_t; |
michael@0 | 22 | null_t; |
michael@0 | 23 | bool; |
michael@0 | 24 | int; |
michael@0 | 25 | double; |
michael@0 | 26 | nsString; |
michael@0 | 27 | PTestHandle; |
michael@0 | 28 | KeyValue[]; |
michael@0 | 29 | JSONVariant[]; |
michael@0 | 30 | }; |
michael@0 | 31 | |
michael@0 | 32 | sync protocol PTestJSON { |
michael@0 | 33 | manages PTestHandle; |
michael@0 | 34 | |
michael@0 | 35 | child: |
michael@0 | 36 | async Start(); |
michael@0 | 37 | |
michael@0 | 38 | parent: |
michael@0 | 39 | async PTestHandle(); |
michael@0 | 40 | sync Test(JSONVariant i) |
michael@0 | 41 | returns (JSONVariant o); |
michael@0 | 42 | async __delete__(); |
michael@0 | 43 | |
michael@0 | 44 | state START: |
michael@0 | 45 | send Start goto TEST; |
michael@0 | 46 | |
michael@0 | 47 | state TEST: |
michael@0 | 48 | recv PTestHandle goto TEST; |
michael@0 | 49 | recv Test goto TEST; |
michael@0 | 50 | recv __delete__; |
michael@0 | 51 | }; |
michael@0 | 52 | |
michael@0 | 53 | } // namespace mozilla |
michael@0 | 54 | } // namespace _ipdltest |