blob: 970973bf1fce499253b6bfef7f8f7c60d0de26b5 [file] [log] [blame]
// Copyright 2020 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.driver.framework;
using fuchsia.component.runner;
using fuchsia.url;
using zx;
const MAX_NAMESPACE_COUNT uint32 = fuchsia.component.runner.MAX_NAMESPACE_COUNT;
/// Arguments for starting a driver.
type DriverStartArgs = resource table {
/// Node that the driver is bound to.
1: node client_end:Node;
/// The name of the node the driver is bound to.
8: node_name string:MAX;
/// Symbols provided to the driver, for |node|. These come from the driver
/// that added |node|, and are filtered to the symbols requested in the bind
/// program.
2: symbols vector<NodeSymbol>:MAX_SYMBOL_COUNT;
/// URL of the package containing the driver. This is purely informational,
/// used only to provide data for inspect.
3: url fuchsia.url.Url;
/// Information about the driver to start. Currently, we support the
/// following entries:
/// 1. "binary": a string containing the package-relative path to the
/// driver binary.
/// 2. "colocate" (optional): a string containing "true" or "false"
/// specifying whether the driver should be colocated in the same
/// driver host as the driver that added |node|. If not specified, the
/// driver will be launched in a new driver host.
/// 3. "default_dispatcher_opts" (optional): an array of strings specifying
/// the options for creating the default dispatcher. A string can be one
/// of the following:
/// * `allow_sync_calls`: allows synchronous calls to be done on the
/// default dispatcher's thread.
4: program;
/// Incoming namespace provided to the driver.
5: incoming vector<fuchsia.component.runner.ComponentNamespaceEntry>:MAX_NAMESPACE_COUNT;
/// Outgoing directory served by the driver.
6: outgoing_dir;
// TODO( add link to reference for the contents
/// Configuration passed to the driver.
7: config zx.handle:VMO;