| // Copyright 2014 The Chromium Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| |
| [DartPackage="_mojo_for_test_only", |
| JavaPackage="org.chromium.mojo.bindings.test.mojom.sample", |
| JavaConstantsClassName="InterfaceConstants", |
| Foo="hello world"] |
| module sample; |
| |
| const uint64 kLong = 4405; |
| |
| enum Enum { |
| VALUE, |
| }; |
| |
| interface Provider { |
| EchoString(string a) => (string a); |
| EchoStrings(string a, string b) => (string a, string b); |
| EchoMessagePipeHandle(handle<message_pipe> a) => (handle<message_pipe> a); |
| EchoEnum(Enum a) => (Enum a); |
| EchoInt(int32 a) => (int32 a); |
| }; |
| |
| interface IntegerAccessor { |
| GetInteger() => (int64 data, [MinVersion=2] Enum type); |
| [MinVersion=1] |
| SetInteger(int64 data, [MinVersion=3] Enum type); |
| }; |
| |
| // Used for testing that structs are generated for request params and response |
| // params. Also used to test the generated method ordinals. |
| interface SampleInterface { |
| SampleMethod1@1(int32 in1, string? in2) => (string? out1, Enum out2); |
| SampleMethod0@0(); |
| SampleMethod2@2(); |
| }; |