| // Copyright 2025 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.component.internal; |
| |
| using fuchsia.component.sandbox; |
| using fuchsia.component.decl; |
| |
| /// A component's sandbox, which holds all of the capabilities that a component |
| /// has access to, can provide to the system, and makes available to its |
| /// children. |
| @available(added=HEAD) |
| type ComponentSandbox = resource table { |
| 1: component_input fuchsia.component.sandbox.DictionaryRef; |
| 2: component_output fuchsia.component.sandbox.DictionaryRef; |
| 3: program_input fuchsia.component.sandbox.DictionaryRef; |
| 4: program_output fuchsia.component.sandbox.DictionaryRef; |
| 5: reserved fuchsia.component.sandbox.DictionaryRef; |
| 6: capability_sourced fuchsia.component.sandbox.DictionaryRef; |
| 7: declared_dictionaries fuchsia.component.sandbox.DictionaryRef; |
| 8: child_inputs vector<ChildInput>; |
| 9: collection_inputs vector<ChildInput>; |
| }; |
| |
| @available(added=HEAD) |
| type ChildInput = resource struct { |
| child_name fuchsia.component.decl.child_name; |
| child_input fuchsia.component.sandbox.DictionaryRef; |
| }; |
| |
| @discoverable(server="platform") |
| @available(added=HEAD) |
| open protocol ComponentSandboxRetriever { |
| flexible GetMySandbox() -> (ComponentSandbox); |
| }; |