blob: 8d8997ce79b94140779402100b98c0db3fe9a2db [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.diagnostics as diagnostics;
using zx;
const uint16 MAX_NUM_MATCHES = 250;
const uint16 MAX_CONNECT_MATCHES = 5;
enum RebootType {
// Standard reboot.
REBOOT = 1;
// Reboots into recovery mode.
RECOVERY = 2;
// Reboots into the bootloader.
BOOTLOADER = 3;
};
[Discoverable]
protocol RemoteControl {
IdentifyHost() -> (IdentifyHostResponse response) error IdentifyHostError;
// Connects a channel to a service, given a selector and a channel iff the selector
// matches exactly one service on the system.
// If successful, returns information about the service connected to.
Connect(
diagnostics.Selector selector,
zx.handle:CHANNEL service_chan) -> (ServiceMatch match)
error ConnectError;
Select(diagnostics.Selector selector)
-> (vector<ServiceMatch>:MAX_NUM_MATCHES matches)
error SelectError;
};