blob: aae533a1fde436abfce0bc4dabfcda4dd82ee554 [file] [log] [blame]
// Copyright 2019 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
library fuchsia.developer.remotecontrol;
using fuchsia.url;
using fuchsia.test as test;
using fuchsia.test.manager as test_manager;
// This is copied from `fuchsia.sys.types`.
// Unfortunately we can't depend on it directly,
// because this protocol needs to build on the host.
const uint16 MAX_URL_LENGTH = 2083;
enum RebootType {
// Standard reboot.
REBOOT = 1;
// Reboots into recovery mode.
RECOVERY = 2;
// Reboots into the bootloader.
BOOTLOADER = 3;
};
[Discoverable]
protocol RemoteControl {
// Starts a component asynchronously.
StartComponent(
// Name of the component to start.
string:MAX_URL_LENGTH component_url,
// Arguments to pass to the component.
vector<string:MAX>:MAX args,
// stdout from the component.
// This would be called just 'stdout', except for fxb/42108.
handle<socket> component_stdout,
// stderr from the component.
// This would be called just 'stderr', except for fxb/42108.
handle<socket> component_stderr,
request<ComponentController> controller
) -> () error ComponentControlError;
IdentifyHost() -> (IdentifyHostResponse response) error IdentifyHostError;
// This should be a fire-and-forget, but that seems to do
// nothing in Overnet.
// TODO(fxb/43011) look into this.
// TODO(fxb/43046) Add parameters for other reboot types.
RebootDevice(RebootType reboot_type) -> ();
// Enumerate the test cases available in a test suite.
LaunchSuite(
fuchsia.url.Url test_url,
request<test.Suite> suite,
request<test_manager.SuiteController> controller) -> ()
error test_manager.LaunchError;
};