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, 9 BAR_HORIZONTAL = 2, 10 BAR_INVALID 11 }; 12 13 struct Bar { 14 uint8 alpha @0; 15 uint8 beta @1; 16 uint8 gamma @2; 17 int32 type @3; 18 }; 19 20 [RequiredFields=7] 21 struct Foo { 22 string name @8; 23 int32 x @0; 24 int32 y @1; 25 bool a @2; 26 bool b @3; 27 bool c @4; 28 Bar bar @5; 29 Bar[] extra_bars @7; 30 uint8[] data @6; 31 handle<message_pipe> source @9; 32 }; 33 34 [Peer=ServiceClient] 35 interface Service { 36 void Frobinate(Foo foo @0, bool baz @1, handle<message_pipe> port @2) @0; 37 }; 38 39 [Peer=Service] 40 interface ServiceClient { 41 void DidFrobinate(int32 result @0) @0; 42 }; 43 44 } 45