blob: 4a21a8114df2ba9421d1f4c4893ff8180f327581 [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.sys2;
using fuchsia.component;
/// Declares an environment which configures a realm.
table EnvironmentDecl {
/// The name of this environment.
1: fuchsia.component.environment_name name;
/// Specifies how the initial state of this environment is constructed.
2: EnvironmentExtends extends;
/// List of component resolvers and the URL schemes they are registered to resolve.
/// These registrations determine how components are resolved in the realm.
/// If the component URL scheme does not match any of these resolvers, URL resolution
/// is delegated to the parent environment, if this environment `extends` from `REALM`.
3: vector<ResolverRegistration>:MAX resolvers;
/// The duration in milliseconds that the component will have to stop before
/// it is killed.
4: uint32 stop_timeout_ms;
};
/// Specifies how a declared environment's initial set of properties are assigned.
enum EnvironmentExtends {
/// The environment has no initial set of properties.
NONE = 0;
/// The environment's initial set of properties are inherited from its realm.
/// Inherited properties include any fields defined in `EnvironmentDecl`.
REALM = 1;
};
/// A mapping of URL scheme to resolver name.
table ResolverRegistration {
/// The name of the resolver.
1: fuchsia.component.resolver_name resolver;
/// The provider of the capability relative to the component itself. Must be
/// `realm`, `self`, or `child`.
2: Ref source;
/// The URL scheme the resolver is registered to handle.
/// Only one resolver may be registered to a particular URL scheme.
/// The URL scheme must start with a lowercase ASCII letter (a-z), and may contain
/// lowercase ASCII letters, digits, `+`, `-`, and `.`.
3: fuchsia.component.url_scheme scheme;
};