| // Copyright 2019 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; |
| |
| /// Declares a capability exposed to a component's containing realm, such as a |
| /// legacy service exposed by the component or one of its children at runtime. |
| xunion ExposeDecl { |
| ExposeServiceDecl service; |
| ExposeLegacyServiceDecl legacy_service; |
| ExposeDirectoryDecl directory; |
| }; |
| |
| /// Declares a service exposed to a component's containing realm, such as a |
| /// service exposed by the component or one of its children at runtime. |
| /// |
| /// To learn more about services, see: |
| /// https://fuchsia.dev/fuchsia-src/glossary#service |
| table ExposeServiceDecl { |
| /// The provider of the capability relative to the component itself. Must |
| /// be `self` or `child`. |
| 1: Ref source; |
| |
| /// Path identifying the service, by which it was presented to this |
| /// component. |
| /// |
| /// Must be an absolute path starting with /. |
| 2: string:MAX_PATH_LENGTH source_path; |
| |
| /// The path by which the capability is being exposed. |
| /// |
| /// Must be an absolute path starting with /. |
| 3: string:MAX_PATH_LENGTH target_path; |
| }; |
| |
| /// Declares a legacy service exposed to a component's containing realm, such as |
| /// a legacy service exposed by the component or one of its children at runtime. |
| /// |
| /// A legacy service is a service with a single instance, provided by a single |
| /// FIDL protocol. |
| table ExposeLegacyServiceDecl { |
| /// The provider of the capability relative to the component itself. Must |
| /// be `self` or `child`. |
| 1: Ref source; |
| |
| /// Path identifying the legacy service, by which it was presented to this |
| /// component. |
| 2: string:MAX_PATH_LENGTH source_path; |
| |
| /// The path by which the capability is being exposed. |
| /// |
| /// Must be an absolute path starting with /. |
| 3: string:MAX_PATH_LENGTH target_path; |
| }; |
| |
| /// Declares a directory exposed to a component's containing realm, such as a |
| /// directory exposed by the component or one of its children at runtime. |
| table ExposeDirectoryDecl { |
| /// Path identifying the directory, by which it was presented to this |
| /// component. |
| 1: string:MAX_PATH_LENGTH source_path; |
| |
| /// The provider of the capability relative to the component itself. Must |
| /// be `self` or `child`. |
| 2: Ref source; |
| |
| /// The path by which the capability is being exposed. |
| /// |
| /// Must be an absolute path starting with /. |
| 3: string:MAX_PATH_LENGTH target_path; |
| }; |