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 5module mojo.test; 6 7import "mojo/public/interfaces/bindings/tests/ping_service.mojom"; 8 9interface FooInterface {}; 10 11struct 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 18union 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 25interface 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 38interface IntegerSender { 39 Echo(int32 value) => (int32 value); 40 Send(int32 value); 41}; 42 43interface StringSender { 44 Echo(string value) => (string value); 45 Send(string value); 46}; 47 48interface IntegerSenderConnection { 49 GetSender(associated IntegerSender& sender); 50 AsyncGetSender() => (associated IntegerSender sender); 51}; 52 53interface IntegerSenderConnectionAtBothEnds { 54 GetSender(associated IntegerSender& sender); 55 SetSender(associated IntegerSender sender) => (int32 value); 56}; 57 58interface SenderConnection { 59 GetIntegerSender(associated IntegerSender& sender); 60 GetStringSender(associated StringSender& sender); 61}; 62 63interface AssociatedPingProvider { 64 GetPing(associated PingService& request); 65}; 66 67interface AssociatedPingProviderProvider { 68 GetPingProvider(associated AssociatedPingProvider& request); 69}; 70