chromium/mojo/public/interfaces/bindings/tests/test_sync_methods.mojom

// Copyright 2016 The Chromium Authors
// 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 TestSyncPrimary {
  [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);
};