| // 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; |
| |
| enum StartupMode { |
| /// Start component instance only when another instance binds to it. |
| LAZY = 0; |
| /// Start component instance as soon as parent starts. |
| EAGER = 1; |
| }; |
| |
| /// Statically declares a child component instance. |
| table ChildDecl { |
| /// The name assigned to the child by its parent. |
| /// |
| /// Must be non-empty, unique among all siblings, and contain only the |
| /// following characters: [a-z0-9-_.]. |
| 1: string:MAX_CHILD_NAME_LENGTH name; |
| |
| /// The child component's URL. |
| /// |
| /// Must be non-empty and a well-formed URL. |
| 2: string:MAX_URL_LENGTH url; |
| |
| /// The startup mode for the component instance. |
| 3: StartupMode startup; |
| |
| // TODO(CP-154): Provide a way to supply parameters to the child, possibly |
| // as command-line arguments, by URL, or maybe in some other way which is |
| // orthogonal to other inputs to mitigate confused deputy issues. Perhaps |
| // as a dictionary like we do for runners? |
| }; |