blob: eef38e342c0fc9ce5dd08e1c5808b75c5bfa5f75 [file] [log] [blame]
// Copyright 2021 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.
module chromeos.cros_healthd.connectivity.test.client.mojom;
import "diagnostics/bindings/connectivity/test/test_common.mojom";
struct MySubStruct {
int32 num;
};
struct MyStruct {
int32 num;
string str;
string? opt_str;
MySubStruct s;
MySubStruct? s_opt;
};
union MyUnion {
int32 num;
string str;
string? opt_str;
MyStruct my_struct;
MyStruct? my_struct_opt;
};
enum MyEnum {
A,
B,
C,
};
[Extensible]
enum EnumWithDefault {
[Default] A,
};
interface FooInterface {
Foo() => ();
};
interface BarInterface {
Bar(pending_remote<FooInterface> on_response);
};
interface TestSuccess {
Foo();
Bar() => ();
Args(int16 a, string b, string? c);
Response() => (int16 a, string b, string? c);
IO(int16 a, string b, string? c) => (int16 a, string b, string? c);
FunStruct(MyStruct? s) => (MyStruct? s);
FunUnion(MyUnion? u) => (MyUnion? u);
FunEnum(MyEnum e) => (MyEnum e);
FunEnumWithDefault(EnumWithDefault e) => (EnumWithDefault e);
FunPutService(pending_remote<FooInterface> on_response);
FunGetService(pending_receiver<FooInterface> foo_interface);
FunPutServiceR(pending_remote<FooInterface> on_response) => ();
FunGetServiceR(pending_receiver<FooInterface> foo_interface) => ();
FunPutTwoLayerInterface(pending_remote<BarInterface> on_response);
FunPutTwoLayerInterfaceR(pending_remote<BarInterface> on_response) => ();
FunGetTwoLayerInterface(pending_receiver<BarInterface> on_response);
FunGetTwoLayerInterfaceR(pending_receiver<BarInterface> on_response) => ();
FunCommon(
chromeos.cros_healthd.connectivity.test.common.mojom.CommonStruct s);
FunCommonNull(
chromeos.cros_healthd.connectivity.test.common.mojom.CommonStruct? s);
};
interface TestMissFunction {
Foo();
Bar();
};
interface TestWrongFunctionType1 {
Foo() => ();
};
interface TestWrongFunctionType2 {
Foo();
};
interface TestWrongType {
Foo(int16 a);
};
interface TestWrongReturnType {
Foo() => (string s);
};
interface TestCannotBeNull {
Foo(string? a);
};
struct WrongStruct {
int32 n;
string s;
};
interface TestWrongStruct {
Foo(WrongStruct s);
};
union WrongUnion {
int32 num;
string str;
};
interface TestWrongUnion {
Foo(WrongUnion u);
};
interface TestFailSubInterfaceForward {
Foo(pending_receiver<TestWrongStruct> foo_interface);
};
interface TestFailSubInterfaceBackward {
Foo(pending_remote<TestWrongStruct> on_response);
};