OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 module mojo.test; | 5 module mojo.test; |
6 | 6 |
7 interface TestSyncCodeGeneration { | 7 interface TestSyncCodeGeneration { |
8 [Sync] | 8 [Sync] |
9 NoInput() => (int32 result); | 9 NoInput() => (int32 result); |
10 | 10 |
11 [Sync] | 11 [Sync] |
12 NoOutput(int32 value) => (); | 12 NoOutput(int32 value) => (); |
13 | 13 |
14 [Sync] | 14 [Sync] |
15 NoInOut() => (); | 15 NoInOut() => (); |
16 | 16 |
17 [Sync] | 17 [Sync] |
18 HaveInOut(int32 value1, int32 value2) => (int32 result1, int32 result2); | 18 HaveInOut(int32 value1, int32 value2) => (int32 result1, int32 result2); |
19 }; | 19 }; |
20 | 20 |
21 interface TestSync { | 21 interface TestSync { |
22 [Sync] | 22 [Sync] |
23 Ping() => (); | 23 Ping() => (); |
24 | 24 |
25 [Sync] | 25 [Sync] |
26 Echo(int32 value) => (int32 result); | 26 Echo(int32 value) => (int32 result); |
27 | 27 |
28 AsyncEcho(int32 value) => (int32 result); | 28 AsyncEcho(int32 value) => (int32 result); |
29 }; | 29 }; |
| 30 |
| 31 // Test sync method support with associated interfaces. |
| 32 interface TestSyncMaster { |
| 33 [Sync] |
| 34 Ping() => (); |
| 35 |
| 36 [Sync] |
| 37 Echo(int32 value) => (int32 result); |
| 38 |
| 39 AsyncEcho(int32 value) => (int32 result); |
| 40 |
| 41 SendInterface(associated TestSync ptr); |
| 42 |
| 43 SendRequest(associated TestSync& request); |
| 44 }; |
OLD | NEW |