summaryrefslogtreecommitdiff
path: root/chromium/mojo/public/interfaces/bindings/tests/test_sync_methods.mojom
blob: b5a7911fdeecaf9abe9ee64db647b22edc250750 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// Copyright 2016 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 mojo.test;

interface TestSyncCodeGeneration {
  [Sync]
  NoInput() => (int32 result);

  [Sync]
  NoOutput(int32 value) => ();

  [Sync]
  NoInOut() => ();

  [Sync]
  HaveInOut(int32 value1, int32 value2) => (int32 result1, int32 result2);
};

interface TestSync {
  [Sync]
  Ping() => ();

  [Sync]
  Echo(int32 value) => (int32 result);

  AsyncEcho(int32 value) => (int32 result);
};

// Test sync method support with associated interfaces.
interface TestSyncMaster {
  [Sync]
  Ping() => ();

  [Sync]
  Echo(int32 value) => (int32 result);

  AsyncEcho(int32 value) => (int32 result);

  SendRemote(pending_associated_remote<TestSync> remote);
  SendReceiver(pending_associated_receiver<TestSync> receiver);
};