1 // Copyright 2015 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 mojo.test; 6 7 import "mojo/public/interfaces/bindings/tests/ping_service.mojom"; 8 9 interface FooInterface {}; 10 11 struct StructContainsAssociated { 12 associated FooInterface? foo_interface; 13 associated FooInterface& foo_request; 14 array<associated FooInterface> foo_interfaces; 15 array<associated FooInterface&> foo_requests; 16 }; 17 18 union UnionContainsAssociated { 19 associated FooInterface foo_interface; 20 associated FooInterface& foo_request; 21 array<associated FooInterface> foo_interfaces; 22 array<associated FooInterface&> foo_requests; 23 }; 24 25 interface InterfacePassesAssociated { 26 PassFoo(associated FooInterface foo_interface, 27 associated FooInterface& foo_request) => 28 (associated FooInterface foo_interface, 29 associated FooInterface& foo_request); 30 31 PassStruct(StructContainsAssociated foo_struct) => 32 (StructContainsAssociated foo_struct); 33 34 PassUnion(UnionContainsAssociated foo_union) => 35 (UnionContainsAssociated foo_union); 36 }; 37 38 interface IntegerSender { 39 Echo(int32 value) => (int32 value); 40 Send(int32 value); 41 }; 42 43 interface StringSender { 44 Echo(string value) => (string value); 45 Send(string value); 46 }; 47 48 interface IntegerSenderConnection { 49 GetSender(associated IntegerSender& sender); 50 AsyncGetSender() => (associated IntegerSender sender); 51 }; 52 53 interface IntegerSenderConnectionAtBothEnds { 54 GetSender(associated IntegerSender& sender); 55 SetSender(associated IntegerSender sender) => (int32 value); 56 }; 57 58 interface SenderConnection { 59 GetIntegerSender(associated IntegerSender& sender); 60 GetStringSender(associated StringSender& sender); 61 }; 62 63 interface AssociatedPingProvider { 64 GetPing(associated PingService& request); 65 }; 66 67 interface AssociatedPingProviderProvider { 68 GetPingProvider(associated AssociatedPingProvider& request); 69 }; 70