blob: 3dfd70195f16f02d13fc3a0defda7fd1588e4302 [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 as io;
using zx;
const uint16 MAX_NUM_MATCHES = 250;
const uint16 MAX_CONNECT_MATCHES = 5;
enum RebootType {
// Standard reboot.
// Reboots into recovery mode.
// Reboots into the bootloader.
protocol RemoteControl {
// Connects to the Hub root directory. The server side will be connected to
// a handle, which can then be connected to on the
// client side via a Directory proxy.
// This is, currently, a read-only view into the hub.
OpenHub(request<io.Directory> server) -> () error zx.status;
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.
diagnostics.Selector selector,
zx.handle:CHANNEL service_chan) -> (ServiceMatch match)
error ConnectError;
Select(diagnostics.Selector selector)
-> (vector<ServiceMatch>:MAX_NUM_MATCHES matches)
error SelectError;