| // Copyright 2018 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; |
| |
| /// A component declaration. |
| /// |
| /// This information is typically encoded in the component manifest (.cm file) |
| /// if it has one or may be generated at runtime by a component resolver for |
| /// those that don't. |
| table ComponentDecl { |
| /// Information about the program to run when the component is executed. |
| /// Omitted for non-executable components. |
| 1: ProgramDecl program; |
| |
| /// List of capabilities used by the component. These consist of |
| /// capabilities offered to the component that are installed in its incoming |
| /// namespace. |
| /// |
| /// The used capabilities must be unique and non-overlapping. |
| 2: vector<UseDecl> uses; |
| |
| /// List of capabilities exposed by the component. These consist of |
| /// capabilities that are made visible to the containing realm. The parent |
| /// may `offer` these capabilities to its children, but not `use` them. |
| /// |
| /// The exposed capabilities must be unique and non-overlapping. |
| 3: vector<ExposeDecl> exposes; |
| |
| /// List of capabilities offered to the component’s children. These consist |
| /// of capabilities that the given children may `use`, which may come from a |
| /// child, the containing realm, or the component's own outgoing namespace. |
| /// |
| /// The offered capabilities must be unique and non-overlapping. |
| 4: vector<OfferDecl> offers; |
| |
| /// List of capabilities defined by the component. |
| 5: vector<CapabilityDecl> capabilities; |
| |
| /// The component's statically instantiated children. The children must have |
| /// unique names. |
| 6: vector<ChildDecl> children; |
| |
| /// The component's collections. The collections must have unique names. |
| 7: vector<CollectionDecl> collections; |
| |
| /// List of environments created by this component. |
| /// Environments are assigned to children and control aspects of a child component's |
| /// runtime. |
| 8: vector<EnvironmentDecl> environments; |
| |
| /// Additional metadata about the component. |
| 9: Object facets; |
| }; |