OLD | NEW |
| (Empty) |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 module sample { | |
6 | |
7 enum BarType { | |
8 BAR_VERTICAL = 1 << 0, | |
9 BAR_HORIZONTAL = (1 << 1) + 0, | |
10 BAR_BOTH = BAR_VERTICAL | BAR_HORIZONTAL, | |
11 BAR_INVALID | |
12 }; | |
13 | |
14 struct Bar { | |
15 uint8 alpha @0; | |
16 uint8 beta @1; | |
17 uint8 gamma @2; | |
18 int32 type @3; | |
19 }; | |
20 | |
21 [RequiredFields=7] | |
22 struct Foo { | |
23 string name @8; | |
24 int32 x @0; | |
25 int32 y @1; | |
26 bool a @2; | |
27 bool b @3; | |
28 bool c @4; | |
29 Bar bar @5; | |
30 Bar[] extra_bars @7; | |
31 uint8[] data @6; | |
32 handle<message_pipe> source @9; | |
33 handle<data_pipe_consumer>[] input_streams @10; | |
34 handle<data_pipe_producer>[] output_streams @11; | |
35 }; | |
36 | |
37 [Peer=ServiceClient] | |
38 interface Service { | |
39 enum BazOptions { | |
40 BAZ_REGULAR = 0, | |
41 BAZ_EXTRA | |
42 }; | |
43 void Frobinate(Foo foo @0, int32 baz @1, handle<message_pipe> port @2) @0; | |
44 }; | |
45 | |
46 [Peer=Service] | |
47 interface ServiceClient { | |
48 void DidFrobinate(int32 result @0) @0; | |
49 }; | |
50 | |
51 } | |
OLD | NEW |