OLD | NEW |
1 module js_to_cpp { | 1 module js_to_cpp { |
2 | 2 |
3 // This struct encompasses all of the basic types, so that they | 3 // This struct encompasses all of the basic types, so that they |
4 // may be sent from C++ to JS and back for validation. | 4 // may be sent from C++ to JS and back for validation. |
5 struct EchoArgs { | 5 struct EchoArgs { |
6 int64 si64; | 6 int64 si64; |
7 int32 si32; | 7 int32 si32; |
8 int16 si16; | 8 int16 si16; |
9 int8 si8; | 9 int8 si8; |
10 uint64 ui64; | 10 uint64 ui64; |
11 uint32 ui32; | 11 uint32 ui32; |
12 uint16 ui16; | 12 uint16 ui16; |
13 uint8 ui8; | 13 uint8 ui8; |
14 float float_val; | 14 float float_val; |
15 float float_inf; | 15 float float_inf; |
16 float float_nan; | 16 float float_nan; |
17 double double_val; | 17 double double_val; |
18 double double_inf; | 18 double double_inf; |
19 double double_nan; | 19 double double_nan; |
20 string name; | 20 string name; |
21 string[] string_array; | 21 string[] string_array; |
22 }; | 22 }; |
23 | 23 |
24 [Peer=JsSide] | |
25 interface CppSide { | 24 interface CppSide { |
26 StartTest(); // Sent for all tests to notify that the JS side is now ready. | 25 StartTest(); // Sent for all tests to notify that the JS side is now ready. |
27 TestFinished(); // Sent in echo / bit-flip tests to indicate end. | 26 TestFinished(); // Sent in echo / bit-flip tests to indicate end. |
28 PingResponse(); | 27 PingResponse(); |
29 EchoResponse(EchoArgs arg1, EchoArgs arg2); | 28 EchoResponse(EchoArgs arg1, EchoArgs arg2); |
30 BitFlipResponse(EchoArgs arg); | 29 BitFlipResponse(EchoArgs arg); |
31 }; | 30 }; |
32 | 31 |
33 [Peer=CppSide] | 32 [Client=CppSide] |
34 interface JsSide { | 33 interface JsSide { |
35 Ping(); | 34 Ping(); |
36 Echo(int32 numIterations, EchoArgs arg); | 35 Echo(int32 numIterations, EchoArgs arg); |
37 BitFlip(EchoArgs arg); | 36 BitFlip(EchoArgs arg); |
38 }; | 37 }; |
39 | 38 |
40 } | 39 } |
OLD | NEW |