| // Copyright 2018 The Fuchsia Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| |
| library fidl.examples.bindingstest; |
| |
| struct NoHandleStruct { |
| string foo; |
| int32 bar; |
| vector<uint8> baz; |
| }; |
| |
| struct ExampleStruct { |
| string foo; |
| int32 bar; |
| vector<uint8>? baz; |
| }; |
| |
| table ExampleTable { |
| 1: string foo; |
| 2: int32 bar; |
| 3: vector<uint8> baz; |
| }; |
| |
| [Discoverable] |
| interface TestServer { |
| 1: OneWayNoArgs(); |
| 2: ReceivedOneWayNoArgs() -> (bool received); |
| |
| 3: OneWayStringArg(string value); |
| 4: ReceivedOneWayString() -> (string value); |
| |
| 5: OneWayThreeArgs(int32 x, uint64 y, NoHandleStruct z); |
| 6: ReceivedOneWayThreeArgs() -> (int32 x, uint64 y, NoHandleStruct z); |
| |
| 21: OneWayExampleTable(ExampleTable value); |
| 22: ReceivedOneWayExampleTable() -> (ExampleTable received); |
| |
| 7: TwoWayNoArgs() -> (); |
| 8: TwoWayStringArg(string value) -> (string value); |
| 9: TwoWayThreeArgs(int32 x, uint64 y, NoHandleStruct z) -> (int32 x, uint64 y, NoHandleStruct z); |
| |
| 10: SendEmptyEvent(); |
| 11: -> EmptyEvent(); |
| |
| 12: SendStringEvent(string value); |
| 13: -> StringEvent(string value); |
| |
| 14: SendThreeArgEvent(int32 x, uint64 y, NoHandleStruct z); |
| 15: -> ThreeArgEvent(int32 x, uint64 y, NoHandleStruct z); |
| |
| 16: SendMultipleEvents(int32 count, float64 intervalSeconds); |
| 17: -> MultipleEvent(int32 index); |
| |
| 18: ReplySlowly(string value, float64 delaySeconds) -> (string value); |
| |
| 19: CloseConnection(float64 delaySeconds); |
| |
| 20: -> NeverEvent(); |
| }; |
| |
| enum EnumOne { |
| ONE = 1; |
| TWO = 2; |
| THREE = 3; |
| }; |
| |
| enum EnumTwo { |
| ONE = 1; |
| TWO = 2; |
| THREE = 3; |
| }; |
| |
| struct HandleStruct { |
| string foo; |
| int32 bar; |
| handle baz; |
| }; |
| |
| union UnionOne { |
| string foo; |
| string bar; |
| uint32 baz; |
| }; |
| |
| union UnionTwo { |
| string foo; |
| string bar; |
| uint32 baz; |
| }; |
| |
| interface SimpleServer { |
| 1: Ping() -> (); |
| }; |